Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 0.2-maven2
-
Fix Version/s: 1.0.1-beta-2, 1.0.1-beta-3, 1.0.1
-
Component/s: Maven2
-
Labels:None
-
Environment:WinXp
-
Complexity:Intermediate
-
Tested on JDKs:1.5
-
Testcase included:yes
-
Number of attachments :
Description
If project has multiple dependencies to artifacts with same artifactId, groupId but not with type the false artifact can be deployed!
Pom example:
++++++++++++++++++++++
<?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>
<!-- Version: $Revision: 640 $ -->
<!-- URL: $URL: https://svn.sourceforge.net/svnroot/el4j/branches/el4j_1.1-alpha-m2/el4j/framework/tests/remoting/web/pom.xml $ -->
<!-- Date: $Date: 2006-07-21 12:31:31 +0200 (Fr, 21 Jul 2006) $ -->
<!-- Author: $Author: swisswheel $ -->
<parent>
<groupId>ch.elca.el4j.tests</groupId>
<artifactId>el4j-framework-tests-remoting</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>module-remoting-tests-functional_tests</artifactId>
<version>$
</version>
<packaging>pom</packaging>
<name>EL4J module remoting functional tests</name>
<description>
Test module for functional tests of remoting modules of the EL4J framework.
</description>
<dependencies>
<dependency>
<groupId>ch.elca.el4j.tests</groupId>
<artifactId>module-remoting-tests-web</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.elca.el4j.tests</groupId>
<artifactId>module-remoting-tests-web</artifactId>
<type>war</type>
</dependency>
...
</dependencies>
<build>
...
</build>
</project>
++++++++++++++++++++++
To solve this issue I've introduced property "checkType" where you can turn on ckecking the type and not just the artifactId and groupId.
Maven2 config example:
++++++++++++++++++++++
<deployable>
<groupId>ch.elca.el4j.tests</groupId>
<artifactId>module-remoting-tests-web</artifactId>
<type>war</type>
<properties>
<context>module-remoting-tests</context>
</properties>
<pingURL>http://$
:$
{jee-web.port}/module-remoting-tests</pingURL>
<pingTimeout>120000</pingTimeout>
<checkType>true</checkType>
</deployable>
++++++++++++++++++++++
I've written tests for it and all works well!
Cheers,
Martin
Committed revision 2062.