tags:

views:

25

answers:

0

Hi,

After following what was in this thread http://stackoverflow.com/questions/1769586/maven-war-dependency I tried to apply this to my project.

The project I'm working on requires to use some of the classes provided by a WAR file. I've added to my pom.xml the following:

.... com.foo my-war 1.0.2/version> war com.foo my-war 1.0.2 warpath ..... org.appfuse maven-warpath-plugin 2.0.2 true add-classes

But while compiling I get an errror but can't figure out the issue. Any help would be appreicated.

When I try to compile this with Eclipse I get the following error: [WARNING] Attempting to build MavenProject instance for Artifact (org.apache.maven.plugins:maven-eclipse-plugin:2.9-20100706.060738-71) of type: maven-plugin; constructing POM artifact instead. [WARNING] Attempting to build MavenProject instance for Artifact (org.apache.maven.plugins:maven-eclipse-plugin:2.9-20100706.060738-71) of type: maven-plugin; constructing POM artifact instead. [INFO] [statemgmt:start-fork] [INFO] Starting forked execution [fork id: -1177171160]

[INFO] [warpath:add-classes]

constituent[0]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/aspectjrt-1.5.3.jar constituent[1]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/commons-cli-1.0.jar constituent[2]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/doxia-sink-api-1.0-alpha-9.jar constituent[3]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/jsch-0.1.27.jar constituent[4]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/jtidy-4aug2000r7-dev.jar constituent[5]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-artifact-3.0-SNAPSHOT.jar constituent[6]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-core-2.1-SNAPSHOT.jar constituent[7]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-embedder-2.1-SNAPSHOT.jar constituent[8]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-lifecycle-2.1-SNAPSHOT.jar constituent[9]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-model-2.1-SNAPSHOT.jar constituent[10]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-plugin-api-2.1-SNAPSHOT.jar constituent[11]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-profile-2.1-SNAPSHOT.jar constituent[12]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-project-2.1-SNAPSHOT.jar constituent[13]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-reporting-api-2.1-SNAPSHOT.jar constituent[14]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-toolchain-2.1-SNAPSHOT.jar constituent[15]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/maven-workspace-2.1-SNAPSHOT.jar constituent[16]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/plexus-container-default-1.0-alpha-44.jar constituent[17]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/plexus-interactivity-api-1.0-alpha-6.jar constituent[18]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/plexus-interpolation-1.0-SNAPSHOT.jar constituent[19]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/plexus-utils-1.5.1.jar constituent[20]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-file-1.0-beta-2.jar constituent[21]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-http-lightweight-1.0-beta-2.jar constituent[22]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-http-shared-1.0-beta-2.jar constituent[23]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-provider-api-1.0-beta-2.jar constituent[24]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-ssh-1.0-beta-2.jar constituent[25]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-ssh-common-1.0-beta-2.jar

constituent[26]: file:/C:/Program%20Files/Surf/Common/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/wagon-ssh-external-1.0-beta-2.jar

java.lang.NullPointerException at org.appfuse.AddClassesMojo.getWarClassesDependency(AddClassesMojo.java:208) at org.appfuse.AddClassesMojo.execute(AddClassesMojo.java:144) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149) at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223) at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1) at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904) at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176) at org.apache.maven.cli.MavenCli.main(MavenCli.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:408) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351) at org.codehaus.classworlds.Launcher.main(Launcher.java:31)

related questions