I am trying to write/refine the mevenide Eclise PDE builder maven2 plugin.

 

In essence what this plugin needs to do is to read an XML file (plugin.xml)
and add a bunch of jar files to the classpath prior to compilation or
testing.

 

I have all the latest source for m2 and am not 100% sure about the right
approach, but I think I will start with a custom lifecycle what will class a
slight modified compiler that add the 'private' Eclipse PDE dependencies

 

<side-note>

            I suppose I could go down the path of trying to treat the
Eclipse specific stuff as real dependencies and create artifacts for them
and write a custom artifact handler that could read them from the Eclipse
plugins folder, but I think that would be a lot of code and not be that much
better than simply adding the jar files to the classpath before calling the
AbstractCompilerMojo - private API issues aside

</side-note>

 

So my question is, after having read
http://maven.apache.org/maven2/lifecycle.html and attempting to follow it, I
get the following 

 

[INFO] Deleting directory C:\proj\m2\workspace\m2-plugin-test\target

[ERROR] Nonexistent component:
org.apache.maven.lifecycle.mapping.LifecycleMappingeclipse-plugin

[ERROR] No lifecycle mapping for type 'dude-application': using defaults

 

My META-INF/plexus.componenets.xml looks like this:

 

<components>

  <component>

    <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>

    <role-hint>eclipse-plugin</role-hint>

 
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</
implementation>

    <configuration>

      <phases>

        <process-resources>resources:resources</process-resources>

        <compile>pde:pde-compile</compile>

 
<process-test-resources>resources:testResources</process-test-resources>

        <test-compile>compiler:testCompile</test-compile>

        <test>surefire:test</test>

        <package>pde:pde-package</package>

        <install>install:install</install>

        <deploy>deploy:deploy</deploy>

      </phases>

    </configuration>

  </component>

</components>

 

If anyone can point me to a complete plugin example that defines its own
lifecycle I can probably work from there

 

Thanks,

Matthew

 

 

Reply via email to