- This topic has 6 replies, 2 voices, and was last updated 15 years, 8 months ago by mdurbin.
-
AuthorPosts
-
mdurbinMemberMaven MyEclipse 7.0 fails to build war with current classes
I can do the exact same thing in MyEclipse 6.0 and the classes are current
Here are some details to the
Version: 7.0
Build id: 7.0-20081201It is likely not in the cvs project as the exact same project in MyEclise 6.0 work and does not generate the most current class in the ./WEB-INF/class of the war file
Here is part the debug mode of maven output during package goal
DEBUG] – WEB-INF/classes/com/tektools/ttlgs/servlets/Training4Servlet.class wasn’t copied because it has already been packaged for overlay[currentBuild].
[DEBUG] – WEB-INF/classes/com/tektools/ttlgs/servlets/Training5Servlet.class wasn’t copied because it has already been packaged for overlay[currentBuild].
[DEBUG] – WEB-INF/classes/com/tektools/ttlgs/servlets/Training6Servlet.class wasn’t copied because it has already been packaged for overlay[currentBuild].
[DEBUG] – WEB-INF/classes/com/tektools/ttlgs/servlets/TrainingServlet.class wasn’t copied because it has already been packaged for overlay[currentBuild].
mdurbinMemberPutting the following entry into the pom.xml (or settings.xml not to screw up the other developers) seems (so far) to fix the problem. Note I was doing a clean before but it was working to package the new classes.
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/WEB-INF/</directory>
<includes>
<include>lib/</include>
<include>classes</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
support-eugeneMemberI can’t see the issue? Is this breaking your build?
MyEclipse compiles all Java files on-the-fly. On my setup Maven only says that “nothing to compile”.
mdurbinMemberIt does break the build in that it creates a package war that has older classes in the ./WEB-INF/classes folder. In other words, the package goal runs and makes a war file but the war file contains older classes in it.
support-eugeneMemberDo you use pom.xml generated by MyEclipse or you have customized it somehow?
mdurbinMemberIt was a customer one. In fact, to address the other coders in our team whom do not use MyEclipse … the fix was moved out of the pom.xml and into my own ./m2/settings.xml file.
mdurbinMemberHere is the pom file contents. Recall the fix is in the settings.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd”>
<modelVersion>4.0.0</modelVersion>
<artifactId>OurCompany-main-web</artifactId>
<name>OurCompany-main-web</name>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<description>Our Website</description>
<parent>
<groupId>com.OurCompany</groupId>
<artifactId>OurCompany</artifactId>
<version>1</version>
</parent>
<scm>
<connection>scm:cvs:local:/home/source:OurCompany-main-web</connection>
<developerConnection>scm:cvs:local:/home/source:OurCompany-main-web</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.5</version>
<configuration>
<systemProperties>
<systemPropery>
<name>log4j.configuration</name>
<value>file:./src/main/resources/log4j.xml</value>
</systemPropery>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.0</version>
<configuration>
<goals>install</goals>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>tomcat</groupId>
<artifactId>servlet</artifactId>
<version>4.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.4</version>
</dependency>
<dependency>
<groupId>com.OurCompany</groupId>
<artifactId>profiler-utils</artifactId>
<version>4.9.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project> -
AuthorPosts