简体   繁体   中英

maven plugin: “Failed to read artifact descriptor for”

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>

最好的解决方案是在公司中安装存储库管理器

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM