Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven upload file to Nexus repo without groupId and artifactId

Tags:

I have a zip file and a Nexus repo and I would like to know if it is possible to create a goal to upload the zip file in the repot root folder, without groupId and artifactId

my artifact is build by a pom.xml

like image 244
Nunyet de Can Calçada Avatar asked Aug 20 '20 11:08

Nunyet de Can Calçada


1 Answers

It depends on the type of repository declared in your Nexus 3 instance.

For a Maven one, you need a GAV (group/artifactID/Version).
(NEXUS-5170 is illustrates that, even without a GAV, the GUI still proposes 'Add Artifact', but that is a bug)

In your case, as a workaround, you would create one "default/root" group dedicated to host those kind of artifacts: one group to host them all.
You can then use deploy:deploy-file, which, as you have seen, requires a GAV.

But if your artifact is built by a pom.xml (which does specify the GAV), a simple mvn deploy is enough (target deploy:deploy)

like image 160
VonC Avatar answered Sep 28 '22 09:09

VonC