[
https://jira.codehaus.org/browse/MASSEMBLY-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=276677#comment-276677
]
Martin Ellis commented on MASSEMBLY-556:
----------------------------------------
My user settings are based on the settings described here:
http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
As a workaround, I've managed to build our project with the following settings
file (note that 'nexus' resolves to our local Nexus instance):
{code:xml}
<settings>
<profiles>
<profile>
<id>no-mirrors</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>nexus</id>
<layout>default</layout>
<url>http://nexus/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<url>http://nexus/content/groups/public</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
{code}
> mvn assembly:assembly NPEs with install:install-file'd artifacts
> ----------------------------------------------------------------
>
> Key: MASSEMBLY-556
> URL: https://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 (Faux)
> Assignee: John Casey
> Fix For: 2.3
>
> Attachments: build.log, massembly-556.tar.gz, 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira