SANSA-Stack / SANSA-Template-Maven-Spark

Maven Template Project for SANSA using Spark
Apache License 2.0
5 stars 5 forks source link

Build error while trying to execute "mvn package" #2

Closed yamalight closed 6 years ago

yamalight commented 6 years ago

I'm trying to setup SANSA according to getting started page, but I'm getting the following error after running mvn clean package:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:20 min
[INFO] Finished at: 2018-09-26T14:17:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SANSA-Template-Maven-Spark: Could not resolve dependencies for project net.sansa-stack:SANSA-Template-Maven-Spark:jar:0.4.1-SNAPSHOT: Could not find artifact commons-codec:commons-codec:jar:2.0-SNAPSHOT in maven.aksw.snapshots (http://maven.aksw.org/archiva/repository/snapshots) -> [Help 1]

How can I fix that?

GezimSejdiu commented 6 years ago

Hi Tim,

glad to see that you did try to setup SANSA:).

Not sure, what was the issue, I was not able to reproduce it. I just did mvn package and the build succeed (see below).

[INFO] Replacing /home/gezim/workspace/SANSA/0.4/SANSA-Template-Maven-Spark/target/SANSA-Template-Maven-Spark-0.4.1-SNAPSHOT.jar with /home/gezim/workspace/SANSA/0.4/SANSA-Template-Maven-Spark/target/SANSA-Template-Maven-Spark-0.4.1-SNAPSHOT-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:06 min
[INFO] Finished at: 2018-09-27T09:56:33+02:00
[INFO] ------------------------------------------------------------------------

It could be that some of the snapshots are missing at your end. Try to force install them by mvn -U install and then do mvn package.

Let me know if this issue still persists, and we could debug further.

Best regards, Gezim

yamalight commented 6 years ago

Hi Gezim,

Alright, trying to run that now. Will get back to you once it finishes 🤔 Thanks!

yamalight commented 6 years ago

OK, running mvn -U install fails with the same error:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:36 min
[INFO] Finished at: 2018-09-27T10:05:45+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SANSA-Template-Maven-Spark: Could not resolve dependencies for project net.sansa-stack:SANSA-Template-Maven-Spark:jar:0.4.1-SNAPSHOT: Could not find artifact commons-codec:commons-codec:jar:2.0-SNAPSHOT in maven.aksw.snapshots (http://maven.aksw.org/archiva/repository/snapshots) -> [Help 1]
[ERROR]

Maybe you have that package in your cache? Does it still work for you if you wipe the cache and try to re-install? 🤔

yamalight commented 6 years ago

Suggestion: I can setup a CI to test that building is successful if you'd like that. Can send a PR for that beginning next week 🤔

GezimSejdiu commented 6 years ago

Yes, you are right. It may be that the package is already at my cache. Many thanks for your inputs. I just set-up a Travis CI check for this in order to have a clean environment:). Sorry, that I didn't wait for your PR (I saw your message a bit late, while I was doing the same :) ).

Let's find out what is happening and fix this issue.

Update: Travis shows the same error as yours. Will try to fix it as soon as possible :)

Best regards,

yamalight commented 6 years ago

OK, great. Please let me know when I can test it. Thanks!

yamalight commented 6 years ago

@GezimSejdiu any ETA on the fix?

GezimSejdiu commented 6 years ago

Hi Tim, still working on it :( . Not sure from which dependency or plugin this version is coming. This dependency is no longer at aksw.maven and maven snapshots central repository.

I did a rebuild to all the SANSA layers, just to see if that will fix the issue, at the same time upgraded the maven-shade-plugin to the latest version, but still, the issue persists.

Hope to fix it soon.

yamalight commented 6 years ago

Got it, please @ ping me here when it's done. Thank you! 👍

GezimSejdiu commented 6 years ago

Great! @yamalight , I think I found it :) It was because of the jets3t::0.9.4 :

 +- net.java.dev.jets3t:jets3t:jar:0.9.4:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:2.0-SNAPSHOT:compile (version selected from constraint [1.8,2.0))
[INFO] |  |  +- javax.activation:activation:jar:1.1.1:compile
[INFO] |  |  +- org.bouncycastle:bcprov-jdk15on:jar:1.52:compile
[INFO] |  |  \- com.jamesmurty.utils:java-xmlbuilder:jar:1.1:compile
[INFO] |  |     \- net.iharder:base64:jar:2.3.8:compile

The combination between 1.8 and 2.0 was not pointing to the latest release (1.11) so I had to include that dependence as a listed one!

Please, have a look and let me know. PS: We will see once more why this was happening and then we can remove this depedency again from the depedency list.

yamalight commented 6 years ago

@GezimSejdiu yep, builds successfully now, thanks! 👍