首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将jar添加到人工.m2/资源库不包含jar文件后,maven构建失败

将jar添加到人工.m2/资源库不包含jar文件后,maven构建失败
EN

Stack Overflow用户
提问于 2014-08-26 04:20:38
回答 1查看 1.9K关注 0票数 1

我尝试将jasperreports.jar文件添加到libs-release-local:net/sf/jasperreports/jasperreports/5.0.1/jasperreports-5.0.1.jar下的artifactory中,但部署成功。

pom.xml依赖

代码语言:javascript
运行
复制
<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中,但无法识别。

代码语言:javascript
运行
复制
[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

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25493742

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档