MyProject > src
> target
> MyProject > classes (1)
> classes (2)
The actual newly compiled code is being put into 2, however the war file is getting created using 1. Thus my war file is not up to date at all.
What should I be doing ? Shown below snippet of my pom … :
<build>
<finalName>MyProject</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
<warName>MyProject</warName>
</configuration>
<version>2.1.1</version>
</plugin>
</plugins>
</build>
target/PROJ is nothing but exploded war.
try deleting target directory. Perform maven build from commandline. and check if all things are created as they are at this point. If so, then maven is behaving correctly as both of the places contains updated class files and that target/PROJ directory is exploded war directory. You can use path to that directory to setup a context in tomcat/web container.