All,
I'm trying to write a custom packing plugin that uses the Maven assembly
descriptors but I'm running into some issues with my class. Just trying
to proof out my concepts, I copied the class DirectoryMojo and changed
the package name, added it to my Maven plugin and built the plugin; the
plugin compiled with no issues.
I then took a simple app with an assembly descriptor and tried to use my
new packing plugin but I'm getting a null exception during the phase
where it builds. Can anyone point me to in the right direction?
-- POM configuration in helloWorld app.
<plugin>
<groupId>org.example.plugin</groupId>
<artifactId>custom-packaging-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/custom.xml</descriptor>
</descriptors>
</configuration>
</plugin>
-- helloWorld build error
[INFO] [sample-project:custom-assembly {execution: default-cli}]
[INFO] Creating custom artifact now...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at
org.apache.maven.plugin.assembly.mojos.AbstractDirectoryMojo.execute(AbstractDirectoryMojo.java:49)
at
org.apache.maven.plugin.assembly.mojos.CustomAssemblyMojo.execute(CustomAssemblyMojo.java:40)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 19 seconds
[INFO] Finished at: Mon May 24 16:53:57 EDT 2010
[INFO] Final Memory: 44M/127M
[INFO]
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]