[jenkins-commons-jelly] Build more artifacts
Michal Srb
msrb at fedoraproject.org
Thu Dec 5 12:49:20 UTC 2013
commit 3ae2e641dec8dd0384b567abb3c5a2f975bf9685
Author: Michal Srb <msrb at redhat.com>
Date: Thu Dec 5 13:48:41 2013 +0100
Build more artifacts
0001-Do-not-run-tests-for-jelly-tags-xml.patch | 32 ++++++++++
0002-Fix-build.xml-for-jelly-tags-fmt.patch | 75 ++++++++++++++++++++++++
0003-Fix-build.xml-for-jelly-tags-define.patch | 46 ++++++++++++++
generate-sources.sh | 15 ++++-
jenkins-commons-jelly.spec | 29 +++++++++-
sources | 2 +-
6 files changed, 194 insertions(+), 5 deletions(-)
---
diff --git a/0001-Do-not-run-tests-for-jelly-tags-xml.patch b/0001-Do-not-run-tests-for-jelly-tags-xml.patch
new file mode 100644
index 0000000..7a245bb
--- /dev/null
+++ b/0001-Do-not-run-tests-for-jelly-tags-xml.patch
@@ -0,0 +1,32 @@
+From 86566f4cda067bf0a7fb8e4fac15955da55e3b00 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb at redhat.com>
+Date: Wed, 4 Dec 2013 16:29:18 +0100
+Subject: [PATCH 1/3] Do not run tests for jelly-tags-xml
+
+---
+ jelly-tags/xml/build.xml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/jelly-tags/xml/build.xml b/jelly-tags/xml/build.xml
+index c80db5e..4190c9e 100644
+--- a/jelly-tags/xml/build.xml
++++ b/jelly-tags/xml/build.xml
+@@ -67,7 +67,7 @@
+ </fileset>
+ </copy>
+ </target>
+- <target name="jar" description="o Create the jar" depends="compile,test">
++ <target name="jar" description="o Create the jar" depends="compile">
+ <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+ </jar>
+ </target>
+@@ -195,4 +195,4 @@
+ <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
+ </unjar>
+ </target>
+-</project>
+\ No newline at end of file
++</project>
+--
+1.8.3.1
+
diff --git a/0002-Fix-build.xml-for-jelly-tags-fmt.patch b/0002-Fix-build.xml-for-jelly-tags-fmt.patch
new file mode 100644
index 0000000..24e39b6
--- /dev/null
+++ b/0002-Fix-build.xml-for-jelly-tags-fmt.patch
@@ -0,0 +1,75 @@
+From 08a11d8bca7a809c0a69457e93dd0218e6175f6b Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb at redhat.com>
+Date: Wed, 4 Dec 2013 16:59:27 +0100
+Subject: [PATCH 2/3] Fix build.xml for jelly-tags-fmt
+
+---
+ jelly-tags/fmt/build.xml | 33 ++++++---------------------------
+ 1 file changed, 6 insertions(+), 27 deletions(-)
+
+diff --git a/jelly-tags/fmt/build.xml b/jelly-tags/fmt/build.xml
+index 45d18c2..2db3d2b 100644
+--- a/jelly-tags/fmt/build.xml
++++ b/jelly-tags/fmt/build.xml
+@@ -34,30 +34,9 @@
+ <property name="proxy.password" value="">
+ </property>
+ <path id="build.classpath">
+- <pathelement location="${libdir}/commons-jelly/jars/commons-jelly-tags-ant-1.1.jar">
+- </pathelement>
+- <pathelement location="${libdir}/ant/jars/ant-1.6.5.jar">
+- </pathelement>
+- <pathelement location="${libdir}/commons-jelly/jars/commons-jelly-tags-junit-1.0.jar">
+- </pathelement>
+- <pathelement location="${libdir}/xml-apis/jars/xml-apis-1.0.b2.jar">
+- </pathelement>
+- <pathelement location="${libdir}/commons-beanutils/jars/commons-beanutils-1.6.jar">
+- </pathelement>
+- <pathelement location="${libdir}/commons-collections/jars/commons-collections-2.1.jar">
+- </pathelement>
+- <pathelement location="${libdir}/commons-jexl/jars/commons-jexl-1.0.jar">
+- </pathelement>
+- <pathelement location="${libdir}/commons-jelly/jars/commons-jelly-1.0.jar">
+- </pathelement>
+- <pathelement location="${libdir}/commons-logging/jars/commons-logging-1.0.3.jar">
+- </pathelement>
+- <pathelement location="${libdir}/dom4j/jars/dom4j-1.5.jar">
+- </pathelement>
+- <pathelement location="${libdir}/jaxen/jars/jaxen-1.1-beta-2.jar">
+- </pathelement>
+- <pathelement location="${libdir}/xerces/jars/xerces-2.2.1.jar">
+- </pathelement>
++ <fileset dir="target/jars">
++ <include name="**/*.jar"/>
++ </fileset>
+ </path>
+ <target name="init" description="o Initializes some properties">
+ <mkdir dir="${libdir}">
+@@ -81,7 +60,7 @@
+ </and>
+ </condition>
+ </target>
+- <target name="compile" description="o Compile the code" depends="get-deps">
++ <target name="compile" description="o Compile the code">
+ <mkdir dir="${classesdir}">
+ </mkdir>
+ <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+@@ -109,7 +88,7 @@
+ <copy todir="${classesdir}/META-INF" file="${basedir}/../../LICENSE.txt">
+ </copy>
+ </target>
+- <target name="jar" description="o Create the jar" depends="compile,test">
++ <target name="jar" description="o Create the jar" depends="compile">
+ <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+ </jar>
+ </target>
+@@ -380,4 +359,4 @@
+ <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
+ </unjar>
+ </target>
+-</project>
+\ No newline at end of file
++</project>
+--
+1.8.3.1
+
diff --git a/0003-Fix-build.xml-for-jelly-tags-define.patch b/0003-Fix-build.xml-for-jelly-tags-define.patch
new file mode 100644
index 0000000..7ba1311
--- /dev/null
+++ b/0003-Fix-build.xml-for-jelly-tags-define.patch
@@ -0,0 +1,46 @@
+From 5149382d8ecaa6bdb6dbbf8f747bc90ee5ba06f1 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb at redhat.com>
+Date: Thu, 5 Dec 2013 11:06:31 +0100
+Subject: [PATCH 3/3] Fix build.xml for jelly-tags-define
+
+---
+ jelly-tags/define/build.xml | 4 ++--
+ jelly-tags/fmt/build.xml | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/jelly-tags/define/build.xml b/jelly-tags/define/build.xml
+index 07f8597..3c23d0e 100644
+--- a/jelly-tags/define/build.xml
++++ b/jelly-tags/define/build.xml
+@@ -67,7 +67,7 @@
+ </fileset>
+ </copy>
+ </target>
+- <target name="jar" description="o Create the jar" depends="compile,test">
++ <target name="jar" description="o Create the jar" depends="compile">
+ <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+ </jar>
+ </target>
+@@ -201,4 +201,4 @@
+ <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
+ </unjar>
+ </target>
+-</project>
+\ No newline at end of file
++</project>
+diff --git a/jelly-tags/fmt/build.xml b/jelly-tags/fmt/build.xml
+index 2db3d2b..d976f4f 100644
+--- a/jelly-tags/fmt/build.xml
++++ b/jelly-tags/fmt/build.xml
+@@ -34,7 +34,7 @@
+ <property name="proxy.password" value="">
+ </property>
+ <path id="build.classpath">
+- <fileset dir="target/jars">
++ <fileset dir="target/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+--
+1.8.3.1
+
diff --git a/generate-sources.sh b/generate-sources.sh
index 8a6dad9..8792bf7 100755
--- a/generate-sources.sh
+++ b/generate-sources.sh
@@ -1,7 +1,6 @@
#!/bin/bash
-VERSION="1.1.20120928"
-
+VERSION=`grep Version: *spec | sed -e 's/Version:\s*\(.*\)/\1/'`
MINORVER="${VERSION#*\.*\.}"
@@ -16,8 +15,18 @@ rm 1.1-jenkins-${MINORVER}.tar.gz
mv ${ORIG_DIR_NAME} ${NEW_DIR_NAME}
cd ${NEW_DIR_NAME}
rm -Rf build.properties.sample parent-project.xml KEYS maven.xml project.xml \
- project.properties release.sh xdocs doap_jelly.rdf jelly-tags \
+ project.properties release.sh xdocs doap_jelly.rdf \
build.xml src/bin/ .classpath .gitignore .hgignore .project
+
+# remove things we don't need
+pushd jelly-tags/
+rm -Rf ant antlr avalon bean beanshell betwixt bsf dynabean email html http \
+ interaction jaxme jetty jface jms jmx jsl junit log maven.xml memory \
+ ojb project.properties project.xml quartz regexp soap sql swing swt \
+ tag-checkstyle.xml tag-navigation.xml tag-project.xml threads util \
+ validate velocity xmlunit
+popd
+
cd ../
tar czvf ${OUTPUT} ${NEW_DIR_NAME}
diff --git a/jenkins-commons-jelly.spec b/jenkins-commons-jelly.spec
index 387b6f5..e7bd7af 100644
--- a/jenkins-commons-jelly.spec
+++ b/jenkins-commons-jelly.spec
@@ -2,7 +2,7 @@
Name: jenkins-commons-jelly
Version: 1.1.20120928
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Open and customizable XML processing engine
License: ASL 2.0
@@ -14,6 +14,10 @@ Source0: jenkins-commons-jelly-%{version}-clean.tar.gz
# Port to jexl 2.x, we don't have jexl 1.x API in Fedora
# TODO possibly upstreamable, need some testing
Patch0: 0001-Use-jexl2-API-instead-of-just-jexl.patch
+# Do not run tests for xml jelly tag (missing dep)
+Patch1: 0001-Do-not-run-tests-for-jelly-tags-xml.patch
+Patch2: 0002-Fix-build.xml-for-jelly-tags-fmt.patch
+Patch3: 0003-Fix-build.xml-for-jelly-tags-define.patch
BuildRequires: maven-local
BuildRequires: mvn(commons-beanutils:commons-beanutils)
@@ -54,6 +58,9 @@ This package contains the API documentation for %{name}.
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
# We don't have this extension
%pom_xpath_remove "pom:extension[pom:artifactId[text()='wagon-svn']]"
@@ -79,9 +86,26 @@ This package contains the API documentation for %{name}.
sed -i 's/\r//' LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt \
README-binary-dist.txt short-license.txt
+
%build
%mvn_build
+# build few more artifacts in jelly-tags/ directory (these use ant)
+cpjars="xalan-j2 apache-commons-jexl/commons-jexl xml-commons-apis \
+ apache-commons-beanutils apache-commons-collections \
+ apache-commons-logging dom4j jaxen xerces-j2 junit"
+
+for tag in xml fmt define; do
+ mkdir -p jelly-tags/${tag}/target/lib
+ build-jar-repository jelly-tags/${tag}/target/lib ${cpjars}
+ ln -s ../../../../target/commons-jelly-1.1-jenkins-%{minorver}.jar \
+ jelly-tags/${tag}/target/lib/commons-jelly-%{version}.jar
+
+ ant -Dnoget=1 -f jelly-tags/${tag}/build.xml
+ %mvn_artifact commons-jelly:commons-jelly-tags-${tag}:::1.0 \
+ jelly-tags/${tag}/target/commons-jelly-tags-${tag}-*-SNAPSHOT.jar
+done
+
%install
%mvn_install
@@ -94,6 +118,9 @@ sed -i 's/\r//' LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt \
%doc LICENSE.txt short-license.txt
%changelog
+* Thu Dec 05 2013 Michal Srb <msrb at redhat.com> - 1.1.20120928-4
+- Build more artifacts
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.20120928-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 94c32f2..2e93a0f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-21a6daccf8f9c1badf8e333e98959899 jenkins-commons-jelly-1.1.20120928-clean.tar.gz
+ae5cf0216ca84d9a0f41627401d8c635 jenkins-commons-jelly-1.1.20120928-clean.tar.gz
More information about the scm-commits
mailing list