Eclipse Maven Project无法解析依赖项

时间:2016-10-21 13:12:07

标签: java eclipse maven svn dependencies

这是我在这个领域的第一个问题,因为我没有使用Eclipse和Maven。所以,放纵吧!我一直在寻找解决方案而没有运气,所以我希望它不会重复。

我正在尝试在Eclipse中构建一个Maven项目。该项目从Subversion存储库中签出。它具有自定义pom.xml文件,它们包含来自VPN远程存储库的多个依赖项。我有一个带有jar的本地文件夹和所有必需的文件。如果远程文件不可用或不存在,则应从本地文件夹加载。我确实所有的依赖声明都是正确的,并且maven设置指定了文件夹的正确路径。文件夹名称以“。”开头。并且macOS将这些文件处理为隐藏(我不认为这是问题),因为Maven在目录中找到了一些文件,除了 milyn / flute / 1.3 / flute-1.3.pom 。我希望一切都清楚。 对不起,很长的帖子。

控制台日志更好地讲述了这个故事:

[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] CTA main project
[INFO] cta-bom
[INFO] cta-common
[INFO] cta-model
[INFO] cta-birt
[INFO] cta-dto
[INFO] cta-business
[INFO] cta-web
[INFO] cta-test
[INFO]                                                                         
[INFO] ----------------------------------------------------------------
[INFO] Building CTA main project 1.0.10-SNAPSHOT
[INFO] ----------------------------------------------------------------
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties                   (clean-properties) @ cta ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/developer.properties
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cta ---
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (build-properties) @ cta ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/developer.properties
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ cta ---
[INFO] Executing: /bin/sh -c cd "/Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta" && svn --non-interactive info
[INFO] Working directory: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta
[INFO] Storing buildNumber: 1702 at timestamp: 1477050870632
[INFO] Executing: /bin/sh -c cd "/Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta" && svn --non-interactive info
[INFO] Working directory: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta
[INFO] Storing buildScmBranch: trunk
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cta ---
[INFO] Installing /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/pom.xml to /Users/tothkristof/.m2/repository/hu/innovitech/cta/cta/1.0.10-SNAPSHOT/cta-1.0.10-SNAPSHOT.pom
[INFO]                                                                         
[INFO] ----------------------------------------------------------------
[INFO] Building cta-bom 1.0.10-SNAPSHOT
[INFO] ----------------------------------------------------------------
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (clean-properties) @ cta-bom ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-bom/developer.properties
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cta-bom ---
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (build-properties) @ cta-bom ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-bom/developer.properties
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ cta-bom ---
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cta-bom ---
[INFO] Installing /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-bom/pom.xml to /Users/tothkristof/.m2/repository/hu/innovitech/cta/cta-bom/1.0.10-SNAPSHOT/cta-bom-1.0.10-SNAPSHOT.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cta-common 1.0.10-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (clean-properties) @ cta-common ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/developer.properties
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cta-common ---
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties     (build-properties) @ cta-common ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/developer.properties
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ cta-common ---
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ cta-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ cta-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ cta-common ---
[INFO] Not copying test resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ cta-common ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ cta-common ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ cta-common ---
[INFO] Building jar: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/target/cta-common-1.0.10-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cta-common ---
[INFO] Installing /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/target/cta-common-1.0.10-SNAPSHOT.jar to /Users/tothkristof/.m2/repository/hu/innovitech/cta/cta-common/1.0.10-SNAPSHOT/cta-common-1.0.10-SNAPSHOT.jar
[INFO] Installing /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-common/pom.xml to /Users/tothkristof/.m2/repository/hu/innovitech/cta/cta-common/1.0.10-SNAPSHOT/cta-common-1.0.10-SNAPSHOT.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cta-model 1.0.10-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties     (clean-properties) @ cta-model ---
[WARNING] Ignoring missing properties file:     /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-model/developer.properties
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cta-model ---
[INFO] 
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (build-properties) @ cta-model ---
[WARNING] Ignoring missing properties file: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-model/developer.properties
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ cta-model ---
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ cta-model ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ cta-model ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 46 source files to /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-model/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ cta-model ---
[INFO] Not copying test resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ cta-model ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cta-model ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ cta-model ---
[INFO] Building jar: /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-model/target/cta-model-1.0.10-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ cta-model ---
[INFO] Installing /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-model/target/cta-model-1.0.10-SNAPSHOT.jar to /Users/tothkristof/.m2/repository/hu/innovitech/cta/cta-model/1.0.10-SNAPSHOT/cta-model-1.0.10-SNAPSHOT.jar
[INFO] Installing /Users/tothkristof/Documents/Programming/Java Projects/CTA Project/cta/cta-model/pom.xml to /Users/tothkristof/.m2/repository/hu/innovitech/cta/cta-model/1.0.10-SNAPSHOT/cta-model-1.0.10-SNAPSHOT.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cta-birt 1.0.10-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://maven.innovitech.internal/nexus/content/groups/public/milyn/flute/1.3/flute-1.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] CTA main project ................................... SUCCESS [  1.250 s]
[INFO] cta-bom ............................................ SUCCESS [  0.016 s]
[INFO] cta-common ......................................... SUCCESS [  2.854 s]
[INFO] cta-model .......................................... SUCCESS [  1.733 s]
[INFO] cta-birt ........................................... FAILURE [  6.206 s]
[INFO] cta-dto ............................................ SKIPPED
[INFO] cta-business ....................................... SKIPPED
[INFO] cta-web ............................................ SKIPPED
[INFO] cta-test ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.792 s
[INFO] Finished at: 2016-10-21T13:54:41+02:00
[INFO] Final Memory: 35M/365M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project cta-birt: Could not resolve dependencies for project hu.innovitech.cta:cta-birt:jar:1.0.10-SNAPSHOT: Failed to collect dependencies at hu.ss.weld:weld-fw-birt:jar:1.0.3 -> org.eclipse.birt.runtime:org.eclipse.birt.runtime:jar:4.3.0 -> milyn:flute:jar:1.3: Failed to read artifact descriptor for milyn:flute:jar:1.3: Could not transfer artifact milyn:flute:pom:1.3 from/to innovitech-repository (https://maven.innovitech.internal/nexus/content/groups/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :cta-birt

如果您需要更多信息文件或路径,我可以添加它们。

提前致谢,

克里斯托夫

1 个答案:

答案 0 :(得分:1)

在HTTPS站点上下载时,需要在信任库中添加服务器证书。 然后,当您运行maven命令时,不要忘记为此信任库添加环境属性。

以下是有关如何创建信任库的链接: Digital Certificate: How to import .cer file in to .truststore file using?

并且:

-Djavax.net.ssl.trustStore = /家庭/路径/到/信任

在运行编译时使用信任库。

您也可以按照Maven的指南进行操作:

http://maven.apache.org/guides/mini/guide-repository-ssl.html