[jaxen] Update to latest upstream version.
Alexander Kurtakov
akurtakov at fedoraproject.org
Tue Nov 29 12:03:00 UTC 2011
commit 54432ea18a43f0b1345ef3bc15e5d4d235546dfa
Author: Alexander Kurtakov < <akurtako at redhat.com>
Date: Tue Nov 29 14:02:45 2011 +0200
Update to latest upstream version.
- Adapt to current guidelines.
.gitignore | 1 +
build.xml | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
jaxen.spec | 143 ++++++-----------------------------------------------------
sources | 2 +-
4 files changed, 161 insertions(+), 129 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a04a5a7..254c6be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
jaxen-1.1.1-src.tar.gz
+jaxen-1.1.3-src.tar.gz
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..0b28444
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--build.xml generated by maven from project.xml version 1.1.1
+ on date May 5 2007, time 1501-->
+
+<project default="jar" name="jaxen" basedir=".">
+ <property name="defaulttargetdir" value="target">
+ </property>
+ <property name="libdir" value="target/lib">
+ </property>
+ <property name="classesdir" value="target/classes">
+ </property>
+ <property name="testclassesdir" value="target/test-classes">
+ </property>
+ <property name="testclassesdir" value="target/test-classes">
+ </property>
+ <property name="testreportdir" value="target/test-reports">
+ </property>
+ <property name="distdir" value="dist">
+ </property>
+ <property name="javadocdir" value="dist/docs/api">
+ </property>
+ <property name="final.name" value="jaxen-1.1.3">
+ </property>
+ <path id="build.classpath">
+ <fileset dir="${libdir}">
+ <include name="**/*.jar">
+ </include>
+ </fileset>
+ </path>
+ <target name="init" description="o Initializes some properties">
+ <mkdir dir="${libdir}">
+ </mkdir>
+ <condition property="noget">
+ <equals arg2="only" arg1="${build.sysclasspath}">
+ </equals>
+ </condition>
+ <!--Test if JUNIT is present in ANT classpath-->
+
+ <available property="Junit.present" classname="junit.framework.Test">
+ </available>
+ </target>
+ <target name="compile" description="o Compile the code">
+ <mkdir dir="${classesdir}">
+ </mkdir>
+ <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+ <src>
+ <pathelement location="src/java/main">
+ </pathelement>
+ </src>
+ <classpath refid="build.classpath">
+ </classpath>
+ </javac>
+ </target>
+ <target name="jar" description="o Create the jar" depends="compile">
+ <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+ </jar>
+ </target>
+ <target name="clean" description="o Clean up the generated directories">
+ <delete dir="${defaulttargetdir}">
+ </delete>
+ <delete dir="${distdir}">
+ </delete>
+ </target>
+ <target name="dist" description="o Create a distribution" depends="jar, javadoc">
+ <mkdir dir="dist">
+ </mkdir>
+ <copy todir="dist">
+ <fileset dir="${defaulttargetdir}" includes="*.jar">
+ </fileset>
+ <fileset dir="${basedir}" includes="LICENSE*, README*">
+ </fileset>
+ </copy>
+ </target>
+ <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
+ <fail message="There were test failures.">
+ </fail>
+ </target>
+ <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
+ <mkdir dir="${testreportdir}">
+ </mkdir>
+ <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+ <sysproperty key="basedir" value=".">
+ </sysproperty>
+ <formatter type="xml">
+ </formatter>
+ <formatter usefile="false" type="plain">
+ </formatter>
+ <classpath>
+ <path refid="build.classpath">
+ </path>
+ <pathelement path="${testclassesdir}">
+ </pathelement>
+ <pathelement path="${classesdir}">
+ </pathelement>
+ </classpath>
+ <batchtest todir="${testreportdir}">
+ <fileset dir="src/java/test">
+ <include name="**/*Test.java">
+ </include>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+ <target name="junit-present" unless="Junit.present" depends="init">
+ <echo>================================= WARNING ================================</echo>
+ <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
+ <echo>==========================================================================</echo>
+ </target>
+ <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
+ <mkdir dir="${testclassesdir}">
+ </mkdir>
+ <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+ <src>
+ <pathelement location="src/java/test">
+ </pathelement>
+ </src>
+ <classpath>
+ <path refid="build.classpath">
+ </path>
+ <pathelement path="${classesdir}">
+ </pathelement>
+ </classpath>
+ </javac>
+ </target>
+ <target name="javadoc" description="o Generate javadoc">
+ <mkdir dir="${javadocdir}">
+ </mkdir>
+ <tstamp>
+ <format pattern="2001-yyyy" property="year">
+ </format>
+ </tstamp>
+ <property name="copyright" value="Copyright &copy; 2001-2007 Codehaus. All Rights Reserved.">
+ </property>
+ <property name="title" value="jaxen 1.1.3 API">
+ </property>
+ <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java/main" packagenames="org.jaxen.*">
+ <classpath>
+ <path refid="build.classpath">
+ </path>
+ </classpath>
+ </javadoc>
+ </target>
+</project>
\ No newline at end of file
diff --git a/jaxen.spec b/jaxen.spec
index 018fbb1..7be7eb1 100644
--- a/jaxen.spec
+++ b/jaxen.spec
@@ -28,39 +28,16 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# We don't want to build with maven
-%define _without_maven 1
-
-# If you don't want to build with maven, and use straight ant instead,
-# give rpmbuild option '--without maven'
-
-%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
-%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
-
-# If you don't want the manual to be built, give rpmbuild option
-# '--without manual'
-%define with_manual %{!?_without_manual:1}%{?_without_manual:0}
-%define without_manual %{?_without_manual:1}%{!?_without_manual:0}
-
Name: jaxen
-Version: 1.1.1
-Release: 4.1%{?dist}
+Version: 1.1.3
+Release: 1%{?dist}
Epoch: 0
Summary: An XPath engine written in Java
License: BSD
-Url: http://jaxen.codehaus.org/
+URL: http://jaxen.codehaus.org/
Group: Development/Libraries
Source0: http://dist.codehaus.org/jaxen/distributions/jaxen-%{version}-src.tar.gz
-
-%if %{with_maven}
-Source1: pom-maven2jpp-depcat.xsl
-Source2: pom-maven2jpp-newdepmap.xsl
-Source3: pom-maven2jpp-mapdeps.xsl
-Source4: jaxen-1.1-b7-jpp-depmap.xml
-
-Source5: jaxen-1.1-b7-build.xml
-%endif
-
+Source1: build.xml
Requires: dom4j >= 0:1.6.1
Requires: jdom >= 0:1.0-0.rc1.1jpp
Requires: xalan-j2
@@ -68,15 +45,6 @@ Requires: xerces-j2
Requires: xom
BuildRequires: ant >= 0:1.6, jpackage-utils >= 0:1.6, junit, ant-junit
BuildRequires: java-devel
-%if %{with_maven}
-BuildRequires: maven >= 0:1.1, saxon, saxon-scripts
-BuildRequires: maven-plugin-changes >= 0:1.1
-BuildRequires: maven-plugin-file-activity >= 0:1.1
-BuildRequires: maven-plugin-developer-activity >= 0:1.1
-BuildRequires: maven-plugin-license >= 0:1.1
-BuildRequires: maven-plugin-jdepend >= 0:1.1
-BuildRequires: maven-plugin-tasklist >= 0:1.1
-%endif
BuildRequires: dom4j >= 0:1.6.1
BuildRequires: jdom >= 0:1.0-0.rc1.1jpp
BuildRequires: xalan-j2
@@ -85,24 +53,12 @@ BuildRequires: xom
Provides: jaxen-bootstrap <= %{version}-%{release}
Obsoletes: jaxen-bootstrap <= %{version}-%{release}
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Jaxen is an XPath engine written in Java to work against a variety of XML
based object models such as DOM, dom4j and JDOM together with Java
Beans.
-%if %{with_maven}
-%if %{with_manual}
-%package manual
-Summary: Documents for %{name}
-Group: Development/Documentation
-
-%description manual
-%{summary}.
-%endif
-%endif
-
%package demo
Summary: Samples for %{name}
Group: Development/Documentation
@@ -119,118 +75,49 @@ Group: Development/Documentation
%{summary}.
%prep
-# If you dont want to build with maven, give rpmbuild option '--without
-# maven'
-# If you dont want the manual to be built, give rpmbuild option
-# '--without manual'
-
-%setup -q -n %{name}-%{version}
+%setup -q
find . -name "*.jar" -exec rm -f {} \;
-
-%if %{with_maven}
-export DEPCAT=$(pwd)/jaxen-1.1-b7-depcat.new.xml
-echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
-echo '<depset>' >> $DEPCAT
-for p in $(find . -name project.xml); do
- pushd $(dirname $p)
- /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
- popd
-done
-echo >> $DEPCAT
-echo '</depset>' >> $DEPCAT
-/usr/bin/saxon $DEPCAT %{SOURCE2} > jaxen-1.1-b7-depmap.new.xml
-%else
+cp %{SOURCE1} .
mkdir -p target/lib
pushd target/lib
build-jar-repository . dom4j-1.6.1.jar jdom-1.0.jar xom-1.0.jar
ln -s %{_javadir}/xerces-j2.jar xercesImpl-2.6.2.jar
popd
-%endif
%build
-%if %{with_maven}
-for p in $(find . -name project.xml); do
- pushd $(dirname $p)
- cp project.xml project.xml.orig
- /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
- popd
-done
-
mkdir .maven
-
-%if %{with_manual}
-maven \
- -Dmaven.repo.remote=file:/usr/share/maven/repository \
- -Dmaven.home.local=$(pwd)/.maven \
- jar javadoc xdoc
-%else
-maven \
- -Dmaven.repo.remote=file:/usr/share/maven/repository \
- -Dmaven.home.local=$(pwd)/.maven \
- jar javadoc
-%endif
-%else
-ant -Dnoget=true jar javadoc
-%endif
+export CLASSPATH=$(build-classpath xml-commons-apis)
+ant -Dant.build.sysclasspath=first jar javadoc
%install
-rm -rf $RPM_BUILD_ROOT
-
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/%{name}-%{version}.jar \
-$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
-
-(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do \
-ln -sf ${jar} ${jar/-%{version}/}; done)
+$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-%if %{with_maven}
-cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-rm -rf target/docs/apidocs
-%else
-cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-%endif
-ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
-# manual
-%if %{with_maven}
-%if %{with_manual}
-install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-%endif
-%endif
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# demo
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/samples
cp -pr src/java/samples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/samples
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
-%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_javadir}/*
-%if %{with_maven}
-%if %{with_manual}
-%files manual
-%defattr(0644,root,root,0755)
-%doc %{_docdir}/%{name}-%{version}
-%endif
-%endif
-
%files javadoc
-%defattr(0644,root,root,0755)
%doc %{_javadocdir}/*
%files demo
-%defattr(0644,root,root,0755)
%{_datadir}/%{name}-%{version}
%changelog
+* Tue Nov 29 2011 Alexander Kurtakov <akurtako at redhat.com> 0:1.1.3-1
+- Update to latest upstream version.
+- Adapt to current guidelines.
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0:1.1.1-4.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/sources b/sources
index 59b32cf..0661434 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b598ae6b7e765a92e13667b0a80392f4 jaxen-1.1.1-src.tar.gz
+c89a75cd42267c3016e1873f638cada0 jaxen-1.1.3-src.tar.gz
More information about the scm-commits
mailing list