[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] bundle builds using Maven

On 17/05/07, Stuart McCulloch <stuart.mcculloch@xxxxxxxxxx> wrote:
On 17/05/07, Aaron Siri <Aaron.Siri@xxxxxxx> wrote:
> Thanks for the replies.  I realized what I was doing wrong.  You must call
> "mvn install" for it to properly build.  "mvn compile" (which I was trying to
> use) doesn't place the dependencies in the local repo for the dependant
> modules to build from.

yep, I've seen a lot of people hit the same problem when using maven to
build OSGi bundles, so I try to get people used to 'mvn install' in tutorials.

Actually, it's pretty easy to set up Maven to build OSGi bundles -- in fact, about as easy as it is for other Java projects. What doesn't work so well is trying to use Eclipse PDE to edit/test those bundles in a Maven layout. Whilst Maven looks as the Manifest.mf as something that's generated, Eclipse PDE treats it as a source file to be edited. So you end up duplicating dependency references.

It's notable that using Maven to build Java projects suffers none of
these problems, since in Java projects everything's taken from the set
of output directories, so it's trivial to set up a source folder for
mapping the resources into the output.

If one wanted to break backward compatibility for existing PDE
layouts, it would be possible to fix the eclipse -dev hook to search
for resources via getEntry() relatively to the build output folder
instead of relative to the project folder. But since that's
effectively a backwardly-compatible break, it's not going to happen.

Alex.