Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: maven-archiver-2.4
-
Fix Version/s: None
-
Component/s: maven-archiver
-
Labels:None
-
Number of attachments :
Description
In the current implementation of the JAR packaging, the POM file is copied as is to META-INF/maven/groupId/artifactId/pom.xml. The POM inheritance makes this file useless to identify this artifact outside the maven environment.
For example:
In the parent POM
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
in the child POM
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
The child POM now declare dependency to junit:junit but there is no way to identify the version, scope or classifier and therefore i suggest attach a modified version of the POM to the artifact JAR file to provide the full information without inheritance or variables, so its become:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
</dependencies>
Its very useful to make the artifact standalone and identifiable by any external systems.
Thanks you.