Reputation: 447
given this configuration:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<jettyConfig>${basedir}/src/main/config/jetty.xml</jettyConfig>
<jettyEnvXml>${project.build.directory}/jetty/jetty-env.xml</jettyEnvXml>
<classesDirectory>${project.build.directory}/classes</classesDirectory>
<scanIntervalSeconds>1</scanIntervalSeconds>
</configuration>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.3-603.jdbc4</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
</dependencies>
</plugin>
I have some new values in src/main/java/com.mypackage/myproperties.properties which is a perfect copy of src/main/java/com.mypackage/myproperties.properties coming from a WAR declared as a dependency in the pom.xml
When I start mvn jetty:run , the overlay takes place, and my file is in target/classes instead of the original one, with the new values as expected.
BTW jetty keeps serving the original file and I can't really figure out why or from where.
Thanks for any hints, I've been spending almost 8 hours searching and experimenting on this...
Bau, Wiz
Upvotes: 1
Views: 829
Reputation: 447
I found out that Jetty wants a full package with all its classes (and .properties) otherwise it just won't allow the single new file to override the original one.
Upvotes: 2
Reputation: 24617
Maven caches files for the jetty plugin in a local repository for offline mode. You can use the settings to find out where this is and delete it.
Upvotes: 0