Jetty Maven plugin - put properties file in classpath

I am using the eclipse jetty plugin in my project:

<groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.0.3.v20130506</version> 

I have an application that reads a file in the server class path, but I cannot put it in the Jetty class path ...

I would like to put it in a folder in my project and make this folder part of the Jetty class path, how can I do this?
Is there a better solution to make this file external to the application?

+3
source share
1 answer

It was a maven plugin configuration issue

  <configuration>
     <scanIntervalSeconds> 10 </scanIntervalSeconds>
     <jettyXml> jetty / jetty.xml </jettyXml>
     <webApp>
         <extraClasspath> $ {basedir} / jetty / classpath </extraClasspath>
     </webApp>
 </configuration>

to add the classpath folder to Jetty, she needs the extraClasspath folder in the webApp tag.

+4
source

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


All Articles