felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch" <stuart.mccull...@jayway.net>
Subject Re: Is the bundle-version available for use in other plugins?
Date Mon, 07 Jan 2008 14:25:01 GMT
On 07/01/2008, Steinar Bang <sb@dod.no> wrote:
>
> If one has a POM file with <packaging>bundle</packaging> is the
> bundle-version available in a property that can be used in other plugin
> configs in the same POM file?


I'm not aware of a way to publish/push properties from one plugin to
another.
ie. if we change the properties in the project model at runtime I don't
believe
other plugins would see these changes (I may be wrong)

also changing/adding properties via a plugin could make the build less
stable
because you'd get different results depending on which plugins ran during
the
build cycle (ie. compare "mvn clean install" to "mvn install" on a built
project)

My usecase is a dependency:copy execution that copies the bundle from
> the local maven repo and into the PDE target platform, after building
> the bundle.
>
> I currently use ${version} as part of the target name, and that works
> fine for version 1.0.0 and such, but not for 1.0.1-SNAPSHOT (which gets
> bundle-version 1.0.1.SNAPSHOT).


yes, unfortunately 1.0.1-SNAPSHOT is not a valid OSGi version string.

FYI, there is a Maven shared component to convert between Maven and OSGi:

   <groupId>org.apache.maven.shared</groupId>
   <artifactId>maven-osgi</artifactId>
   <version>0.2.0</version>

but to use it you'd have to either patch the dependency plugin... or
possibly
you could access it by using some scripting extension like groovy/beanshell
to do the copying.

The other solution is to use the antrun plugin to tweak the files afterwards
(ie. use the move task to change files ending -SNAPSHOT to .SNAPSHOT)

Carlos Sanchez (carlos@apache.org) or one of the other Maven devs over
at dev@maven.apache.org might be able to suggest more alternatives...

Thanx!
>
> - Steinar
>
>


-- 
Cheers, Stuart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message