Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
WIndowx XP
Description
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.
P.S. I mistakenly created another issue for maven-war (which now I am guessing is only related to maven 1...). MPWAR-51
Attachments
Attachments
Issue Links
- is duplicated by
-
MNG-1289 war:exploded removes content of .class files
- Closed