使用maven构建项目时出错。
Reason: Error getting POM for 'de.jetwick:snacktory' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/user/.m2/repository/de/jetwick/snacktory/1.2-SNAPSHOT/maven-metadata-karussell_snapshots.xml': expected = after attribute name (position: TEXT seen ...meta name="selected-link" value="repo_source" data-pjax-transient>... @32:72)
de.jetwick:snacktory:pom:1.2-SNAPSHOT
这是我在IntelliJ IDE日志中得到的错误
[WARNING] The metadata /home/user/.m2/repository/de/jetwick/snacktory/1.2-SNAPSHOT/maven-metadata-karussell_snapshots.xml is invalid: expected = after attribute name (position: TEXT seen ...meta name="selected-link" value="repo_source" data-pjax-transient>... @32:72)
这是我的pom
<repositories>
<repository>
<id>karussell_snapshots</id>
<url>https://github.com/karussell/mvnrepo/tree/master/snapshots/</url>
</repository>
<repository>
<id>snacktory_snapshots</id>
<url>https://github.com/karussell/mvnrepo/tree/master/snapshots/de/jetwick/snacktory/</url>
</repository>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
这是pom的依赖部分
<dependency>
<groupId>de.jetwick</groupId>
<artifactId>snacktory</artifactId>
<version>1.2-SNAPSHOT</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
提前致谢
答案 0 :(得分:0)
我通过将snacktory的版本更改为1.3
来解决问题<version>1.3-SNAPSHOT</version>