我尝试将jasperreports.jar文件添加到libs-release-local:net/sf/jasperreports/jasperreports/5.0.1/jasperreports-5.0.1.jar下的artifactory中,但部署成功。
pom.xml依赖
<dependency>
<groupId>jasperreports-htmlcomponent</groupId>
<artifactId>jasperreports-htmlcomponent</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<!--version>5.1.0</version-->
<version>5.0.1</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
</exclusion>
</exclusions>
</dependency>
但是,当我尝试从Intellij运行应用程序时,我得到了依赖的错误路径。两个jar文件都存在于artifactory中,但无法识别。
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.864 s
[INFO] Finished at: 2014-08-25T15:51:47-05:00
[INFO] Final Memory: 16M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.3.4:run-app (default-cli) on project MPF-SalesQuote: Failed to create classpath for Grails execution. Could not transfer artifact com.lowagie:itext:jar:2.1.7.js1 from/to metasystems-snapshots (http://javaguru.metasystems.com:8081/artifactory/metasystems-snapshot): Failed to transfer file: http://javaguru.metasystems.com:8081/artifactory/metasystems-snapshot/com/lowagie/itext/2.1.7.js1/itext-2.1.7.js1.jar. Return code is: 409, ReasonPhrase: The repository 'metasystems-snapshot' rejected the artifact 'metasystems-snapshot:com/lowagie/itext/2.1.7.js1/itext-2.1.7.js1.jar' due to its snapshot/release handling policy..
[ERROR] com.lowagie:itext:jar:2.1.7.js1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] metasystems-snapshots (http://javaguru.metasystems.com:8081/artifactory/metasystems-snapshot, releases=true, snapshots=true),
[ERROR] metasystems-release (http://javaguru.metasystems.com:8081/artifactory/metasystems-release, releases=true, snapshots=true),
[ERROR] local-releases (http://javaguru.metasystems.com:8081/artifactory/libs-release-local, releases=true, snapshots=true),
[ERROR] grails (http://repo.grails.org/grails/core, releases=true, snapshots=true),
[ERROR] grails-plugins (http://repo.grails.org/grails/plugins, releases=true, snapshots=true),
[ERROR] Metasystems Inc. (http://javaguru.metasystems.com:8081/artifactory/libs-release-local, releases=true, snapshots=true),
[ERROR] central-mirror (http://javaguru.metasystems.com:8081/artifactory/remote-repos, releases=true, snapshots=false)
[ERROR] Path to dependency:
[ERROR] 1) com.metasystems:MPF-SalesQuote:grails-app:1.0-SNAPSHOT
[ERROR] 2) net.sf.jasperreports:jasperreports:jar:5.0.1
[ERROR] 3) com.lowagie:itext:jar:2.1.7.js1
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoEx
ecutionException
https://stackoverflow.com/questions/25493742
复制相似问题