You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Tobias Wunden <to...@id.ethz.ch> on 2010/12/02 23:27:48 UTC

Referencing maven 3 snapshots from config.properties

Hi,

I am looking for a solution where I can reference -SNAPSHOT versions of my bundles that are hosted in a maven repository from config.properties.

The problem that I am running into is that starting with Maven 3, SNAPSHOT artifacts will always have their build number attached when deployed to maven repositories such as Sonatype's Nexus (as in bundle-1.0-SNAPSHOT-982346.jar). Since this number is generated each time I do a "mvn deploy", I can't reference the snapshot in config.properties using http://my.repo.org/snapshots/bundle-1.0-SNAPSHOT.jar (earlier versions of Maven would simply overwrite the bundle-1.0-SNAPSHOT.jar with the new version).

So I guess what I am looking for is a "maven" way to reference bundles from config.properties, as in mvn://my.repo.org/snapshots/bundle-1.0-SNAPSHOT, which would be using the repository's metadata to find the most recent version of the SNAPSHOT, just like maven does.

Has anybody come accross this problem as well and found a solution to this problem? Alternatively, I could of course  ask people to install maven, do a build before starting felix and reference the bundle using a file:// url locally.

Thanks for any hints,

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


Re: Referencing maven 3 snapshots from config.properties

Posted by Tobias Wunden <to...@id.ethz.ch>.
Hi Justin,

thanks for the hint! I think that the Nexus LVO plugin is used to find the latest version of Nexus rather than that of a certain artifact. However, after a bit of research I can confirm that using Nexus, you can link to the latest version of an artifcat like this:

 http://my.repo.org/nexus/service/local/artifact/maven/redirect?r=snapshots&g=<groupId>&a=<artifactId>&v=<version>&e=jar \

I still think that it would be a nice addition to have in Felix since it will simplify creating and updating test versions of applications, but the suggested approach is definitely working with Nexus, so thanks again!

Tobias

On 03.12.2010, at 01:03, Justin Edelson wrote:

> If you're using Nexus specifically, there was (and probably still is) a plugin called LVO which enabled you to formulate an URL to the Latest Version  Of an artifact. This might do the trick.
> 
> Justin

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


Re: Referencing maven 3 snapshots from config.properties

Posted by Justin Edelson <ju...@justinedelson.com>.
If you're using Nexus specifically, there was (and probably still is) a plugin called LVO which enabled you to formulate an URL to the Latest Version  Of an artifact. This might do the trick.

Justin

On Dec 2, 2010, at 5:27 PM, Tobias Wunden <to...@id.ethz.ch> wrote:

> Hi,
> 
> I am looking for a solution where I can reference -SNAPSHOT versions of my bundles that are hosted in a maven repository from config.properties.
> 
> The problem that I am running into is that starting with Maven 3, SNAPSHOT artifacts will always have their build number attached when deployed to maven repositories such as Sonatype's Nexus (as in bundle-1.0-SNAPSHOT-982346.jar). Since this number is generated each time I do a "mvn deploy", I can't reference the snapshot in config.properties using http://my.repo.org/snapshots/bundle-1.0-SNAPSHOT.jar (earlier versions of Maven would simply overwrite the bundle-1.0-SNAPSHOT.jar with the new version).
> 
> So I guess what I am looking for is a "maven" way to reference bundles from config.properties, as in mvn://my.repo.org/snapshots/bundle-1.0-SNAPSHOT, which would be using the repository's metadata to find the most recent version of the SNAPSHOT, just like maven does.
> 
> Has anybody come accross this problem as well and found a solution to this problem? Alternatively, I could of course  ask people to install maven, do a build before starting felix and reference the bundle using a file:// url locally.
> 
> Thanks for any hints,
> 
> Tobias
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

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