Eclipse does provide some ant tasks, but they require that Eclipse is
running.  They have a way to run in headless mode, but you need to use a
script that invokes Eclipse, and then tell Eclipse to run its antRunner
process.  As far as I can tell, there is no way to have ant run these
Eclipse tasks without running ant from Eclipse (which we clearly can't
do if we need to run ant from maven).

Since I got no other replies, I assume that somehow, no one has done
this before, so I need to dig into it.  I have gotten to the following
stopping point, and I need help.  An Eclipse plugin consists of a JAR
that contains 3 classes of items:

1. Another jar with the actual code.
2. The plugin.xml file
3. 0 or more JAR dependencies for the plugin.

Maven builds item 1 without a problem, and we've hacked up a Mojo to
update item 2.  Then we have a separate ant goal that runs from Maven to
copy all 3 to the target directory, then zip it all up.  The problem is
that we need to add a second artifact to the build once this ant step is
complete, because we need both the original jar (for other project build
dependencies) and the new jar (for the later Eclipse feature build that
I need to write).  

The question is, how do I add another artifact to the build when there
is already an artifact that I must preserve, and when both artifacts are
needed by different maven dependencies?  Also, how can I say that I
depend upon only one of those artifacts?

Jim Babka
Senior Software Engineer
Main: (512) 334 3200
Direct: (512) 334 3237
Email: [EMAIL PROTECTED]
 
Webify Solutions
Enabling the On Demand Enterprise(tm)
www.webifysolutions.com
-----Original Message-----
From: Milos Kleint [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 07, 2006 2:37 AM
To: Maven Users List
Subject: Re: [m2] Maven2 building Eclipse plugins, features, and update
sites

does eclipse provide ant tasks to do the plugin building?
I've done exactly the same for netbeans modules,
a bunch of mojos and a custom lifecycle, internally reusing the netbeans
ant
tasks.
At least the lifecycle definition might be of interest you,
http://cvs.mevenide.codehaus.org/mojos/maven-nbm-plugin/

Regards

Milos Kleint

On 1/7/06, Jim Babka <[EMAIL PROTECTED]> wrote:
>
> I have been searching for this now for several days and have found
> nothing, so I thought I would ask here.  Is there a maven2 plugin that
> supports building of Eclipse plugins, features, and update sites?
Right
> now we have several Eclipse plugins that are built into ZIP files that
> can be unzipped into an Eclipse plugins directory.  However, there are
> several problems with this:
>
> 1. There's no support for updating the plugin.xml with the version
> information of the plugin's jar.
> 2. There's no support for putting the maven pom.xml dependencies
(direct
> or transitive) into the plugin.xml.
> 3. There's no support for building an Eclipse feature that includes
> those plugins.
> 4. There's no support for building an Eclipse update site from the
> feature or for that matter deploying to an update site.
>
> Right now we have some hackery to at least get to the ZIP file, but
> unless there is something already existing, I see a bunch of long
nights
> ahead while I write my own stuff.  The requirement is that we can have
> an update site automatically built/updated by our build system.
>
> So, is there anything that I can use here?  Even if there is an open
> source project that goes only part of the way, it would possibly give
me
> a head start.
>
> Thanks in advance for any help that anyone can give me.
>
> Jim Babka
> Senior Software Engineer
> Main: (512) 334 3200
> Direct: (512) 334 3237
> Email: [EMAIL PROTECTED]
>
> Webify Solutions
> Enabling the On Demand Enterprise(tm)
> www.webifysolutions.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to