Closed mhvelplund closed 7 years ago
It's trivial to add a repository to the top-level POM to get past downloading jspf.core-1.0.2.jar
, e.g.:
<repository>
<id>KEEPS-Artifacts-Alt</id>
<name>KEEP Artifacts-releases (alternative)</name>
<url>http://repository.mygrid.org.uk/artifactory/simple/keep</url>
</repository>
... but that merely pushes the compiler failure to later in the process:
...
[INFO] ------------------------------------------------------------------------
[INFO] Building dbptk-module-siard 2.0.0
[INFO] ------------------------------------------------------------------------
Downloading: http://artifactory.keep.pt/keep/com/databasepreservation/dbptk-bindings-siard1/1.1.1/dbptk-bindings-siard1-1.1.1.pom
Downloading: http://artifactory.keep.pt/keep/com/databasepreservation/dbptk-bindings-siard2/1.1.1/dbptk-bindings-siard2-1.1.1.pom
Downloading: http://artifactory.keep.pt/keep/com/databasepreservation/dbptk-bindings-siarddk/1.3.0/dbptk-bindings-siarddk-1.3.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Database Preservation Toolkit ...................... SUCCESS [ 0.096 s]
[INFO] dbptk-model ........................................ SUCCESS [ 2.191 s]
[INFO] dbptk-modules ...................................... SUCCESS [ 0.139 s]
[INFO] dbptk-module-dbml .................................. SUCCESS [ 0.154 s]
[INFO] dbptk-module-jdbc .................................. SUCCESS [ 0.206 s]
[INFO] dbptk-module-list-tables ........................... SUCCESS [ 0.080 s]
[INFO] dbptk-module-ms-access ............................. SUCCESS [ 0.095 s]
[INFO] dbptk-module-mysql ................................. SUCCESS [ 0.091 s]
[INFO] dbptk-module-oracle ................................ SUCCESS [ 0.075 s]
[INFO] dbptk-module-postgresql ............................ SUCCESS [ 0.110 s]
[INFO] dbptk-module-siard ................................. FAILURE [ 1.137 s]
[INFO] dbptk-module-solr .................................. SKIPPED
[INFO] dbptk-module-sql-server ............................ SKIPPED
[INFO] dbptk-core ......................................... SKIPPED
[INFO] dbptk-module-db2 ................................... SKIPPED
[INFO] dbptk-module-odbc .................................. SKIPPED
[INFO] dbptk-module-sql-file .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.669 s
[INFO] Finished at: 2017-09-06T13:45:40+02:00
[INFO] Final Memory: 37M/484M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dbptk-module-siard: Could not resolve dependencies for project com.databasepreservation:dbptk-module-siard:jar:2.0.0: Failed to collect dependencies at com.databasepreservation:dbptk-bindings-siard1:jar:1.1.1: Failed to read artifact descriptor for com.databasepreservation:dbptk-bindings-siard1:jar:1.1.1: Could not transfer artifact com.databasepreservation:dbptk-bindings-siard1:pom:1.1.1 from/to KEEPS-Artifacts (http://artifactory.keep.pt/keep): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
This happens because the repository http://artifactory.keep.pt/keep now redirects to its HTTPS version (https://artifactory.keep.pt/keep) which has a LetsEncrypt certificate and you are using an outdated version of Java in your maven command.
Please update your Java to a version equal or greater to Java 8 update 101. See this for more details: https://stackoverflow.com/a/34111150
To check which Java version you are using you can do:
$ mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T20:39:06+01:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: pt_PT, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
Your were right. I was using an older version og Java 1.8. Summarizing the SO for others coming here, I had to do the following to get past the problem (on OSX):
$ export JAVA_HOME=$(/usr/libexec/java_home)
$ sudo cp -a $JAVA_HOME/jre/lib/security/cacerts $JAVA_HOME/jre/lib/security/cacerts.orig
$ wget https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der
$ sudo keytool -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -importcert -alias lets-encrypt-x3-cross-signed -file lets-encrypt-x3-cross-signed.der
Compilation now fails later in the dbptk-core
module while running tests:
Failed tests:
TestSIARDDKImportModule.testArchiveSplitInMultipleFolders:37 Expected the content of [/var/folders/2_/10gf5rhs4bb9qd5sfvkdf9xh0000gn/T/AVID.TST.4000.1/Indices/fileIndex.xml] to match the content of [/Users/mhv/tmp/db-preservation-toolkit/dbptk-core/target/test-classes/siarddk/AVID.TST.4000.1/Indices/fileIndex.xml]
TestSIARDDKImportModule.testArchiveWithXmlHexBinaryData:67 Expected import of siard-dk archive [/Users/mhv/tmp/db-preservation-toolkit/dbptk-core/target/test-classes/siarddk/AVID.HEX.1000.1] followed by export to siard-dk archive [/var/folders/2_/10gf5rhs4bb9qd5sfvkdf9xh0000gn/T/AVID.HEX.2000.1] to succeed.
That can be handled with: mvn clean package -DskipTests
😄
Unit tests might be failing due to missing installed dependencies. @chalkos please create another issue to document which dependencies need to be installed in order to run the full set of unit tests.
@mhvelplund to note that simply downloading and installing the latest Java JDK would also have worked.
The POM files indicate that the project is a Java 7 project? I don't think there is a version of JDK 7 that has the newest certs.
Yes, that is true, if you'd like to use Java 7 to compile it your solutions is the most adequate.
"adequate" 🤣
Anyway, thanks for the quick response!
please create another issue to document which dependencies need to be installed in order to run the full set of unit tests.
@luis100 I don't think there are any besides having databases configured as described in the README. But the development documentation could use an update. Added an issue for that: #320
Description:
Steps required to reproduce the bug:
rm -rf ~/.m2/repository
~/.m2/settings.xml
)mvn clean package
The result is the following: