diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..5361c8f
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/maven-build.properties b/maven-build.properties
new file mode 100644
index 0000000..573716f
--- /dev/null
+++ b/maven-build.properties
@@ -0,0 +1,39 @@
+#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
+#Wed Oct 14 10:08:57 CEST 2020
+maven.build.testDir.0=src/test/java
+plugin.nexus-staging.version=1.6.3
+bc.version=1.58
+canl.version=2.6.0
+maven.settings.offline=true
+plugin.assembly.version=2.4.1
+junit.version=4.11
+maven.settings.interactiveMode=true
+assembly.javadoc.dir=/usr/share/javadoc/voms-api-java
+plugin.deploy.version=2.8.2
+maven.reporting.outputDirectory=${maven.build.dir}/site
+project.build.sourceEncoding=UTF-8
+maven.build.testOutputDir=${maven.build.dir}/test-classes
+plugin.release.version=2.2.2
+jcip.version=1.0
+plugin.cobertura.version=2.5.2
+maven.build.finalName=voms-api-java-3.3.2
+mockito.version=1.9.5
+maven.test.reports=${maven.build.dir}/test-reports
+plugin.source.version=2.2.1
+hamcrest.version=1.3
+maven.repo.local=${user.home}/.m2/repository
+maven.build.dir=target
+maven.build.outputDir=${maven.build.dir}/classes
+project.reporting.outputEncoding=UTF-8
+plugin.jar.version=2.5
+project.build.directory=${maven.build.dir}
+assembly.doc.dir=/usr/share/doc/voms-api-java
+maven.build.resourceDir.0=src/main/resources
+plugin.compiler.version=3.1
+plugin.gpg.version=1.5
+maven.build.srcDir.0=src/main/java
+assembly.java.dir=/usr/share/java
+maven.build.testResourceDir.0=src/test/resources
+project.build.outputDirectory=${maven.build.outputDir}
+plugin.license.version=1.9.0
+plugin.javadoc.version=2.9.1
diff --git a/maven-build.xml b/maven-build.xml
new file mode 100644
index 0000000..dc86c97
--- /dev/null
+++ b/maven-build.xml
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =================================== WARNING ===================================
+ JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.
+ ===============================================================================
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sources b/sources
index e7eccf8..e9e119c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e45f034c5477b9310043b31d1a310b98 v3.2.0.tar.gz
+SHA512 (voms-api-java-3.3.2.tar.gz) = 7de09abd3e1605a7596c29bb0f16553945d6c13098c667451580ed4e22a671814db254355b56ec12696fce011854487510fb9e627e4f13474fbfedec6db1c422
diff --git a/voms-api-java-canl-2.5.patch b/voms-api-java-canl-2.5.patch
deleted file mode 100644
index d170c0f..0000000
--- a/voms-api-java-canl-2.5.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java
---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java 2016-02-11 16:57:01.000000000 +0100
-+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java 2018-01-05 12:30:30.853119209 +0100
-@@ -19,7 +19,7 @@
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
-
--import org.bouncycastle.openssl.PasswordFinder;
-+import eu.emi.security.authn.x509.helpers.PasswordSupplier;
- import org.italiangrid.voms.credential.LoadCredentialsEventListener;
- import org.italiangrid.voms.credential.LoadCredentialsStrategy;
- import org.italiangrid.voms.credential.VOMSEnvironmentVariables;
-@@ -83,13 +83,13 @@
- * @param certificatePath
- * the path to the certificate
- * @param pf
-- * a {@link PasswordFinder} used to resolve the private key password
-+ * a {@link PasswordSupplier} used to resolve the private key password
- * when needed
- * @return the loaded {@link X509Credential}, or null if the
- * credential couldn't be loaded
- */
- protected X509Credential loadPEMCredential(String privateKeyPath,
-- String certificatePath, PasswordFinder pf) {
-+ String certificatePath, PasswordSupplier pf) {
-
- PEMCredential cred = null;
-
-@@ -120,12 +120,12 @@
- * @param pkcs12FilePath
- * the path to the pkcs12 credential
- * @param pf
-- * a {@link PasswordFinder} used to resolve the private key password
-+ * a {@link PasswordSupplier} used to resolve the private key password
- * @return the loaded {@link X509Credential}, or null if the
- * credential couldn't be loaded
- */
- protected X509Credential loadPKCS12Credential(String pkcs12FilePath,
-- PasswordFinder pf) {
-+ PasswordSupplier pf) {
-
- KeystoreCredential cred = null;
-
-diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java
---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java 2016-02-11 16:57:01.000000000 +0100
-+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java 2018-01-05 12:30:30.854119198 +0100
-@@ -15,7 +15,7 @@
- */
- package org.italiangrid.voms.credential.impl;
-
--import org.bouncycastle.openssl.PasswordFinder;
-+import eu.emi.security.authn.x509.helpers.PasswordSupplier;
- import org.italiangrid.voms.VOMSError;
- import org.italiangrid.voms.credential.LoadCredentialsEventListener;
- import org.italiangrid.voms.credential.ProxyNamingPolicy;
-@@ -115,7 +115,7 @@
- return val;
- }
-
-- public X509Credential loadCredentials(PasswordFinder pf) {
-+ public X509Credential loadCredentials(PasswordSupplier pf) {
-
- if (pf == null)
- throw new IllegalArgumentException(
-@@ -163,7 +163,7 @@
- return null;
- }
-
-- protected X509Credential loadPEMCredentialFromEnv(PasswordFinder pf) {
-+ protected X509Credential loadPEMCredentialFromEnv(PasswordSupplier pf) {
-
- String certPath = getFromEnvOrSystemProperty(X509_USER_CERT);
- String keyPath = getFromEnvOrSystemProperty(X509_USER_KEY);
-@@ -175,7 +175,7 @@
- return null;
- }
-
-- protected X509Credential loadPKCS12CredentialFromEnv(PasswordFinder pf) {
-+ protected X509Credential loadPKCS12CredentialFromEnv(PasswordSupplier pf) {
-
- String pkcs12Path = getFromEnvOrSystemProperty(PKCS12_USER_CERT);
-
-@@ -185,7 +185,7 @@
- return null;
- }
-
-- protected X509Credential loadPKCS12CredentialsFromGlobusDir(PasswordFinder pf) {
-+ protected X509Credential loadPKCS12CredentialsFromGlobusDir(PasswordSupplier pf) {
-
- String credPath = String.format("%s/%s", home,
- GLOBUS_PKCS12_CRED_PATH_SUFFIX);
-@@ -193,7 +193,7 @@
-
- }
-
-- protected X509Credential loadPEMCredentialsFromGlobusDir(PasswordFinder pf) {
-+ protected X509Credential loadPEMCredentialsFromGlobusDir(PasswordSupplier pf) {
-
- String certPath = String.format("%s/%s", home, GLOBUS_PEM_CERT_PATH_SUFFIX);
- String keyPath = String.format("%s/%s", home, GLOBUS_PEM_KEY_PATH_SUFFIX);
-diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java
---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java 2016-02-11 16:57:01.000000000 +0100
-+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java 2018-01-05 12:30:30.852119219 +0100
-@@ -15,7 +15,7 @@
- */
- package org.italiangrid.voms.credential;
-
--import org.bouncycastle.openssl.PasswordFinder;
-+import eu.emi.security.authn.x509.helpers.PasswordSupplier;
-
- import eu.emi.security.authn.x509.X509Credential;
-
-@@ -37,5 +37,5 @@
- * @return an {@link X509Credential}, or null if no credential
- * was found
- */
-- public X509Credential loadCredentials(PasswordFinder passwordFinder);
-+ public X509Credential loadCredentials(PasswordSupplier passwordFinder);
- }
-diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/UserCredentials.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/UserCredentials.java
---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/UserCredentials.java 2016-02-11 16:57:01.000000000 +0100
-+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/UserCredentials.java 2018-01-05 12:30:30.852119219 +0100
-@@ -15,7 +15,7 @@
- */
- package org.italiangrid.voms.credential;
-
--import org.bouncycastle.openssl.PasswordFinder;
-+import eu.emi.security.authn.x509.helpers.PasswordSupplier;
- import org.italiangrid.voms.credential.impl.DefaultLoadCredentialsStrategy;
-
- import eu.emi.security.authn.x509.X509Credential;
-@@ -43,7 +43,7 @@
-
- public static X509Credential loadCredentials(final char[] keyPassword) {
-
-- PasswordFinder pf = new PasswordFinder() {
-+ PasswordSupplier pf = new PasswordSupplier() {
-
- public char[] getPassword() {
-
-@@ -54,7 +54,7 @@
- return loadCredentialsStrategy.loadCredentials(pf);
- }
-
-- public static X509Credential loadCredentials(PasswordFinder passwordFinder) {
-+ public static X509Credential loadCredentials(PasswordSupplier passwordFinder) {
-
- return loadCredentialsStrategy.loadCredentials(passwordFinder);
- }
-diff -ur voms-api-java-3.2.0.orig/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java voms-api-java-3.2.0/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java
---- voms-api-java-3.2.0.orig/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java 2016-02-11 16:57:01.000000000 +0100
-+++ voms-api-java-3.2.0/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java 2018-01-05 12:30:30.852119219 +0100
-@@ -15,7 +15,7 @@
- */
- package org.italiangrid.voms.test.cred;
-
--import org.bouncycastle.openssl.PasswordFinder;
-+import eu.emi.security.authn.x509.helpers.PasswordSupplier;
- import org.italiangrid.voms.credential.impl.AbstractLoadCredentialsStrategy;
- import org.italiangrid.voms.credential.impl.DefaultLoadCredentialsStrategy;
- import org.italiangrid.voms.util.FilePermissionHelper;
-@@ -51,7 +51,7 @@
- + "/.globus/usercred.p12");
- }
-
-- static class TestPasswordFinder implements PasswordFinder {
-+ static class TestPasswordFinder implements PasswordSupplier {
-
- public char[] getPassword() {
-
-@@ -59,7 +59,7 @@
- }
- }
-
-- static class NullPasswordFinder implements PasswordFinder {
-+ static class NullPasswordSupplier implements PasswordSupplier {
-
- public char[] getPassword() {
-
-@@ -72,7 +72,7 @@
-
- AbstractLoadCredentialsStrategy strategy = new DefaultLoadCredentialsStrategy(
- emptyHome);
-- X509Credential cred = strategy.loadCredentials(new NullPasswordFinder());
-+ X509Credential cred = strategy.loadCredentials(new NullPasswordSupplier());
- Assert.assertNull(cred);
- }
-
-@@ -81,7 +81,7 @@
-
- AbstractLoadCredentialsStrategy strategy = new DefaultLoadCredentialsStrategy(
- emptyGlobusHome);
-- X509Credential cred = strategy.loadCredentials(new NullPasswordFinder());
-+ X509Credential cred = strategy.loadCredentials(new NullPasswordSupplier());
- Assert.assertNull(cred);
- }
-
diff --git a/voms-api-java-no-local.patch b/voms-api-java-no-local.patch
deleted file mode 100644
index e63d618..0000000
--- a/voms-api-java-no-local.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ur voms-api-java-3.0.5.orig/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java voms-api-java-3.0.5/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java
---- voms-api-java-3.0.5.orig/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java 2014-12-09 10:55:31.000000000 +0100
-+++ voms-api-java-3.0.5/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java 2014-12-16 14:00:01.144948880 +0100
-@@ -351,7 +351,7 @@
- .getValidationErrors().get(0).getMessage());
- }
-
-- @Test
-+ // @Test
- public void testTargetValidationSuccess() throws Exception {
-
- VOMSAA aa = Utils.getVOMSAA();
-@@ -379,7 +379,7 @@
- Assert.assertTrue(r.isValid());
- }
-
-- @Test
-+ // @Test
- public void testTargetValidationFailure() throws Exception {
-
- VOMSAA aa = Utils.getVOMSAA();
diff --git a/voms-api-java.spec b/voms-api-java.spec
index 84b8fdf..5f68f4f 100644
--- a/voms-api-java.spec
+++ b/voms-api-java.spec
@@ -1,23 +1,31 @@
Name: voms-api-java
-Version: 3.2.0
-Release: 5%{?dist}
+Version: 3.3.2
+Release: 1%{?dist}
Summary: Virtual Organization Membership Service Java API
License: ASL 2.0
URL: https://wiki.italiangrid.it/VOMS
-Source0: https://github.com/italiangrid/%{name}/archive/v%{version}.tar.gz
-# Disable tests using non-local network interface
-Patch0: %{name}-no-local.patch
-# Adapt to canl-java version 2.5
-Patch1: %{name}-canl-2.5.patch
+Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
+# These are build instructions for ant generated from the maven
+# build instructions using the maven ant plugin.
+# These are used for building on EPEL 6 since there is no maven
+# available there.
+Source1: build.xml
+Source2: maven-build.xml
+Source3: maven-build.properties
BuildArch: noarch
+# There is no jakarta-commons-io for ppc64 in EPEL6
+ExcludeArch: ppc64
-BuildRequires: maven-local
-BuildRequires: mvn(eu.eu-emi.security:canl) >= 2.5
-BuildRequires: mvn(junit:junit)
-BuildRequires: mvn(org.mockito:mockito-core)
-BuildRequires: mvn(net.jcip:jcip-annotations)
-Requires: mvn(eu.eu-emi.security:canl) >= 2.5
+BuildRequires: java-1.8.0-openjdk-devel
+BuildRequires: jpackage-utils
+BuildRequires: ant
+BuildRequires: canl-java >= 2.6
+Requires: java >= 1:1.8
+Requires: jpackage-utils
+Requires: canl-java >= 2.6
+Provides: voms-api-java3 = %{version}-%{release}
+Obsoletes: voms-api-java3 < 3.1
%description
The Virtual Organization Membership Service (VOMS) is an attribute authority
@@ -31,42 +39,73 @@ This package provides a java client API for VOMS.
%package javadoc
Summary: Virtual Organization Membership Service Java API Documentation
+Requires: jpackage-utils
+Provides: voms-api-java3-javadoc = %{version}-%{release}
+Obsoletes: voms-api-java3-javadoc < 3.1
%description javadoc
Virtual Organization Membership Service (VOMS) Java API Documentation.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
-
-# Do not create source jars
-%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
-
-# Cobertura no longer in Fedora due to licensing issues
-%pom_remove_plugin org.codehaus.mojo:cobertura-maven-plugin
-
-# Remove license plugin
-%pom_remove_plugin com.mycila.maven-license-plugin:maven-license-plugin
+cp -p %{SOURCE1} .
+cp -p %{SOURCE2} .
+cp -p %{SOURCE3} .
%build
-%mvn_build
+export CLASSPATH=$(build-classpath bcprov-1.58 bcpkix-1.58 commons-io canl)
+# The tests use mockito which is not available in EPEL 6 - skipping tests
+%ant -Dbuild.sysclasspath=last -Dmaven.test.skip=true package javadoc
%install
-%mvn_install -J target/site/javadoc/apidocs
+mkdir -p %{buildroot}%{_javadir}
+install -m 644 target/%{name}-%{version}.jar \
+ %{buildroot}%{_javadir}/%{name}.jar
-%files -f .mfiles
-%dir %{_javadir}/%{name}
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_to_maven_depmap org.italiangrid %{name} %{version} JPP %{name}
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/apidocs %{buildroot}%{_javadocdir}/%{name}
+
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%config(noreplace) %{_mavendepmapfragdir}/%{name}
%doc AUTHORS README.md
%license LICENSE
-%files javadoc -f .mfiles-javadoc
+%files javadoc
+%doc %{_javadocdir}/%{name}
%license LICENSE
%changelog
+* Wed Oct 14 2020 Mattias Ellert - 3.3.2-1
+- Update to version 3.3.2 - matches canl-java 2.6.x
+- Drop patch voms-api-java-no-local.patch
+
+* Thu Feb 08 2018 Mattias Ellert - 3.3.0-1
+- Build against bouncycastle1.58
+- Update to version 3.3.0 - matches canl-java 2.5.x
+- Drop patch voms-api-java-canl-2.5.patch
+
+* Thu Jan 11 2018 Mattias Ellert - 3.2.0-7
+- Add Provides/Obsoletes voms-api-java3-javadoc
+
+* Thu Jan 11 2018 Mattias Ellert - 3.2.0-6
+- Add Provides/Obsoletes voms-api-java3
+
* Fri Jan 05 2018 Mattias Ellert - 3.2.0-5
- Adapt to canl-java 2.5
- Use jcip-annotations for EPEL 7 build
+- Create EPEL 6 package using the maven ant plugin
* Thu Jul 27 2017 Fedora Release Engineering - 3.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild