Maven plugin for jetty and resource catalog

Should I expect the files in main / resources to be in the classpath when the maven plugin starts? So they will be available for the application in which I work inside the pier? Will I be able to load them as class resources, and not through the file system?

The same question is about running junit tests inside Eclipse using the Eclipse Maven plugin.

If this directory is not in the classpath, can I add it?

+3
source share
1 answer

Resources from are src/main/resourcescopied in target/classesduring the phase process-resources, so yes, they will be on the way to the class when starting the maven berth plugin. They will also be available when doing unit tests (actually see this previous answer ). This is used internally in Eclipse and on the command line.

+6
source

Source: https://habr.com/ru/post/1748620/


All Articles