Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-dev] Resolve artifact

Lucian wrote:

I'm trying to develop a maven plugin for verify if the version artifact of my project is alreeady deployed.This for avoid accidental update of a version.

Just to mention it, some/most repository managers have an option to block redeployment of (release) versions already.

I'm using the class ResolveArtifactMojo.java for erify if the artifact is present, but always found it  because counts also the version of the current project.
There's a way to exclude the version that I'm building?

The version you're currently building would be coming from the Maven reactor which in terms of Aether is modelled by a WorkspaceReader. So

DefaultRepositorySystemSession mySession = new DefaultRepositorySystemSession(repoSession);
mySession.setWorkspaceReader(null);

should get rid of that for your resolution requests.


Benjamin


Back to the top