eXist-db / expath-crypto-module

expath
GNU Lesser General Public License v2.1
1 stars 9 forks source link

Update for the latest version of eXist #11

Closed adamretter closed 3 years ago

claudius108 commented 5 years ago

Agree.

joewiz commented 5 years ago

Is this PR backward-compatible with eXist 4.x? (The package currently declares version compatibility with eXist 4.4 or later.)

adamretter commented 5 years ago

@joewiz I don't think so

joewiz commented 5 years ago

@adamretter Great. I'd like to be able to give this PR a quick test but am unable to build the project.

Adam or @claudius108 Could you please let me know the steps you use to build it?

claudius108 commented 5 years ago

Run "mvn clean package"

joewiz commented 5 years ago

@claudius108 Thanks for that hint! Unfortunately, the build encounters an error. Here is my console output for the master branch:

$ mvn clean package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for ro.kuberam.expath.exist:crypto:0.8.0-SNAPSHOT: Could not find artifact ro.kuberam.expath.exist:base:pom:1.6.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 10
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project ro.kuberam.expath.exist:crypto:0.8.0-SNAPSHOT (/Users/joe/workspace/crypto-exist-java-lib/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for ro.kuberam.expath.exist:crypto:0.8.0-SNAPSHOT: Could not find artifact ro.kuberam.expath.exist:base:pom:1.6.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 10 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Here is the output for this PR's branch:

$ mvn clean package
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/ro/kuberam/expath/exist/base/1.5.4/base-1.5.4.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for ro.kuberam.expath.exist:crypto:0.7: Could not find artifact ro.kuberam.expath.exist:base:pom:1.5.4 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 7, column 10
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project ro.kuberam.expath.exist:crypto:0.7 (/Users/joe/workspace/crypto-exist-java-lib/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for ro.kuberam.expath.exist:crypto:0.7: Could not find artifact ro.kuberam.expath.exist:base:pom:1.5.4 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 7, column 10 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

This is with Maven 3.6.1 on macOS 10.14.6. Do you have any suggestions?

claudius108 commented 5 years ago

Why do you changed the POM file to use ro.kuberam.expath.exist:base:pom:1.6.0-SNAPSHOT?

joewiz commented 5 years ago

I didn’t change the POM file... I just checked out this PR’s branch and the master branch.

claudius108 commented 5 years ago

Use version 1.5.5 for parent, and it will work:

    <groupId>ro.kuberam.expath.exist</groupId>
    <artifactId>base</artifactId>
    <version>1.5.5</version>
joewiz commented 5 years ago

@claudius108 Thanks! But from a fresh clone of the repository, checked out to master, and your change to pom.xml in place, I still get an error:

$ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< ro.kuberam.expath.exist:crypto >-------------------
[INFO] Building eXist-db EXPath Cryptographic library 0.8.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from exist: https://raw.github.com/eXist-db/mvn-repo/master/ro/kuberam/libs/java/crypto/1.7.0-SNAPSHOT/maven-metadata.xml
Downloading from exist: https://raw.github.com/eXist-db/mvn-repo/master/ro/kuberam/libs/java/crypto/1.7.0-SNAPSHOT/crypto-1.7.0-SNAPSHOT.pom
[WARNING] The POM for ro.kuberam.libs.java:crypto:jar:1.7.0-SNAPSHOT is missing, no dependency information available
Downloading from exist: https://raw.github.com/eXist-db/mvn-repo/master/ro/kuberam/libs/java/crypto/1.7.0-SNAPSHOT/crypto-1.7.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.553 s
[INFO] Finished at: 2019-07-24T16:18:08-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project crypto: Could not resolve dependencies for project ro.kuberam.expath.exist:crypto:jar:0.8.0-SNAPSHOT: Could not find artifact ro.kuberam.libs.java:crypto:jar:1.7.0-SNAPSHOT in exist (https://raw.github.com/eXist-db/mvn-repo/master/) -> [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

Doing the same with this PR's branch, I get:

$ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< ro.kuberam.expath.exist:crypto >-------------------
[INFO] Building eXist-db EXPath Cryptographic library 0.7
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for ro.kuberam.libs.java:crypto:jar:1.6 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.631 s
[INFO] Finished at: 2019-07-24T16:22:02-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project crypto: Could not resolve dependencies for project ro.kuberam.expath.exist:crypto:jar:0.7: Failure to find ro.kuberam.libs.java:crypto:jar:1.6 in https://raw.github.com/eXist-db/mvn-repo/master/ was cached in the local repository, resolution will not be reattempted until the update interval of exist has elapsed or updates are forced -> [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
claudius108 commented 5 years ago

You could use version 1.5 for ro.kuberam.libs.java:crypto. This is the latest I published in the maven repo.

joewiz commented 5 years ago

@claudius108 Thanks, I think we're getting closer, but even with the changes you suggested to pom.xml, I'm getting compilation errors when building the master branch:

e$ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< ro.kuberam.expath.exist:crypto >-------------------
[INFO] Building eXist-db EXPath Cryptographic library 0.8.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ crypto ---
[INFO] Deleting /Users/joe/workspace/crypto-exist-java-lib/target
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven) @ crypto ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ crypto ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ crypto ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to /Users/joe/workspace/crypto-exist-java-lib/target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java: /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java uses or overrides a deprecated API.
[WARNING] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java: Recompile with -Xlint:deprecation for details.
[WARNING] Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[INFO] 3 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[128,75] incompatible types: byte[] cannot be converted to java.io.InputStream
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[158,75] incompatible types: byte[] cannot be converted to java.io.InputStream
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[132,52] constructor NodeInputStream in class org.exist.validation.internal.node.NodeInputStream cannot be applied to given types;
  required: org.exist.Database,org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue
  found: org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue
  reason: actual and formal argument lists differ in length
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[263,70] cannot find symbol
  symbol:   method getDescription()
  location: variable DENIED_KEYSTORE of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[269,59] cannot find symbol
  symbol:   method getDescription()
  location: variable KEYSTORE_URL of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/EXpathCryptoException.java:[33,80] cannot find symbol
  symbol:   method getDescription()
  location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,44] cannot find symbol
  symbol:   method getCode()
  location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,139] cannot find symbol
  symbol:   method getDescription()
  location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError
[INFO] 8 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.413 s
[INFO] Finished at: 2019-07-25T11:13:18-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project crypto: Compilation failure: Compilation failure: 
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[128,75] incompatible types: byte[] cannot be converted to java.io.InputStream
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[158,75] incompatible types: byte[] cannot be converted to java.io.InputStream
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[132,52] constructor NodeInputStream in class org.exist.validation.internal.node.NodeInputStream cannot be applied to given types;
[ERROR]   required: org.exist.Database,org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue
[ERROR]   found: org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue
[ERROR]   reason: actual and formal argument lists differ in length
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[263,70] cannot find symbol
[ERROR]   symbol:   method getDescription()
[ERROR]   location: variable DENIED_KEYSTORE of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[269,59] cannot find symbol
[ERROR]   symbol:   method getDescription()
[ERROR]   location: variable KEYSTORE_URL of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/EXpathCryptoException.java:[33,80] cannot find symbol
[ERROR]   symbol:   method getDescription()
[ERROR]   location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,44] cannot find symbol
[ERROR]   symbol:   method getCode()
[ERROR]   location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,139] cannot find symbol
[ERROR]   symbol:   method getDescription()
[ERROR]   location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError
[ERROR] -> [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/MojoFailureException

The changes to pom.xml were:

claudius108 commented 5 years ago

Hi,

I cannot test in order to fix, as my internet connection is broken. I hope it will be repaired very soon.

Claudius On Jul 25, 2019 6:17 PM, "Joe Wicentowski" notifications@github.com wrote:

@claudius108 https://github.com/claudius108 Thanks, I think we're getting closer, but even with the changes you suggested to pom.xml, I'm getting compilation errors when building the master branch:

e$ mvn clean package [INFO] Scanning for projects... [INFO] [INFO] -------------------< ro.kuberam.expath.exist:crypto >------------------- [INFO] Building eXist-db EXPath Cryptographic library 0.8.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ crypto --- [INFO] Deleting /Users/joe/workspace/crypto-exist-java-lib/target [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven) @ crypto --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ crypto --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ crypto --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 10 source files to /Users/joe/workspace/crypto-exist-java-lib/target/classes [INFO] ------------------------------------------------------------- [WARNING] COMPILATION WARNING : [INFO] ------------------------------------------------------------- [WARNING] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java: /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java uses or overrides a deprecated API. [WARNING] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java: Recompile with -Xlint:deprecation for details. [WARNING] Some messages have been simplified; recompile with -Xdiags:verbose to get full output [INFO] 3 warnings [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[128,75] incompatible types: byte[] cannot be converted to java.io.InputStream [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[158,75] incompatible types: byte[] cannot be converted to java.io.InputStream [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[132,52] constructor NodeInputStream in class org.exist.validation.internal.node.NodeInputStream cannot be applied to given types; required: org.exist.Database,org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue found: org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue reason: actual and formal argument lists differ in length [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[263,70] cannot find symbol symbol: method getDescription() location: variable DENIED_KEYSTORE of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[269,59] cannot find symbol symbol: method getDescription() location: variable KEYSTORE_URL of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/EXpathCryptoException.java:[33,80] cannot find symbol symbol: method getDescription() location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,44] cannot find symbol symbol: method getCode() location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,139] cannot find symbol symbol: method getDescription() location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError [INFO] 8 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.413 s [INFO] Finished at: 2019-07-25T11:13:18-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project crypto: Compilation failure: Compilation failure: [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[128,75] incompatible types: byte[] cannot be converted to java.io.InputStream [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/encrypt/EncryptionFunctions.java:[158,75] incompatible types: byte[] cannot be converted to java.io.InputStream [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[132,52] constructor NodeInputStream in class org.exist.validation.internal.node.NodeInputStream cannot be applied to given types; [ERROR] required: org.exist.Database,org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue [ERROR] found: org.exist.storage.serializers.Serializer,org.exist.xquery.value.NodeValue [ERROR] reason: actual and formal argument lists differ in length [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[263,70] cannot find symbol [ERROR] symbol: method getDescription() [ERROR] location: variable DENIED_KEYSTORE of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/digitalSignature/GenerateSignatureFunction.java:[269,59] cannot find symbol [ERROR] symbol: method getDescription() [ERROR] location: variable KEYSTORE_URL of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/EXpathCryptoException.java:[33,80] cannot find symbol [ERROR] symbol: method getDescription() [ERROR] location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,44] cannot find symbol [ERROR] symbol: method getCode() [ERROR] location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] /Users/joe/workspace/crypto-exist-java-lib/src/main/java/org/expath/exist/crypto/ExpathCryptoErrorCode.java:[14,139] cannot find symbol [ERROR] symbol: method getDescription() [ERROR] location: variable cryptoError of type ro.kuberam.libs.java.crypto.CryptoError [ERROR] -> [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/MojoFailureException

The changes to pom.xml were:

-

Change line 10:

  • 1.6.0-SNAPSHOT
  • 1.5.5
  • Change line 47:

  • 1.7.0-SNAPSHOT
  • 1.5

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eXist-db/crypto-exist-java-lib/pull/11?email_source=notifications&email_token=AANKHHS5KNFACMQQKR722NDQBG7XZA5CNFSM4G42FYD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ZZR6Q#issuecomment-515086586, or mute the thread https://github.com/notifications/unsubscribe-auth/AANKHHR2QRG2POO7JLRTDTTQBG7XZANCNFSM4G42FYDQ .

claudius108 commented 5 years ago

The below pom, along with the change @adamretter proposes with this PR, will fix the build.

` <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<groupId>ro.kuberam.expath.exist</groupId>
<artifactId>crypto</artifactId>
<version>0.8.0-SNAPSHOT</version>
<name>eXist-db EXPath Cryptographic library</name>
<description>eXist-db wrapper for EXPath Cryptographic Java library</description>
<url>http://expath.org/spec/crypto</url>
<inceptionYear>2016</inceptionYear>
<licenses>
    <license>
        <name>GNU Lesser General Public License version 2.1</name>
        <url>https://opensource.org/licenses/LGPL-2.1</url>
        <distribution>repo</distribution>
    </license>
</licenses>

<organization>
    <name>Kuberam</name>
    <url>http://kuberam.ro</url>
</organization>

<developers>
    <developer>
        <id>claudius</id>
        <name>Claudius Teodorescu</name>
        <email>claudius.teodorescu@gmail.com</email>
    </developer>
</developers>

<contributors>
    <contributor>
        <name>Adam Retter</name>
    </contributor>
</contributors>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>  
    <crypto.java.lib.version>1.7</crypto.java.lib.version>
    <package.title>EXPath Cryptographic Module Implementation</package.title>
    <exist.version>4.7.0</exist.version>
    <maven.version>3.6.0</maven.version>
    <package.name>http://expath.org/ns/${project.artifactId}</package.name>
    <package.abbrev>expath-${project.artifactId}-exist-lib</package.abbrev>
</properties>

<dependencies>
    <dependency>
        <groupId>ro.kuberam.libs.java</groupId>
        <artifactId>crypto</artifactId>
        <version>${crypto.java.lib.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.exist-db</groupId>
        <artifactId>exist-core</artifactId>
        <version>${exist.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>1.4.01</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.11.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.evolvedbinary.j8fu</groupId>
        <artifactId>j8fu</artifactId>
        <version>1.9.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>exist</id>
        <url>https://raw.github.com/eXist-db/mvn-repo/master/</url>
    </repository>
</repositories>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M2</version>
            <executions>
                <execution>
                    <id>enforce-maven</id>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                    <configuration>
                        <rules>
                            <requireMavenVersion>
                                <version>${maven.version}</version>
                            </requireMavenVersion>
                        </rules>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.0.2</version>
            <configuration>
                <archive>
                    <manifest>
                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                    </manifest>
                    <manifestEntries>
                        <Build-Tag>${build-tag}</Build-Tag>
                        <Git-Commit>${build-commit}</Git-Commit>
                        <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                        <Build-Version>${build-version}</Build-Version>
                        <Build-Timestamp>${build-tstamp}</Build-Timestamp>
                        <Source-Repository>${project.scm.connection}</Source-Repository>
                        <Description>${project.description}</Description>
                        <Implementation-URL>${project.url}</Implementation-URL>
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.ruleoftech</groupId>
            <artifactId>markdown-page-generator-plugin</artifactId>
            <version>2.1.0</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <inputDirectory>${project.basedir}</inputDirectory>
                <headerHtmlFile>${project.basedir}/build/header.html</headerHtmlFile>
                <footerHtmlFile>${project.basedir}/build/footer.html</footerHtmlFile>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.coderplus.maven.plugins</groupId>
            <artifactId>copy-rename-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
                <execution>
                    <id>rename-readme-file</id>
                    <phase>package</phase>
                    <goals>
                        <goal>rename</goal>
                    </goals>
                    <configuration>
                        <sourceFile>${project.build.directory}/html/README.html</sourceFile>
                        <destinationFile>${project.build.directory}/html/index.html</destinationFile>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>ro.kuberam.maven.plugins</groupId>
            <artifactId>kuberam-expath-plugin</artifactId>
            <version>0.6.0</version>
            <executions>
                <execution>
                    <id>create-xar</id>
                    <phase>package</phase>
                    <goals>
                        <goal>make-xar</goal>
                    </goals>
                    <configuration>
                        <descriptor>build/xar-assembly.xml</descriptor>
                        <finalName>expath-${project.artifactId}-exist-lib-${project.version}</finalName>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <!-- Attach source jars -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <configuration>
                <archive>
                    <manifest>
                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                    </manifest>
                    <manifestEntries>
                        <Build-Tag>${build-tag}</Build-Tag>
                        <Git-Commit>${build-commit}</Git-Commit>
                        <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                        <Build-Version>${build-version}</Build-Version>
                        <Build-Timestamp>${build-tstamp}</Build-Timestamp>
                        <Source-Repository>${project.scm.connection}</Source-Repository>
                        <Description>${project.description}</Description>
                        <Implementation-URL>${project.url}</Implementation-URL>
                    </manifestEntries>
                </archive>
            </configuration>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <!-- Attach javadoc jars -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0-M1</version>
            <configuration>
                <archive>
                    <manifest>
                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                    </manifest>
                    <manifestEntries>
                        <Build-Tag>${build-tag}</Build-Tag>
                        <Git-Commit>${build-commit}</Git-Commit>
                        <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                        <Build-Version>${build-version}</Build-Version>
                        <Build-Timestamp>${build-tstamp}</Build-Timestamp>
                        <Source-Repository>${project.scm.connection}</Source-Repository>
                        <Description>${project.description}</Description>
                        <Implementation-URL>${project.url}</Implementation-URL>
                    </manifestEntries>
                </archive>
            </configuration>
            <executions>
                <execution>
                    <id>attach-javadocs</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

`

adamretter commented 5 years ago

@claudius108 @joewiz Okay I have taken a look...

First thing we need to do is get these two PRs merged to the base library:

  1. https://github.com/claudius108/crypto-java-lib/pull/6
  2. https://github.com/claudius108/crypto-java-lib/pull/5

Once that is done, we then secondly need to get a release of crypto-java-lib 1.8.0 to Maven Central. We can then update this module to depend on it.

@claudius108 Can you help with the above please?

claudius108 commented 5 years ago

Hi, I think that this PR can be approved. But, please, do not rely on 1.8.0 version of ro.kuberam.libs.java.crypto for this, as this is impossible for me, due to major and still untested changes I did to it. Rely on a previous version. I will tell you which one, after releasing them in maven central repo.

After this PR is approved, two steps are to be taken (I can do this):

  1. remove the dependency to the current parent POM, as I suggested some time ago;
  2. add the changes for Nick's JWS.
claudius108 commented 5 years ago

Great, and congratulations for v. 5.0! Now I will make a PR with the changes for JWS.

joewiz commented 4 years ago

@claudius108 Forgive me if I made a mistake with https://github.com/eXist-db/crypto-exist-java-lib/pull/11/commits/21526a4dfb6707c20a296fdede7ae0c66b53e52d, but I was seeking to get the repo and this PR updated and ready to incorporate the same fix applied in https://github.com/eXist-db/exist/commit/ad0bed13475e4f1cdebd5a9b251db9df43c0860a. However, I wasn't successful at finding the same references to UnsynchronizedByteArrayInputStream in the code. I'll back away, head hung low. Thanks in advance for your help updating the crypto lib for compatibility with eXist 5.3.0-SNAPSHOT!

claudius108 commented 4 years ago

Hi, I made the xar for eXist 5.3.0. Is anyone willing to test it? I was not able to upload it to the eXist public repo. I can send it by email.

Thanks, Claudius

joewiz commented 4 years ago

That’s great, Claudius, thanks! I’d be happy to test it.

joewiz commented 4 years ago

@claudius108 I've successfully installed the xar that you sent me, and confirmed that it doesn't suffer from the bug reported at https://github.com/eXist-db/exist/issues/3540. Looking forward to your PR!

Also, I assume that after your PR has been merged this one could be closed?

claudius108 commented 4 years ago

Hi,

There is no need for PR, as I made a new branch for eXist 5.3.0, and also renumbered the module version to be synchronized with eXist.

I was not able again to upload the xar in the public repo.

Claudius

joewiz commented 3 years ago

@claudius108 I see there is a new release available in the eXist public repo - thank you! Could you please point me to the updated source code?

joewiz commented 3 years ago

@claudius108 The new xar declares that it is compatible with eXist 4.4.0. Is it backward compatible that far, or does it require eXist 5.3.0 (as the package's version number would suggest)?

claudius108 commented 3 years ago

Hi,

I want also to thank the person who published the v. 5.3.0. of this module in eXist's public repo, as I got an error while trying to do it.

The update source code is at https://github.com/claudius108/crypto-exist-java-lib/tree/eXist-5.3.0. There the dependency is for eXist 5.3.0.

As one can see, I synchronized the module's version with the eXist's version, and I will make a new branch for each eXist and module version.

Best regards, Claudius

On Sat, 17 Oct 2020 at 22:44, Joe Wicentowski notifications@github.com wrote:

@claudius108 https://github.com/claudius108 The new xar declares that it is compatible with eXist 4.4.0. Is it backward compatible that far, or does it require eXist 5.3.0 (as the package's version number would suggest)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eXist-db/crypto-exist-java-lib/pull/11#issuecomment-711070379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANKHHQLICZMJY4RWM4NG4DSLHXYDANCNFSM4G42FYDQ .

-- http://kuberam.ro

joewiz commented 3 years ago

@claudius108 Could you please submit a PR so the latest code is in this repository? Then we can close this PR, and community maintenance and discussion of the codebase can resume here. Thank you so much, Claudius!

Regarding branches for 4.x and 5.x development, you might consult monex's example:

The analogous changes for the crypto module would be similar. You already jumped to v5.3.0 for the eXist 5.x version, so maintenance of the eXist 5.x branch might well take place in the master branch. And the eXist 4.x branch could take place in a "crypto-1.x" branch. What do you think of this?

By the way, does 5.3.0 of crypto module break only for eXist 4.x or also eXist 5.x before eXist 5.3.0?

line-o commented 3 years ago

Multiple projects depending on the crypto lib break when installed on exist 5.3.0-SNAPSHOT

Error: It is a static error if multiple functions declared or imported by a module have the number of arguments and their expanded QNames are equal (as defined by the eq operator). Error while loading module xmldb:///db/system/repo/jwt-1.0.1/test/jwt-spec.xqm: error found while loading module jwt: Error while loading module : Prolog has more than one imported module that defines the function: {http://expath.org/ns/crypto}generate-signature#7
claudius108 commented 3 years ago

I did not added the module

xmldb:///db/system/repo/jwt-1.0.1/test/jwt-spec.xqm

to the xar.

On Mon, 16 Nov 2020 at 14:13, Juri Leino notifications@github.com wrote:

Multiple projects depending on the crypto lib break when installed on exist 5.3.0-SNAPSHOT

Error: It is a static error if multiple functions declared or imported by a module have the number of arguments and their expanded QNames are equal (as defined by the eq operator). Error while loading module xmldb:///db/system/repo/jwt-1.0.1/test/jwt-spec.xqm: error found while loading module jwt: Error while loading module : Prolog has more than one imported module that defines the function: {http://expath.org/ns/crypto}generate-signature#7

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eXist-db/crypto-exist-java-lib/pull/11#issuecomment-727940996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANKHHRZ5EDYAOV73T7ZYUDSQEJPHANCNFSM4G42FYDQ .

-- http://kuberam.ro

line-o commented 3 years ago

This PR is superseded by #36