Hi Michael,
For your custom Mojo:
1) Add a dependency on the Eclipse plugin in your custom plugin pom.xml.
2) Depending on what you want to accomplish you can wrap an EclipsePlugin
instance in your Mojo and delegate to the wrapped instance the most common
tasks. That should take care of "eclipse:eclipse myplugin:eclipse" scenario.
I'd imagine then you only need to type "myplugin:eclipse".
3) You can use the setters provided in EclipsePlugin to set up relevant/required
fields for the wrapped EclipsePlugin instance.
The resource writers in the Eclipse plugin are reusable outside the Eclipse
plugin itself so you shouldn't need to duplicate much code.
Hope this helps.
Cheers,
Rahul
----- Original Message -----
From: "Michael" <[EMAIL PROTECTED]>
To: "Maven Users List" <[email protected]>
Sent: Monday, January 02, 2006 3:49 PM
Subject: [m2] Eclipse Recommendations
Hello,
I'm currently in the process of migrating from m1 to m2 and ran across an
issue in generating my Eclipse configuration. In m1, I used a postGoal
script to generate extra Eclipse files besides the normal .project and
.classpath. Specifically, I was generating a .checkstyle file and a
.mymetadata file for the Eclipse Checkstyle plugin and the MyEclipse suite
of plugins respectively.
To accomplish this in m2, I started to write my own mojo but found 2 major
disadvantages:
1) A lot of the code in maven-eclipse-plugin would need to be rewritten or
at least referenced.
2) Running "mvn eclipse:eclipse" would only generate the normal set of
eclipse files, not my set. I'd have to train all developers to type "mvn
eclipse:eclipse myplugin:eclipse" or something to that effect.
Does anyone have any recommendations on how to go about this? Looking at
the source to maven-eclipse-plugin, it would seem that if the plugin allowed
additional AbstractEclipseResourceWriters to be registered via plugin
configuration, both of my problems above would be solved. This might lead
to other problems though.
Thanks,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]