Skip to content

Conversation

@adamretter
Copy link
Contributor

No description provided.

@joewiz joewiz requested review from a team and claudius108 July 17, 2019 18:29
@claudius108
Copy link
Collaborator

Agree.

@joewiz
Copy link
Member

joewiz commented Jul 19, 2019

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

@adamretter
Copy link
Contributor Author

@joewiz I don't think so

@joewiz
Copy link
Member

joewiz commented Jul 20, 2019

@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
Copy link
Collaborator

Run "mvn clean package"

@joewiz
Copy link
Member

joewiz commented Jul 24, 2019

@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
Copy link
Collaborator

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

@joewiz
Copy link
Member

joewiz commented Jul 24, 2019

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

@claudius108
Copy link
Collaborator

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
Copy link
Member

joewiz commented Jul 24, 2019

@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
Copy link
Collaborator

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

@joewiz
Copy link
Member

joewiz commented Jul 25, 2019

@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:

    - <version>1.6.0-SNAPSHOT</version>
    + <version>1.5.5</version>
    
  • Change line 47:

    - <crypto.java.lib.version>1.7.0-SNAPSHOT</crypto.java.lib.version>
    + <crypto.java.lib.version>1.5</crypto.java.lib.version>
    

@claudius108
Copy link
Collaborator

claudius108 commented Jul 28, 2019 via email

@claudius108
Copy link
Collaborator

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

`

<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>[email protected]</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
Copy link
Contributor Author

adamretter commented Aug 22, 2019

@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. Adopt Semantic Versioning number e.g. x.x.x expath/crypto-java#6
  2. [feature] Facility for listing providers and algorithms expath/crypto-java#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?

@adamretter adamretter force-pushed the hotfix/exist-update branch from 65ba670 to 5954270 Compare August 22, 2019 22:09
@claudius108
Copy link
Collaborator

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
Copy link
Collaborator

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

@joewiz
Copy link
Member

joewiz commented Sep 29, 2020

@claudius108 Forgive me if I made a mistake with 21526a4, but I was seeking to get the repo and this PR updated and ready to incorporate the same fix applied in eXist-db/exist@ad0bed1. 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
Copy link
Collaborator

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
Copy link
Member

joewiz commented Oct 4, 2020

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

@joewiz
Copy link
Member

joewiz commented Oct 5, 2020

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

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

@claudius108
Copy link
Collaborator

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
Copy link
Member

joewiz commented Oct 17, 2020

@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
Copy link
Member

joewiz commented Oct 17, 2020

@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
Copy link
Collaborator

claudius108 commented Oct 18, 2020 via email

@joewiz
Copy link
Member

joewiz commented Oct 19, 2020

@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
Copy link
Member

line-o commented Nov 16, 2020

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
Copy link
Collaborator

claudius108 commented Nov 16, 2020 via email

@line-o
Copy link
Member

line-o commented Jun 11, 2021

This PR is superseded by #36

@line-o line-o closed this Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants