Windows and Linux build for same GAV different classifier

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows and Linux build for same GAV different classifier

Kevin
This post has NOT been accepted by the mailing list yet.
I have a case where I am building Native Libraries in C++ using the same code base on Linux and Windows. The maven project POM contains two profiles for windows and linux that create and attach the correct artifact/classifier.

Project POM: com.xyz.native:myLib:pom:0-SNAPSHOT
Windows Artifact:  com.xyz.native:myLib:dll:windows:0-SNAPSHOT
Linux Artifact: com.xyz.native:myLib:so:linux:0-SNAPSHOT

The builds run and deploy the correct Artifacts, but at some point in time one of the two artifacts disappears form Nexus.

Does anyone know why the Artifact is deleted?
Is my approach to creating the set of artifacts valid or is there something I am missing?
Reply | Threaded
Open this post in threaded view
|

Re: Windows and Linux build for same GAV different classifier

Francois MAROT
Hi Kevin,

I think you are facing more or less the same problem I faced before (
http://maven.40175.n5.nabble.com/mvn-deploy-deploy-file-with-same-groupId-amp-artifactId-but-different-classifiers-td5838931.html#a5838934
).
So to sum up:
- if you want to add 2 native artifacts differing by the classifier, the
ideal way is to deploy both at the same time as the main artifact.
Otherwise, if deployed separately, it seems the behavior may vary depending
on the artifact repository.
- if deploying at the same time is difficult (so was my case), then you can
declare different artifactId and voila. It's not as clean and nice but it
may be easier to manage.

I also take the opportunity to advertise my "native" plugin which may help
you: https://github.com/fmarot/nativedependencies-maven



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]