0

I have a simple Hello World project in AnyPoint Studio. I have folder of additional files (a few jar files and some configuration files) I want to include with the project so they can get published to the cloud (CloudHub). How do I include these files into my project so when I publish my application the additional files are packaged with them.

Part 2 - Say I have a json file I want to read from my Mule application. What path do I reference the json file with after it is published?

aled
  • 8,621
  • 2
  • 17
  • 24

1 Answers1

0
  1. Mule 4 projects are Maven based. You need to reference those jar files as Maven dependencies. You might need to install those projects in your local Maven repository. Search for Maven tutorials if needed. Ideally those JAR files are available in Maven repositories and you add only the dependency snippet in your pom.xml. If you are building yourself you can use mvn install command. If they are third party JAR files that you have the file only you have to use the mvn install but you need to define the coordinates (groupId, artifactId, version) yourself, which is not ideal and Maven won't be able to do automatic dependencies resolution for those JAR files. See this answer for details.

  2. In your source project resource files should be in src/main/resources. At execution time you don't need to add a directory. If you add the file in a subdirectory of src/main/resources you need to use the subdirectory name only.

aled
  • 8,621
  • 2
  • 17
  • 24