Maven Plugin Tools
  1. Maven Plugin Tools
  2. MPLUGIN-225

Make MojoExecution available as Component compatible with Maven 2

    Details

    • Number of attachments :
      0

      Description

      Just like MavenProject it is possible to define the MojoExecution as:

      @Component
      private MojoExecution mojoExecution ;
      

      but actually generated descriptor works only for Maven 3, not for Maven 2

        Issue Links

          Activity

          Hide
          Herve Boutemy added a comment -

          it's already done in MPLUGIN-204, with ITs (java-basic and java-basic-annotations) which check MojoExecution recognition

          or I'm missing something

          Show
          Herve Boutemy added a comment - it's already done in MPLUGIN-204 , with ITs (java-basic and java-basic-annotations) which check MojoExecution recognition or I'm missing something
          Hide
          Robert Scholte added a comment -

          Actually it was Mark Struberg who hit this first.

          In the FirstMojo.java file of the IT I do see a the @Component annotated MojoExecution but does it work?.
          I'm referring to something like http://mojo.codehaus.org/cobertura-maven-plugin/xref/org/codehaus/mojo/cobertura/AbstractCoberturaMojo.html#71
          MPLUGIN-204 talks about $

          {mojo}

          , not about $

          {mojoExecution}

          . Could that be a problem?

          Show
          Robert Scholte added a comment - Actually it was Mark Struberg who hit this first. In the FirstMojo.java file of the IT I do see a the @Component annotated MojoExecution but does it work?. I'm referring to something like http://mojo.codehaus.org/cobertura-maven-plugin/xref/org/codehaus/mojo/cobertura/AbstractCoberturaMojo.html#71 MPLUGIN-204 talks about $ {mojo} , not about $ {mojoExecution} . Could that be a problem?
          Hide
          Herve Boutemy added a comment -

          fixed in r1405318

          generated default value was $

          {mojo}

          , which is only recognized by Maven 3

          replaced by $

          {mojoExecution}

          , which is recognized by Maven 2 too

          Show
          Herve Boutemy added a comment - fixed in r1405318 generated default value was $ {mojo} , which is only recognized by Maven 3 replaced by $ {mojoExecution} , which is recognized by Maven 2 too

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              Robert Scholte
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: