t0thkr1s
t0thkr1s

Reputation: 105

Eclipse Maven Project could not resolve dependencies

This is my first question in this field, because I have not worked with Eclipse and Maven. So, be indulgent! I have been searching for solution for weeks with no luck, so I hope it is not a duplicate.

I'm trying to build a Maven project in Eclipse. The project is checked out from a Subversion repository. It has custom pom.xml files and they contain several dependencies from VPN remote repository. I have a local folder with jars and all the necessary files. If a remote file is unavailable or not exists, it should load from the local folder. I am really sure all the dependency declarations are correct and the maven settings specifies the correct path to the folder. The folder name start with a "." and the macOS handles these files as hidden (I don't think this is the problem), because Maven finds some of the files in the directory, except the milyn/flute/1.3/flute-1.3.pom. I hope everything is clear. Sorry for the long post.

The console log tells the story much better:

[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

If you need more information files or path, I can add them.

Thanks in advance,

Kristof

Upvotes: 0

Views: 1752

Answers (1)

C&#233;dric O.
C&#233;dric O.

Reputation: 101

As you are downloading on an HTTPS site, you need to add the server certificate in your trust store. Then, when you run your maven command, don't forget to add the environment properties for this trust store.

Here is a link on how to create the truststore : Digital Certificate: How to import .cer file in to .truststore file using?

And :

-Djavax.net.ssl.trustStore=/home/path/to/truststore

To use the truststore when running your compilation.

You can also follow this guide from Maven :

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

Upvotes: 1

Related Questions