Search code examples
policymule-componentanypoint-studiomulesoftmule4

MuleSoft 4 API Gateway HTTP Policy Transform Error


I am trying to download the module API Gateway HTTP Policy Transform from Exchange to create custom policy but unfortunately I encounter an error, ideas to solve this problem ?

I am using AnypointStudio 7.2.3

I also added the dependencies to my pom :

  <dependency>
    <groupId>68ef9520-24e9-4cf2-b2f5-620025690913</groupId>
    <artifactId>mule-http-policy-transform-extension</artifactId>
    <version>3.0.0</version>
    <classifier>mule-plugin</classifier>
  </dependency>

In my maven settings.xml i have the reference to the mule entreprise repositories :

      <repository>
            <id>MuleRepository</id>
            <name>MuleRepository</name>
            <url>https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
      </repository>

attached the screenshot of the error :

Error image : API Gateway HTTP Policy Transform


Solution

  • The groupId being a unique identifier is a hint that this dependency comes from your organization in Anypoint Exchange. You need to configure Exchange as a repository to consume it:

      <repositories>
        <repository>
          <id>Repository</id>
          <name>Corporate Repository</name>
          <url>https://maven.anypoint.mulesoft.com/api/v1/organizations/ORG_ID/maven</url>
          <layout>default</layout>
        </repository>
    

    Note that you have to replace ORG_ID for your organization ID, which should be the groupId from your artifact.

    Full instructions: https://docs.mulesoft.com/exchange/to-publish-assets-maven#consume-an-exchange-asset-with-maven