I have a case where I need to build what could be considered a patch between 2 versions of the same object. I am using Maven 3.1.1
<dependency>
<groupId>my.group.id</groupId>
<artifactId>artifact1</artifactId>
<!-- managed version from parent pom -->
<!-- 1.0.1-SNAPSHOT -->
<type>zip</type>
</dependency>
<dependency>
<groupId>my.group.id</groupId>
<artifactId>artifact1</artifactId>
<version>1.0.0</version>
<type>zip</type>
</dependency>
I use the maven-dependency-plugin to unzip them into different directories during the build process. The exec-maven-plugin is used to execute an external tool that creates what is essentially a patch.
This all works.
The problem is a warning
[WARNING] [WARNING] Some problems were encountered while building the effective model for my.group.id:build-patch:pom:1.0.1-SNAPSHOT [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: my.group.id:artifact1:zip -> version (?) vs 1.0.0 @ my.group.id:build-patch:[unknown-version], /my/jenkins/workspace/directory/stuff/build-patch/pom.xml, line 163, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING]
I know this is only a warning
However I want to make the build as clean as possible. Also note that the groupId:artifactId:type:classifier will never be unique. How can I set this up so that there are no warnings? Does anyone else suspect that this may be a problem in the future?