2 Replies Latest reply on Apr 22, 2009 1:19 AM by Cruz Fernandez

    Problem with Maven Instrumentation Plugin

    Cruz Fernandez Newbie

      I have tried to integrate the maven-plugin that instrumentates classes to my maven-build-project.

      I configured it like this:


      and added the pluginrepo:

                <name>SEam jboss</name>

      The problem is that when I have a dependency of the scope provided, it is not being used on the classpath of the instrumentator (NoClassDefFound error).

      I have modified the MOJO plugin to use a compile scope (the default is runtime, where the dependency provided is not include), and it was fixed:

      Index: src/main/java/org/jboss/seam/wicket/InstrumentationMojo.java
      --- src/main/java/org/jboss/seam/wicket/InstrumentationMojo.java     (revisión: 10298)
      +++ src/main/java/org/jboss/seam/wicket/InstrumentationMojo.java     (copia de trabajo)
      @@ -20,7 +20,7 @@
        * This mojo takes classes specified with the "includes" parameter in the plugin configuration
        * and instruments them with Seam's Wicket JavassistInstrumentor.
        * @goal instrument
      - * @requiresDependencyResolution
      + * @requiresDependencyResolution compile
        * @phase process-classes
       public class InstrumentationMojo extends AbstractMojo

      is this a real fix? Should I open a JIRA issue?