我使用的是Maven 3.1.1,Java 6和JBoss 7.1.3。我想将我的JSP上的对象渲染为JSON,但是当我将它包含在我的pom中时
<dependency>
<groupId>json-taglib</groupId>
<artifactId>json-taglib</artifactId>
<version>0.4.1</version>
</dependency>
我收到了这个通知......
[ERROR] Failed to execute goal on project myproject: Could not resolve dependencies for project org.mainco.subco:myproject:war:66.0.0-SNAPSHOT: Failure to find json-taglib:json-taglib:jar:0.4.1 in https://repository-myrepo.forge.cloudbees.com/release was cached in the local repository, resolution will not be reattempted until the update interval of cloudbees-private-release-repository has elapsed or updates are forced -> [Help 1]
此工件是否可在任何公共回购中使用?我想避免下载工件或将其安装到只有我有权访问的仓库。或者,如果有一个公共可访问的库可以执行相同的操作,我可以使用它。
编辑:根据给出的答案设置我的存储库指令,但仍然收到错误
<repository>
<id>atg-json-taglib</id>
<name>ATG JSON</name>
<url>http://maven.nuxeo.org/nexus/content/repositories/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
答案 0 :(得分:4)
您应该检查此存储库。
http://maven.nuxeo.org/nexus/content/repositories/public/atg/taglib/json/json-taglib/0.4.1/
您可以像这样添加存储库:
<repository>
<id>public</id>
<url>http://maven.nuxeo.org/nexus/content/repositories/public/</url>
</repository>
添加你的依赖
<dependency>
<groupId>atg.taglib.json</groupId>
<artifactId>json-taglib</artifactId>
<version>0.4.1</version>
</dependency>
答案 1 :(得分:1)
您也可以使用此依赖项
<dependency>
<groupId>com.github.livesense</groupId>
<artifactId>org.liveSense.scripting.jsp.taglib.jsonatg</artifactId>
<version>1.0.5</version>
</dependency>