0

我正在尝试重建开发环境,以对 2009 年开发的 Web 应用程序进行一些更改。我在本地存储库中遇到了 maven 和 Crystal 报告工件的问题。jar 文件肯定在本地存储库中。我有一份旧 pom 文件的副本,还有一份 .m2 本地 repo 的备份。当我运行 mvn clean compile 时,我得到以下输出: 注意:下划线停止 url。

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>

任何帮助,将不胜感激。

谢谢,杰森

4

2 回答 2

3

您绝对确定您拥有正确的存储库备份吗?

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 中央存储库中不存在。

<dependency>
<groupId>com.businessobjects.sdks.jrc_11_8_0_11_8_6_v1371</groupId>
<artifactId>Concurrent</artifactId>
<version>1.0</version> 
</dependency>

在某个遥远的时间点,使用类似以下命令的东西将这种依赖关系嵌入到本地存储库中:

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

使用这种机制来管理 3rd 方依赖项,是保证在不同机器上复制构建时获得很多乐趣的最佳方式......

根据我的经验,使用 Maven 存储库管理器是无可替代的:

事实上,如果这不止一次的活动可能是为这些缺失的依赖项设置适当管理的存储库的想法。

于 2012-07-22T12:10:49.667 回答
0

您需要首先找出您的“rasapp”jar 位于哪个存储库中,然后在您的 settings.xml 中添加该存储库 url,这个 jar 将被下载。

于 2012-08-29T12:22:22.313 回答