[wss4j] Initial commit

Andy Grimm arg at fedoraproject.org
Thu Mar 1 20:11:05 UTC 2012


commit 27b8e40a703b8abe4daa999c68e0da4daa83c74f
Author: Andy Grimm <agrimm at gmail.com>
Date:   Thu Mar 1 15:09:46 2012 -0500

    Initial commit

 .gitignore              |    1 +
 sources                 |    1 +
 wss4j-deps.patch        |   61 +++++++++
 wss4j-no-opensaml.patch |  309 +++++++++++++++++++++++++++++++++++++++++++++++
 wss4j-no-pmd.patch      |   33 +++++
 wss4j.spec              |   95 +++++++++++++++
 6 files changed, 500 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0f43cdb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/wss4j-src-1.5.12.zip
diff --git a/sources b/sources
index e69de29..84344c9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7f0029d960a140b5054a3c339259daac  wss4j-src-1.5.12.zip
diff --git a/wss4j-deps.patch b/wss4j-deps.patch
new file mode 100644
index 0000000..e5d7294
--- /dev/null
+++ b/wss4j-deps.patch
@@ -0,0 +1,61 @@
+--- wss4j/pom.xml	2012-02-05 21:23:36.651150053 -0500
++++ pom.xml.new	2012-02-05 21:34:12.100106605 -0500
+@@ -336,7 +336,6 @@
+         <profile>
+             <id>jdk14</id>
+             <activation>
+-                <activeByDefault>true</activeByDefault>
+                 <jdk>1.4</jdk>
+             </activation>
+             <dependencies>
+@@ -382,6 +382,7 @@
+         <xalan.version>2.7.1</xalan.version>
+         <xerces.version>2.9.1</xerces.version>
+         <axis.version>1.4</axis.version>
++        <axis.basedir>/usr/share/java/axis</axis.basedir>
+         <junit.version>3.8.1</junit.version>
+     </properties>
+     
+@@ -438,34 +438,32 @@
+             <scope>test</scope>
+         </dependency>
+         <dependency>
+-            <groupId>org.opensaml</groupId>
+-            <artifactId>opensaml</artifactId>
+-            <version>${opensaml.version}</version>
+-            <scope>provided</scope>
+-        </dependency>
+-        <dependency>
+             <groupId>org.apache.axis</groupId>
+             <artifactId>axis</artifactId>
+             <version>${axis.version}</version>
+-            <scope>provided</scope>
++            <scope>system</scope>
++            <systemPath>${axis.basedir}/axis.jar</systemPath>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.axis</groupId>
+             <artifactId>axis-ant</artifactId>
+             <version>${axis.version}</version>
+-            <scope>provided</scope>
++            <scope>system</scope>
++            <systemPath>${axis.basedir}/axis-ant.jar</systemPath>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.axis</groupId>
+             <artifactId>axis-jaxrpc</artifactId>
+             <version>${axis.version}</version>
+-            <scope>provided</scope>
++            <scope>system</scope>
++            <systemPath>${axis.basedir}/jaxrpc.jar</systemPath>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.axis</groupId>
+             <artifactId>axis-saaj</artifactId>
+             <version>${axis.version}</version>
+-            <scope>provided</scope>
++            <scope>system</scope>
++            <systemPath>${axis.basedir}/saaj.jar</systemPath>
+         </dependency>
+     </dependencies>
+ 
diff --git a/wss4j-no-opensaml.patch b/wss4j-no-opensaml.patch
new file mode 100644
index 0000000..dc1dc3c
--- /dev/null
+++ b/wss4j-no-opensaml.patch
@@ -0,0 +1,309 @@
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/message/WSSecDKSign.java wss4j.new/src/org/apache/ws/security/message/WSSecDKSign.java
+--- wss4j/src/org/apache/ws/security/message/WSSecDKSign.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/message/WSSecDKSign.java	2009-07-20 15:30:17.000000000 +0200
+@@ -28,7 +28,7 @@
+ import org.apache.ws.security.conversation.ConversationException;
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.algorithms.SignatureAlgorithm;
+@@ -295,7 +295,7 @@
+                     Element ctx = createSTRParameter(document);
+                     transforms.addTransform(STRTransform.implementedTransformURI, ctx);
+                     sig.addDocument("#" + strUri, transforms);
+-                } else if (elemName.equals("Assertion")) { // Assertion
++                } /* else if (elemName.equals("Assertion")) { // Assertion
+                     String id = SAMLUtil.getAssertionId(envel, elemName, nmSpace);
+ 
+                     Element body = 
+@@ -319,7 +319,7 @@
+                     body.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
+                     sig.addDocument("#" + id, transforms);
+ 
+-                } else {
++                } */ else {
+                     Element body = (Element) WSSecurityUtil.findElement(envel, elemName, nmSpace);
+                     if (body == null) {
+                         throw new WSSecurityException(
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/message/WSSecSignature.java wss4j.new/src/org/apache/ws/security/message/WSSecSignature.java
+--- wss4j/src/org/apache/ws/security/message/WSSecSignature.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/message/WSSecSignature.java	2009-07-20 15:30:17.000000000 +0200
+@@ -31,7 +31,7 @@
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.util.Base64;
+ import org.apache.ws.security.util.WSSecurityUtil;
+@@ -551,7 +551,7 @@
+                     Element ctx = createSTRParameter(document);
+                     transforms.addTransform(STRTransform.implementedTransformURI, ctx);
+                     sig.addDocument("#" + strUri, transforms, digestAlgo);
+-                } else if (elemName.equals("Assertion")) { // Assertion
++                }/* else if (elemName.equals("Assertion")) { // Assertion
+                     String id = null;
+                     id = SAMLUtil.getAssertionId(envelope, elemName, nmSpace);
+ 
+@@ -574,7 +574,7 @@
+                         WSSecurityUtil.setNamespace(body, WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
+                     body.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
+                     sig.addDocument("#" + id, transforms, digestAlgo);
+-                } else {
++                }*/ else {
+                     Element body = 
+                         (Element)WSSecurityUtil.findElement(envelope, elemName, nmSpace);
+                     if (body == null) {
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/message/WSSignEnvelope.java wss4j.new/src/org/apache/ws/security/message/WSSignEnvelope.java
+--- wss4j/src/org/apache/ws/security/message/WSSignEnvelope.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/message/WSSignEnvelope.java	2009-07-20 15:30:17.000000000 +0200
+@@ -31,7 +31,7 @@
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.algorithms.SignatureAlgorithm;
+@@ -416,7 +416,7 @@
+                     transforms.addTransform(
+                             STRTransform.implementedTransformURI, ctx);
+                     sig.addDocument("#" + secRefId, transforms);
+-                } else if (elemName.equals("Assertion")) { // Assertion
++                } /*else if (elemName.equals("Assertion")) { // Assertion
+ 
+                     String id = null;
+                     id = SAMLUtil.getAssertionId(envelope, elemName, nmSpace);
+@@ -443,7 +443,7 @@
+                             id);
+                     sig.addDocument("#" + id, transforms);
+ 
+-                } else {
++                } */ else {
+                     Element body = (Element) WSSecurityUtil.findElement(
+                             envelope, elemName, nmSpace);
+                     if (body == null) {
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java wss4j.new/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java
+--- wss4j/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java	2009-07-20 15:30:17.000000000 +0200
+@@ -30,8 +30,8 @@
+ import org.apache.ws.security.message.token.DerivedKeyToken;
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.util.Base64;
+ import org.w3c.dom.Element;
+ 
+@@ -165,13 +165,14 @@
+                 this.secret = ((EncryptedKeyProcessor) processor).getDecryptedBytes();
+             } else if (processor instanceof SecurityContextTokenProcessor) {
+                 this.secret = ((SecurityContextTokenProcessor) processor).getSecret();
+-            } else if (processor instanceof SAMLTokenProcessor) {
++/*            } else if (processor instanceof SAMLTokenProcessor) {
+                 SAMLTokenProcessor samlp = (SAMLTokenProcessor) processor;
+                 SAMLKeyInfo keyInfo = 
+                     SAMLUtil.getSAMLKeyInfo(samlp.getSamlTokenElement(), crypto, cb);
+                 // TODO Handle malformed SAML tokens where they don't have the 
+                 // secret in them
+                 this.secret = keyInfo.getSecret();
++*/
+             } else {
+                 throw new WSSecurityException(
+                     WSSecurityException.FAILED_CHECK, "unsupportedKeyId"
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/processor/ReferenceListProcessor.java wss4j.new/src/org/apache/ws/security/processor/ReferenceListProcessor.java
+--- wss4j/src/org/apache/ws/security/processor/ReferenceListProcessor.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/processor/ReferenceListProcessor.java	2009-07-20 15:30:17.000000000 +0200
+@@ -37,8 +37,8 @@
+ import org.apache.ws.security.components.crypto.Crypto;
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.encryption.XMLCipher;
+ import org.apache.xml.security.encryption.XMLEncryptionException;
+@@ -318,13 +318,14 @@
+             } else if (p instanceof DerivedKeyTokenProcessor) {
+                 DerivedKeyTokenProcessor dkp = (DerivedKeyTokenProcessor) p;
+                 decryptedData = dkp.getKeyBytes(WSSecurityUtil.getKeyLength(algorithm));
+-            } else if (p instanceof SAMLTokenProcessor) {
+-                SAMLTokenProcessor samlp = (SAMLTokenProcessor) p;
+-                SAMLKeyInfo keyInfo = 
+-                    SAMLUtil.getSAMLKeyInfo(samlp.getSamlTokenElement(), crypto, cb);
+-                // TODO Handle malformed SAML tokens where they don't have the 
+-                // secret in them
+-                decryptedData = keyInfo.getSecret();
++ /*           } else if (p instanceof SAMLTokenProcessor) {
++  *               SAMLTokenProcessor samlp = (SAMLTokenProcessor) p;
++  *               SAMLKeyInfo keyInfo = 
++  *                  SAMLUtil.getSAMLKeyInfo(samlp.getSamlTokenElement(), crypto, cb);
++  *              // TODO Handle malformed SAML tokens where they don't have the 
++  *              // secret in them
++  *              decryptedData = keyInfo.getSecret();  
++  */
+             } else {
+                 // Try custom token
+                 WSPasswordCallback pwcb = new WSPasswordCallback(id, WSPasswordCallback.CUSTOM_TOKEN);
+@@ -348,7 +349,7 @@
+                 }
+             }
+         } else if (secRef.containsKeyIdentifier()) {
+-            if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
++/*            if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
+                 Element token = 
+                     secRef.getKeyIdentifierTokenElement(secRefToken.getOwnerDocument(), wsDocInfo, cb);
+                 
+@@ -361,7 +362,7 @@
+                 // TODO Handle malformed SAML tokens where they don't have the 
+                 // secret in them
+                 decryptedData = keyInfo.getSecret();
+-            } else {
++            } else { */
+                 String sha = secRef.getKeyIdentifierValue();
+                 
+                 WSPasswordCallback pwcb = 
+@@ -384,7 +385,7 @@
+                     );
+                 }
+                 decryptedData = pwcb.getKey();
+-            }
++            // }
+         } else {
+             throw new WSSecurityException(WSSecurityException.FAILED_CHECK, "noReference");
+         }
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/processor/SignatureProcessor.java wss4j.new/src/org/apache/ws/security/processor/SignatureProcessor.java
+--- wss4j/src/org/apache/ws/security/processor/SignatureProcessor.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/processor/SignatureProcessor.java	2009-07-20 15:30:17.000000000 +0200
+@@ -43,8 +43,8 @@
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.UsernameToken;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.transform.STRTransformUtil;
+ import org.apache.ws.security.util.WSSecurityUtil;
+@@ -57,7 +57,7 @@
+ import org.apache.xml.security.signature.XMLSignatureInput;
+ import org.apache.xml.security.transforms.Transform;
+ import org.apache.xml.security.transforms.Transforms;
+-import org.opensaml.SAMLAssertion;
++//import org.opensaml.SAMLAssertion;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.Node;
+ 
+@@ -232,7 +232,7 @@
+         KeyInfo info = sig.getKeyInfo();
+         UsernameToken ut = null;
+         DerivedKeyToken dkt = null;
+-        SAMLKeyInfo samlKi = null;
++        //SAMLKeyInfo samlKi = null;
+         String customTokenId = null;
+         java.security.PublicKey publicKey = null;
+         X509Certificate[] certs = null;
+@@ -281,11 +281,11 @@
+                         if (certs != null && certs.length > 1) {
+                             validateCertificateChain = true;
+                         }
+-                    } else if (el.equals(WSSecurityEngine.SAML_TOKEN)) {
++/*                    } else if (el.equals(WSSecurityEngine.SAML_TOKEN)) {
+                         samlKi = SAMLUtil.getSAMLKeyInfo(token, crypto, cb);
+                         certs = samlKi.getCerts();
+                         secretKey = samlKi.getSecret();
+-
++*/
+                     } else if (el.equals(WSSecurityEngine.ENCRYPTED_KEY)){
+                         if (crypto == null) {
+                             throw new WSSecurityException(
+@@ -356,12 +356,12 @@
+                         WSSecurityUtil.getKeyLength(signatureMethodURI);
+                     
+                     secretKey = dktProcessor.getKeyBytes(keyLength);
+-                } else if (processor instanceof SAMLTokenProcessor) {
++/*                } else if (processor instanceof SAMLTokenProcessor) {
+                     SAMLTokenProcessor samlp = (SAMLTokenProcessor) processor;
+                     samlKi = SAMLUtil.getSAMLKeyInfo(samlp.getSamlTokenElement(), crypto, cb);
+                     certs = samlKi.getCerts();
+                     secretKey = samlKi.getSecret();
+-                    publicKey = samlKi.getPublicKey();
++                    publicKey = samlKi.getPublicKey(); */
+                 }
+             } else if (secRef.containsX509Data() || secRef.containsX509IssuerSerial()) {
+                 certs = secRef.getX509IssuerSerial(crypto);
+@@ -387,7 +387,7 @@
+                         );
+                     }
+                     secretKey = pwcb.getKey();
+-                } else if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
++/*                } else if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
+                     Element token = 
+                         secRef.getKeyIdentifierTokenElement(elem.getOwnerDocument(), wsDocInfo, cb);
+                     
+@@ -395,6 +395,7 @@
+                     certs = samlKi.getCerts();
+                     secretKey = samlKi.getSecret();
+                     publicKey = samlKi.getPublicKey();
++*/
+                 } else {
+                     certs = secRef.getKeyIdentifier(crypto);
+                 }
+@@ -605,11 +606,12 @@
+                     }
+                     principal.setBasetokenId(basetokenId);
+                     return principal;
+-                } else if (samlKi != null) {
++/*                } else if (samlKi != null) {
+                     final SAMLAssertion assertion = samlKi.getAssertion();
+                     CustomTokenPrincipal principal = new CustomTokenPrincipal(assertion.getId());
+                     principal.setTokenObject(assertion);
+                     return principal;
++*/
+                 } else if (secretKey != null) {
+                     // This is the custom key scenario
+                     CustomTokenPrincipal principal = new CustomTokenPrincipal(customTokenId);
+--- wss4j/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java	2011-08-12 15:18:06.000000000 -0400
++++ wss4j.new/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java	2012-02-05 21:49:25.844044121 -0500
+@@ -31,8 +31,8 @@
+ import org.apache.ws.security.components.crypto.Crypto;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.util.Base64;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.algorithms.JCEMapper;
+@@ -223,7 +223,7 @@
+                 //
+                 else if (secRef.containsKeyIdentifier()) {
+                     X509Certificate[] certs = null;
+-                    if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
++/*                    if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
+                         Element token = 
+                             secRef.getKeyIdentifierTokenElement(doc, docInfo, cb);
+                         
+@@ -234,9 +234,9 @@
+                         }
+                         SAMLKeyInfo samlKi = SAMLUtil.getSAMLKeyInfo(token, crypto, cb);
+                         certs = samlKi.getCerts();
+-                    } else {
++                    } else { */
+                         certs = secRef.getKeyIdentifier(crypto);
+-                    }
++                    // }
+                     if (certs == null || certs.length < 1 || certs[0] == null) {
+                         throw new WSSecurityException(
+                             WSSecurityException.FAILURE,
diff --git a/wss4j-no-pmd.patch b/wss4j-no-pmd.patch
new file mode 100644
index 0000000..5f64a58
--- /dev/null
+++ b/wss4j-no-pmd.patch
@@ -0,0 +1,33 @@
+--- wss4j/pom.xml	2011-08-12 15:33:32.000000000 -0400
++++ wss4j.new/pom.xml	2012-02-05 18:19:17.671906268 -0500
+@@ -147,30 +147,6 @@
+ 
+         <plugins>
+             <plugin>
+-                <groupId>org.apache.maven.plugins</groupId>
+-                <artifactId>maven-pmd-plugin</artifactId>
+-                <version>2.5</version>
+-                <configuration>
+-                    <linkXRef>false</linkXRef>
+-                    <failOnViolation>true</failOnViolation>
+-                    <verbose>true</verbose>
+-                    <includeTests>false</includeTests>
+-                    <excludes>
+-                        <exclude>**/Merlin.java, **/CryptoBase.java, **/SAMLIssuerImpl.java, **/DOM2Writer.java
+-                        </exclude>
+-                    </excludes>
+-                </configuration>
+-                <executions>
+-                    <execution>
+-                        <id>validate</id>
+-                        <phase>validate</phase>
+-                        <goals>
+-                            <goal>check</goal>
+-                        </goals>
+-                    </execution>
+-                </executions>
+-            </plugin>
+-            <plugin>
+                 <groupId>org.apache.felix</groupId>
+                 <artifactId>maven-bundle-plugin</artifactId>
+                 <version>1.4.3</version>
diff --git a/wss4j.spec b/wss4j.spec
new file mode 100644
index 0000000..4713780
--- /dev/null
+++ b/wss4j.spec
@@ -0,0 +1,95 @@
+Name:           wss4j 
+Version:        1.5.12
+Release:        2%{?dist}
+Summary:        Apache WS-Security implementation
+
+Group:          Development/Libraries
+License:        ASL 2.0
+URL:            http://ws.apache.org/wss4j/
+Source0:        http://www.apache.org/dyn/closer.cgi/ws/wss4j/1_5_12/wss4j-src-1.5.12.zip
+# This plugin does not impact the build, and it currently raises this error:
+# Reporting mojo's can only be called from ReportDocumentRender
+Patch0:         %{name}-no-pmd.patch
+# OpenSAML has several other dependencies which are not packaged, 
+# so omit it for now
+Patch1:         %{name}-no-opensaml.patch
+# Remove opensaml dep, and work around broken axis deps for now.
+Patch2:         %{name}-deps.patch
+BuildArch:      noarch
+
+BuildRequires:  java-devel   
+BuildRequires:  axis
+BuildRequires:  xml-security
+BuildRequires:  maven
+BuildRequires:  maven-compiler-plugin
+BuildRequires:  maven-surefire-plugin
+BuildRequires:  maven-remote-resources-plugin
+BuildRequires:  apache-resource-bundles
+BuildRequires:  dos2unix
+
+Requires:       java
+Requires:       jpackage-utils
+Requires:       axis
+Requires:       xml-security
+
+%description
+The Apache WSS4J project provides a Java implementation of the
+primary security standards for Web Services. 
+
+%package javadoc
+Summary: Javadoc for %{name}
+Group:   Documentation
+Requires: jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q -n wss4j
+%patch0 -p1 -b .sav0
+%patch1 -p1 -b .sav1
+%patch2 -p1 -b .sav2
+# Remove bundled JARs
+find . -type f -name '*.jar' -exec rm -f {} \;
+# Remove classes requiring OpenSAML
+find . -name *SAMLToken*.java -exec rm -f {} \;
+rm -rf src/org/apache/ws/security/saml/
+
+%build
+# Tests need dependency fixes and opensaml tests will take
+# some work to patch out.  Disable for now.
+mvn-rpmbuild install -Dmaven.test.skip=true javadoc:javadoc
+dos2unix NOTICE
+
+%install
+# jars
+install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
+install -m 0644 target/%{name}-%{version}.jar \
+$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
+# javadoc
+install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+# pom
+install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -m 0644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+%files
+%doc ChangeLog.txt NOTICE LICENSE.txt
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+
+%files javadoc
+%doc LICENSE.txt
+%doc %{_javadocdir}/%{name}
+
+%changelog
+* Mon Feb 20 2012 Andy Grimm <agrimm at gmail.com> - 1.5.12-2
+- Package review fixes
+
+* Sun Feb  5 2012 Andy Grimm <agrimm at gmail.com> - 1.5.12-1
+- initial build
+


More information about the scm-commits mailing list