1 Reply Latest reply on Sep 29, 2009 11:30 AM by galder.zamarreno

    Accessing maven dependency class from exec-maven-plugin clas

    galder.zamarreno

      Hi,

      In Infinispan, we do some post processing of classes to generate JMX documentation by scanning annotations. We do this via a javadoc Doclet that gives us com.sun.javadoc.RootDoc instance which we can loop to check all classes for annotations.

      Now, I'd like to use a similar approach that allowed me to generate jopr plugin's rhq-plugin.xml and this processing should involve a similar annotation scanning process before building the infinispan jopr plugin jar.

      The obvious thing to do looks to me to have a executable class that is executed before process-classes and that generates the plugin xml. However, how do I get access to the list of maven dependency classes?

      I could maybe use a doclet cos I'd get a RootDoc instance but this expects some kind of docletArtifcact where to lookup the doclet is precisely before this artifact is generated that I want to execute this doclet.

      Thoughts?

        • 1. Re: Accessing maven dependency class from exec-maven-plugin
          galder.zamarreno

          Right now, the only way I see being able to do this, which I find rather ugly, is to have a 2nd jopr maven project with only the generator doclet in it. The main jopr plugin project would then run the doclet from that artifact and generate the xml at the process-classes phase.

          One thing I've realised that even if I could get hold of the classpath in the executable to run on the main jopr plugin project, this project would need to have dependencies in all the rest of projects that could contain classes that need scanning, and this could have issues in the future.