Reputation: 7230
For my build process, I need two custom maven plugins (see here). It works fine when deploying it to my local maven repository with mvn install
.
However, I need to make it accessible for other developer's in my team and integration testing.
I noticed that you could setup a light-weight maven repository on github so that's what I did for now: https://github.com/rweng/mvn-repo
This works fine for normal dependencies like ch.yax.yocto.yocto-server, however, it fails for my plugins with the message
[WARNING] The POM for com.arcanio.maven.plugin:velocity:jar:0.1-SNAPSHOT is missing, no dependency information available**
[ERROR] Plugin com.arcanio.maven.plugin:velocity:0.1-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.arcanio.maven.plugin:velocity:jar:0.1-SNAPSHOT: Could not find artifact com.arcanio.maven.plugin:velocity:pom:0.1-SNAPSHOT -> [Help 1]
I tried substituting the github url in my repositories section through file:///
, Though I doubt the problem lies here. I also doubt that this is a proxy problems, as many users with the same error reported.
Is is possible that mvn install deploys s.th. different than my deployment command
mvn -DaltDeploymentRepository=snapshot-repo::default::file:/Users/robin/Code/mvn-repo/ clean deploy
Thanks in advance for any hints how to solve this.
EDIT
I just moved the plugin from my local repository to the github repository and notice the following changes.
D com/arcanio/maven/plugin/maven-metadata.xml
D com/arcanio/maven/plugin/maven-metadata.xml.md5
D com/arcanio/maven/plugin/maven-metadata.xml.sha1
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/maven-metadata.xml
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/maven-metadata.xml.md5
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/maven-metadata.xml.sha1
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-20130206.084855-1.jar
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-20130206.084855-1.jar.md5
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-20130206.084855-1.jar.sha1
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-20130206.084855-1.pom
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-20130206.084855-1.pom.md5
D com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-20130206.084855-1.pom.sha1
D com/arcanio/maven/plugin/velocity/maven-metadata.xml
D com/arcanio/maven/plugin/velocity/maven-metadata.xml.md5
D com/arcanio/maven/plugin/velocity/maven-metadata.xml.sha1
?? com/arcanio/maven/plugin/maven-metadata-local.xml
?? com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/_maven.repositories
?? com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/maven-metadata-local.xml
?? com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-SNAPSHOT.jar
?? com/arcanio/maven/plugin/velocity/0.1-SNAPSHOT/velocity-0.1-SNAPSHOT.pom
?? com/arcanio/maven/plugin/velocity/maven-metadata-local.xml
So mvn install
really does generate something different. Does anyone know why? I thought mvn install
was basically the same as mvn deploy
but to the local repository.
EDIT
Using mvn -DuniqueVersion=false
fixes the unique versions. See here.
EDIT
uniqueVersion=false
does not work anymore with maven 3. So the problem stays the same, the timestamped versions are not found in the repository. I think I might be missing a artifactid-snapshot pom.
SOLUTION
Solution found here:
The repository must be added as pluginRepository:
<pluginRepositories>
<pluginRepository>
<id>rweng-plugins</id>
<url>https://github.com/rweng/mvn-repo/raw/master</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
Upvotes: 0
Views: 12239
Reputation: 97359
The best solution for such things is to install a repository manager in your company.
Upvotes: 1