Hello,
I need some clarification regarding an issue I have with the generation
of an EAR package. When specifying the correct version of my WAR project
as a dependency in my EAR pom.xml, the EAR file is generated correctly.
However, when I specify a wrong version number, the build still succeeds
and an EAR file is generated. I'm doing this just as a test. I would
expect the build to fail when the EAR project can't find the WAR file it
depends on, but instead it gives a message that it can't find the WAR
file in the local repository and remote repository and uses the
generated WAR file (that is created before the EAR file is created) and
uses that one to include in the EAR package.
This my super pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<name>Tour de France Service</name>
<groupId>nl.doyle.mccloud.TourDeFranceService</groupId>
<version>0.0.1</version>
<artifactId>TourDeFranceService</artifactId>
<packaging>pom</packaging>
<modules>
<module>../TourDeFranceServiceEAR</module>
<module>../TourDeFranceServiceWeb</module>
</modules>
</project>
This my WAR pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<name>Tour de France Service Web</name>
<groupId>nl.doyle.mccloud.TourDeFranceService</groupId>
<artifactId>TourDeFranceServiceWeb</artifactId>
<packaging>war</packaging>
<version>0.0.2</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>../TourDeFranceServiceWeb/WebContent/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
</plugins>
<finalName>TourDeFranceServiceWeb</finalName>
</build>
</project>
And this my EAR pom.xml with the wrong version number of the WAR project:
<project>
<modelVersion>4.0.0</modelVersion>
<name>Tour de France Service EAR</name>
<groupId>nl.doyle.mccloud.TourDeFranceService</groupId>
<artifactId>TourDeFranceServiceEAR</artifactId>
<packaging>ear</packaging>
<version>0.0.1</version>
<dependencies>
<dependency>
<groupId>nl.doyle.mccloud.TourDeFranceService</groupId>
<artifactId>TourDeFranceServiceWeb</artifactId>
<type>war</type>
<version>1.0.2</version>
</dependency>
</dependencies>
<build>
<finalName>TourDeFranceServiceEAR</finalName>
</build>
</project>
This is part of the message that "mvn install" gives me:
Downloading:
http://repo1.maven.org/maven2/nl/doyle/mccloud/TourDeFranceService/TourDeFranceServiceWeb/1.0.2/TourDeFranceServiceWeb-1.0.2.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)
[INFO] [ear:generate-application-xml]
[INFO] Generating application.xml
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [ear:ear]
[INFO] Copying
artifact[war:nl.doyle.mccloud.TourDeFranceService:TourDeFranceServiceWeb:1.0.2]
to[TourDeFranceServiceWeb.war]
How can it copy an artifact that doesn't exist??? It also doesn't exist
in my local repository!!!
With kind regards,
Duncan Doyle
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]