war:exploded removes content of .class files
--------------------------------------------
Key: MPWAR-51
URL: http://jira.codehaus.org/browse/MPWAR-51
Project: maven-war-plugin
Type: Bug
Environment: WIndowx XP
Reporter: Victor Yushenko
To enable development in MyEclipse I have been configuring maven to build a
folder with 'war' extention during the build. This then becomes an expanded
folder that I can just copy (actually MyEclipse does it) to jboss for
deployment.
After the build my folder structure looks like this:
--src
|-----main
...
--target
|---testweb.war
|---css
|---WEB-INF
|---- classes
|---- lib
|---- jsp
I also configure compiler to compile files directy into
target/${project.build.finalName}.war/WEB-INF/classes (which would be a
target/testweb.war/WEB-INF/classes in the example above). This worked great in
maven 1.* (I can change any file, eclipse compiles it into the class folder and
MyEclipse immidiately deployes it to the JBoss). It also seemed to work for few
hours in maven 2 (I only starrted using it today). Now if I do: "mvn package" I
get proper exploded war except that all files in the 'classes' folder have 0
size. It seems that compiler creates good class files (and copies resources
there) and then war plug-in comes along and wipes content of these files (but
not files themselfs):
Here is a snipped from my pom.xml:
<build>
<finalName>testweb.war</finalName>
<outputDirectory>target/${project.build.finalName}.war/WEB-INF/classes</outputDirectory>
<directory>target/war</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>target/${project.build.finalName}.war</webappDirectory>
</configuration>
</plugin>
</plugins>
</build>
As an experimet I did following steps:
mvn compile - this produced expected results, compiled classes in the
WEB-INF/classes folder
then I did:
mvn war:exploded - this command copied files from webapp and removed content
from files produced by the compiler, so that all *.class files now have 0 bytes
size...
Interestingly enough it seemed to work for few hours and then just stoped. I
have rebooted PC just to see and I still get the same result...
my src\main\webapp\WEB-INF folder does not have classes folder, so I am not
sure why war plug-in affects *.class files.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]