mvn clean without dependencies

It looks like you're using nexus. It might be easier to deploy the artifact to the nexus repo as opposed to having to maintain it with this project.


I ran into a related issue, and I found this question when googling for a solution, so I'll note it here:

mvn clean fails in a multi-module project when there are missing dependencies within the same project, if plugins are invoked during clean.

We invoke the antrun-plugin during the clean phase in some modules, and because of that all dependencies need to be present in the maven repository, including the other modules in the same reactor, which in some cases have not been built yet (say you just bumped the project version, or you're starting off a new project).

This is a maven-antrun bug reported in https://issues.apache.org/jira/browse/MANTRUN-78 - which again leads back to a bug in maven core: https://issues.apache.org/jira/browse/MNG-3283.

My workaround was to provide the developers (and Jenkins) with an alternative way of doing clean (shell/bat script, ant script or some git/hg clean operation), and have them invoke this instead.

I would suggest a similar workaround for your team (or just set up up a shared maven repository internally in your team, use one of the developer machines if necessary).

Tags:

Maven

Maven 2