You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tony Chemit (JIRA)" <ji...@codehaus.org> on 2012/06/21 11:04:21 UTC

[jira] (MPLUGIN-213) NullPointerException in descriptor goal

Tony Chemit created MPLUGIN-213:
-----------------------------------

             Summary: NullPointerException in descriptor goal
                 Key: MPLUGIN-213
                 URL: https://jira.codehaus.org/browse/MPLUGIN-213
             Project: Maven 2.x Plugin Tools
          Issue Type: Bug
          Components: maven-plugin-tools-java
    Affects Versions: 3.0
            Reporter: Tony Chemit
            Priority: Blocker
         Attachments: patch.diff

I have this definition  :

{code}
@Mojo( name = "aggregate-add-third-party", requiresProject = true, aggregator = true,
       defaultPhase = LifecyclePhase.GENERATE_RESOURCES )
@Execute( goal = "add-third-party" )
{code}

And this exeception then while building : 

{code}
Caused by: java.lang.NullPointerException
	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.toMojoDescriptors(JavaAnnotationsMojoDescriptorExtractor.java:522)
	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:110)
	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108)
	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:245)
	at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:88)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	... 20 more
{code}

I had a look to the code and it is normal (I think)

{code}
if ( execute != null )
{
    mojoDescriptor.setExecuteGoal( execute.goal() );
    mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
    mojoDescriptor.setExecutePhase( execute.phase().id() );
}
{code}

but should be 

{code}
if ( execute != null )
{
    mojoDescriptor.setExecuteGoal( execute.goal() );
    mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
    if ( execute.phase() != null )
    {
        mojoDescriptor.setExecutePhase( execute.phase().id() );
    }
}
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPLUGIN-213) NullPointerException in descriptor goal

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MPLUGIN-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MPLUGIN-213:
---------------------------------

    Fix Version/s: 3.1
    
> NullPointerException in descriptor goal
> ---------------------------------------
>
>                 Key: MPLUGIN-213
>                 URL: https://jira.codehaus.org/browse/MPLUGIN-213
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Bug
>          Components: maven-plugin-tools-java
>    Affects Versions: 3.0
>            Reporter: Tony Chemit
>            Assignee: Olivier Lamy
>            Priority: Blocker
>             Fix For: 3.1
>
>         Attachments: patch.diff
>
>
> I have this definition  :
> {code}
> @Mojo( name = "aggregate-add-third-party", requiresProject = true, aggregator = true,
>        defaultPhase = LifecyclePhase.GENERATE_RESOURCES )
> @Execute( goal = "add-third-party" )
> {code}
> And this exeception then while building : 
> {code}
> Caused by: java.lang.NullPointerException
> 	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.toMojoDescriptors(JavaAnnotationsMojoDescriptorExtractor.java:522)
> 	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:110)
> 	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108)
> 	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:245)
> 	at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:88)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	... 20 more
> {code}
> I had a look to the code and it is normal (I think)
> {code}
> if ( execute != null )
> {
>     mojoDescriptor.setExecuteGoal( execute.goal() );
>     mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
>     mojoDescriptor.setExecutePhase( execute.phase().id() );
> }
> {code}
> but should be 
> {code}
> if ( execute != null )
> {
>     mojoDescriptor.setExecuteGoal( execute.goal() );
>     mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
>     if ( execute.phase() != null )
>     {
>         mojoDescriptor.setExecutePhase( execute.phase().id() );
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPLUGIN-213) NullPointerException in descriptor goal

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MPLUGIN-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy reassigned MPLUGIN-213:
------------------------------------

    Assignee: Olivier Lamy
    
> NullPointerException in descriptor goal
> ---------------------------------------
>
>                 Key: MPLUGIN-213
>                 URL: https://jira.codehaus.org/browse/MPLUGIN-213
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Bug
>          Components: maven-plugin-tools-java
>    Affects Versions: 3.0
>            Reporter: Tony Chemit
>            Assignee: Olivier Lamy
>            Priority: Blocker
>             Fix For: 3.1
>
>         Attachments: patch.diff
>
>
> I have this definition  :
> {code}
> @Mojo( name = "aggregate-add-third-party", requiresProject = true, aggregator = true,
>        defaultPhase = LifecyclePhase.GENERATE_RESOURCES )
> @Execute( goal = "add-third-party" )
> {code}
> And this exeception then while building : 
> {code}
> Caused by: java.lang.NullPointerException
> 	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.toMojoDescriptors(JavaAnnotationsMojoDescriptorExtractor.java:522)
> 	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:110)
> 	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108)
> 	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:245)
> 	at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:88)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	... 20 more
> {code}
> I had a look to the code and it is normal (I think)
> {code}
> if ( execute != null )
> {
>     mojoDescriptor.setExecuteGoal( execute.goal() );
>     mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
>     mojoDescriptor.setExecutePhase( execute.phase().id() );
> }
> {code}
> but should be 
> {code}
> if ( execute != null )
> {
>     mojoDescriptor.setExecuteGoal( execute.goal() );
>     mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
>     if ( execute.phase() != null )
>     {
>         mojoDescriptor.setExecutePhase( execute.phase().id() );
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPLUGIN-213) NullPointerException in descriptor goal

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MPLUGIN-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MPLUGIN-213.
--------------------------------

    Resolution: Fixed

applied.
Thanks!
                
> NullPointerException in descriptor goal
> ---------------------------------------
>
>                 Key: MPLUGIN-213
>                 URL: https://jira.codehaus.org/browse/MPLUGIN-213
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Bug
>          Components: maven-plugin-tools-java
>    Affects Versions: 3.0
>            Reporter: Tony Chemit
>            Assignee: Olivier Lamy
>            Priority: Blocker
>             Fix For: 3.1
>
>         Attachments: patch.diff
>
>
> I have this definition  :
> {code}
> @Mojo( name = "aggregate-add-third-party", requiresProject = true, aggregator = true,
>        defaultPhase = LifecyclePhase.GENERATE_RESOURCES )
> @Execute( goal = "add-third-party" )
> {code}
> And this exeception then while building : 
> {code}
> Caused by: java.lang.NullPointerException
> 	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.toMojoDescriptors(JavaAnnotationsMojoDescriptorExtractor.java:522)
> 	at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:110)
> 	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108)
> 	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:245)
> 	at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:88)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	... 20 more
> {code}
> I had a look to the code and it is normal (I think)
> {code}
> if ( execute != null )
> {
>     mojoDescriptor.setExecuteGoal( execute.goal() );
>     mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
>     mojoDescriptor.setExecutePhase( execute.phase().id() );
> }
> {code}
> but should be 
> {code}
> if ( execute != null )
> {
>     mojoDescriptor.setExecuteGoal( execute.goal() );
>     mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
>     if ( execute.phase() != null )
>     {
>         mojoDescriptor.setExecutePhase( execute.phase().id() );
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira