Reputation: 47290
I get no errors, however the class files are no longer copied to target directory ("/WEB-INF/classes/...") when doing my next normal (non clean) build.
Thanks muchly for any help, I am learning maven.
When I say normal build, I am using war:war from within eclipse.
Upvotes: 3
Views: 1565
Reputation: 4392
I find it's helpful to give Eclipse builds a separate directory from Maven CLI builds:
Insert the following into your pom.xml. The existence of the "m2e.version" property will activate the following profile which alters the location of the Eclipse build
<profiles>
<profile>
<id>IDE</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<!-- Put the IDE's build output in a folder other than target, so that IDE builds don't interact with Maven builds -->
<directory>target-ide</directory>
</build>
</profile>
Upvotes: 0
Reputation: 5739
mvn clean is supposed to cleanup the target directory as per the clean lifecycle phase. You have to compile the source again using compile plugin.
You can use mvn clean compile war:war to create the war.
Or you can invoke the default lifecyle by running mvn install
Upvotes: 1
Reputation: 10154
When running mvn war:war
, you don't run the normal maven life cycle, which beyond others includes the classes compilation. So basically you have no compiled classes to be added to WEB-INF/classes
since you didn't compile them.
Just run mvn install
and it should work.
Upvotes: 6