How to test maven deploy?

Viewed 2389

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.

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>
Related