maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: How to set up an Eclipse library plugin
Date Sun, 20 Jan 2008 15:42:31 GMT
I found one way to do the jar building.  The idea is to have the 
eclipse-runtime POM project include two things:

1) a Jar configuration specifying where to find the Eclipse manifest: 
<manifestFile>META-INF/MANIFEST.MF</manifestFile>

2) an extra ant-run step for the packaging phase which runs the Ant Jar 
task to update the jar that maven built with the additional libraries.
I know this is not the maven way, which is why I'm asking for a better 
way :-)..

-Marshall


Marshall Schor wrote:
> We have a multi-jar project set up in the "flat" layout style.  We 
> have a parent POM which refs all the child POMs in the <modules> section.
> We would like to have a special jar which includes a subset of some of 
> the project's jars, packaged as an Eclipse plugin - a library plugin - 
> for other plugins to use.  So we made a project for this which I'll 
> call the eclipse-runtime plugin.  This project has no source itself; 
> it serves only to collect together a (sub)set of other project's jars.
> In the eclipse-runtime plugin's POM, I declare dependencies on the 
> other projects whose Jars we want to include.  If I run 
> eclipse:eclipse on this POM, it puts in <links> to the "JARs" of these 
> other projects (using the corresponding Jars from my local repository) 
> in the .project file, and updates the .classpath to have entries that 
> reference these.  This make things work in the plug-in development 
> environment.  For instance, when I have an eclipse plugin dependency 
> on my runtime plugin in another Eclipse plugin-project, this other 
> plugin-project compiles OK.
>
> But - the build (both maven and Eclipse) of this runtime plugin 
> produces an empty JAR - since there is no source code in the project 
> itself.  I need the build to produce a jar which contains all the 
> referenced JARs, I think, so when a user downloads installs the 
> library plugin using Eclipses "update" mechanism, the referenced jars 
> are there.
>
> Any idea how to do this?
>
> -------------------------
>
> Another issue:  I tried running eclipse:eclipse goal from the parent 
> POM.  I saw in another posting to this list that the eclipse:eclipse 
> goal, when run from a parent POM, is supposed to create project 
> dependencies, instead of <links> to jars in the local repository.
> I tried this for my plugin projects, and found that it didn't put any 
> <links> in the .project file for these dependencies (as expected), but 
> it also didn't update the .classpath either - so as a result, things 
> which depend on the runtime plugin to compile now fail to compile.  
> The .classpath file has no entries at all for projects this library 
> project is depending on.
> I did notice that it did the right thing for *non-Eclipse-plugin* 
> projects: the .classpath file had the right entries added for 
> dependent projects.
>
> Is this a known issue with the eclipse:eclipse goal, when used with 
> Eclipse plugin projects?
>
> -Marshall
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message