maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn Verburg (JIRA)" <j...@codehaus.org>
Subject [jira] (MASSEMBLY-735) NullPointerException at org.apache.commons.compress.archivers.zip.FallbackZipEncoding.encode(FallbackZipEncoding.java:80)
Date Fri, 28 Nov 2014 14:23:10 GMT

    [ https://jira.codehaus.org/browse/MASSEMBLY-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=358201#comment-358201
] 

Martijn Verburg commented on MASSEMBLY-735:
-------------------------------------------

It was all OK under the assembly 2.5 plugin, 2.5.1 showed the regression:

POM snippet:

```
           <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <finalName>java</finalName>
                    <descriptors>
                        <descriptor>src/main/assembly/jar.xml</descriptor>
                        <descriptor>src/main/assembly/zip.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
```

Assembly descriptors involved:

```
<assembly
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">

    <id>simulations-package</id>
    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <baseDirectory>/</baseDirectory>

    <files>
        <file>
            <source>run-simulator.sh</source>
            <destName>run-simulator.sh</destName>
            <outputDirectory>/</outputDirectory>
            <fileMode>744</fileMode>
        </file>
        <file>
            <source>rotate-simulators.sh</source>
            <destName>rotate-simulators.sh</destName>
            <outputDirectory>/</outputDirectory>
            <fileMode>744</fileMode>
        </file>
        <file>
            <source>target/java-simulations.jar</source>
            <destName>java-simulations.jar</destName>
            <outputDirectory>/</outputDirectory>
        </file>
    </files>
</assembly>
```

AND

```
<assembly
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">

    <id>simulations</id>
    <formats>
        <format>jar</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/</outputDirectory>
            <useProjectArtifact>true</useProjectArtifact>
            <unpack>true</unpack>
            <scope>runtime</scope>
        </dependencySet>
    </dependencySets>
</assembly>
```

> NullPointerException at org.apache.commons.compress.archivers.zip.FallbackZipEncoding.encode(FallbackZipEncoding.java:80)
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-735
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-735
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5.1, 2.5.2
>         Environment: Linux
>            Reporter: Martijn Verburg
>            Priority: Blocker
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single
(make-assembly) on project java-simulations: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single
failed. NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single
(make-assembly) on project java-simulations: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single
failed.
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution make-assembly
of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single failed.
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> 	... 19 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.commons.compress.archivers.zip.FallbackZipEncoding.encode(FallbackZipEncoding.java:80)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:542)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:602)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:389)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:314)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:213)
> 	at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:940)
> 	at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:541)
> 	at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:180)
> 	at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:486)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> 	... 20 more



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message