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 5df8bdb..e9e119c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (voms-api-java-3.3.7.tar.gz) = b623480b972742625e0c7cd95bfefee36a580f743240434d5591a9f35a19977a4d7d3abc90b598666e86f8e6d3a40a6c6ca66e19309a1ea8d2be979af57aaa58
-SHA512 (helper-scripts-master.tar.gz) = 8704b5bdbee360c0db70e6ece2781a385c62c802c9000754f62efbd23bd22542ace77f68b8064661201f441b40234475a005d9f67b50f0aea435636a0a851225
+SHA512 (voms-api-java-3.3.2.tar.gz) = 7de09abd3e1605a7596c29bb0f16553945d6c13098c667451580ed4e22a671814db254355b56ec12696fce011854487510fb9e627e4f13474fbfedec6db1c422
diff --git a/voms-api-java-test.patch b/voms-api-java-test.patch
deleted file mode 100644
index b32fafc..0000000
--- a/voms-api-java-test.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java b/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java
-index a0f7a87..4244925 100644
---- a/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java
-+++ b/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java
-@@ -31,6 +31,7 @@ import org.italiangrid.voms.test.utils.Utils;
- import org.italiangrid.voms.test.utils.VOMSAA;
- import org.junit.Assert;
- import org.junit.BeforeClass;
-+import org.junit.Ignore;
- import org.junit.Test;
-
- import eu.emi.security.authn.x509.X509CertChainValidatorExt;
-@@ -316,6 +317,7 @@ public class TestACValidator implements Fixture {
- }
-
- @Test
-+ @Ignore
- public void testTargetValidationSuccess() throws Exception {
-
- VOMSAA aa = Utils.getVOMSAA();
-@@ -342,6 +344,7 @@ public class TestACValidator implements Fixture {
- }
-
- @Test
-+ @Ignore
- public void testTargetValidationFailure() throws Exception {
-
- VOMSAA aa = Utils.getVOMSAA();
diff --git a/voms-api-java.spec b/voms-api-java.spec
index 2b354af..5f68f4f 100644
--- a/voms-api-java.spec
+++ b/voms-api-java.spec
@@ -1,31 +1,31 @@
Name: voms-api-java
-Version: 3.3.7
-Release: 4%{?dist}
+Version: 3.3.2
+Release: 1%{?dist}
Summary: Virtual Organization Membership Service Java API
-License: Apache-2.0
-URL: https://github.com/italiangrid/%{name}
-Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
-# Helper scripts for generating test certificates
-Source1: https://baltig.infn.it/mw-devel/helper-scripts/-/archive/master/helper-scripts-master.tar.gz
-# Disable tests requiring non-local network
-Patch0: %{name}-test.patch
-
+License: ASL 2.0
+URL: https://wiki.italiangrid.it/VOMS
+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
-ExclusiveArch: %{java_arches} noarch
+# There is no jakarta-commons-io for ppc64 in EPEL6
+ExcludeArch: ppc64
-%if %{?fedora}%{!?fedora:0} >= 43
-BuildRequires: maven-local-openjdk25
-%else
-BuildRequires: maven-local
-%endif
-BuildRequires: mvn(eu.eu-emi.security:canl) >= 2.8.3
-BuildRequires: mvn(junit:junit)
-BuildRequires: mvn(org.hamcrest:hamcrest-library)
-BuildRequires: mvn(org.mockito:mockito-core)
-BuildRequires: faketime
-BuildRequires: openssl
-Requires: mvn(eu.eu-emi.security:canl) >= 2.8.3
+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
@@ -39,187 +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 -a 1
-%patch -P0 -p1
-
-# Remove unused dependency
-%pom_remove_dep net.jcip:jcip-annotations
-
-# F33+ and EPEL8+ doesn't use the maven-javadoc-plugin to generate javadoc
-# Remove maven-javadoc-plugin configuration to avoid build failure
-%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
-
-# Do not create source jars
-%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
-
-%if %{?rhel}%{!?rhel:0} == 9
-# Modify bouncycastle dependencies for RHEL 9
-%pom_change_dep org.bouncycastle:bcprov-jdk18on org.bouncycastle:bcprov-jdk15on
-%pom_change_dep org.bouncycastle:bcpkix-jdk18on org.bouncycastle:bcpkix-jdk15on
-%endif
-
-# Generate test certificates
-export PATH=$PWD/helper-scripts-master/x509-scripts/scripts:$PATH
-pushd src/test/resources
-./setup.sh
-popd
+%setup -q
+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
+mkdir -p %{buildroot}%{_javadir}
+install -m 644 target/%{name}-%{version}.jar \
+ %{buildroot}%{_javadir}/%{name}.jar
-%files -f .mfiles
+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
-* Fri Jul 17 2026 Fedora Release Engineering - 3.3.7-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
-
-* Sat Jun 13 2026 Yaakov Selkowitz - 3.3.7-3
-- Rebuilt for openssl 4.0
-
-* Sat Jan 17 2026 Fedora Release Engineering - 3.3.7-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
-
-* Sat Dec 20 2025 Mattias Ellert - 3.3.7-1
-- Update to version 3.3.7
-
-* Mon Sep 08 2025 Mattias Ellert - 3.3.6-2
-- Include upstream's scripts for generating test certificates
-- Enable tests again
-
-* Tue Aug 05 2025 Mattias Ellert - 3.3.6-1
-- Update to version 3.3.6
-
-* Tue Jul 29 2025 jiri vanek - 3.3.5-4
-- Rebuilt for java-25-openjdk as preffered jdk
-
-* Fri Jul 25 2025 Fedora Release Engineering - 3.3.5-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
-
-* Tue Apr 22 2025 Mattias Ellert - 3.3.5-2
-- Update URL tag
-
-* Thu Apr 17 2025 Mattias Ellert - 3.3.5-1
-- Update to version 3.3.5
-- Do not run tests
- - some scripts needed for generating the test certificates are missing
-
-* Sun Jan 19 2025 Fedora Release Engineering - 3.3.3-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
-
-* Thu Nov 28 2024 Mattias Ellert - 3.3.3-2
-- Update bouncycastle dependencies for EPEL 10
-
-* Sat Aug 03 2024 Mattias Ellert - 3.3.3-1
-- Update to version 3.3.3
-
-* Sat Jul 20 2024 Fedora Release Engineering - 3.3.2-18
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
-
-* Thu Mar 14 2024 Mattias Ellert - 3.3.2-17
-- Update bouncycastle dependencies
-
-* Tue Feb 27 2024 Jiri Vanek - 3.3.2-16
-- Rebuilt for java-21-openjdk as system jdk
-
-* Sat Jan 27 2024 Fedora Release Engineering - 3.3.2-15
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Sat Dec 16 2023 Mattias Ellert - 3.3.2-14
-- Adjust to removed deprecaded API in Mockito
-
-* Sat Jul 22 2023 Fedora Release Engineering - 3.3.2-13
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Sat Jan 21 2023 Fedora Release Engineering - 3.3.2-12
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Tue Dec 13 2022 Mattias Ellert - 3.3.2-11
-- Disable tests that fail due to more expired certificates
-
-* Mon Oct 17 2022 Mattias Ellert - 3.3.2-10
-- Disable tests that fail due to expired certificates
-
-* Wed Sep 28 2022 Mattias Ellert - 3.3.2-9
-- Disable failing multi-thread test
-- Disable tests using obsolete hashes (md5/sha1)
-
-* Sat Jul 23 2022 Fedora Release Engineering - 3.3.2-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Fri Jul 08 2022 Jiri Vanek - 3.3.2-7
-- Rebuilt for Drop i686 JDKs
-
-* Sat Feb 05 2022 Jiri Vanek - 3.3.2-6
-- Rebuilt for java-17-openjdk as system jdk
-
-* Sat Jan 22 2022 Fedora Release Engineering - 3.3.2-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Fri Jan 14 2022 Mattias Ellert - 3.3.2-4
-- Disable failing tests due to changes in bouncycastle
-
-* Fri Jul 23 2021 Fedora Release Engineering - 3.3.2-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Wed Jan 27 2021 Fedora Release Engineering - 3.3.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Tue Oct 13 2020 Mattias Ellert - 3.3.2-1
+* Wed Oct 14 2020 Mattias Ellert - 3.3.2-1
- Update to version 3.3.2 - matches canl-java 2.6.x
-- Drop patches voms-api-java-javadoc-source.patch and -no-local.patch
-
-* Wed Jul 29 2020 Fedora Release Engineering - 3.3.0-11
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Wed Jul 15 2020 Mattias Ellert - 3.3.0-10
-- Fedora 33 builds javadoc the same way EPEL 8 does
-
-* Sat Jul 11 2020 Jiri Vanek - 3.3.0-9
-- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
-
-* Tue May 05 2020 Mattias Ellert - 3.3.0-8
-- Only remove the maven-javadoc-plugin configuration on EPEL 8
-- Add source version to javadoc configuration (backported from git)
-
-* Fri Jan 31 2020 Fedora Release Engineering - 3.3.0-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Tue Aug 20 2019 Mattias Ellert - 3.3.0-6
-- Remove maven-javadoc-plugin configuration
-- Remove unused dependency net.jcip:jcip-annotations
-
-* Sat Jul 27 2019 Fedora Release Engineering - 3.3.0-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Sun Feb 03 2019 Fedora Release Engineering - 3.3.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Fri Dec 07 2018 Mattias Ellert - 3.3.0-3
-- Add BuildRequires on hamcrest-library (no longer pulled in by mockito)
-
-* Sat Jul 14 2018 Fedora Release Engineering - 3.3.0-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+- 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