authenteq-zz / java-bigchaindb-driver

Official BigchainDB Java driver
https://www.bigchaindb.com
Apache License 2.0
32 stars 22 forks source link

mvn could not resolve java-crypto-conditions dependencies #1

Closed diminator closed 6 years ago

diminator commented 7 years ago

upon mvn install

[WARNING] The POM for org.interledger:java-crypto-conditions:jar:2.0.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.227 s
[INFO] Finished at: 2017-09-12T17:40:09+02:00
[INFO] Final Memory: 10M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project java-bigchaindb-driver: Could not resolve dependencies for project com.authenteq:java-bigchaindb-driver:jar:0.1: Could not find artifact org.interledger:java-crypto-conditions:jar:2.0.0-SNAPSHOT -> [Help 1]

mvn -v

Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.8.0-59-generic", arch: "amd64", family: "unix"
bohdanbezp commented 7 years ago

java-crypto-conditions dependency should be installed into the local maven repo before building. Updated the installation guide accordingly.

diminator commented 7 years ago

FYI: https://github.com/interledger/java-crypto-conditions/issues/70

which yields a different version: java-crypto-conditions:0.3.0.SNAPSHOT rather than 2.0.0.SNAPSHOT Wondering which one is used in the project?

[INFO] 6 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.144 s
[INFO] Finished at: 2017-09-15T10:00:05+02:00
[INFO] Final Memory: 15M/207M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project java-bigchaindb-driver: Compilation failure: Compilation failure:
[ERROR] /home/dimi/code_ascribe/java-bigchaindb-driver/src/main/java/com/authenteq/BigchaindbTransaction.java:[28,46] package org.interledger.cryptoconditions.types does not exist
[ERROR] /home/dimi/code_ascribe/java-bigchaindb-driver/src/main/java/com/authenteq/BigchaindbTransaction.java:[29,46] package org.interledger.cryptoconditions.types does not exist
[ERROR] /home/dimi/code_ascribe/java-bigchaindb-driver/src/main/java/com/authenteq/BigchaindbTransaction.java:[70,9] cannot find symbol
[ERROR] symbol:   class Ed25519Sha256Condition
[ERROR] location: class com.authenteq.BigchaindbTransaction
[ERROR] /home/dimi/code_ascribe/java-bigchaindb-driver/src/main/java/com/authenteq/BigchaindbTransaction.java:[70,49] cannot find symbol
[ERROR] symbol:   class Ed25519Sha256Condition
[ERROR] location: class com.authenteq.BigchaindbTransaction
[ERROR] /home/dimi/code_ascribe/java-bigchaindb-driver/src/main/java/com/authenteq/BigchaindbTransaction.java:[135,13] cannot find symbol
[ERROR] symbol:   class Ed25519Sha256Fulfillment
[ERROR] location: class com.authenteq.BigchaindbTransaction
[ERROR] /home/dimi/code_ascribe/java-bigchaindb-driver/src/main/java/com/authenteq/BigchaindbTransaction.java:[136,27] cannot find symbol
[ERROR] symbol:   class Ed25519Sha256Fulfillment
[ERROR] location: class com.authenteq.BigchaindbTransaction
[ERROR] -> [Help 1]
bohdanbezp commented 7 years ago

The one used in this driver is 2.0.0.SNAPSHOT, and this rises the question: maybe it would be just easier to maintain and build if the static version will be included with the driver? In such case both Android and standard Java runtime will be supported out of the box.

alvin-reyes commented 7 years ago

Did you resolved this? Workround is to include it (if you're still using Maven) like this:

<dependency>
    <groupId>org.interledger</groupId>
    <artifactId>java-crypto-conditions</artifactId>
    <version>2.0.0-SNAPSHOT</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/libs/java-crypto-conditions-2.0.0-SNAPSHOT.jar</systemPath>
</dependency>
bohdanbezp commented 7 years ago

Right now we would probaly stick with including the static dependency. Later we should change the driver to support 3.0.0 of java-crypto-conditions

agwego commented 6 years ago

I don't know where you got java-crypto-conditions-2.0.0-SNAPSHOT.jar from but it doesn't match any of the various crypto-conditions jars available or source for that matter.

From java-crypto-conditions-2.0.0-SNAPSHOT.jar org/interledger/cryptoconditions/types/Ed25519Sha256Condition.class org/interledger/cryptoconditions/types/ThresholdSha256Fulfillment.class org/interledger/cryptoconditions/types/Ed25519Sha256Fulfillment.class

So https://github.com/interledger/java-crypto-conditions is now DEPRECATED in favour of https://github.com/hyperledger/quilt/tree/master/crypto-conditions. Both versions use the following class structure. ./org/interledger/cryptoconditions/Ed25519Sha256Condition.java ./org/interledger/cryptoconditions/Ed25519Sha256Fulfillment.java ./org/interledger/cryptoconditions/ThresholdSha256Fulfillment.java

Unless I'm totally missing something like the wrong github project,java-crypto-conditions-2.0.0-SNAPSHOT.jar seems out of sync with those projects.

bohdanbezp commented 6 years ago

Yeah, right, the driver right now depends on a deprecated version, and updating it to proper version is in TODO list.

agwego commented 6 years ago

I took a quick shot at doing it, the stumbling block is uri which is missing from the quilt version. Which poses a quandary which is fork quilt and submit the pull request or update java-bigchaindb-driver and remove the uri references.

alvin-reyes commented 6 years ago

I'll create an issue here for Tracking purposes. I think we need to use the latest version and avoid using the deprecated one.

alvin-reyes commented 6 years ago

Newly Travis CI build failed because of this. Issue for this is here https://github.com/authenteq/java-bigchaindb-driver/issues/43

alvin-reyes commented 6 years ago

This is already fixed by https://github.com/authenteq/java-bigchaindb-driver/pull/58