0
votes

I have mule configured as a maven project in eclipse and I reference some resources from the src/test/resources. However it seems like mule deletes these files when it is deployed onto mule server . How can I stop it from doing that?

EDIT:. Even if I were to persist it in src/main/resources.mule copies it to the root folder(classes) and doesnt actually create the src/main/resources folder . I have test cases that look against src/main(or test)/resources. How do I work around that?

3
can you look up for your resource using classpath:resourceName? - Vihar

3 Answers

1
votes

Why you want to persist src/test/resources - its against maven convention.

You should put your property files in src/main/resources folder instead. src/main/resources will be added to deployable archive.

0
votes

src/test/resources is only used during the test phase of a Maven project. If you need resources within your deployment you need to place them in src/main/resources. Anything in src/main/resources should get copied to the classes folder of your Mule deployment archive.

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

0
votes

Maybe this question is somewhat similar to your query(Not exactly same) but you might get an idea for the way forward How to can I make maven build add resources to classpath?