Accepting request 963092 from Java:packages
Build with source/target levels 8 + rewamp the build system a bit OBS-URL: https://build.opensuse.org/request/show/963092 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jaxen-bootstrap?expand=0&rev=15
This commit is contained in:
commit
5de8942719
@ -8,43 +8,25 @@
|
||||
<property file="${user.home}/build.properties"></property>
|
||||
<!--Build properties-->
|
||||
<property name="defaulttargetdir" value="${basedir}/target"></property>
|
||||
<property name="libdir" value="${user.home}/.maven/repository"></property>
|
||||
<property name="libdir" value="lib"></property>
|
||||
<property name="classesdir" value="${basedir}/target/classes"></property>
|
||||
<property name="testclassesdir" value="${basedir}/target/test-classes"></property>
|
||||
<property name="testreportdir" value="${basedir}/target/test-reports"></property>
|
||||
<property name="distdir" value="${basedir}/dist"></property>
|
||||
<property name="javadocdir" value="${basedir}/dist/docs/api"></property>
|
||||
<property name="final.name" value="jaxen-1.1-beta-7"></property>
|
||||
<property name="proxy.host" value=""></property>
|
||||
<property name="proxy.port" value=""></property>
|
||||
<property name="proxy.username" value=""></property>
|
||||
<property name="proxy.password" value=""></property>
|
||||
<path id="build.classpath">
|
||||
<pathelement location="${libdir}/JPP/jars/dom4j.jar"></pathelement>
|
||||
<pathelement location="${libdir}/JPP/jars/jdom.jar"></pathelement>
|
||||
<pathelement location="${libdir}/JPP/jars/xml-commons-apis.jar"></pathelement>
|
||||
<pathelement location="${libdir}/JPP/jars/xerces-j2.jar"></pathelement>
|
||||
<pathelement location="${libdir}/JPP/jars/xom.jar"></pathelement>
|
||||
<pathelement location="${libdir}/JPP/jars/junit.jar"></pathelement>
|
||||
<fileset dir="${libdir}">
|
||||
<include name="**/*.jar"/>
|
||||
</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>
|
||||
<!--Test if user defined a proxy-->
|
||||
<condition property="useProxy">
|
||||
<and>
|
||||
<isset property="proxy.host"></isset>
|
||||
<not>
|
||||
<equals trim="true" arg2="" arg1="${proxy.host}"></equals>
|
||||
</not>
|
||||
</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">
|
||||
<src>
|
||||
@ -113,7 +95,7 @@
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="javadoc" description="o Generate javadoc" depends="get-deps">
|
||||
<target name="javadoc" description="o Generate javadoc">
|
||||
<mkdir dir="${javadocdir}"></mkdir>
|
||||
<tstamp>
|
||||
<format pattern="2001-yyyy" property="year"></format>
|
||||
@ -126,68 +108,4 @@
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
<target name="get-dep-dom4j.jar" description="o Download the dependency : dom4j.jar" unless="dom4j.jar" depends="init,setProxy,noProxy,get-custom-dep-dom4j.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/dom4j.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/dom4j.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-dom4j.jar" if="dom4j.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/dom4j.jar" usetimestamp="true" ignoreerrors="true" src="${dom4j.jar}"></get>
|
||||
</target>
|
||||
<target name="get-dep-jdom.jar" description="o Download the dependency : jdom.jar" unless="jdom.jar" depends="init,setProxy,noProxy,get-custom-dep-jdom.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/jdom.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/jdom.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-jdom.jar" if="jdom.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/jdom.jar" usetimestamp="true" ignoreerrors="true" src="${jdom.jar}"></get>
|
||||
</target>
|
||||
<target name="get-dep-xmlParserAPIs.jar" description="o Download the dependency : xmlParserAPIs.jar" unless="xmlParserAPIs.jar" depends="init,setProxy,noProxy,get-custom-dep-xmlParserAPIs.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/xml-commons-apis.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/xml-commons-apis.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-xmlParserAPIs.jar" if="xmlParserAPIs.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/xml-commons-apis.jar" usetimestamp="true" ignoreerrors="true" src="${xmlParserAPIs.jar}"></get>
|
||||
</target>
|
||||
<target name="get-dep-xercesImpl.jar" description="o Download the dependency : xercesImpl.jar" unless="xercesImpl.jar" depends="init,setProxy,noProxy,get-custom-dep-xercesImpl.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/xerces-j2.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/xerces-j2.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-xercesImpl.jar" if="xercesImpl.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/xerces-j2.jar" usetimestamp="true" ignoreerrors="true" src="${xercesImpl.jar}"></get>
|
||||
</target>
|
||||
<target name="get-dep-xom.jar" description="o Download the dependency : xom.jar" unless="xom.jar" depends="init,setProxy,noProxy,get-custom-dep-xom.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/xom.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/xom.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-xom.jar" if="xom.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/xom.jar" usetimestamp="true" ignoreerrors="true" src="${xom.jar}"></get>
|
||||
</target>
|
||||
<target name="get-dep-junit.jar" description="o Download the dependency : junit.jar" unless="junit.jar" depends="init,setProxy,noProxy,get-custom-dep-junit.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/junit.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/junit.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-junit.jar" if="junit.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/junit.jar" usetimestamp="true" ignoreerrors="true" src="${junit.jar}"></get>
|
||||
</target>
|
||||
<target name="get-deps" unless="noget" depends="get-dep-dom4j.jar,get-dep-jdom.jar,get-dep-xmlParserAPIs.jar,get-dep-xercesImpl.jar,get-dep-xom.jar,get-dep-junit.jar"></target>
|
||||
<target name="setProxy" if="useProxy" depends="init">
|
||||
<!--Proxy settings works only with a JDK 1.2 and higher.-->
|
||||
<echo>Proxy used :</echo>
|
||||
<echo>Proxy host [${proxy.host}]</echo>
|
||||
<echo>Proxy port [${proxy.port}]</echo>
|
||||
<echo>Proxy user [${proxy.username}]</echo>
|
||||
<setproxy proxyuser="${proxy.username}" proxyport="${proxy.port}" proxypassword="${proxy.password}" proxyhost="${proxy.host}"></setproxy>
|
||||
</target>
|
||||
<target name="noProxy" unless="useProxy" depends="init">
|
||||
<echo>Proxy not used.</echo>
|
||||
</target>
|
||||
<target name="install-maven">
|
||||
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar"></get>
|
||||
<unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"></unjar>
|
||||
</target>
|
||||
</project>
|
@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<depset>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.6.1</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<jar>dom4j.jar</jar>
|
||||
<version>1.6.1</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
<version>1.0</version>
|
||||
<url>http://jdom.org</url>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
<jar>jdom.jar</jar>
|
||||
<version>1.0</version>
|
||||
<url>http://jdom.org</url>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.6.2</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<jar>xerces-j2.jar</jar>
|
||||
<version>2.6.2</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.3.02</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<jar>xml-commons-jaxp-1.3-apis.jar</jar>
|
||||
<version>1.3.02</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xmlParserAPIs</artifactId>
|
||||
<version>2.6.2</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>xmlParserAPIs</artifactId>
|
||||
<jar>xml-commons-jaxp-1.3-apis.jar</jar>
|
||||
<version>2.6.2</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>xom</groupId>
|
||||
<artifactId>xom</artifactId>
|
||||
<version>1.0b3</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>xom</artifactId>
|
||||
<jar>xom.jar</jar>
|
||||
<version>1.0b3</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<add>
|
||||
<dependency>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<jar>junit.jar</jar>
|
||||
</dependency>
|
||||
</add>
|
||||
</depset>
|
@ -1,60 +0,0 @@
|
||||
--- project.xml.sav 2006-12-31 21:50:30.000000000 +0100
|
||||
+++ project.xml 2007-05-01 13:04:28.000000000 +0200
|
||||
@@ -237,7 +237,9 @@
|
||||
<report>maven-jdepend-plugin</report>
|
||||
<report>maven-checkstyle-plugin</report>
|
||||
<report>maven-cobertura-plugin</report>
|
||||
+<!--
|
||||
<report>maven-changelog-plugin</report>
|
||||
+-->
|
||||
<report>maven-developer-activity-plugin</report>
|
||||
<report>maven-file-activity-plugin</report>
|
||||
<report>maven-license-plugin</report>
|
||||
@@ -287,6 +289,7 @@
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
+<!--
|
||||
<dependency>
|
||||
<groupId>maven-plugins</groupId>
|
||||
<artifactId>maven-cobertura-plugin</artifactId>
|
||||
@@ -294,12 +297,12 @@
|
||||
<type>plugin</type>
|
||||
</dependency>
|
||||
|
||||
-<!-- <dependency>
|
||||
+ <dependency>
|
||||
<groupId>maven-plugins</groupId>
|
||||
<artifactId>maven-latex-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<type>plugin</type>
|
||||
- </dependency> -->
|
||||
+ </dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>maven-plugins</groupId>
|
||||
@@ -308,19 +311,20 @@
|
||||
<type>plugin</type>
|
||||
</dependency>
|
||||
|
||||
-<!-- <dependency>
|
||||
+ <dependency>
|
||||
<groupId>lint4j</groupId>
|
||||
<artifactId>jutils-lint4j-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<type>plugin</type>
|
||||
- </dependency> -->
|
||||
+ </dependency>
|
||||
|
||||
- <!-- <dependency>
|
||||
+ <dependency>
|
||||
<groupId>org.hammurapi</groupId>
|
||||
<artifactId>maven-hammurapi-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<type>plugin</type>
|
||||
- </dependency> -->
|
||||
+ </dependency>
|
||||
+-->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 19 21:42:10 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build with source/target levels 8
|
||||
- Clean-up the build system
|
||||
- Removed patch:
|
||||
* jaxen-bootstrap-project_xml.patch
|
||||
+ not needed in the rewamped build system
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 8 08:20:32 UTC 2017 - fstrba@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package jaxen-bootstrap
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,85 +12,49 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define with_maven 0
|
||||
%define real jaxen
|
||||
%define dom4jver 1.6.1
|
||||
%define section free
|
||||
|
||||
Name: jaxen-bootstrap
|
||||
Version: 1.1
|
||||
Release: 0
|
||||
Summary: A convenience package for build of dom4j
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
Url: http://jaxen.codehaus.org/
|
||||
URL: http://jaxen.codehaus.org/
|
||||
Source0: http://dist.codehaus.org/jaxen/distributions/jaxen-1.1-src.tar.bz2
|
||||
Source1: pom-maven2jpp-depcat.xsl
|
||||
Source2: pom-maven2jpp-newdepmap.xsl
|
||||
Source3: pom-maven2jpp-mapdeps.xsl
|
||||
Source4: jaxen-1.1-b7-jpp-depmap.xml
|
||||
# Debian sources don't need a proprietary msv for build, so that's why I used them
|
||||
# svn co svn://svn.debian.org/svn/pkg-java/trunk/dom4j
|
||||
# rm dom4j/docs/xref/org/dom4j/tree/ConcurrentReaderHashMap.html
|
||||
# rm dom4j/docs/clover/org/dom4j/tree/ConcurrentReaderHashMap.html
|
||||
# #bnc501764
|
||||
# bnc#501764
|
||||
# rm dom4j/lib/tools/clover.license
|
||||
# tar --exclude-vcs -cjf dom4j-1.6.1-debian.tar.bz2 dom4j/
|
||||
Source5: http://prdownloads.sourceforge.net/dom4j/dom4j-%{dom4jver}-debian.tar.bz2
|
||||
Source6: jaxen-1.1-b7-build.xml
|
||||
Patch0: jaxen-bootstrap-project_xml.patch
|
||||
Requires: xalan-j2
|
||||
Requires: xerces-j2
|
||||
Requires: xom
|
||||
Source1: http://prdownloads.sourceforge.net/dom4j/dom4j-%{dom4jver}-debian.tar.bz2
|
||||
Source2: jaxen-1.1-b7-build.xml
|
||||
BuildRequires: ant >= 1.6
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: junit
|
||||
%if %{with_maven}
|
||||
BuildRequires: maven >= 1.1
|
||||
BuildRequires: maven-plugin-license
|
||||
BuildRequires: maven-plugin-test
|
||||
BuildRequires: maven-plugins-base
|
||||
BuildRequires: saxon
|
||||
BuildRequires: saxon-scripts
|
||||
%endif
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xalan-j2
|
||||
BuildRequires: xerces-j2
|
||||
BuildRequires: xom
|
||||
Requires: xalan-j2
|
||||
Requires: xerces-j2
|
||||
Requires: xom
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Dom4j depends on a jaxen build with dom4j support. This package must
|
||||
only be installed in the rare event of having to rebuild dom4j.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real}-%{version}
|
||||
tar -xf %{SOURCE5}
|
||||
#/bin/gzip -dc %{SOURCE5} | tar -xf -
|
||||
cp %{SOURCE6} build.xml
|
||||
%setup -q -n %{real}-%{version} -a1
|
||||
cp %{SOURCE2} build.xml
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
%patch0 -b .sav
|
||||
%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
|
||||
%endif
|
||||
rm -rf src/java/main/org/jaxen/jdom
|
||||
rm -rf src/java/test/org/jaxen/jdom
|
||||
rm -f src/java/test/org/jaxen/test/JaxenTests.java
|
||||
@ -100,58 +64,37 @@ rm -f src/java/test/org/jaxen/test/JDOMTests.java
|
||||
rm -f src/java/test/org/jaxen/test/JDOMXPathTest.java
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath \
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib \
|
||||
xom \
|
||||
jdom \
|
||||
xalan-j2 \
|
||||
xerces-j2 \
|
||||
)
|
||||
pushd dom4j/src/java
|
||||
javac -sourcepath ../../../src/java/main:. \
|
||||
org/dom4j/Attribute.java \
|
||||
org/dom4j/Branch.java \
|
||||
org/dom4j/CDATA.java \
|
||||
org/dom4j/Comment.java \
|
||||
org/dom4j/Document.java \
|
||||
org/dom4j/DocumentException.java \
|
||||
org/dom4j/Element.java \
|
||||
org/dom4j/Namespace.java \
|
||||
org/dom4j/Node.java \
|
||||
org/dom4j/ProcessingInstruction.java \
|
||||
org/dom4j/Text.java \
|
||||
org/dom4j/io/SAXReader.java
|
||||
jar cf ../../dom4j.jar $(find . -name "*.class")
|
||||
popd
|
||||
mkdir -p .maven/repository/JPP/jars
|
||||
cp dom4j/dom4j.jar .maven/repository/JPP/jars/dom4j.jar
|
||||
%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
|
||||
maven \
|
||||
-Dmaven.test.skip=true \
|
||||
-Dmaven.repo.remote=file:/usr/share/maven/repository \
|
||||
-Dmaven.home.local=$(pwd)/.maven \
|
||||
jar
|
||||
%else
|
||||
export CLASSPATH=$CLASSPATH:dom4j/dom4j.jar
|
||||
ant -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
||||
-Dbuild.sysclasspath=first
|
||||
%endif
|
||||
xerces-j2
|
||||
|
||||
mkdir -p dom4j/classes
|
||||
javac \
|
||||
-source 8 -target 8 -d dom4j/classes \
|
||||
-sourcepath src/java/main:dom4j/src/java \
|
||||
dom4j/src/java/org/dom4j/Attribute.java \
|
||||
dom4j/src/java/org/dom4j/Branch.java \
|
||||
dom4j/src/java/org/dom4j/CDATA.java \
|
||||
dom4j/src/java/org/dom4j/Comment.java \
|
||||
dom4j/src/java/org/dom4j/Document.java \
|
||||
dom4j/src/java/org/dom4j/DocumentException.java \
|
||||
dom4j/src/java/org/dom4j/Element.java \
|
||||
dom4j/src/java/org/dom4j/Namespace.java \
|
||||
dom4j/src/java/org/dom4j/Node.java \
|
||||
dom4j/src/java/org/dom4j/ProcessingInstruction.java \
|
||||
dom4j/src/java/org/dom4j/Text.java \
|
||||
dom4j/src/java/org/dom4j/io/SAXReader.java
|
||||
|
||||
jar cf lib/dom4j.jar -C dom4j/classes .
|
||||
|
||||
%ant -Dant.build.javac.source=1.8 -Dant.build.javac.target=1.8
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 644 target/%{real}-%{version}-beta-7.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{real}-%{version}.jar
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do \
|
||||
ln -sf ${jar} ${jar/-%{version}/}; done)
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -m 644 target/%{real}-%{version}-beta-7.jar %{buildroot}%{_javadir}/%{real}.jar
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
|
@ -1,109 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:template match="*[name() != 'dependencies']|*/text()">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
<xsl:template match="//dependencies">
|
||||
<xsl:for-each select="./dependency">
|
||||
<xsl:element name="dependency">
|
||||
<xsl:element name="maven">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./groupId">
|
||||
<xsl:copy-of select="./groupId"/>
|
||||
<xsl:copy-of select="./artifactId"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-before(./id/text(),':') != ''">
|
||||
<xsl:element name="groupId">
|
||||
<xsl:value-of select="substring-before(./id/text(),':')"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="substring-after(./id/text(),':')"/>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="groupId">
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
ERROR
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:for-each select="./*">
|
||||
<xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
<xsl:element name="jpp">
|
||||
<xsl:element name="groupId">JPP</xsl:element>
|
||||
<xsl:choose>
|
||||
<xsl:when test="./artifactId">
|
||||
<xsl:copy-of select="./artifactId"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-after(./id/text(),':') != ''">
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="substring-after(./id/text(),':')"/>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
ERROR
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:element name="jar">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./artifactId">
|
||||
<xsl:value-of select="./artifactId/text()"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-after(./id/text(),':') != ''">
|
||||
<xsl:value-of select="substring-after(./id/text(),':')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
ERROR
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:choose>
|
||||
<xsl:when test="./type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./type/text() = 'plugin'">.jar</xsl:when>
|
||||
<xsl:otherwise>.<xsl:value-of select="./type/text()"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>.jar</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:element>
|
||||
<xsl:for-each select="./*">
|
||||
<xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:param name="map" />
|
||||
<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:template match="/project" >
|
||||
<xsl:element name="project">
|
||||
<xsl:copy-of select="child::*[not(self::dependencies)]"/>
|
||||
<xsl:if test="not(./dependencies)">
|
||||
<xsl:element name="dependencies">
|
||||
<xsl:for-each select="document($map)//add/dependency">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="dependencies"/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template match="dependencies" >
|
||||
<xsl:element name="dependencies">
|
||||
<xsl:for-each select="dependency">
|
||||
<xsl:if test="./artifactId">
|
||||
<xsl:call-template name="replace">
|
||||
<xsl:with-param name="artifact" select="./artifactId/text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-after(./id/text(),':') != ''">
|
||||
<xsl:call-template name="replace">
|
||||
<xsl:with-param name="artifact" select="substring-after(./id/text(),':')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="replace">
|
||||
<xsl:with-param name="artifact" select="./id/text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="document($map)//add/dependency">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template name="replace">
|
||||
<xsl:param name="artifact"/>
|
||||
<xsl:variable name="this" select="."/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
|
||||
<xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
|
||||
<xsl:if test="../jpp">
|
||||
<xsl:element name="dependency">
|
||||
<xsl:copy-of select="../jpp/*"/>
|
||||
<xsl:copy-of select="$this/properties"/>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="dependency">
|
||||
<xsl:copy-of select="./*"/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
|
||||
<xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
|
||||
<xsl:for-each select="../add/dependency">
|
||||
<xsl:element name="dependency">
|
||||
<xsl:copy-of select="./*"/>
|
||||
<xsl:copy-of select="$this/properties"/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:saxon="http://icl.com/saxon"
|
||||
extension-element-prefixes="saxon">
|
||||
<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:template match="/" >
|
||||
<xsl:element name="depset">
|
||||
<saxon:group select="//dependency" group-by="./maven/artifactId">
|
||||
<xsl:sort select="./maven/artifactId"/>
|
||||
<xsl:element name="dependency">
|
||||
<xsl:element name="maven">
|
||||
<xsl:copy-of select="./maven/*[name() != 'properties']"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="jpp">
|
||||
<xsl:copy-of select="./jpp/*[name() != 'properties']"/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<saxon:item/>
|
||||
</saxon:group>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
Loading…
Reference in New Issue
Block a user