[ http://jira.codehaus.org/browse/MNG-2242?page=all ]

John Casey updated MNG-2242:
----------------------------

    Fix Version: 2.1

> mvn command gives a Null Pointer Exception when a plugin is invalid
> -------------------------------------------------------------------
>
>          Key: MNG-2242
>          URL: http://jira.codehaus.org/browse/MNG-2242
>      Project: Maven 2
>         Type: Bug

>  Environment: Windows XP, Mavne 2.0.2
>     Reporter: Kin Leung
>      Fix For: 2.1
>  Attachments: pom.xml
>
>
> I tried to use xdoclet with Maven 2.0.2 by adding those lines in pom.xml:
>   <build>
>     <finalName>bookstore-web</finalName>
>     <plugins>
>        <plugin>
>          <groupId>xdoclet</groupId>
>          <artifactId>maven-xdoclet-plugin</artifactId>
>          <version>1.2</version>
>          <executions>
>             <execution>
>               <id>generate-deployment-decriptor</id>
>               <phase>generate-sources</phase>
>               <configuration>
>                 <fileset dir="src/main/java">
>                   <include name="**/*.java"/>
>                 </fileset> 
>                 <webdoclet>
>                    <destinationFile>web.xml</destinationFile>
>                    <destDir>src/main/webapp/WEB-INF</destDir>
>                 </webdoclet>
>                </configuration>
>               <goals>
>                 <goal>webdoclet</goal>
>               </goals>
>             </execution>
>           </executions>
>       </plugin>
>      </plugins>
> After I saved the file and run mvn (mvn install and mvn clean), it gives me 
> Null Pointer Exception:
> Downloading: 
> http://repo1.maven.org/maven2/xdoclet/maven-xdoclet-plugin/1.2/mave
> n-xdoclet-plugin-1.2.pom
> 159b downloaded
> Downloading: 
> http://repo1.maven.org/maven2/xdoclet/maven-xdoclet-plugin/1.2/mave
> n-xdoclet-plugin-1.2.jar
> 34K downloaded
> [INFO] 
> -------------------------------------------------------------------------
> ---
> [ERROR] FATAL ERROR
> [INFO] 
> -------------------------------------------------------------------------
> ---
> [INFO] null
> [INFO] 
> -------------------------------------------------------------------------
> ---
> [INFO] Trace
> java.lang.NullPointerException
>         at 
> org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginM
> anager.java:295)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(De
> faultPluginManager.java:200)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
> inManager.java:165)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
> ultLifecycleExecutor.java:1218)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifec
> ycle(DefaultLifecycleExecutor.java:1182)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycl
> eMappings(DefaultLifecycleExecutor.java:950)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:450)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:303)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:270)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         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] 
> -------------------------------------------------------------------------
> ---
> Looks like something is screwed up when maven attempts to run the plugin for 
> generating the web.xml of my servlet.  I didn't do anything on the 
> settings.xml, does that matter?
> Also the documentation is por and in worse case the poor documentation 
> offsets the benefits of the tool.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to