Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2-beta-1
-
None
-
None
Description
How to reproduce:
- create a new project with
mvn archetype:create -DgroupId=org.sample -DartifactId=sample2 - modify the pom.xml, adding maven-assembly-plugin configuration (see below)
- run mvn assembly:directory or mvn assemby:assembly
Expected result: the created directory target/sample2-1.0-SNAPSHOT-jar-with-dependencies.dir or JAR target/sample2-1.0-SNAPSHOT-jar-with-dependencies.jar should contain files META-INF/maven/org.sample/sample2/pom.properties and META-INF/maven/org.sample/sample2/pom.xml,
as in the example in http://maven.apache.org/plugins/maven-assembly-plugin/usage.html.
Actual result: no pom.xml and pom.properties in the created directory or JAR.
This is the pom.xml:
<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> <groupId>org.sample</groupId> <artifactId>sample2</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>sample2</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-1</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> </build> <pluginRepositories> <pluginRepository> <id>pluginrepo</id> <url>http://repo1.maven.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </project>