mvn assembly:assembly NPEs with install:install-file'd artifacts ----------------------------------------------------------------
Key: MASSEMBLY-556 URL: http://jira.codehaus.org/browse/MASSEMBLY-556 Project: Maven 2.x Assembly Plugin Issue Type: Bug Affects Versions: 2.2-beta-5 Environment: Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000) on Win 7 x64, Sun Java 6u24 x64. Reporter: Chris West Attachments: build.log, pom.xml, repository.xml I have 3rd-party jars installed via. {{mvn install:install-file}}. This causes {{mvn assembly:assembly}} to NPE around: {code} Caused by: java.lang.NullPointerException at org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata.getLocalFilename(AbstractRepositoryMetadata.java:61) at org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout.pathOfLocalRepositoryMetadata(DefaultRepositoryLayout.java:72) ... {code} To reproduce, first, install:install-file a random file: {code} mvn install:install-file -Dfile=pom.xml -DgroupId=com.goeswhere.test -DartifactId=a -Dversion=0 -Dpackaging=jar {code} Then, create pom.xml (attached): {code: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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.goeswhere.test</groupId> <artifactId>b</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <dependencies> <dependency> <groupId>com.goeswhere.test</groupId> <artifactId>a</artifactId> <version>0</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>./repository.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build> </project> {code} and repository.xml (attached): {code:xml} <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <id>repository</id> <formats> <format>jar</format> </formats> <repositories> <repository> <includeMetadata>true</includeMetadata> <outputDirectory>maven2</outputDirectory> </repository> </repositories> </assembly> {code} And run {{mvn assembly:assembly}}. See attached build.log. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira