我将此依赖项添加到了pom.xml中。当我构建项目时,如果创建此错误。
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-sandbox-parent</artifactId>
<version>10</version>
</dependency>
无法在项目核心上执行目标:无法解析项目com.name:core:jar:0.0.1-SNAPSHOT的依赖项:找不到中央的工件org.apache.commons:commons-sandbox-parent:jar:10(http://repo1.maven.org/maven2)-> [帮助1]
当我单击此链接到中央仓库时,我注意到该文件夹中没有预编译的jar文件。生成过程中抱怨没有jar。我使用的所有其他依赖项中都有预编译的jar文件。我该如何解决这个问题并编译我的项目?
http://central.maven.org/maven2/org/apache/commons/commons-sandbox-parent/10/
此依赖项是'pom'类型的,而不是'jar'类型的。在http://central.maven.org/maven2/org/apache/commons/commons/commons-sandbox-parent/10/commons-sandbox-parent-10.pom的pom文件中的“包装”标签中提到了该标签。
如果在声明依赖项时未指定任何类型,则将其假定为“ jar”。您可以改为指定类型“ pom”。
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-sandbox-parent</artifactId>
<version>10</version>
<type>pom</type>
</dependency>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句