Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails with NullPointer on docker:build #214

Closed
computerlyrik opened this issue Jul 8, 2015 · 4 comments
Closed

fails with NullPointer on docker:build #214

computerlyrik opened this issue Jul 8, 2015 · 4 comments

Comments

@computerlyrik
Copy link
Contributor

First: Great plugin
Second: Error giving following 08/15 pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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>de.computerlyrik</groupId>
    <artifactId>docker-mvn-test</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>foo</name>


    <build>
        <plugins>
            <plugin>
                <groupId>org.jolokia</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                                                    <version>0.13.0</version>

                <configuration>
                    <images>
                        <image>
                            <alias>foo</alias>
                            <name>foo</name>
                            <build></build>
                        </image>

                    </images>
                </configuration>
                <executions>
                    <execution>
                        <id>install</id>
                        <phase>install</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>

run mvn install

@computerlyrik
Copy link
Contributor Author

[ERROR] Failed to execute goal org.jolokia:docker-maven-plugin:0.13.0:build (install) on project docker-mvn-test: Execution install of goal org.jolokia:docker-maven-plugin:0.13.0:build failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jolokia:docker-maven-plugin:0.13.0:build (install) on project docker-mvn-test: Execution install of goal org.jolokia:docker-maven-plugin:0.13.0:build 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:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        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:497)
        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 install of goal org.jolokia:docker-maven-plugin:0.13.0:build failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
Caused by: java.lang.NullPointerException
        at org.jolokia.docker.maven.assembly.DockerAssemblyManager.createDockerTarArchive(DockerAssemblyManager.java:85)
        at org.jolokia.docker.maven.AbstractBuildSupporMojo.buildImage(AbstractBuildSupporMojo.java:79)
        at org.jolokia.docker.maven.BuildMojo.executeInternal(BuildMojo.java:36)
        at org.jolokia.docker.maven.AbstractDockerMojo.execute(AbstractDockerMojo.java:147)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        ... 21 more

@computerlyrik
Copy link
Contributor Author

I am trying to emulate the command
docker build -t my-rails-app .
with from=>rails:onbuild

as mentioned here https://registry.hub.docker.com/_/rails/

@rhuss
Copy link
Collaborator

rhuss commented Jul 17, 2015

I don't see what you want to achieve with you plugin configuration. The exception is ugly indeed, and I will fix that for 0.13.3 (0.13.2 is just about to be released).

Maybe you can elaborate a bit on your use case ?

@jgangemi
Copy link
Collaborator

dup of #236 (or #236 was a dup of this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants