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

enabling 'filtered' on 'files' in assembly descriptor yields NullPointerException #82

Closed
jgangemi opened this issue Jan 28, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@jgangemi
Copy link
Collaborator

example assembly.xml snippet

  <files>
    <file>
      <source>src/main/docker/app/startup.sh</source>
      <outputDirectory>/usr/local/bin</outputDirectory>
      <fileMode>0755</fileMode>
      <filtered>true</filtered>
    </file>
  </files>

relevant stacktrace

Caused by: java.lang.NullPointerException
    at org.apache.maven.plugin.assembly.format.ReaderFormatter.createReaderFilter(ReaderFormatter.java:81)
    at org.apache.maven.plugin.assembly.format.ReaderFormatter.access$000(ReaderFormatter.java:41)
    at org.apache.maven.plugin.assembly.format.ReaderFormatter$1.transform(ReaderFormatter.java:116)
    at org.apache.maven.plugin.assembly.archive.phase.FileItemAssemblyPhase$1.getInputStream(FileItemAssemblyPhase.java:130)
    at org.apache.maven.plugin.assembly.archive.phase.FileItemAssemblyPhase$Deferred.<init>(FileItemAssemblyPhase.java:166)
    at org.apache.maven.plugin.assembly.archive.phase.FileItemAssemblyPhase$1.<init>(FileItemAssemblyPhase.java:134)
    at org.apache.maven.plugin.assembly.archive.phase.FileItemAssemblyPhase.execute(FileItemAssemblyPhase.java:125)
    at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:162)
    at org.jolokia.docker.maven.assembly.DockerAssemblyManager.createArchiveFromAssembly(DockerAssemblyManager.java:126)
    at org.jolokia.docker.maven.assembly.DockerAssemblyManager.create(DockerAssemblyManager.java:55)
    at org.jolokia.docker.maven.BuildMojo.buildImage(BuildMojo.java:66)
    at org.jolokia.docker.maven.BuildMojo.executeInternal(BuildMojo.java:58)
    at org.jolokia.docker.maven.AbstractDockerMojo.execute(AbstractDockerMojo.java:136)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    ... 20 more

this will require the DockerAssemblyConfigurationSource to return an implementation of MavenReaderFilter. i think this is a simple as returning an instance of DefaultMavenReaderFilter, i just nee to validate that.

@rhuss rhuss added this to the 0.11.1 milestone Feb 6, 2015
@rhuss rhuss added the bug label Feb 6, 2015
jgangemi added a commit to jgangemi/docker-maven-plugin that referenced this issue Feb 19, 2015
- inject the 'MavenReaderFilter' to enable filtering

Signed-off-by: Jae Gangemi <[email protected]>
@jgangemi jgangemi self-assigned this Feb 22, 2015
@rhuss rhuss modified the milestones: 0.11.2, 0.11.1 Mar 1, 2015
@rhuss
Copy link
Collaborator

rhuss commented Mar 1, 2015

fixed in 0.11.2

@rhuss rhuss closed this as completed Mar 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants