%define maven 0 Name: apache-ws-commons-axiom Version: 1.2.7 Release: 2mamba Summary: AXIOM XML infoset model for Apache Axis2 Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: gil URL: http://ws.apache.org/commons/axiom/ # jsvn export https://svn.apache.org/repos/asf/webservices/commons/tags/axiom/1.2.7 ws-commons-axiom-1.2.7 Source0: ws-commons-axiom-%{version}-src-svn.tar.gz Source1: maven2-2.2.0-settings.xml Source2: ws-commons-axiom-%{version}-autogeneratedfiles.tar.gz Patch0: apache-ws-commons-axiom-1.2.7-modules-axiom-tests-maven-build_xml.patch License: Apache License Version 2.0 BuildRequires: apache-ant # activation_1.1 javamail_1.4 stax-api_1.0_spec BuildRequires: apache-geronimo-1.2-specs BuildRequires: apache-log4j %if %maven BuildRequires: apache-maven BuildRequires: apache-maven-plugin-assembly BuildRequires: apache-maven-plugin-compiler BuildRequires: apache-maven-plugin-gpg BuildRequires: apache-maven-plugin-install BuildRequires: apache-maven-plugin-jar BuildRequires: apache-maven-plugin-javadoc BuildRequires: apache-maven-plugin-repository BuildRequires: apache-maven-plugin-resources BuildRequires: apache-maven-plugin-site BuildRequires: apache-maven-plugin-source BuildRequires: mojo-jdepend-maven-plugin %endif BuildRequires: jakarta-commons-logging BuildRequires: java-bea-stax BuildRequires: java-bea-stax-api BuildRequires: java-depend BuildRequires: java-dom4j BuildRequires: java-dom BuildRequires: java-excalibur-avalon-framework BuildRequires: java-excalibur-avalon-logkit BuildRequires: java-jaxen BuildRequires: java-junit3 BuildRequires: java-sun-mail-1.4-api BuildRequires: java-sun-jaf BuildRequires: java-wstx BuildRequires: xerces-j2 BuildRequires: xml-commons-apis BuildRequires: xmlunit Requires: jakarta-commons-logging Requires: java-bea-stax-api Requires: java-jaxen Requires: java-sun-mail-1.4-api Requires: java-sun-jaf Requires: java-wstx Requires: jpackage-utils Requires: xerces-j2 Requires: xml-commons-apis BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Apache AXIOM is a StAX-based, XML Infoset compliant object model which supports on-demand building of the object tree. It supports a novel "pull-through" model which allows one to turn off the tree building and directly access the underlying pull event stream. It also has built-in support for XML Optimized Packaging (XOP) and MTOM, the combination of which allows XML to carry binary data efficiently and in a transparent manner. The combination of these results in a easy to use API with a very high performant architecture! Initialy developed as part of Apache Axis2, Apache AXIOM (AXIs Object Model) is the core of Apache Axis2. However, it is a pure standalone XML Infoset model with novel features and can be used independently of Apache Axis2. %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc AXIOM XML infoset model for Apache Axis2. This package contains API documentation for %{name}. %if %maven %package manual Group: Documentation Summary: Manual for %{name} %description manual AXIOM XML infoset model for Apache Axis2. This package contains documentation for %{name}. %endif %prep %setup -q -n ws-commons-axiom-%{version} for f in $(find . -name "*.jar"); do mv $f $f.no done %if %maven cp %{SOURCE1} settings.xml mkdir -p .m2/repository/JPP/maven2 sed -i -e "s|__INTERNAL_REPO_PLACEHOLDER__|file://`pwd`/external_repo|g" settings.xml sed -i -e "s|__EXTERNAL_REPO_PLACEHOLDER__|file://`pwd`/.m2/repository|g" settings.xml %else tar xf %{SOURCE2} #%patch0 %endif %build export JAVA_HOME=/usr/lib/jvm/jdk-sun export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository mkdir -p $MAVEN_REPO_LOCAL %if %maven export MAVEN_SETTINGS=$(pwd)/settings.xml mkdir external_repo ln -s %{_javadir} external_repo/JPP mvn-jpp \ -e \ -s $MAVEN_SETTINGS \ -Dmaven.test.failure.ignore=true \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ ant:ant install javadoc:javadoc %else mkdir -p $MAVEN_REPO_LOCAL/junit/junit/3.8.2 ln -sf $(build-classpath junit-3.8.2) $MAVEN_REPO_LOCAL/junit/junit/3.8.2/junit-3.8.2.jar mkdir -p $MAVEN_REPO_LOCAL/geronimo-spec/geronimo-activation_1.1_spec/1.0.1 ln -sf $(build-classpath geronimo/activation-1.0.2-api-1.2) \ $MAVEN_REPO_LOCAL/geronimo-spec/geronimo-activation_1.1_spec/1.0.1/geronimo-activation_1.1_spec-1.0.1.jar mkdir -p $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.2/geronimo-javamail_1.4_spec-1.2.jar ln -sf $(build-classpath geronimo/javamail-1.4-api-1.1) \ $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.2/geronimo-javamail_1.4_spec-1.2.jar mkdir -p $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0.1 ln -sf $(build-classpath geronimo/stax-api-1.0-api-1.0) \ $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0.1/geronimo-stax-api_1.0_spec-1.0.1.jar mkdir -p $MAVEN_REPO_LOCAL/commons-logging/commons-logging/1.1.1 ln -sf $(build-classpath commons-logging) $MAVEN_REPO_LOCAL/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar mkdir -p $MAVEN_REPO_LOCAL/jaxen/jaxen/1.1.1 ln -sf $(build-classpath jaxen) $MAVEN_REPO_LOCAL/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar mkdir -p $MAVEN_REPO_LOCAL/xml-apis/xml-apis/1.3.04 ln -sf $(build-classpath xml-commons-apis) $MAVEN_REPO_LOCAL/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar mkdir -p $MAVEN_REPO_LOCAL/xerces/xercesImpl/2.6.2 ln -sf $(build-classpath xercesImpl) $MAVEN_REPO_LOCAL/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar pushd modules/axiom-api export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath geronimo/activation-1.0.2-api-1.2 geronimo/javamail-1.4-api-1.1 geronimo/stax-api-1.0-api-1.0) CLASSPATH=$CLASSPATH:$(build-classpath commons-logging jaxen xml-commons-apis xercesImpl) CLASSPATH=$CLASSPATH:$(build-classpath log4j junit-3.8.2):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ jar javadoc mkdir -p $MAVEN_REPO_LOCAL/org/apache/ws/commons/axiom/axiom-api/%{version} cp target/axiom-api-%{version}.jar $MAVEN_REPO_LOCAL/org/apache/ws/commons/axiom/axiom-api/%{version}/ popd pushd modules/axiom-impl mkdir -p $MAVEN_REPO_LOCAL/org/codehaus/woodstox/wstx-asl/3.2.4 ln -sf $(build-classpath wstx/wstx-asl) $MAVEN_REPO_LOCAL/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath geronimo/activation-1.0.2-api-1.2 geronimo/javamail-1.4-api-1.1 geronimo/stax-api-1.0-api-1.0) CLASSPATH=$CLASSPATH:$(build-classpath commons-logging jaxen xml-commons-apis xercesImpl wstx/wstx-asl) CLASSPATH=$CLASSPATH:../axiom-api/target/axiom-api-%{version}.jar CLASSPATH=$CLASSPATH:$(build-classpath log4j junit-3.8.2):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ jar javadoc mkdir -p $MAVEN_REPO_LOCAL/org/apache/ws/commons/axiom/axiom-impl/%{version} cp target/axiom-impl-%{version}.jar $MAVEN_REPO_LOCAL/org/apache/ws/commons/axiom/axiom-impl/%{version}/ popd pushd modules/axiom-dom export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath geronimo/activation-1.0.2-api-1.2 geronimo/javamail-1.4-api-1.1 geronimo/stax-api-1.0-api-1.0) CLASSPATH=$CLASSPATH:$(build-classpath commons-logging jaxen xml-commons-apis xercesImpl wstx/wstx-asl) CLASSPATH=$CLASSPATH:../axiom-api/target/axiom-api-%{version}.jar CLASSPATH=$CLASSPATH:$(build-classpath log4j junit-3.8.2):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ jar javadoc mkdir -p $MAVEN_REPO_LOCAL/org/apache/ws/commons/axiom/axiom-dom/%{version} cp target/axiom-dom-%{version}.jar $MAVEN_REPO_LOCAL/org/apache/ws/commons/axiom/axiom-dom/%{version}/ popd # with maven # pushd modules/axiom-tests # mkdir -p $MAVEN_REPO_LOCAL/javax/mail/mail/1.4 # ln -sf $(build-classpath sun-mail-api) $MAVEN_REPO_LOCAL/javax/mail/mail/1.4/mail-1.4.jar # mkdir -p $MAVEN_REPO_LOCAL/javax/activation/activation/1.1 # ln -sf $(build-classpath sun-jaf) $MAVEN_REPO_LOCAL/javax/activation/activation/1.1/activation-1.1.jar # mkdir -p $MAVEN_REPO_LOCAL/xmlunit/xmlunit/1.1 # ln -sf $(build-classpath xmlunit) $MAVEN_REPO_LOCAL/xmlunit/xmlunit/1.1/xmlunit-1.1.jar # export CLASSPATH="" # CLASSPATH=$CLASSPATH:$(build-classpath geronimo/activation-1.0.2-api-1.2 geronimo/javamail-1.4-api-1.1 geronimo/stax-api-1.0-api-1.0) # CLASSPATH=$CLASSPATH:$(build-classpath commons-logging jaxen xml-commons-apis xercesImpl wstx/wstx-asl) # CLASSPATH=$CLASSPATH:$(build-classpath sun-mail-api sun-jaf xmlunit) # CLASSPATH=$CLASSPATH:../axiom-api/target/axiom-api-%{version}.jar # CLASSPATH=$CLASSPATH:../axiom-impl/target/axiom-impl-%{version}.jar # CLASSPATH=$CLASSPATH:../axiom-dom/target/axiom-dom-%{version}.jar # CLASSPATH=$CLASSPATH:$(build-classpath log4j junit-3.8.2):target/classes:target/test-classes # ant \ # -Duser.home=$PWD \ # -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ # -Dmaven.settings.offline=true \ # -Dmaven.settings.interactiveMode=false \ # jar javadoc # popd mkdir target %endif mkdir tmp pushd tmp jar xf ../modules/axiom-impl/target/axiom-impl-%{version}.jar jar xf ../modules/axiom-dom/target/axiom-dom-%{version}.jar jar xf ../modules/axiom-api/target/axiom-api-%{version}.jar jar cf ../target/axiom-%{version}.jar * popd rm -rf tmp %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} mkdir -p %{buildroot}%{_datadir}/maven2/poms install -m 644 target/axiom-%{version}.jar \ %{buildroot}%{_javadir}/ws-commons-axiom-%{version}.jar install -m 644 modules/axiom-api/target/axiom-api-%{version}.jar \ %{buildroot}%{_javadir}/ws-commons-axiom-api-%{version}.jar install -m 644 modules/axiom-impl/target/axiom-impl-%{version}.jar \ %{buildroot}%{_javadir}/ws-commons-axiom-impl-%{version}.jar install -m 644 modules/axiom-dom/target/axiom-dom-%{version}.jar \ %{buildroot}%{_javadir}/ws-commons-axiom-dom-%{version}.jar %add_to_maven_depmap org.apache.ws.commons.axiom axiom %{version} JPP ws-commons-axiom %add_to_maven_depmap org.apache.ws.commons.axiom axiom-api %{version} JPP ws-commons-axiom-api %add_to_maven_depmap org.apache.ws.commons.axiom axiom-dom %{version} JPP ws-commons-axiom-dom %add_to_maven_depmap org.apache.ws.commons.axiom axiom-impl %{version} JPP ws-commons-axiom-impl install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.ws-commons-axiom.pom install -pm 644 modules/axiom-api/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.ws-commons-axiom-api.pom install -pm 644 modules/axiom-dom/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.ws-commons-axiom-dom.pom install -pm 644 modules/axiom-impl/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.ws-commons-axiom-impl.pom ( cd %{buildroot}%{_javadir} for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) mkdir -p %{buildroot}%{_javadocdir}/ws-commons-axiom-%{version}/api cp -pr modules/axiom-api/target/site/apidocs/* %{buildroot}%{_javadocdir}/ws-commons-axiom-%{version}/api mkdir -p %{buildroot}%{_javadocdir}/ws-commons-axiom-%{version}/dom cp -pr modules/axiom-dom/target/site/apidocs/* %{buildroot}%{_javadocdir}/ws-commons-axiom-%{version}/dom mkdir -p %{buildroot}%{_javadocdir}/ws-commons-axiom-%{version}/impl cp -pr modules/axiom-impl/target/site/apidocs/* %{buildroot}%{_javadocdir}/ws-commons-axiom-%{version}/impl ln -s ws-commons-axiom-%{version} %{buildroot}%{_javadocdir}/ws-commons-axiom mkdir -p %{buildroot}%{_datadir}/ws-commons-axiom-%{version} cp -pr LICENSE.txt NOTICE.txt README.txt RELEASE-NOTE.txt %{buildroot}%{_datadir}/ws-commons-axiom-%{version} %if %maven mkdir -p %{buildroot}%{_docdir}/ws-commons-axiom-%{version} cp -pr target/site/* %{buildroot}%{_docdir}/ws-commons-axiom-%{version} %endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root) %{_javadir}/ws-commons-axiom-%{version}.jar %{_javadir}/ws-commons-axiom.jar %{_javadir}/ws-commons-axiom-api-%{version}.jar %{_javadir}/ws-commons-axiom-api.jar %{_javadir}/ws-commons-axiom-dom-%{version}.jar %{_javadir}/ws-commons-axiom-dom.jar %{_javadir}/ws-commons-axiom-impl-%{version}.jar %{_javadir}/ws-commons-axiom-impl.jar %{_datadir}/maven2/poms %{_mavendepmapfragdir} %doc %{_datadir}/ws-commons-axiom-%{version} %files javadoc %defattr(-,root,root) %{_javadocdir}/ws-commons-axiom-%{version} %{_javadocdir}/ws-commons-axiom %if %maven %files manual %defattr(-,root,root) %doc %{_docdir}/ws-commons-axiom-%{version} %endif %changelog * Thu Nov 25 2010 gil 1.2.7-2mamba - rebuilt devel * Tue Jan 12 2010 gil 1.2.7-1mamba - package created by autospec