0
votes

I'm writing up a basic REST Connector in Anypoint Studio (MULE). I have the connector, containing a @RestCall that returns a JSON2POJO object generated with the recommended jsonschema2pojo tool.

I am lead to believe from the documentation that I should not have to add any additional dependencies to my pom.xml file.

However, when attempting to Install/Upgrade the connector, I get the following error message:

[ERROR] C:\Users\Nbarnier\AnypointStudio\workspace\brightpearl-connector\src\main\java\com\briteskies\mule\brightpearl\BrightpearlConnector.java:27: Some dependencies need to be added to the pom.xml in order to complete the generate-sources lifecycle phase:
public abstract class BrightpearlConnector
                ^

  <dependency>
     <artifactId>mule-transport-http</artifactId>
     <groupId>org.mule.transports</groupId>
     <version>[3.0.0,4.0.0)</version>
     <scope>compile</scope>
  </dependency>

Obviously I've tried adding the <dependency> shown there, but that results in the following error:

Failed to execute goal on project brightpearl-connector: Could not resolve dependencies for project com.briteskies.mule:brightpearl-connector:mule-module:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.transports:mule-transport-http:jar:3.3.4-SNAPSHOT: Failed to read artifact descriptor for org.mule.transports:mule-transport-http:jar:3.3.4-SNAPSHOT: Failure to find org.mule:mule:pom:3.3.4-20141128.150754-35 in http://repository.mulesoft.org/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of mulesoft-snapshots has elapsed or updates are forced

How do I get this to compile?

1

1 Answers

1
votes

Don't use a range like this: [3.0.0,4.0.0)

There are important variations in internal APIs in Mule that could throw transports off if you run one version against the other.

Instead be specific. If you target, say, the Mule 3.5.0 Runtime then use:

<dependency>
   <artifactId>mule-transport-http</artifactId>
   <groupId>org.mule.transports</groupId>
   <version>3.5.0</version>
   <scope>compile</scope>
</dependency>