Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test maven deploy?

I work on a maven project but don't have the rights to deploy in the our company nexus (this is done by the CI tool). However, while configuring deployment, I would like to test what is actually deployed by "mvn clean deploy".

Q: Is there a way to run deploy but don't send anything to the nexus repo?

I would expect 1 of 2 options:

  • there is some kind of dry-run option in deploy for that purpose
  • there is an option to redirect deployment to some local folder that acts as nexus repo (and thus can see what would have been deployed)

Note: my project is multi-modules.

like image 450
Juh_ Avatar asked Oct 19 '25 16:10

Juh_


1 Answers

I guess you could just overwrite the <distributionManagement> with a local folder:

<distributionManagement>
  <repository>
    <id>local-release</id>
    <url>file:../local_repo/release</url>
  </repository>
  <snapshotRepository>
    <id>local-snapshot</id>
    <url>file:../local_repo/snapshot</url>
  </snapshotRepository>
</distributionManagement>
like image 192
J Fabian Meier Avatar answered Oct 21 '25 07:10

J Fabian Meier