Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1
    • Labels:
      None
    • Flags:
      Patch

      Description

      I have this definition :

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

      And this exeception then while building :

      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
      

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

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

      but should be

      if ( execute != null )
      {
          mojoDescriptor.setExecuteGoal( execute.goal() );
          mojoDescriptor.setExecuteLifecycle( execute.lifecycle() );
          if ( execute.phase() != null )
          {
              mojoDescriptor.setExecutePhase( execute.phase().id() );
          }
      }
      
      1. patch.diff
        1.0 kB
        Tony Chemit

        Activity

        Tony Chemit created issue -
        Olivier Lamy (*$^¨%`£) made changes -
        Field Original Value New Value
        Assignee Olivier Lamy [ olamy ]
        Olivier Lamy (*$^¨%`£) made changes -
        Fix Version/s 3.1 [ 18553 ]
        Olivier Lamy (*$^¨%`£) made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Tony Chemit made changes -
        Link This issue is depended upon by MLICENSE-41 [ MLICENSE-41 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 12:08:28 UTC 2015 [ 1428235708524 ]
        Mark Thomas made changes -
        Workflow jira [ 12723198 ] Default workflow, editable Closed status [ 12756228 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:41:51 UTC 2015 [ 1428280911727 ]
        Mark Thomas made changes -
        Workflow jira [ 12960721 ] Default workflow, editable Closed status [ 12997270 ]

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Tony Chemit
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development