I need to make a change to the maven dependency plugin to satisfy unique requirements in my organization.
I've downloaded the sources from http://maven.apache.org/plugins/maven-dependency-plugin/download.cgi
When I look at its pom, I see that it defines a parent pom like this:
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>27</version>
<relativePath>../maven-plugins/pom.xml</relativePath>
</parent>
This leads me to the understanding that this project cannot be built independently, at least not the version I have.
When trying to run mvn clean install anyway I get the following error:
Couldn't download artifact: Failed to read artifact descriptor for org.apache.maven:maven-model:jar:2.0.9
The funny thing is that it actually does exist in my local .m2 repository.
Is it really the case that if I want to make a contribution or a change to a maven plugin I have to have the entire environment or is there a way to build it independently?
I am using maven 3.0.4 and Nexus.
The parent pom can be found in maven central.
So it should be enough to simple remove the
<relativePath>
statement from the<parent>
. Sometimes an empty<relativePath />
also helps to tell maven to resolve the pom from the repository and not try to find it via a relative path in the project.If the parent is not in a maven repository you either place it there - or you would need to checkout the version control project on a higher level so the path actually matches the local structure.