1

Trying to deploy an artifact to nexus, but it has to be in a specific location which ignores the groupId. Is there a way to do this?

<groupId>com.company.team</groupId>
<artifactId>project</artifactId>
<version>0.0.3-SNAPSHOT</version>

the url for our internal repository is:

http://repo.com/teamRepo/somedir/artifact/version/

but maven deploy (as expected) uploads to:

http://repo.com/teamRepo/com/company/team/artifact/version/

Alex
  • 587
  • 11
  • 31

1 Answers1

1

Was able to do this by using the mvn deploy:deploy-file command:

 mvn deploy:deploy-file -Durl=https://repo.com/teamRepo -DgroupId=team -DartifactId=artifact -Dversion=0.0.3 -Dpackaging=tar.gz -DskipTests -Dmaven.install.skip=true -DrepositoryId=repoId -Dfile=target/artifact.tar.gz

using -DrepositoryId was to allow the use of credentials stored as per this answer Maven: Trying to Deploy with credentials in settings.xml file

Alex
  • 587
  • 11
  • 31