我正在尝试重建开发环境,以便对2009年开发的Web应用程序进行一些更改。我在本地存储库中遇到了maven和crystal report工件的问题。 jar文件肯定在本地存储库中。我有一个旧的pom文件的副本,也是.m2本地存储库的备份。当我运行mvn clean compile时,我得到以下输出: 注意:使用下划线来停止网址。
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/ReportViewer/1.0/ReportViewer-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/webreporting/1.0/webreporting-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/jrcerom/1.0/jrcerom-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/serialization/1.0/serialization-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/developer/crystalreportsforeclipse/doc_1.0.6.v1371/1.0/doc_1.0.6.v1371-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/developer/crystalreportsforeclipse/nl1_1.0.6.v1371/1.0/nl1_1.0.6.v1371-1.0.pom
[INFO] [compiler:compile] [INFO] Compiling 168 source files to C:\WorkSpaces\CKDProject\CKDProject\core-domain\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] Building web [INFO] task-segment: [clean, compile]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean] [INFO] Deleting directory C:\WorkSpaces\CKDProject\CKDProject\web\target
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalContentModels/1.0/CrystalContentModels-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalDatabaseConnectors/1.0/CrystalDatabaseConnectors-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalExporters/1.0/CrystalExporters-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalExportingBase/1.0/CrystalExportingBase-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalFormulas/1.0/CrystalFormulas-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CRDBJavaServerCommon/1.0/CRDBJavaServerCommon-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CRDBXMLExternal/1.0/CRDBXMLExternal-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CRDBXMLServer/1.0/CRDBXMLServer-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalCharting/1.0/CrystalCharting-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalCommon/1.0/CrystalCommon-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalReportingCommon/1.0/CrystalReportingCommon-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalQueryEngine/1.0/CrystalQueryEngine-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/CrystalReportEngine/1.0/CrystalReportEngine-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/keycodeDecoder/1.0/keycodeDecoder-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/MetafileRenderer/1.0/MetafileRenderer-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/rpoifs/1.0/rpoifs-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/Concurrent/1.0/Concurrent-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/ebus405/1.0/ebus405-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/icu4j/1.0/icu4j-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/URIUtil/1.0/URIUtil-1.0.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/jrcadapter/1.0/jrcadapter-1.0.pom
Downloading: http://repo1.maven.org/maven2/jmaki/ajax-wrapper-comp/1.8.1/ajax-wrapper-comp-1.8.1.pom
Downloading: http://repo1.maven.org/maven2/local/sun/java/net/jaxws-spring/1.8/jaxws-spring-1.8.pom
Downloading: http://repo1.maven.org/maven2/local/xbean-spring/2.8/xbean-spring-2.8.pom
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/Concurrent/1.0/Concurrent-1.0.jar
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/ebus405/1.0/ebus405-1.0.jar
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/icu4j/1.0/icu4j-1.0.jar
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/URIUtil/1.0/URIUtil-1.0.jar
Downloading: http://repo1.maven.org/maven2/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/jrcadapter/1.0/jrcadapter-1.0.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact. Missing:
----------
1) com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371:Concurrent:jar:1.0
Try downloading the file manually from the project website. Then,
install it using the command:
mvn install:install-file -DgroupId=com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371 -DartifactId=Concurrent -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371 -DartifactId=Concurrent -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) root.project:web:war:1.0 2)
com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371:Concurrent:jar:1.0
我的pom文件对于水晶报告所需的各种jar文件有以下几行:
<dependency>
<groupId>com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371</groupId>
<artifactId>rasapp</artifactId>
<version>1.0</version>
</dependency>
任何帮助都将不胜感激。
谢谢,杰森
答案 0 :(得分:2)
您绝对确定您拥有正确的存储库备份吗?
jar文件肯定在本地存储库中
除非您将Maven配置为查找别处,否则丢失的文件应位于此处:
$HOME/.m2/repository/com/businessobjects/sdks/jrc_11_8_0_11_8_6_v1371/Concurrent/1.0/Concurrent-1.0.jar
显然Maven报告缺少依赖项。
以下依赖项是一个商业jar,它解释了它在默认Maven Central repository中不存在的原因。
<dependency>
<groupId>com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371</groupId>
<artifactId>Concurrent</artifactId>
<version>1.0</version>
</dependency>
在某个遥远的时间点,这种依赖关系是使用以下命令之类的东西进入本地repositoy:
mvn install:install-file -DgroupId=com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371 -DartifactId=Concurrent -Dversion=1.0 -Dpackaging=jar -Dfile=Concurrent.jar
使用这种机制来管理第三方依赖,是在不同的机器上复制构建时保证很多乐趣的最好方法....
根据我的经验,使用Maven存储库管理器是无可替代的:
事实上,如果这不仅仅是一次性活动可能是为这些缺少的依赖项设置正确管理的存储库的想法。
答案 1 :(得分:0)
您需要先了解哪个存储库是您的&#34; rasapp&#34; jar找到然后在settings.xml中添加该存储库url,这个jar将被下载。