Hello everyone, :-)

seems my question was an odd one as I didn't get any replies on it.
So maybe I modify it a little bit:
Is it possible - maybe with an own Maven plugin - to check if an artifact is 
already in the remote / central repository of my company?

The goal is the following:

Each check-in into the SCM triggers a build which builds with "install" on the 
Jenkins build server.
Except if that version is already in the central Nexus repository of the 
company.
A manually triggered build on the Jenkins build server will build with "deploy".
Except if that version is already in the central Nexus repository of the 
company.

This way always the newest version of an artifact would be available for other 
artifact build processes which depend on it.
But versions which have been already "released" wouldn't be changed / 
overwritten.
Otherwise they would change on the build server because someone forgot to 
change the version and break other builds on that machine.

Does someone of you know if it is possible to realize something like that with 
already existing (and still maintained / developed) plugins?
Or how a programmatically solution could look like? Means does someone know 
what the Maven classes for accessing the remote repository are?

Regards,
Gerrit
-----Ursprüngliche Nachricht-----
Von: Hohl, Gerrit [mailto:[email protected]] 
Gesendet: Freitag, 18. November 2016 08:48
An: [email protected]
Betreff: Don't overwrite existing artifact - how?

Hello everyone, :-)

 

is it somehow possible not to "install" an artifact which already exists in the 
local repository?

What about artifacts in a remote repository? Is it possible to prevent 
deployment of such artifacts?

 

I don't want to have our build server to accidentally install an artifact a 
second time just because someone forgot to change the version.

Even if that artifact isn't deployed to the remote repository it will be used 
on that build server.

In the maven-install-plugin description there is no option. But who knows...

 

I saw that there is the possibility in Nexus to prevent redeployement for a 
repository.

Is there also a way within Maven? Or not because Maven says it's the job of the 
repository server / service itself.

In the maven-deploy-plugin description there is no option. But who knows...

 

Regards,

Gerrit

 


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

Reply via email to