SHA256
1
0
forked from pool/dom4j
OBS User unknown 2009-06-04 02:31:56 +00:00 committed by Git OBS Bridge
commit 2747ca2fd3
12 changed files with 826 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,12 @@
--- dom4j/src/java/org/dom4j/util/SimpleSingleton.java
+++ dom4j/src/java/org/dom4j/util/SimpleSingleton.java
@@ -35,8 +35,7 @@
if (singletonClassName != null) {
Class clazz = null;
try {
- clazz = Thread.currentThread().getContextClassLoader().loadClass(
- singletonClassName);
+ clazz = Class.forName(singletonClassName);
singletonInstance = clazz.newInstance();
} catch (Exception ignore) {
try {

View File

@ -0,0 +1,15 @@
<project name="dom4j-component-info">
<component id="dom4j"
licenseType="dom4j"
version="@VERSION@"
projectHome="http://dom4j.org/"
description="Library for XML, XPath and XSLT on the Java platform"
scm=":ext:cvs.devel.redhat.com:/cvs/dist/dom4j"
tag="@TAG@">
<!-- Built using JDK 1.4 -->
<artifact id="dom4j.jar"/>
<export>
<include input="dom4j.jar"/>
</export>
</component>
</project>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d72427a11a23df97f8957331269df7fde4fcc982ac3b9d399a49e4df8598b94a
size 1962425

221
dom4j-1.6.1.pom Normal file
View File

@ -0,0 +1,221 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<name>dom4j</name>
<version>1.6.1</version>
<description>dom4j: the flexible XML framework for Java</description>
<url>http://dom4j.org</url>
<issueManagement>
<url>http://sourceforge.net/tracker/?group_id=16035</url>
</issueManagement>
<ciManagement>
<notifiers>
<notifier>
<address>dom4j-dev@lists.sourceforge.net</address>
</notifier>
</notifiers>
</ciManagement>
<inceptionYear>2001</inceptionYear>
<mailingLists>
<mailingList>
<name>dom4j user list</name>
<subscribe>http://lists.sourceforge.net/lists/listinfo/dom4j-user</subscribe>
<unsubscribe>http://lists.sourceforge.net/lists/listinfo/dom4j-user</unsubscribe>
<archive>http://www.mail-archive.com/dom4j-user%40lists.sourceforge.net/</archive>
</mailingList>
<mailingList>
<name>dom4j developer list</name>
<subscribe>http://lists.sourceforge.net/lists/listinfo/dom4j-dev</subscribe>
<unsubscribe>http://lists.sourceforge.net/lists/listinfo/dom4j-dev</unsubscribe>
<archive>http://www.mail-archive.com/dom4j-dev%40lists.sourceforge.net/</archive>
</mailingList>
<mailingList>
<name>dom4j commits list</name>
<subscribe>http://lists.sourceforge.net/lists/listinfo/dom4j-commits</subscribe>
<unsubscribe>http://lists.sourceforge.net/lists/listinfo/dom4j-commits</unsubscribe>
</mailingList>
</mailingLists>
<developers>
<developer>
<id>carnold</id>
<name>Curt Arnold</name>
<email>carnold@users.sourceforge.net</email>
</developer>
<developer>
<id>ddlucas</id>
<name>David Lucas</name>
<email>ddlucas@users.sourceforge.net</email>
</developer>
<developer>
<id>drwhite</id>
<name>David White</name>
<email>drwhite@users.sourceforge.net</email>
</developer>
<developer>
<id>jjenkov</id>
<name>Jakob Jenkov</name>
<email>jjenkov@users.sourceforge.net</email>
</developer>
<developer>
<id>jstrachan</id>
<name>James Strachan</name>
<email>jstrachan@apache.org</email>
<organization>SpiritSoft, Inc.</organization>
</developer>
<developer>
<id>laramiec</id>
<name>Laramie Crocker</name>
<email>laramiec@users.sourceforge.net</email>
</developer>
<developer>
<id>maartenc</id>
<name>Maarten Coene</name>
<email>maartenc@users.sourceforge.net</email>
<organization>Cronos</organization>
</developer>
<developer>
<id>mskells</id>
<name>Michael Skells</name>
<email>mskells@users.sourceforge.net</email>
</developer>
<developer>
<id>nicksanderson</id>
<name>Nick Sanderson</name>
<email>nicksanderson@users.sourceforge.net</email>
</developer>
<developer>
<id>slehmann</id>
<name>Steen Lehmann</name>
<email>slehmann@users.sourceforge.net</email>
</developer>
<developer>
<id>tradem</id>
<name>Tobias Rademacher</name>
<email>tradem@users.sourceforge.net</email>
</developer>
<developer>
<id>werken</id>
<name>Bob McWhirter</name>
<email>werken@users.sourceforge.net</email>
</developer>
<developer>
<id>wolfftw</id>
<name>Todd Wolff</name>
<email>wolfftw@users.sourceforge.net</email>
</developer>
<developer>
<id>yeekee</id>
<name>OuYang Chen</name>
<email>yeekee@users.sourceforge.net</email>
</developer>
<developer>
<id>yruan2</id>
<name>Yuxin Ruan</name>
<email>yruan2@users.sourceforge.net</email>
</developer>
</developers>
<scm>
<connection>scm:cvs:pserver:anonymous@cvs.sourceforge.net:/cvsroot/dom4j:dom4j</connection>
<developerConnection>scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/dom4j:dom4j</developerConnection>
<url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/</url>
</scm>
<organization>
<name>MetaStuff Ltd.</name>
<url>http://sourceforge.net/projects/dom4j</url>
</organization>
<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme-api</artifactId>
<version>0.3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>msv</groupId>
<artifactId>xsdlib</artifactId>
<version>20030807</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>msv</groupId>
<artifactId>relaxngDatatype</artifactId>
<version>20030807</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>pull-parser</groupId>
<artifactId>pull-parser</artifactId>
<version>2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.3.3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.0.b2</version>
</dependency>
<dependency>
<groupId>junitperf</groupId>
<artifactId>junitperf</artifactId>
<version>1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-ri</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.5.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<site>
<id>default</id>
<name>Default Site</name>
<url>scp://dom4j.org//home/groups/d/do/dom4j/htdocs</url>
</site>
</distributionManagement>
</project>

28
dom4j-jarjar-build.xml Normal file
View File

@ -0,0 +1,28 @@
<project name="Jarjar dom4j" default="patchdom4j">
<!--
A jarjar ant build script to create the jarjard dom4j jar.
-->
<target name="patchdom4j">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="jarjar-0.7.jar"/>
<mkdir dir="output" />
<jarjar jarfile="output/dom4j-jarjar.jar">
<manifest>
<attribute name="Created-by" value="${java.vm.version} ${java.vm.vendor}"/>
<attribute name="Specification-Title" value="Dom4j JarJar(org.jboss.dom4j)"/>
<attribute name="Specification-Version" value="1.6.1"/>
<attribute name="Specification-Vendor" value="http://dom4j.org/"/>
<attribute name="Implementation-Title" value="JarJar Dom4j"/>
<attribute name="Implementation-URL" value="http://repository.jboss.com/jboss/dom4j-jarjar"/>
<attribute name="Implementation-Version" value="1.6.1"/>
<attribute name="Implementation-Vendor" value="JBoss, a division of Red Hat"/>
<attribute name="Implementation-Vendor-Id" value="http://www.jboss.org"/>
</manifest>
<zipfileset src="dom4j-1.6.1.jar"/>
<rule pattern="org.dom4j.**" result="org.jboss.dom4j.@1"/>
<zap pattern="org.dom4j.jaxb.**"/>
<zap pattern="org.dom4j.swing.**"/>
<zap pattern="org.dom4j.xpath.**"/>
<zap pattern="org.dom4j.xpp.**"/>
</jarjar>
</target>
</project>

View File

@ -0,0 +1,25 @@
<project name="dom4j-jarjar-component-info">
<!--
$Id: dom4j-jarjar-component-info.xml,v 1.1 2008/08/21 21:25:03 david Exp $
A jarjard version of dom4j that moves the classes to the org.jboss.dom4j package
space and strips the following packages:
org.dom4j.jaxb.*
org.dom4j.swing.*
org.dom4j.xpath.*
org.dom4j.xpp.*
-->
<component id="jboss/dom4j-jarjar"
licenseType="dom4j"
version="@VERSION@"
tag="@TAG@"
projectHome="http://dom4j.org/"
description="JarJar Dom4j(base package = org.jboss.dom4j)">
<artifact id="dom4j-jarjar.jar"/>
<export>
<include input="dom4j-jarjar.jar"/>
</export>
</component>
</project>

19
dom4j.changes Normal file
View File

@ -0,0 +1,19 @@
-------------------------------------------------------------------
Wed May 20 11:39:13 CEST 2009 - mvyskocil@suse.cz
- 'fixed bnc#501764: removed clover.license from source tarball'
-------------------------------------------------------------------
Mon May 18 15:04:56 CEST 2009 - mvyskocil@suse.cz
- Removed documentation of ConcurrentReaderHashMap (bnc#504663)
* dom4j-1.6.1/docs/clover/org/dom4j/tree/ConcurrentReaderHashMap.html
* dom4j-1.6.1/docs/xref/org/dom4j/tree/ConcurrentReaderHashMap.html
-------------------------------------------------------------------
Thu May 14 11:06:10 CEST 2009 - mvyskocil@suse.cz
- Initial SUSE packaging:
* spec script and jarjar build support was taken from jpackage.org 5.0
* Source of dom4j and build.xml comes from Debian unstable, as there don't need
proprietary msv from sun (bnc#430592)

347
dom4j.spec Normal file
View File

@ -0,0 +1,347 @@
#
# spec file for package dom4j (Version 1.6.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
%define _with_repolib 1
%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}
%define repodir %{_javadir}/repository.jboss.com/dom4j/1.6.1-brew
%define repodirlib %{repodir}/lib
%define repodirsrc %{repodir}/src
%define section free
Name: dom4j
Version: 1.6.1
Release: 2
Summary: JarJar of dom4j for JBoss
License: Other uncritical OpenSource License
Url: http://www.dom4j.org/
Group: Development/Libraries/Java
#Source0: dom4j-1.6.1.tar.gz
# 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
# rm dom4j/lib/tools/clover.license
# tar --exclude-vcs -cjf dom4j-1.6.1-debian.tar.bz2 dom4j/
Source0: dom4j-1.6.1-debian.tar.bz2
Source1: dom4j_rundemo.sh
#Source2: dom4j-build.xml
Source3: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom
Source4: dom4j-1.6.1-component-info.xml
# http://repository.jboss.com/jboss/dom4j-jarjar/1.6.1/build/build.xml
Source5: dom4j-jarjar-build.xml
Source6: dom4j-jarjar-component-info.xml
Patch0: dom4j-1.6.1-bug1618750.patch
BuildRequires: jpackage-utils >= 1.7.4
BuildRequires: jarjar
BuildRequires: java-devel >= 1.5.0
BuildRequires: ant >= 1.6.5
BuildRequires: junit
BuildRequires: ant-junit
BuildRequires: ant-trax
BuildRequires: ant-apache-resolver
BuildRequires: jtidy
BuildRequires: junitperf
BuildRequires: isorelax
BuildRequires: jaxen-bootstrap >= 1.1
BuildRequires: relaxngDatatype
BuildRequires: bea-stax
BuildRequires: stax_1_0_api
BuildRequires: ws-jaxme
BuildRequires: xalan-j2 >= 2.7
BuildRequires: xerces-j2
#BuildRequires: jaxp = 1.2
BuildRequires: xpp2
BuildRequires: xpp3
Requires: java >= 1.5.0
Requires: xpp2
Requires: xpp3
Requires: xerces-j2
Requires: relaxngDatatype
Requires: isorelax
Requires: jaxen >= 1.1
Requires: bea-stax
Requires: stax_1_0_api
Requires: ws-jaxme
Requires: xalan-j2
#Requires: jaxp = 1.2
Requires(post): jpackage-utils >= 1.7.4
Requires(postun): jpackage-utils >= 1.7.4
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A jarjard version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%if %{with_repolib}
%package repolib
License: Other uncritical OpenSource License
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
%description repolib
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
Java using the Java Collections Framework. dom4j allows you to read,
write, navigate, create and modify XML documents. dom4j integrates with
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
%package jarjar
License: Other uncritical OpenSource License
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description jarjar
A jarjared version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%package jarjar-repolib
License: Other uncritical OpenSource License
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description jarjar-repolib
A jarjared version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%endif
%package demo
License: Other uncritical OpenSource License
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description demo
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
Java using the Java Collections Framework. dom4j allows you to read,
write, navigate, create and modify XML documents. dom4j integrates with
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
%package manual
License: Other uncritical OpenSource License
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description manual
A jarjard version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%package javadoc
License: Other uncritical OpenSource License
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
%description javadoc
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
Java using the Java Collections Framework. dom4j allows you to read,
write, navigate, create and modify XML documents. dom4j integrates with
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
%prep
%setup -q -n %{name}
# replace run.sh
cp %{SOURCE1} run.sh
rm -f src/test/org/dom4j/xpath/MatrixConcatTest.java
# won't succeed in headless environment
rm src/test/org/dom4j/bean/BeansTest.java
# FIXME Bug in Xalan 2.6 -- reactivate with Xalan 2.7
#rm src/test/org/dom4j/XPathExamplesTest.java
# fix for deleted jars
sed -i -e '/unjar/d' -e 's|,cookbook/\*\*,|,|' build.xml
# FIXME: (yyang): failed in JDK6
rm -f src/test/org/dom4j/ThreadingTest.java
# FIXME: (yyang): failed in JDK6, maybe failed to load russArticle.xml because it's russian encoding
rm -f src/test/org/dom4j/io/StaxTest.java
%patch0 -p1 -b .bug1618750
perl -pi -e 's/\r//g' LICENSE.txt docs/clover/*.css docs/style/*.css docs/xref/*.css docs/xref-test/*.css src/doc/style/*.css docs/benchmarks/xpath/*.java
# jarjar
cp -p %{SOURCE5} dom4j-jarjar-build.xml
pushd lib
ln -sf $(build-classpath xpp2)
ln -sf $(build-classpath relaxngDatatype)
pushd endorsed
#ln -sf $(build-classpath jaxp12)
popd
ln -sf $(build-classpath jaxme/jaxmeapi)
#ln -sf $(build-classpath msv-xsdlib)
#ln -sf $(build-classpath msv-msv)
ln -sf $(build-classpath jaxen)
ln -sf $(build-classpath bea-stax-api)
pushd test
ln -sf $(build-classpath bea-stax-ri)
ln -sf $(build-classpath junitperf)
ln -sf $(build-classpath junit)
popd
ln -sf $(build-classpath xpp3)
pushd tools
ln -sf $(build-classpath jaxme/jaxmexs)
ln -sf $(build-classpath xalan-j2)
ln -sf $(build-classpath xalan-j2-serializer)
ln -sf $(build-classpath jaxme/jaxmejs)
ln -sf $(build-classpath jtidy)
ln -sf $(build-classpath isorelax)
ln -sf $(build-classpath jaxme/jaxme2)
ln -sf $(build-classpath xerces-j2)
popd
popd
%build
export CLASSPATH=
export OPT_JAR_LIST="junit ant/ant-junit"
#ant package test release-javadoc
ant package release-javadoc
#export CLASSPATH=`pwd`/dom4j-1.6.1.jar:$(build-classpath xpp2)
#ant samples
# jarjar
export CLASSPATH=$(build-classpath jarjar)
export OPT_JAR_LIST=:
ant -f dom4j-jarjar-build.xml
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
cp -p build/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
# jarjar
cp -p output/dom4j-jarjar.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-jarjar-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-%{name}.pom
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# manual
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
rm -rf docs/apidocs
cp -pr docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
# demo
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/classes/org/dom4j
cp -pr xml $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/src
cp -pr src/samples $RPM_BUILD_ROOT%{_datadir}/%{name}/src
#cp -pr build/classes/org/dom4j/samples $RPM_BUILD_ROOT%{_datadir}/%{name}/classes/org/dom4j
install -m 0755 run.sh $RPM_BUILD_ROOT%{_datadir}/%{name}
%if %{with_repolib}
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{repodir}/component-info.xml
sed -i "s/@VERSION@/%{version}-brew/g" $RPM_BUILD_ROOT%{repodir}/component-info.xml
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/@TAG@/$tag/g" build.xml $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -p -m 644 %{PATCH0} $RPM_BUILD_ROOT%{repodirsrc}
cp -p $RPM_BUILD_ROOT%{_javadir}/dom4j-%{version}.jar $RPM_BUILD_ROOT%{repodirlib}/dom4j.jar
# jarjar
%define repodir %{_javadir}/repository.jboss.com/jboss/dom4j-jarjar/1.6.1-brew
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{repodir}/component-info.xml
sed -i "s/@VERSION@/%{version}-brew/g" $RPM_BUILD_ROOT%{repodir}/component-info.xml
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/@TAG@/$tag/g" $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -p -m 644 %{PATCH0} $RPM_BUILD_ROOT%{repodirsrc}
install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{repodirsrc}
cp -p $RPM_BUILD_ROOT%{_javadir}/%{name}-jarjar-%{version}.jar $RPM_BUILD_ROOT%{repodirlib}/dom4j-jarjar.jar
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_datadir}/maven2/*
%config %{_mavendepmapfragdir}/*
%files jarjar
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-jarjar.jar
%{_javadir}/%{name}-jarjar-%{version}.jar
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}
%files demo
%defattr(-,root,root,0755)
%{_datadir}/%{name}
%if %{with_repolib}
%files repolib
%defattr(0644,root,root,0755)
%dir %{_javadir}/repository.jboss.com
%{_javadir}/repository.jboss.com/dom4j
%files jarjar-repolib
%defattr(0644,root,root,0755)
%dir %{_javadir}/repository.jboss.com
%{_javadir}/repository.jboss.com/jboss
%endif
%changelog
* Wed May 20 2009 mvyskocil@suse.cz
- 'fixed bnc#501764: removed clover.license from source tarball'
* Mon May 18 2009 mvyskocil@suse.cz
- Removed documentation of ConcurrentReaderHashMap (bnc#504663)
* dom4j-1.6.1/docs/clover/org/dom4j/tree/ConcurrentReaderHashMap.html
* dom4j-1.6.1/docs/xref/org/dom4j/tree/ConcurrentReaderHashMap.html
* Thu May 14 2009 mvyskocil@suse.cz
- Initial SUSE packaging:
* spec script and jarjar build support was taken from jpackage.org 5.0
* Source of dom4j and build.xml comes from Debian unstable, as there don't need
proprietary msv from sun (bnc#430592)

132
dom4j_rundemo.sh Normal file
View File

@ -0,0 +1,132 @@
#!/bin/sh
XMLFMTOPS="-indentSize 2 -trimText -newlines"
if [ $# -eq 0 ]; then
echo PullParserDemo
echo ./run.sh samples.PullParserDemo $XMLFMTOPS xml/web.xml
echo ./run.sh samples.PullParserDemo $XMLFMTOPS xml/fibo.xml
echo
echo SAXDemo
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/web.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/test/test_schema.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/xhtml/xhtml-basic.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/contents.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/cdata.xml
echo ./run.sh -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.SAXDemo $XMLFMTOPS xml/cdata.xml
echo ./run.sh -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.SAXDemo $XMLFMTOPS xml/cdata.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/testPI.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/namespaces.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/testNamespaces.xml
echo ./run.sh samples.SAXDemo $XMLFMTOPS xml/inline.xml
echo
echo DOMDemo
echo ./run.sh samples.dom.DOMDemo xml/contents.xml
echo
echo SAXDOMDemo
echo ./run.sh samples.dom.SAXDOMDemo xml/contents.xml
echo
echo JTidyDemo
echo ./run.sh samples.JTidyDemo $XMLFMTOPS readme.html
echo
echo VisitorDemo
echo ./run.sh samples.VisitorDemo xml/cdata.xml
echo
echo CountDemo
echo ./run.sh samples.CountDemo xml/fibo.xml
echo
echo CreateXMLDemo
echo ./run.sh samples.CreateXMLDemo
echo
echo HTMLWriterDemo
echo ./run.sh samples.HTMLWriterDemo xml/xhtml.xml
echo
echo PerformanceTest
echo ./run.sh -Xprof samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10
echo ./run.sh -Xprof -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10
echo ./run.sh -Xprof -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.performance.PerformanceSupport xml/periodic_table.xml org.dom4j.DocumentFactory 10
echo ./run.sh -Xprof samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10
echo ./run.sh -Xprof -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10
echo ./run.sh -Xprof -Dorg.xml.sax.driver=xml.aelfred2.SAXDriver samples.performance.PerformanceSupport xml/much_ado.xml org.dom4j.DocumentFactory 10
echo
echo XPathDemo
echo ./run.sh samples.XPathDemo xml/web.xml //servlet/servlet-class
echo ./run.sh samples.XPathDemo xml/much_ado.xml //ACT/TITLE
echo
echo XSLTDemo
echo ./run.sh samples.XSLTDemo xml/nitf/sample.xml xml/nitf/ashtml.xsl
echo
echo XSLTNativeDOMDemo
echo ./run.sh samples.dom.XSLTNativeDOMDemo xml/nitf/sample.xml xml/nitf/ashtml.xsl
echo
echo LargeDocumentDemo
echo ./run.sh samples.LargeDocumentDemo xml/much_ado.xml /PLAY/ACT
echo
echo LargeDocumentDemo2
echo ./run.sh samples.LargeDocumentDemo2 xml/much_ado.xml
echo
echo LinkCheckerDemo
echo ./run.sh samples.LinkChecker xml/xhtml/xhtml-basic.xml
echo
echo BeanDemo
echo ./run.sh samples.bean.BeanDemo xml/bean/gui.xml
echo
echo SAXValidatorDemo
echo ./run.sh samples.validate.SAXValidatorDemo xml/nitf/invalid.xml
echo
echo VisitorDemo
echo ./run.sh -Dorg.dom4j.factory=org.dom4j.datatype.DatatypeDocumentFactory samples.VisitorDemo xml/schema/personal-schema.xml
echo
echo JTableDemo
echo ./run.sh samples.swing.JTableDemo xml/web.xml
echo
echo JTableTool
echo ./run.sh samples.swing.JTableTool xml/swing/tableForAtoms.xml xml/periodic_table.xml
echo
echo JTreeDemo
echo ./run.sh samples.swing.JTreeDemo xml/web.xml
exit 0
fi
if [ -z "$JAVA_HOME" ] ; then
JAVA=`which java`
if [ -z "$JAVA" ] ; then
echo "Cannot find JAVA. Please set your PATH."
exit 1
fi
JAVA_BIN=`dirname $JAVA`
JAVA_HOME=$JAVA_BIN/..
fi
JAVA=$JAVA_HOME/bin/java
CLASSPATH=`build-classpath \
dom4j \
xpp2 \
jtidy \
fop \
xerces-j2 \
msv-relaxngDatatype \
msv-xsdlib \
msv-isorelax \
msv \
jaxen \
junit \
junitperf \
saxpath \
xalan-j2 \
xml-commons-apis \
avalon-framework \
avalon-logkit \
`:$CLASSPATH
BOOTCLASSPATH=`build-classpath \
xml-commons-apis \
xerces-j2 \
xalan-j2 \
`
CLASSPATH=classes:$CLASSPATH:$JAVA_HOME/lib/tools.jar
$JAVA -Xbootclasspath/p:$BOOTCLASSPATH -classpath $CLASSPATH "$@"

0
ready Normal file
View File