[main] Removing `log4j12`. (#2008)

* Removing openSUSE specs.

* Initial work to fix 'ant-*' packages.

* Updating 'xml-common-apis'.

* Restoring 'apache-commons-logging' with removed dependency on 'log4j12'.

* Initial commit for 'dom4j'.

* Clean-up for 'dom4j'.

* Adding licenses and signatures.

* Restoring 'slf4j'.

* Adding Fedora's version of 'velocity'

* Initial commit for 'xbean' from Fedora.

* Switching to Fedora's 'xbean'.

* Standard clean-up.

* Adding signatures, removing binaries.

* Removing 'log4j12'.

* Updating 'slf4j-sources'.

* Verifying licenses, updating sources.

* Adding sources retrieval tool.

* Linting.
This commit is contained in:
Pawel Winogrodzki 2022-01-27 16:29:41 -08:00 committed by GitHub
parent 35b82c3127
commit 3902b25a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 1856 additions and 7735 deletions

View File

@ -1,10 +1,7 @@
{
"Signatures": {
"ant-bootstrap.pom.in": "85d35aedfb5ccc60ba1642b4c7624d092f34b253662d3c6c8f2bc1982dcad580",
"ant.keyring": "c4bb9a81a4330dfed089afb72975fdc1d71f77760db64b03317121d831157987",
"apache-ant-1.10.9-src.tar.xz": "4b2008cc60fefd424b05567e9d43a071302865d5fd8b01a807e15e381b557ec2",
"apache-ant-1.10.9-src.tar.xz.asc": "6dea423cd56c433a42851a278b6cf2c13c0de5205c94a5ecddc6db634957a3a4",
"apache-ant-1.8.ant.conf": "8a0bace4a527bd0ff35ad0b0a31c1f7bf30fa186e98cd9dc5142a97098f36ddf",
"pre_checkin.sh": "998aa39eb724efbf77076105038cb9ea1e858abf5e87df2779b544eb6e63c1fc"
"apache-ant-1.10.11-src.tar.gz": "c44d71e07e240eaab638d1da96f2038f84dcc1f245656f03e040a69603ca5b39",
"apache-ant-1.8.ant.conf": "8a0bace4a527bd0ff35ad0b0a31c1f7bf30fa186e98cd9dc5142a97098f36ddf"
}
}

View File

@ -26,18 +26,15 @@ Distribution: Mariner
%bcond_with junit5
%bcond_without antlr
Name: ant-antlr
Version: 1.10.9
Release: 3%{?dist}
Version: 1.10.11
Release: 1%{?dist}
Summary: Antlr Task for ant
License: Apache-2.0
License: ASL 2.0 AND W3C
Group: Development/Tools/Building
URL: https://ant.apache.org/
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.xz
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.gz
Source1: apache-ant-1.8.ant.conf
Source10: ant-bootstrap.pom.in
Source1000: pre_checkin.sh
Source1001: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.xz.asc
Source1002: ant.keyring
Patch0: apache-ant-no-test-jar.patch
Patch1: apache-ant-class-path-in-manifest.patch
Patch2: apache-ant-bootstrap.patch
@ -223,21 +220,6 @@ Apache Ant is a Java-based build tool.
This package contains optional apache bcel tasks for Apache Ant.
%package -n ant-apache-log4j
Summary: Optional apache log4j tasks for ant
License: Apache-2.0
Group: Development/Tools/Building
BuildRequires: log4j12-mini
Requires: log4j12
%ant_antlr_requires_eq ant
Provides: ant-jakarta-log4j = %{version}
Obsoletes: ant-jakarta-log4j < %{version}
%description -n ant-apache-log4j
Apache Ant is a Java-based build tool.
This package contains optional apache log4j tasks for Apache Ant.
%package -n ant-apache-oro
Summary: Optional apache oro tasks for ant
License: Apache-2.0
@ -383,6 +365,11 @@ find -name \*.jar -print -delete
# clean jar files
find . -name "*.jar" -print -delete
# Log4jListener is deprecated by upstream: Apache Log4j (1) is not
# developed any more. Last release is 1.2.17 from 26 May 2012 and
# contains vulnerability issues.
rm src/main/org/apache/tools/ant/listener/Log4jListener.java
# failing testcases. TODO see why
%if %{with antlr} || %{with junit}
rm src/tests/junit/org/apache/tools/mail/MailMessageTest.java \
@ -400,7 +387,7 @@ build-jar-repository -s -p lib/optional junit5 opentest4j
%endif
%if %{with antlr}
# we need to build junit in antlr, but we remove it later
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-apis-bootstrap antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j12/log4j-12 oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver xz-java
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-apis-bootstrap antlr-bootstrap bcel javamail/mailapi jdepend junit4 oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver xz-java
%endif
# Fix file-not-utf8 rpmlint warning
@ -428,6 +415,9 @@ sh -x ./build.sh --noconfig jars
%endif
%?strip_all_nondeterminism
# log4j logging is deprecated
rm -f build/lib/ant-apache-log4j.jar
%install
# ANT_HOME and subdirs
mkdir -p %{buildroot}%{ant_home}/{lib,etc}
@ -578,7 +568,6 @@ echo "xml-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/a
echo "apache-commons-logging ant/ant-commons-logging" > %{buildroot}%{_sysconfdir}/ant.d/commons-logging
echo "apache-commons-net ant/ant-commons-net" > %{buildroot}%{_sysconfdir}/ant.d/commons-net
echo "bcel ant/ant-apache-bcel" > %{buildroot}%{_sysconfdir}/ant.d/apache-bcel
echo "log4j12/log4j-12 ant/ant-apache-log4j" > %{buildroot}%{_sysconfdir}/ant.d/apache-log4j
echo "oro ant/ant-apache-oro" > %{buildroot}%{_sysconfdir}/ant.d/apache-oro
echo "regexp ant/ant-apache-regexp" > %{buildroot}%{_sysconfdir}/ant.d/apache-regexp
echo "xalan-j2 ant/ant-apache-xalan2" > %{buildroot}%{_sysconfdir}/ant.d/apache-xalan2
@ -699,10 +688,6 @@ popd
%{ant_home}/lib/ant-apache-bcel.jar
%config(noreplace) %{_sysconfdir}/ant.d/apache-bcel
%files -n ant-apache-log4j -f .mfiles-ant-apache-log4j
%{ant_home}/lib/ant-apache-log4j.jar
%config(noreplace) %{_sysconfdir}/ant.d/apache-log4j
%files -n ant-apache-oro -f .mfiles-ant-apache-oro
%{ant_home}/lib/ant-apache-oro.jar
%{ant_home}%{_sysconfdir}/maudit-frames.xsl
@ -747,6 +732,11 @@ popd
%endif
%changelog
* Thu Jan 20 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.10.11-1
- Removing dependency on 'log4j' using Fedora 36 spec for guidance (license: MIT).
- Updated version to 1.10.11.
- License verified.
* Thu Dec 09 2021 Thomas Crain <thcrain@microsoft.com> - 1.10.9-3
- Replace usage of removed %%requires_eq macro

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iHEEABECADEWIQTOgHWiUVR77iSbwVGiEVrhX2uLcgUCX3BjFxMcYm9kZXdpZ0Bh
cGFjaGUub3JnAAoJEKIRWuFfa4ty1RoAoOCTeA+8V7MxLXzseH0dUpcfm9U4AJ4w
jTGSbocA3ex+Yy+rheNXYZTsXA==
=qgma
-----END PGP SIGNATURE-----

View File

@ -1,22 +0,0 @@
#!/bin/sh
EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ant.spec! #####\n"
sed "s/^%bcond_without bootstrap$/${EDIT_WARNING}%bcond_with bootstrap/;
s/^%bcond_with antlr/%bcond_without antlr/;
s/^\(Name:.*\)$/\1-antlr/;
0,/^Summary:.*/{s/^Summary:.*/Summary: Antlr Task for ant/};
" < ant.spec > ant-antlr.spec
cp ant.changes ant-antlr.changes
sed "s/^%bcond_without bootstrap$/${EDIT_WARNING}%bcond_with bootstrap/;
s/^%bcond_with junit/%bcond_without junit/;
s/^%bcond_without junit5/%bcond_with junit5/;
s/^\(Name:.*\)$/\1-junit/;
0,/^Summary:.*/{s/^Summary:.*/Summary: Optional junit tasks for ant/};
" < ant.spec > ant-junit.spec
cp ant.changes ant-junit.changes
sed "s/^%bcond_without bootstrap$/${EDIT_WARNING}%bcond_with bootstrap/;
s/^%bcond_with junit5/%bcond_without junit5/;
s/^\(Name:.*\)$/\1-junit5/;
0,/^Summary:.*/{s/^Summary:.*/Summary: Optional junit tasks for ant/};
" < ant.spec > ant-junit5.spec
cp ant.changes ant-junit5.changes

View File

@ -1,10 +1,7 @@
{
"Signatures": {
"ant-bootstrap.pom.in": "85d35aedfb5ccc60ba1642b4c7624d092f34b253662d3c6c8f2bc1982dcad580",
"ant.keyring": "c4bb9a81a4330dfed089afb72975fdc1d71f77760db64b03317121d831157987",
"apache-ant-1.10.9-src.tar.xz": "4b2008cc60fefd424b05567e9d43a071302865d5fd8b01a807e15e381b557ec2",
"apache-ant-1.10.9-src.tar.xz.asc": "6dea423cd56c433a42851a278b6cf2c13c0de5205c94a5ecddc6db634957a3a4",
"apache-ant-1.8.ant.conf": "8a0bace4a527bd0ff35ad0b0a31c1f7bf30fa186e98cd9dc5142a97098f36ddf",
"pre_checkin.sh": "998aa39eb724efbf77076105038cb9ea1e858abf5e87df2779b544eb6e63c1fc"
"apache-ant-1.10.11-src.tar.gz": "c44d71e07e240eaab638d1da96f2038f84dcc1f245656f03e040a69603ca5b39",
"apache-ant-1.8.ant.conf": "8a0bace4a527bd0ff35ad0b0a31c1f7bf30fa186e98cd9dc5142a97098f36ddf"
}
}

View File

@ -26,18 +26,15 @@ Distribution: Mariner
%bcond_with junit5
%bcond_with antlr
Name: ant-junit
Version: 1.10.9
Release: 3%{?dist}
Version: 1.10.11
Release: 1%{?dist}
Summary: Optional junit tasks for ant
License: Apache-2.0
License: ASL 2.0 AND W3C
Group: Development/Tools/Building
URL: https://ant.apache.org/
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.xz
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.gz
Source1: apache-ant-1.8.ant.conf
Source10: ant-bootstrap.pom.in
Source1000: pre_checkin.sh
Source1001: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.xz.asc
Source1002: ant.keyring
Patch0: apache-ant-no-test-jar.patch
Patch1: apache-ant-class-path-in-manifest.patch
Patch2: apache-ant-bootstrap.patch
@ -223,21 +220,6 @@ Apache Ant is a Java-based build tool.
This package contains optional apache bcel tasks for Apache Ant.
%package -n ant-apache-log4j
Summary: Optional apache log4j tasks for ant
License: Apache-2.0
Group: Development/Tools/Building
BuildRequires: log4j12-mini
Requires: log4j12
%ant_junit_requires_eq ant
Provides: ant-jakarta-log4j = %{version}
Obsoletes: ant-jakarta-log4j < %{version}
%description -n ant-apache-log4j
Apache Ant is a Java-based build tool.
This package contains optional apache log4j tasks for Apache Ant.
%package -n ant-apache-oro
Summary: Optional apache oro tasks for ant
License: Apache-2.0
@ -383,6 +365,11 @@ find -name \*.jar -print -delete
# clean jar files
find . -name "*.jar" -print -delete
# Log4jListener is deprecated by upstream: Apache Log4j (1) is not
# developed any more. Last release is 1.2.17 from 26 May 2012 and
# contains vulnerability issues.
rm src/main/org/apache/tools/ant/listener/Log4jListener.java
# failing testcases. TODO see why
%if %{with antlr} || %{with junit}
rm src/tests/junit/org/apache/tools/mail/MailMessageTest.java \
@ -400,7 +387,7 @@ build-jar-repository -s -p lib/optional junit5 opentest4j
%endif
%if %{with antlr}
# we need to build junit in antlr, but we remove it later
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-apis-bootstrap antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j12/log4j-12 oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver xz-java
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-apis-bootstrap antlr-bootstrap bcel javamail/mailapi jdepend junit4 oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver xz-java
%endif
# Fix file-not-utf8 rpmlint warning
@ -428,6 +415,9 @@ sh -x ./build.sh --noconfig jars
%endif
%?strip_all_nondeterminism
# log4j logging is deprecated
rm -f build/lib/ant-apache-log4j.jar
%install
# ANT_HOME and subdirs
mkdir -p %{buildroot}%{ant_home}/{lib,etc}
@ -578,7 +568,6 @@ echo "xml-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/a
echo "apache-commons-logging ant/ant-commons-logging" > %{buildroot}%{_sysconfdir}/ant.d/commons-logging
echo "apache-commons-net ant/ant-commons-net" > %{buildroot}%{_sysconfdir}/ant.d/commons-net
echo "bcel ant/ant-apache-bcel" > %{buildroot}%{_sysconfdir}/ant.d/apache-bcel
echo "log4j12/log4j-12 ant/ant-apache-log4j" > %{buildroot}%{_sysconfdir}/ant.d/apache-log4j
echo "oro ant/ant-apache-oro" > %{buildroot}%{_sysconfdir}/ant.d/apache-oro
echo "regexp ant/ant-apache-regexp" > %{buildroot}%{_sysconfdir}/ant.d/apache-regexp
echo "xalan-j2 ant/ant-apache-xalan2" > %{buildroot}%{_sysconfdir}/ant.d/apache-xalan2
@ -699,10 +688,6 @@ popd
%{ant_home}/lib/ant-apache-bcel.jar
%config(noreplace) %{_sysconfdir}/ant.d/apache-bcel
%files -n ant-apache-log4j -f .mfiles-ant-apache-log4j
%{ant_home}/lib/ant-apache-log4j.jar
%config(noreplace) %{_sysconfdir}/ant.d/apache-log4j
%files -n ant-apache-oro -f .mfiles-ant-apache-oro
%{ant_home}/lib/ant-apache-oro.jar
%{ant_home}%{_sysconfdir}/maudit-frames.xsl
@ -747,6 +732,11 @@ popd
%endif
%changelog
* Thu Jan 20 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.10.11-1
- Removing dependency on 'log4j' using Fedora 36 spec for guidance (license: MIT).
- Updated version to 1.10.11.
- License verified.
* Thu Dec 09 2021 Thomas Crain <thcrain@microsoft.com> - 1.10.9-3
- Replace usage of removed %%requires_eq macro

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iHEEABECADEWIQTOgHWiUVR77iSbwVGiEVrhX2uLcgUCX3BjFxMcYm9kZXdpZ0Bh
cGFjaGUub3JnAAoJEKIRWuFfa4ty1RoAoOCTeA+8V7MxLXzseH0dUpcfm9U4AJ4w
jTGSbocA3ex+Yy+rheNXYZTsXA==
=qgma
-----END PGP SIGNATURE-----

View File

@ -1,22 +0,0 @@
#!/bin/sh
EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ant.spec! #####\n"
sed "s/^%bcond_without bootstrap$/${EDIT_WARNING}%bcond_with bootstrap/;
s/^%bcond_with antlr/%bcond_without antlr/;
s/^\(Name:.*\)$/\1-antlr/;
0,/^Summary:.*/{s/^Summary:.*/Summary: Antlr Task for ant/};
" < ant.spec > ant-antlr.spec
cp ant.changes ant-antlr.changes
sed "s/^%bcond_without bootstrap$/${EDIT_WARNING}%bcond_with bootstrap/;
s/^%bcond_with junit/%bcond_without junit/;
s/^%bcond_without junit5/%bcond_with junit5/;
s/^\(Name:.*\)$/\1-junit/;
0,/^Summary:.*/{s/^Summary:.*/Summary: Optional junit tasks for ant/};
" < ant.spec > ant-junit.spec
cp ant.changes ant-junit.changes
sed "s/^%bcond_without bootstrap$/${EDIT_WARNING}%bcond_with bootstrap/;
s/^%bcond_with junit5/%bcond_without junit5/;
s/^\(Name:.*\)$/\1-junit5/;
0,/^Summary:.*/{s/^Summary:.*/Summary: Optional junit tasks for ant/};
" < ant.spec > ant-junit5.spec
cp ant.changes ant-junit5.changes

View File

@ -1,70 +0,0 @@
pub 4096R/99945293 2012-01-19
uid Thomas Neidhart <thomas.neidhart@gmail.com>
uid Thomas Neidhart (CODE SIGNING KEY) <tn@apache.org>
sub 4096R/264EE073 2012-01-19
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.19 (GNU/Linux)
mQINBE8YNGIBEADEgcfvs8TL3X2Ql62HJ6SrXWAOoHw5CquJxUQkvBGesIT1Hk24
exiPwrlNE1qUjbVlef1Cwk9ZfwMOpJdfP2MQQbx0nxxqv+JtsoeXUy9bTSvZYBUL
9yCmLEVzzSt4VCStMdPmXQGLvn0JV0e6LmDFv5+UfOR+qxjyNXfeF93W7ndVFA/o
YoYgMJN26Xneb+r9bx3rJcT1zbHYpqUqkswiQ9cZSApe5GHkDqOvu/lJnlFYfFiC
+f0UiR2tEQtdIYy1Owkovcy81gMEKw5Mr49d6lrkQm+oES4ZHcCecZ3Y+z8V5Rqt
qqlrV1IR960VxwhmUm1+VkxGeGClxCFF6Xo00wCWlcJ/BCAea7FXXr4QrF5a1oQb
BDfoVDlXt2cl/0Qfo9gCivBbyZ2df883MmeG/Vc3IovAP7Snl0fkX4KgdrfWuISa
nbARk5xsIxlfC0CsnFNU9CuNh+lg4gNV3E1BiCVEa+boy3XqvcfJIq4/ZiTUXyjq
chI7QFHmBS+uhHGnTtqEAYzl8KgRQdHijgo2cUVw+it765tM17Ekk+NJV5oQ8C8u
nlVS6YiWDiuaTfxZZicI3bOBq6kjTr/TZsv0ohhtbUh5JdSRKSxpK8vkWRnNP45W
m9oFvUmI4X209lzFvu1t4/t33Xl0kzp+8q9Qs6tgnqCpSnxSbJY3MZb/QwARAQAB
tCtUaG9tYXMgTmVpZGhhcnQgPHRob21hcy5uZWlkaGFydEBnbWFpbC5jb20+iQI6
BBMBAgAkAhsDAh4BAheABQsJCAcDBRUKCQgLBRYCAwEABQJPGDXGAhkBAAoJEKQf
E8mZlFKT/JkP/j77X9VQ7XjujaIPWTzgpZJx6aOzME48z6KPMDB+CE64Kd4nx3kD
Z4HEK/5LJQaDp7lUMGeNR++5R73aYQ2aZCYiFT38PGPc3nuIv20IhYBuX9HiUcoo
8dEmcd6zPRwZ/+5wiskr9OjF+QAjJmRmAYPMtCS5nCrXlNSYcV8nH091AdTj6d8l
8G4u4SRswAI2HwfE1ynPWN2HxjgyoDQCD9H80OWGVP4PnScUrhwhqDJZgG0GXY/f
VqcmGt91GSUAdKgaFHjorAuwRkV5yKZ+ZGCVKNFrEc7Yeai4cr0lj3fbDuCjYYmV
1cS0qUV+UL1vdH08CmDko/8rZoblP/oY4q4LVqCudBdxnPBPdtUST2M7JSZ9npD/
mKfaPApN6alrO1icJHI1CRoxj1QPzV1h7Gw1IdOOQMM4hxzH7Tcp/HK5cNXs7ASW
fcX9Ad8Xp11eREzxun4u2kJ1EaA7tQAJySSK6oiQ2N9qHnGgMkQvGQn/foniXoqP
d4vedSb+mYTulIE0YO05WGkgQb4sLDuRgzSG6CjJylRlSBZSuW7IuJTp+cvSfdRm
HXow2xhtTb2YkAlZKo61T40o8l3yNgieMaotb5Fta6ZT2sfjVUV8jC2ETu4a1EQ+
v6Og6MBoUMto/jWiar2xoF4fT/2ogL9KuOsgbQv4qP0kU1tAPd8RSW+AtDJUaG9t
YXMgTmVpZGhhcnQgKENPREUgU0lHTklORyBLRVkpIDx0bkBhcGFjaGUub3JnPokC
OAQTAQIAIgUCTxg1awIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQpB8T
yZmUUpNI/xAAs7PW0CEi+tyCnqX6k1HtyR7D4gaMEkIvJlw7ecft3ucY5UIhNlYu
lTr08TQ5iihRWAUcZQuZ8nhJSbX7hQwUuylpMeCvgH4QwDmADg/YwiwnMXOeutI4
AF+Mo4mf93MS84cPLFsKdwjTHpQtL3tLajHZ5iFGYcVPzTUcqtcETvA5xB8TwugD
KRTttb//5sJGmJdADZN6+SSRKq/apU33D868Q51XsBA24PUBwDz46p9rxsul5wLH
SiYKqIeD2fzq4VmPBUBNp5lP2sEQ5uQSX9IsvWHFQnUYHZzEfijM6H+dE814O64v
oSHqkyC5ZtUQURB8p8gUYNv4WQRKJ2sADsciOY4W6HDyns5uf9OAmvrTTr8iSDC8
gBruX4CcIlIdALB6XX5uzIX0XeIafa3ZO3m5aoptHBDNtfTqBCXCvYyG4bf2ldsS
CjDH2qR3BrdaFBbd9+0Ud+4HctnUkLDzwP1ufMotIQyyEi0vgq5j0JN9aeLu4zgC
DXeknsviH8EQojwsVBOkMM/yT3/oPA2flQALX24qO//cSaWa69LCnNB19Vnxcb1M
tikjn4zqjPtfozqowzGBY1BwJLZvJOZjVn2tzJK9DwlzQM68wXeHgtxBe1DT3tUh
PcY3HDlhMkkJejbQa9xdqpSv2djanBrYc0Lnqe92H37nJJRPV5+jHFK5Ag0ETxg0
YgEQALhmdEbatKzNuGj3hj1DKyNxvSlfYSyqohHTq7ODEKVy88BOgKX3Db93g6NG
V/lP7bblRRuo5uxam4FD8HJzccUV0uUfEECgxmy2/UsMDT39nOt86d2MwNF7f960
mfkpYAuMAvieqaKE7G4vPsOPx1S1TaCmKzu26Y9CDg6A6bKxYP9i4BdT65OrUSgD
2cyc3s9t9wVZszmuYBMt4YwfvREm7gUyU3T9DVMN4iG6sZKkvAjW4brlg2JwrK/u
HkmgGcJVWgreTxhUtjz1POZNRbfup9jAFQxvoOcenaAgHq7F25ePtZy4JkGupvfk
T+ziYbLa+4n2JC2DpZrhCmaSiPoUQEuKkA8Ptb4aO7k9Gbrv9W9kTc6u/BnmJrRF
bNOnYjsgUXFN+R2B1Bcunh5paD5Pd0tQfwn3eT5rGZPr2U6eSsuGwW51iC2X7/bN
fJqUw90qL55JVNpG8UjT+ik5Mlt48A8z+SQA3NokSRVh+xmyLbfkSlogLrvYWf60
qivtFMbkBVkObvJZxVVHwKmyzJBawiS0Mtc1odO1hFLmn9r0N7yFjz9m2+0y27MV
X1NTh+m2h8UqX5FtqptdKqQC9BP6MtGyanMUkMS8zzPV1HIdMpVl0SOh9Jw/H0a5
9ogKebQWGGJv3WV+9W89cLYVBi3gw71qKe+y2enkIn31tEHHABEBAAGJAh8EGAEC
AAkFAk8YNGICGwwACgkQpB8TyZmUUpO/4g/7BH4Oorbk0FLr1NjcUUWqkJYnqHBB
22EYp2Pdt7f/7CuPYB7uLVANy7uD7AfsmSLcZFd8RRwFF2LmhDxtCU6kgDsnRr+4
4/XATnDfGAMyOPey8wDmZxSRyA0iHJ7ZY8ExNNeL9YdE5osv5/dQ0KAnrvQyjySm
MUZrKEhJw58QJYFKJvPaO5LuQh3BB30wxJZiWW0Zlc/wjzT7Y6O8Pv/zYCGulJZu
C2spdasCSGhz06d1ZM/RbUXLNgosf+5ll22ZoIKpsvIMidC335IzQpOPuOePthrJ
UHf+EGpJDf56xoT12l5QwQSQCkhBYEWQX6gsNuZAHbuYOwMgwnpNxFBSpE/JYrcM
HJ1Ab5FXPS4ClVr9PzU15m2ZHr3i6SIWLmPQzjEokYmSAj1zoFZrvMEW4UNWzB6D
VX7G+VGgWIRB/LgDKsDs48z/kHwwvV/ciaGxUP62wwUbJWibDDskpeKvX55xbUW8
BcTNbVHHk75fmzKRmKTugbMndok13bOAkOh9gxBHawKG/qj0GY9yxXPY671NNvQe
i+reoOcEm7pv5Tnvg+HP9IcLe50Zp0X9xwPQ6ux3VnXoa4s1PqTGhb7++w+QF2Ja
hE68a/9oR97XTe+8e1VFt+2eWD8lsvbx6avD2hwf9dvyqWO2sHjbmWE+Rn8VpJgX
WVvXdM0hFPWrUzI=
=ChmV
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -1,8 +1,6 @@
{
"Signatures": {
"apache-commons-logging.keyring": "3769888217abb0e4a448c54c5d6a90f5cdde6578f343e63864cde16235f6c5bb",
"commons-logging-1.2-src.tar.gz": "49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81",
"commons-logging-1.2-src.tar.gz.asc": "739a0d03b795aee241219fb3cb8d22c4c0864dcf4a2980c3122cd318cb8e5fad",
"commons-logging-api-1.1.pom": "69b8be61aa746c7d02acb1b11eb3b57cb22b246780ed71d79764195cbbe3d99d"
}
}

View File

@ -23,13 +23,11 @@ Distribution: Mariner
%define short_name commons-%{base_name}
Name: apache-%{short_name}
Version: 1.2
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Apache Commons Logging
License: Apache-2.0
License: ASL 2.0
URL: http://commons.apache.org/%{base_name}
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source1: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
Source2: apache-commons-logging.keyring
Source4: http://central.maven.org/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
Patch0: commons-logging-1.1.3-src-junit.diff
Patch1: commons-logging-1.2-sourcetarget.patch
@ -40,7 +38,6 @@ BuildRequires: glassfish-servlet-api
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local-bootstrap
BuildRequires: junit
BuildRequires: log4j12-mini >= 1.2
Requires: java >= 1.8
Provides: jakarta-%{short_name} = %{version}-%{release}
Obsoletes: jakarta-%{short_name} < %{version}
@ -72,6 +69,19 @@ rm ./src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java
%pom_remove_parent .
# Remove log4j12 and components not provided in CBL-Mariner.
%pom_remove_dep -r :avalon-framework
%pom_remove_dep -r :logkit
%pom_remove_dep -r :log4j
rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java
rm src/main/java/org/apache/commons/logging/impl/Log4JLogger.java
rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java
rm -r src/test/java/org/apache/commons/logging/{avalon,log4j,logkit}
rm src/test/java/org/apache/commons/logging/pathable/{Parent,Child}FirstTestCase.java
# Remove log4j12 tests
rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
@ -82,7 +92,7 @@ export CLASSPATH=$(build-classpath \
):target/classes:target/test-classes
ant \
-Dmaven.mode.offline=true -lib %{_javadir} \
-Dlog4j12.jar=%{_javadir}/log4j12/log4j-12.jar -Dservletapi.jar=%{_javadir}/glassfish-servlet-api.jar \
-Dservletapi.jar=%{_javadir}/glassfish-servlet-api.jar \
dist
%install
@ -115,6 +125,10 @@ install -pm 644 tmp.pom %{buildroot}/%{_mavenpomdir}/%{short_name}-adapters-%{ve
%doc PROPOSAL.html RELEASE-NOTES.txt NOTICE.txt
%changelog
* Fri Jan 21 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.2-10
- Removing 'log4j12' dependency.
- License verified.
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.2-9
- Converting the 'Release' tag to the '[number].[distribution]' format.

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJTuEADAAoJEKQfE8mZlFKT5i0P/3nQsu5rXvr9iw3qAmcO3Rzr
HUktzPQslltx3qBlu9No9iaXAGylerGUqv5awdsxVdZYcg7XJZmvVmv0Hz1A3ufm
u25VW8Oj8rpntTf6uzajF1QhI6WcMuJwHCrS7dgVEnBE4LwdMxXO8d9S45wXMz1g
yAUvXDJNUV82Df71rgfEhisupTpSVaicEh21ICdb55KT+rnR3AKaYXJAjyYfYhaQ
b172kmY2QeZJ6Z9k0BiV4EA/rZAW+72JVQMcI3oYvfNH/Y7UwsaIdauHoTbZGcu5
Ef2I7t9sQYDfFA5hzjaArresq8Qqtmlmb/M3xsTQ6/wRECSF9jqQXh3af6mdm32c
X+pypF9KUk+LEPjpY5XNTLEaDv7+BPwl/16ZpewkDiwbSwJBz05ETzJIUR+Ba6nT
1gTFtU6G9Snrf6+6uEHWhAI8KAZVR/Cxut72+n+kgFCuaXWx9HSUATnyOa1ubAlA
juqKq8xqxqSVi9llloCR6yilNVJsTVd8Fa4NBFJDYn0UYuZ7SPwGzOnbLVdCFu1E
xehEjrdYOPFY9lvD0gXzZ+XudpfDpZ7ei0W3A0LCPjF+imo4+vtW1C1mtZSiy65r
KCAxdUEyVu+7VTkxN1fV6tTWSMFA0gqDoegMofJQDT516hrYfIuSsq/bmIXo6lo8
9rzG4eXx9tpONF4H9ryS
=lLrj
-----END PGP SIGNATURE-----

View File

@ -1,31 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>avalon-logkit</groupId>
<artifactId>avalon-logkit</artifactId>
<name>Avalon Logkit</name>
<version>2.1</version>
<description>Log4j-like logging toolkit.</description>
<inceptionYear>1997</inceptionYear>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.11</version>
</dependency>
<dependency>
<groupId>servletapi</groupId>
<artifactId>servletapi</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-javamail</artifactId>
<version>1.3.1-rc3</version>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jms</artifactId>
<version>1.1-rc4</version>
</dependency>
</dependencies>
</project>

View File

@ -1,28 +0,0 @@
diff --git a/src/java/org/apache/log/ContextMap.java b/src/java/org/apache/log/ContextMap.java
index 046106b..2305955 100644
--- a/src/java/org/apache/log/ContextMap.java
+++ b/src/java/org/apache/log/ContextMap.java
@@ -29,8 +29,8 @@ import java.util.Hashtable;
* <li>hostname -&gt;helm.realityforge.org</li>
* <li>ipaddress -&gt;1.2.3.4</li>
* <li>interface -&gt;127.0.0.1</li>
- * <li>caller <20> <20>-&gt;com.biz.MyCaller.method(MyCaller.java:18)</li>
- * <li>source <20> <20>-&gt;1.6.3.2:33</li>
+ * <li>caller -&gt;com.biz.MyCaller.method(MyCaller.java:18)</li>
+ * <li>source -&gt;1.6.3.2:33</li>
* </ul>
* The context is bound to a thread (and inherited by sub-threads) but
* it can also be added to by LogTargets.
diff --git a/src/java/org/apache/log/Logger.java b/src/java/org/apache/log/Logger.java
index 43ce1b7..d1f7efd 100644
--- a/src/java/org/apache/log/Logger.java
+++ b/src/java/org/apache/log/Logger.java
@@ -295,7 +295,7 @@ public class Logger
}
/**
- * Determine if messages of priority <20>will be logged.
+ * Determine if messages of priority will be logged.
* @param priority the priority
* @return true if messages will be logged
*/

View File

@ -1,33 +0,0 @@
--- pom.xml 2011-04-21 14:24:29.000000000 +0200
+++ pom.xml.new 2011-05-05 14:37:27.016877493 +0200
@@ -13,19 +13,19 @@
<version>1.2.11</version>
</dependency>
<dependency>
- <groupId>servletapi</groupId>
- <artifactId>servletapi</artifactId>
- <version>2.3</version>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
</dependency>
<dependency>
- <groupId>geronimo-spec</groupId>
- <artifactId>geronimo-spec-javamail</artifactId>
- <version>1.3.1-rc3</version>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.3</version>
</dependency>
<dependency>
- <groupId>geronimo-spec</groupId>
- <artifactId>geronimo-spec-jms</artifactId>
- <version>1.1-rc4</version>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>1.1.1</version>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>

View File

@ -1,6 +0,0 @@
{
"Signatures": {
"avalon-logkit-2.1-src.zip": "ff926e98a3b02280bc4eff4d1215b58dc0132a7ce3f0bc0861df275e06eba5bf",
"avalon-logkit-2.1.pom": "ec43d57c1a5f1c039114826037aed685fb91675eeaec85d9ea1dcc5604891ba6"
}
}

View File

@ -1,171 +0,0 @@
Vendor: Microsoft Corporation
Distribution: Mariner
#
# spec file for package avalon-logkit
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2005, JPackage Project
#
# 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 https://bugs.opensuse.org/
#
%define short_name logkit
%define camelcase_short_name LogKit
Name: avalon-logkit
Version: 2.1
Release: 23%{?dist}
Summary: Java logging toolkit
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://avalon.apache.org/%{short_name}/
#Source0: http://www.apache.org/dist/excalibur/%{name}/source/%{name}-%{version}-src.zip
#Source1: http://repo1.maven.org/maven2/avalon-logkit/avalon-logkit/%{version}/%{name}-%{version}.pom
Source0: %{name}-%{version}-src.zip
Source1: %{name}-%{version}.pom
Patch0: fix-java6-compile.patch
Patch1: avalon-logkit-pom-deps.patch
Patch2: avalon-logkit-encoding.patch
Patch3: fix-java7-compile.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: fdupes
BuildRequires: geronimo-jms-1_1-api
BuildRequires: glassfish-servlet-api
BuildRequires: java-devel >= 1.8
BuildRequires: javamail
BuildRequires: javapackages-local-bootstrap
BuildRequires: log4j12
BuildRequires: unzip
Requires: mvn(javax.jms:jms)
Requires: mvn(javax.mail:mail)
Requires: mvn(javax.servlet:servlet-api)
BuildArch: noarch
%description
LogKit is a logging toolkit designed for secure performance oriented
logging in applications. To get started using LogKit, it is recomended
that you read the whitepaper and browse the API docs.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%patch0
cp %{SOURCE1} pom.xml
%patch1
%patch2 -p1
%patch3
# remove all binary libs
find . -name "*.jar" -delete
%build
ant clean
mkdir -p target/lib
build-jar-repository -s -p target/lib \
log4j12/log4j-12 \
javamail/mailapi \
geronimo-jms-1.1-api \
glassfish-servlet-api
ant -Dant.build.javac.source=8 -Dant.build.javac.target=8 \
-Dencoding=ISO-8859-1 -Dnoget=true -lib %{_datadir}/java \
jar javadoc
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
#pom
install -d -m 755 %{buildroot}/%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "%{short_name}:%{short_name},org.apache.avalon.logkit:%{name}"
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files
%doc LICENSE.txt NOTICE.txt
%{_javadir}/*
%{_datadir}/maven-metadata/%{name}.xml
%{_mavenpomdir}/JPP-%{name}.pom
%files javadoc
%doc LICENSE.txt
%{_javadocdir}/*
%changelog
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 2.1-23
- Converting the 'Release' tag to the '[number].[distribution]' format.
* Tue Nov 17 2020 Ruying Chen <v-ruyche@microsoft.com> - 2.1-22.5
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Use javapackages-local-bootstrap to avoid build cycle.
- Remove dependency on jdbc-stdext.
* Tue Oct 1 2019 Fridrich Strba <fstrba@suse.com>
- Build against compatibility log4j12 package
* Mon Apr 15 2019 Fridrich Strba <fstrba@suse.com>
- Depend directly on the geronimo-jms-1_1-api package instead of
the jms virtual provider
* Thu Feb 14 2019 Fridrich Strba <fstrba@suse.com>
- Build against the glassfish-servlet-api
* Tue Jan 22 2019 Fridrich Strba <fstrba@suse.com>
- Require dependencies by their maven artifactId and groupId in
order to be usable from maven build
* Tue May 15 2018 fstrba@suse.com
- Build with source and target 8 to prepare for a possible removal
of 1.6 compatibility
* Fri Sep 15 2017 jengelh@inai.de
- RPM group and minor spelling fix. Replacement of
- exec rm by -delete.
* Fri Sep 15 2017 fstrba@suse.com
- Fix build with jdk9 by specifying java source and target 1.6
- Clean spec file
* Sun May 21 2017 tchvatal@suse.com
- Remove unneeded dependencies
* Fri May 19 2017 pcervinka@suse.com
- New build dependency: javapackages-local
* Thu Jun 4 2015 dimstar@opensuse.org
- Also adjust Requires to be servlet >= 3.0 instead of servlet30.
* Thu Jun 4 2015 dimstar@opensuse.org
- BuildRequire servlet >= 3.0 instead of 'servlet30'. Since tomcat
moved to version 8.0, it now provides 'servlet31' (which is fine,
as this is represented as servlet 3.1).
* Wed Mar 18 2015 tchvatal@suse.com
- Fix build with new javapackages-tools
* Fri Jun 27 2014 tchvatal@suse.com
- Cleanup with spec-cleaner
- Build on SLE11
* Mon Sep 9 2013 tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
* Wed Jun 20 2012 mvyskocil@suse.cz
- bump servletapi to 30 (tomcat7)
* Fri May 18 2012 mvyskocil@suse.cz
- add pom file
- fix a build with openjdk7
- change the jms to jms_api in classpath
* Thu Feb 16 2012 cfarrell@suse.com
- license update: Apache-2.0
Look at License.txt
* Sun Dec 18 2011 nlminhtl@gmail.com
- Package avalon-logkit 2.1 for openSUSE
- Fixing the license for openSUSE

View File

@ -1,13 +0,0 @@
--- src/java/org/apache/log/output/db/DefaultDataSource.java.sav 2005-08-29 21:03:50.000000000 +0300
+++ src/java/org/apache/log/output/db/DefaultDataSource.java 2010-11-09 21:05:58.775055594 +0200
@@ -111,4 +111,10 @@ public class DefaultDataSource
{
m_logWriter = logWriter;
}
+
+ public boolean isWrapperFor(Class<?> iface) {
+ return false;
+ }
+
+ public <T> T unwrap(java.lang.Class<T> iface) {return null;}
}

View File

@ -1,9 +0,0 @@
--- src/java/org/apache/log/output/db/DefaultDataSource.java.sav 2012-04-18 00:41:59.000000000 +0300
+++ src/java/org/apache/log/output/db/DefaultDataSource.java 2012-04-18 00:46:17.454272754 +0300
@@ -117,4 +117,6 @@ public class DefaultDataSource
}
public <T> T unwrap(java.lang.Class<T> iface) {return null;}
+
+ public java.util.logging.Logger getParentLogger() {return null;}
}

View File

@ -1,12 +0,0 @@
--- 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

@ -1,221 +0,0 @@
<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>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.3</version>
<name>dom4j</name>
<description>flexible XML framework for Java</description>
<url>http://dom4j.github.io/</url>
<licenses>
<license>
<name>BSD 3-clause New License</name>
<url>https://github.com/dom4j/dom4j/blob/master/LICENSE</url>
</license>
</licenses>
<developers>
<developer>
<name>Filip Jirsák</name>
<email>filip@jirsak.org</email>
<url>https://github.com/FilipJirsak</url>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com:dom4j/dom4j.git</connection>
<developerConnection>scm:git:git@github.com:dom4j/dom4j.git</developerConnection>
<url>git@github.com:dom4j/dom4j.git</url>
</scm>
<dependencies>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1.6</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>1.0-2</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>xsdlib</artifactId>
<version>2013.6.1</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.12</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>pull-parser</groupId>
<artifactId>pull-parser</artifactId>
<version>2</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -1,259 +0,0 @@
Index: dom4j/src/java/org/dom4j/Namespace.java
===================================================================
--- dom4j.orig/src/java/org/dom4j/Namespace.java
+++ dom4j/src/java/org/dom4j/Namespace.java
@@ -51,6 +51,10 @@ public class Namespace extends AbstractN
public Namespace(String prefix, String uri) {
this.prefix = (prefix != null) ? prefix : "";
this.uri = (uri != null) ? uri : "";
+
+ if (!this.prefix.isEmpty()) {
+ QName.validateNCName(this.prefix);
+ }
}
/**
Index: dom4j/src/java/org/dom4j/QName.java
===================================================================
--- dom4j.orig/src/java/org/dom4j/QName.java
+++ dom4j/src/java/org/dom4j/QName.java
@@ -11,6 +11,7 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
+import java.util.regex.Pattern;
import org.dom4j.tree.QNameCache;
import org.dom4j.util.SingletonStrategy;
@@ -20,6 +21,7 @@ import org.dom4j.util.SingletonStrategy;
* <code>QName</code> represents a qualified name value of an XML element or
* attribute. It consists of a local name and a {@link Namespace}instance. This
* object is immutable.
+ * @author Filip Jirsak
* </p>
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan </a>
@@ -28,6 +30,81 @@ public class QName implements Serializab
/** The Singleton instance */
private static SingletonStrategy singleton = null;
+ /**
+ * {@code NameStartChar} without colon.
+ *
+ * <pre>NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]</pre>
+ *
+ * @see <a href="https://www.w3.org/TR/xml/#sec-common-syn">XML 1.0 - 2.3 Common Syntactic Constructs</a>
+ * @see <a href="https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-common-syn">XML 1.1 - 2.3 Common Syntactic Constructs</a>
+ */
+ private static final String NAME_START_CHAR = "_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
+
+ /**
+ * {@code NameChar} without colon.
+ *
+ * <pre>NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]</pre>
+ *
+ * @see <a href="https://www.w3.org/TR/xml/#sec-common-syn">XML 1.0 - 2.3 Common Syntactic Constructs</a>
+ * @see <a href="https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-common-syn">XML 1.1 - 2.3 Common Syntactic Constructs</a>
+ */
+ private static final String NAME_CHAR = NAME_START_CHAR + "-.0-9\u00B7\u0300-\u036F\u203F-\u2040";
+
+ /**
+ * {@code NCName}
+ * {@code NCName}
+ *
+ * <pre>
+ * NCName ::= NCNameStartChar NCNameChar* (An XML Name, minus the ":")
+ * NCNameChar ::= NameChar -':'
+ * NCNameStartChar ::= NameStartChar -':'
+ * </pre>
+ *
+ * @see <a href="https://www.w3.org/TR/xml-names/#ns-qualnames">Namespaces in XML 1.0 - 4 Qualified Names</a>
+ * @see <a href="https://www.w3.org/TR/2006/REC-xml-names11-20060816/#ns-qualnames">Namespaces in XML 1.1 - 4 Qualified Names</a>
+ */
+ private static final String NCNAME = "["+NAME_START_CHAR+"]["+NAME_CHAR+"]*";
+
+ /**
+ * Regular expression for {@code Name} (with colon).
+ *
+ * <pre>Name ::= NameStartChar (NameChar)*</pre>
+ *
+ * @see <a href="https://www.w3.org/TR/xml/#sec-common-syn">XML 1.0 - 2.3 Common Syntactic Constructs</a>
+ * @see <a href="https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-common-syn">XML 1.1 - 2.3 Common Syntactic Constructs</a>
+ */
+ private static final Pattern RE_NAME = Pattern.compile("[:"+NAME_START_CHAR+"][:"+NAME_CHAR+"]*");
+
+ /**
+ * Regular expression for {@code NCName}.
+ *
+ * <pre>
+ * NCName ::= NCNameStartChar NCNameChar* (An XML Name, minus the ":")
+ * NCNameChar ::= NameChar -':'
+ * NCNameStartChar ::= NameStartChar -':'
+ * </pre>
+ *
+ * @see <a href="https://www.w3.org/TR/xml-names/#ns-qualnames">Namespaces in XML 1.0 - 4 Qualified Names</a>
+ * @see <a href="https://www.w3.org/TR/2006/REC-xml-names11-20060816/#ns-qualnames">Namespaces in XML 1.1 - 4 Qualified Names</a>
+ */
+ private static final Pattern RE_NCNAME = Pattern.compile(NCNAME);
+
+ /**
+ * Regular expression for {@code QName}.
+ *
+ * <pre>
+ * QName ::= PrefixedName | UnprefixedName
+ * PrefixedName ::= Prefix ':' LocalPart
+ * UnprefixedName ::= LocalPart
+ * Prefix ::= NCName
+ * LocalPart ::= NCName
+ * </pre>
+ *
+ * @see <a href="https://www.w3.org/TR/xml-names/#ns-qualnames">Namespaces in XML 1.0 - 4 Qualified Names</a>
+ * @see <a href="https://www.w3.org/TR/2006/REC-xml-names11-20060816/#ns-qualnames">Namespaces in XML 1.1 - 4 Qualified Names</a>
+ */
+ private static final Pattern RE_QNAME = Pattern.compile("(?:"+NCNAME+":)?"+NCNAME);
+
static {
try {
String defaultSingletonClass = "org.dom4j.util.SimpleSingleton";
@@ -73,6 +150,11 @@ public class QName implements Serializab
this.name = (name == null) ? "" : name;
this.namespace = (namespace == null) ? Namespace.NO_NAMESPACE
: namespace;
+ if (this.namespace.equals(Namespace.NO_NAMESPACE)) {
+ validateName(this.name);
+ } else {
+ validateNCName(this.name);
+ }
}
public QName(String name, Namespace namespace, String qualifiedName) {
@@ -80,6 +162,8 @@ public class QName implements Serializab
this.qualifiedName = qualifiedName;
this.namespace = (namespace == null) ? Namespace.NO_NAMESPACE
: namespace;
+ validateNCName(this.name);
+ validateQName(this.qualifiedName);
}
public static QName get(String name) {
@@ -253,6 +337,24 @@ public class QName implements Serializab
QNameCache cache = (QNameCache) singleton.instance();
return cache;
}
+
+ private static void validateName(String name) {
+ if (!RE_NAME.matcher(name).matches()) {
+ throw new IllegalArgumentException(String.format("Illegal character in name: '%s'.", name));
+ }
+ }
+
+ protected static void validateNCName(String ncname) {
+ if (!RE_NCNAME.matcher(ncname).matches()) {
+ throw new IllegalArgumentException(String.format("Illegal character in local name: '%s'.", ncname));
+ }
+ }
+
+ private static void validateQName(String qname) {
+ if (!RE_QNAME.matcher(qname).matches()) {
+ throw new IllegalArgumentException(String.format("Illegal character in qualified name: '%s'.", qname));
+ }
+ }
}
Index: dom4j/src/java/org/dom4j/tree/QNameCache.java
===================================================================
--- dom4j.orig/src/java/org/dom4j/tree/QNameCache.java
+++ dom4j/src/java/org/dom4j/tree/QNameCache.java
@@ -164,6 +164,8 @@ public class QNameCache {
if (index < 0) {
return get(qualifiedName, Namespace.get(uri));
+ } else if (index == 0){
+ throw new IllegalArgumentException("Qualified name cannot start with ':'.");
} else {
String name = qualifiedName.substring(index + 1);
String prefix = qualifiedName.substring(0, index);
Index: dom4j/src/test/org/dom4j/AllowedCharsTest.java
===================================================================
--- /dev/null
+++ dom4j/src/test/org/dom4j/AllowedCharsTest.java
@@ -0,0 +1,78 @@
+package org.dom4j;^M
+^M
+import org.testng.annotations.Test;^M
+^M
+/**^M
+ * @author Filip Jirsak^M
+ */^M
+public class AllowedCharsTest {^M
+ @Test^M
+ public void localName() {^M
+ QName.get("element");^M
+ QName.get(":element");^M
+ QName.get("elem:ent");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void localNameFail() {^M
+ QName.get("!element");^M
+ }^M
+^M
+ @Test^M
+ public void qname() {^M
+ QName.get("element", "http://example.com/namespace");^M
+ QName.get("ns:element", "http://example.com/namespace");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void qnameFail1() {^M
+ QName.get("ns:elem:ent", "http://example.com/namespace");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void qnameFail2() {^M
+ QName.get(":nselement", "http://example.com/namespace");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void createElementLT() {^M
+ DocumentHelper.createElement("element<name");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void createElementGT() {^M
+ DocumentHelper.createElement("element>name");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void createElementAmpersand() {^M
+ DocumentHelper.createElement("element&name");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void addElement() {^M
+ Element root = DocumentHelper.createElement("root");^M
+ root.addElement("element>name");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void addElementQualified() {^M
+ Element root = DocumentHelper.createElement("root");^M
+ root.addElement("element>name", "http://example.com/namespace");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void addElementQualifiedPrefix() {^M
+ Element root = DocumentHelper.createElement("root");^M
+ root.addElement("ns:element>name", "http://example.com/namespace");^M
+ }^M
+^M
+ @Test(expectedExceptions = IllegalArgumentException.class)^M
+ public void addElementPrefix() {^M
+ Element root = DocumentHelper.createElement("root");^M
+ root.addElement("ns>:element", "http://example.com/namespace");^M
+ }^M
+^M
+ //TODO It is illegal to create element or attribute with namespace prefix and empty namespace IRI.^M
+ //See https://www.w3.org/TR/2006/REC-xml-names11-20060816/#scoping^M
+}^M

View File

@ -1,484 +0,0 @@
From a8228522a99a02146106672a34c104adbda5c658 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Filip=20Jirs=C3=A1k?= <filip@jirsak.org>
Date: Sat, 11 Apr 2020 19:06:44 +0200
Subject: [PATCH] SAXReader uses system default XMLReader with its defaults.
New factory method SAXReader.createDefault() sets more secure defaults.
---
src/java/org/dom4j/DocumentHelper.java | 65 +-
src/java/org/dom4j/io/SAXHelper.java | 37 +-
src/java/org/dom4j/io/SAXReader.java | 1824 ++++++++++---------
3 files changed, 973 insertions(+), 953 deletions(-)
Index: dom4j/src/java/org/dom4j/io/SAXHelper.java
===================================================================
--- dom4j.orig/src/java/org/dom4j/io/SAXHelper.java
+++ dom4j/src/java/org/dom4j/io/SAXHelper.java
@@ -13,6 +13,8 @@ import org.xml.sax.SAXNotSupportedExcept
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
/**
* <p>
* <code>SAXHelper</code> contains some helper methods for working with SAX
@@ -59,9 +61,18 @@ class SAXHelper {
}
/**
- * Creats a default XMLReader via the org.xml.sax.driver system property or
+ * Creates a default XMLReader via the org.xml.sax.driver system property or
* JAXP if the system property is not set.
*
+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}.
+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties:
+ *
+ * <pre>
+ * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ * </pre>
+ *
* @param validating
* DOCUMENT ME!
*
Index: dom4j/src/java/org/dom4j/io/SAXReader.java
===================================================================
--- dom4j.orig/src/java/org/dom4j/io/SAXReader.java
+++ dom4j/src/java/org/dom4j/io/SAXReader.java
@@ -30,6 +30,8 @@ import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
/**
* <p>
* <code>SAXReader</code> creates a DOM4J tree from SAX parsing events.
@@ -135,17 +137,76 @@ public class SAXReader {
/** The SAX filter used to filter SAX events */
private XMLFilter xmlFilter;
+ public static SAXReader createDefault() {
+ SAXReader reader = new SAXReader();
+ try {
+ reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ } catch (SAXException e) {
+ // nothing to do, incompatible reader
+ }
+ return reader;
+ }
+
+ /**
+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}.
+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties:
+ *
+ * <pre>
+ * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ * </pre>
+ */
public SAXReader() {
}
+ /**
+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}.
+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties:
+ *
+ * <pre>
+ * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ * </pre>
+ *
+ * @param validating
+ */
public SAXReader(boolean validating) {
this.validating = validating;
}
+ /**
+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}.
+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties:
+ *
+ * <pre>
+ * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ * </pre>
+ *
+ * @param factory
+ */
public SAXReader(DocumentFactory factory) {
this.factory = factory;
}
+ /**
+ * This method internally calls {@link SAXParserFactory}{@code .newInstance().newSAXParser().getXMLReader()} or {@link XMLReaderFactory#createXMLReader()}.
+ * Be sure to configure returned reader if the default configuration does not suit you. Consider setting the following properties:
+ *
+ * <pre>
+ * reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ * reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ * reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ * </pre>
+ *
+ * @param factory
+ * @param validating
+ */
public SAXReader(DocumentFactory factory, boolean validating) {
this.factory = factory;
this.validating = validating;
@@ -185,14 +246,10 @@ public class SAXReader {
* this method is to correctly configure an XMLReader object instance and
* call the {@link #setXMLReader(XMLReader)}method
*
- * @param name
- * is the SAX property name
- * @param value
- * is the value of the SAX property
- *
- * @throws SAXException
- * if the XMLReader could not be created or the property could
- * not be changed.
+ * @param name is the SAX property name
+ * @param value is the value of the SAX property
+ * @throws SAXException if the XMLReader could not be created or the property could
+ * not be changed.
*/
public void setProperty(String name, Object value) throws SAXException {
getXMLReader().setProperty(name, value);
@@ -205,14 +262,10 @@ public class SAXReader {
* calling this method is to correctly configure an XMLReader object
* instance and call the {@link #setXMLReader(XMLReader)}method
*
- * @param name
- * is the SAX feature name
- * @param value
- * is the value of the SAX feature
- *
- * @throws SAXException
- * if the XMLReader could not be created or the feature could
- * not be changed.
+ * @param name is the SAX feature name
+ * @param value is the value of the SAX feature
+ * @throws SAXException if the XMLReader could not be created or the feature could
+ * not be changed.
*/
public void setFeature(String name, boolean value) throws SAXException {
getXMLReader().setFeature(name, value);
@@ -223,13 +276,9 @@ public class SAXReader {
* Reads a Document from the given <code>File</code>
* </p>
*
- * @param file
- * is the <code>File</code> to read from.
- *
+ * @param file is the <code>File</code> to read from.
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(File file) throws DocumentException {
try {
@@ -272,13 +321,9 @@ public class SAXReader {
* Reads a Document from the given <code>URL</code> using SAX
* </p>
*
- * @param url
- * <code>URL</code> to read from.
- *
+ * @param url <code>URL</code> to read from.
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(URL url) throws DocumentException {
String systemID = url.toExternalForm();
@@ -304,13 +349,9 @@ public class SAXReader {
* String} to denote the source of the document.
* </p>
*
- * @param systemId
- * is a URL for a document or a file name.
- *
+ * @param systemId is a URL for a document or a file name.
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(String systemId) throws DocumentException {
InputSource source = new InputSource(systemId);
@@ -326,13 +367,9 @@ public class SAXReader {
* Reads a Document from the given stream using SAX
* </p>
*
- * @param in
- * <code>InputStream</code> to read from.
- *
+ * @param in <code>InputStream</code> to read from.
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(InputStream in) throws DocumentException {
InputSource source = new InputSource(in);
@@ -348,13 +385,9 @@ public class SAXReader {
* Reads a Document from the given <code>Reader</code> using SAX
* </p>
*
- * @param reader
- * is the reader for the input
- *
+ * @param reader is the reader for the input
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(Reader reader) throws DocumentException {
InputSource source = new InputSource(reader);
@@ -370,15 +403,10 @@ public class SAXReader {
* Reads a Document from the given stream using SAX
* </p>
*
- * @param in
- * <code>InputStream</code> to read from.
- * @param systemId
- * is the URI for the input
- *
+ * @param in <code>InputStream</code> to read from.
+ * @param systemId is the URI for the input
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(InputStream in, String systemId)
throws DocumentException {
@@ -396,13 +424,9 @@ public class SAXReader {
* Reads a Document from the given <code>Reader</code> using SAX
* </p>
*
- * @param reader
- * is the reader for the input
- * @param systemId
- * is the URI for the input
- *
+ * @param reader is the reader for the input
+ * @param systemId is the URI for the input
* @return the newly created Document instance
- *
* @throws DocumentException
* if an error occurs during parsing.
*/
@@ -422,13 +446,9 @@ public class SAXReader {
* Reads a Document from the given <code>InputSource</code> using SAX
* </p>
*
- * @param in
- * <code>InputSource</code> to read from.
- *
+ * @param in <code>InputSource</code> to read from.
* @return the newly created Document instance
- *
- * @throws DocumentException
- * if an error occurs during parsing.
+ * @throws DocumentException if an error occurs during parsing.
*/
public Document read(InputSource in) throws DocumentException {
try {
@@ -695,8 +715,7 @@ public class SAXReader {
/**
* Sets the entity resolver used to resolve entities.
*
- * @param entityResolver
- * DOCUMENT ME!
+ * @param entityResolver DOCUMENT ME!
*/
public void setEntityResolver(EntityResolver entityResolver) {
this.entityResolver = entityResolver;
@@ -706,9 +725,7 @@ public class SAXReader {
* DOCUMENT ME!
*
* @return the <code>XMLReader</code> used to parse SAX events
- *
- * @throws SAXException
- * DOCUMENT ME!
+ * @throws SAXException DOCUMENT ME!
*/
public XMLReader getXMLReader() throws SAXException {
if (xmlReader == null) {
@@ -721,8 +738,7 @@ public class SAXReader {
/**
* Sets the <code>XMLReader</code> used to parse SAX events
*
- * @param reader
- * is the <code>XMLReader</code> to parse SAX events
+ * @param reader is the <code>XMLReader</code> to parse SAX events
*/
public void setXMLReader(XMLReader reader) {
this.xmlReader = reader;
@@ -742,8 +758,7 @@ public class SAXReader {
/**
* Sets encoding used for InputSource (null means system default encoding)
*
- * @param encoding
- * is encoding used for InputSource
+ * @param encoding is encoding used for InputSource
*/
public void setEncoding(String encoding) {
this.encoding = encoding;
@@ -753,12 +768,9 @@ public class SAXReader {
* Sets the class name of the <code>XMLReader</code> to be used to parse
* SAX events.
*
- * @param xmlReaderClassName
- * is the class name of the <code>XMLReader</code> to parse SAX
- * events
- *
- * @throws SAXException
- * DOCUMENT ME!
+ * @param xmlReaderClassName is the class name of the <code>XMLReader</code>
+ * to parse SAX events
+ * @throws SAXException DOCUMENT ME!
*/
public void setXMLReaderClassName(String xmlReaderClassName)
throws SAXException {
@@ -769,11 +781,9 @@ public class SAXReader {
* Adds the <code>ElementHandler</code> to be called when the specified
* path is encounted.
*
- * @param path
- * is the path to be handled
- * @param handler
- * is the <code>ElementHandler</code> to be called by the event
- * based processor.
+ * @param path is the path to be handled
+ * @param handler is the <code>ElementHandler</code> to be called by the event
+ * based processor.
*/
public void addHandler(String path, ElementHandler handler) {
getDispatchHandler().addHandler(path, handler);
@@ -783,8 +793,7 @@ public class SAXReader {
* Removes the <code>ElementHandler</code> from the event based processor,
* for the specified path.
*
- * @param path
- * is the path to remove the <code>ElementHandler</code> for.
+ * @param path is the path to remove the <code>ElementHandler</code> for.
*/
public void removeHandler(String path) {
getDispatchHandler().removeHandler(path);
@@ -795,9 +804,8 @@ public class SAXReader {
* registered, this will set a default <code>ElementHandler</code> to be
* called for any path which does <b>NOT </b> have a handler registered.
*
- * @param handler
- * is the <code>ElementHandler</code> to be called by the event
- * based processor.
+ * @param handler is the <code>ElementHandler</code> to be called by the event
+ * based processor.
*/
public void setDefaultHandler(ElementHandler handler) {
getDispatchHandler().setDefaultHandler(handler);
@@ -824,8 +832,7 @@ public class SAXReader {
/**
* Sets the SAX filter to be used when filtering SAX events
*
- * @param filter
- * is the SAX filter to use or null to disable filtering
+ * @param filter is the SAX filter to use or null to disable filtering
*/
public void setXMLFilter(XMLFilter filter) {
this.xmlFilter = filter;
@@ -838,9 +845,7 @@ public class SAXReader {
* Installs any XMLFilter objects required to allow the SAX event stream to
* be filtered and preprocessed before it gets to dom4j.
*
- * @param reader
- * DOCUMENT ME!
- *
+ * @param reader DOCUMENT ME!
* @return the new XMLFilter if applicable or the original XMLReader if no
* filter is being used.
*/
@@ -886,9 +891,7 @@ public class SAXReader {
* XMLReader objects
*
* @return DOCUMENT ME!
- *
- * @throws SAXException
- * DOCUMENT ME!
+ * @throws SAXException DOCUMENT ME!
*/
protected XMLReader createXMLReader() throws SAXException {
return SAXHelper.createXMLReader(isValidating());
@@ -897,13 +900,9 @@ public class SAXReader {
/**
* Configures the XMLReader before use
*
- * @param reader
- * DOCUMENT ME!
- * @param handler
- * DOCUMENT ME!
- *
- * @throws DocumentException
- * DOCUMENT ME!
+ * @param reader DOCUMENT ME!
+ * @param handler DOCUMENT ME!
+ * @throws DocumentException DOCUMENT ME!
*/
protected void configureReader(XMLReader reader, DefaultHandler handler)
throws DocumentException {
@@ -918,10 +917,11 @@ public class SAXReader {
SAXHelper.setParserProperty(reader, SAX_DECL_HANDLER, handler);
}
- // configure namespace support
- SAXHelper.setParserFeature(reader, SAX_NAMESPACES, true);
+ // // configure namespace support
+ // SAXHelper.setParserFeature(reader, SAX_NAMESPACES, true);
- SAXHelper.setParserFeature(reader, SAX_NAMESPACE_PREFIXES, false);
+ // string interning
+ // SAXHelper.setParserFeature(reader, SAX_NAMESPACE_PREFIXES, false);
// string interning
SAXHelper.setParserFeature(reader, SAX_STRING_INTERNING,
@@ -936,8 +936,8 @@ public class SAXReader {
* includeExternalParameterEntities );
*/
// use Locator2 if possible
- SAXHelper.setParserFeature(reader,
- "http://xml.org/sax/features/use-locator2", true);
+ // SAXHelper.setParserFeature(reader,
+ // "http://xml.org/sax/features/use-locator2", true);
try {
// configure validation support
@@ -960,9 +960,7 @@ public class SAXReader {
/**
* Factory Method to allow user derived SAXContentHandler objects to be used
*
- * @param reader
- * DOCUMENT ME!
- *
+ * @param reader DOCUMENT ME!
* @return DOCUMENT ME!
*/
protected SAXContentHandler createContentHandler(XMLReader reader) {

View File

@ -1,14 +0,0 @@
Index: dom4j/build.xml
===================================================================
--- dom4j.orig/build.xml
+++ dom4j/build.xml
@@ -146,9 +146,6 @@
source="8"
deprecation="${deprecation}"
classpathref="compile.classpath">
- <exclude name="org/dom4j/datatype/**"/>
- <exclude name="org/dom4j/io/STAXEventReader.java"/>
- <exclude name="org/dom4j/io/STAXEventWriter.java"/>
</javac>
</target>

View File

@ -1,19 +0,0 @@
--- dom4j/build.xml 2009-05-12 15:04:18.000000000 +0200
+++ dom4j/build.xml 2018-07-10 10:51:51.814095475 +0200
@@ -224,7 +224,6 @@
doctitle="${Name}"
bottom="Copyright &#169; ${year} MetaStuff Ltd. All Rights Reserved. Hosted by &lt;p&gt; &lt;img src='http://sourceforge.net/sflogo.php?group_id=16035' width='88' height='31' border='0' alt='SourceForge Logo' /&gt;"
stylesheetfile="${doc.dir}/style/javadoc.css">
- <link href="file:///usr/share/doc/classpath-doc/api"/>
</javadoc>
<mkdir dir="${build.apidocs}"/>
@@ -240,8 +239,6 @@
doctitle="${Name}"
bottom="Copyright &#169; ${year} MetaStuff Ltd. All Rights Reserved. Hosted by &lt;p&gt; &lt;img src='http://sourceforge.net/sflogo.php?group_id=16035' width='88' height='31' border='0' alt='SourceForge Logo' /&gt;"
stylesheetfile="${doc.dir}/style/javadoc.css">
- <link href="file:///usr/share/doc/classpath-doc/api"/>
- <link href="${build.javadocs}"/>
</javadoc>
</target>

View File

@ -1,37 +0,0 @@
--- dom4j/build.xml 2009-05-12 15:04:18.000000000 +0200
+++ dom4j/build.xml 2017-09-11 13:36:05.252661089 +0200
@@ -142,8 +142,8 @@
destdir="${build.dest}"
debug="${debug}"
optimize="${optimize}"
- target="1.3"
- source="1.3"
+ target="8"
+ source="8"
deprecation="${deprecation}"
classpathref="compile.classpath">
<exclude name="org/dom4j/datatype/**"/>
@@ -195,6 +195,7 @@
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="${packages}"
sourcepath="${build.src}"
+ source="8"
destdir="${build.javadocs}"
author="true"
version="true"
@@ -214,6 +215,7 @@
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="${packages}"
sourcepath="${build.src}"
+ source="8"
destdir="${build.javadocs}"
author="true"
version="true"
@@ -230,6 +232,7 @@
<mkdir dir="${build.apidocs}"/>
<javadoc packagenames="${api.packages}"
sourcepath="${build.src}"
+ source="8"
destdir="${build.apidocs}"
author="true"
version="true"

View File

@ -1,7 +1,6 @@
{
"Signatures": {
"dom4j-1.6.1-debian.tar.bz2": "d72427a11a23df97f8957331269df7fde4fcc982ac3b9d399a49e4df8598b94a",
"dom4j-1.6.1.pom": "447738ca5342da1ab2e0c835f70683e0c93818c22a494c2e5161656f86906c16",
"dom4j_rundemo.sh": "0c96ca492a4322696c0fbd0a414f254fd2ef3e44e7645a4cb3cb0c7f83211f1a"
"dom4j-2.0.3.pom": "8e70c1d00124ccc21b5869080e5344c9cc09cb27c58008eae9bf2b5c2b2081c0",
"dom4j-2.0.3.tar.gz": "729a4bec900fe32afa22b2a4e68594d7d395b394db0e5baeee1310dd540891c9"
}
}

View File

@ -1,296 +1,296 @@
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
Summary: Open Source XML framework for Java
Name: dom4j
Version: 2.0.3
Release: 3%{?dist}
License: BSD
Vendor: Microsoft Corporation
Distribution: Mariner
#
# spec file for package dom4j
#
# Copyright (c) 2020 SUSE LLC
#
# 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.
URL: https://dom4j.github.io/
Source0: https://github.com/dom4j/dom4j/archive/version-%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/org/%{name}/%{name}/%{version}/%{name}-%{version}.pom
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: dom4j
Version: 1.6.1
Release: 34%{?dist}
Summary: JarJar of dom4j for JBoss
License: Apache-1.1
Group: Development/Libraries/Java
URL: http://www.dom4j.org/
#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: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom
Patch0: dom4j-1.6.1-bug1618750.patch
Patch1: dom4j-sourcetarget.patch
Patch2: dom4j-javadoc.patch
# PATCH-FIX-UPSTREAM bsc#1105443 CVE-2018-1000632
Patch3: dom4j-CVE-2018-1000632.patch
# PATCH-FIX-OPENSUSE bsc#1123158 Don't disable STAX and datatypes
Patch4: dom4j-enable-stax-datatypes.patch
# PATCH-FIX-UPSTREAM bsc#1169760 CVE-2020-10683 XML Externl Entity vulnerability in default SAX parser
Patch5: dom4j-CVE-2020-10683.patch
BuildRequires: ant >= 1.6.5
BuildRequires: ant-apache-resolver
BuildRequires: ant-junit
BuildRequires: bea-stax
BuildRequires: fdupes
BuildRequires: isorelax
BuildRequires: java-devel >= 1.6
# Needed for maven conversions
BuildRequires: javapackages-local-bootstrap
BuildRequires: javapackages-tools
BuildRequires: jaxen-bootstrap >= 1.1
BuildRequires: jtidy
BuildRequires: junit
BuildRequires: junitperf
BuildRequires: relaxngDatatype
BuildRequires: stax_1_0_api
BuildRequires: ws-jaxme
BuildRequires: xalan-j2 >= 2.7
BuildRequires: xerces-j2
BuildRequires: xpp2
BuildRequires: xpp3
Requires: bea-stax
Requires: isorelax
Requires: java >= 1.6.0
Requires: jaxen >= 1.1
Requires: relaxngDatatype
Requires: stax_1_0_api
Requires: ws-jaxme
Requires: xalan-j2
Requires: xerces-j2
Requires: xpp2
Requires: xpp3
#Requires: jaxp = 1.2
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: mvn(javax.xml.bind:jaxb-api)
BuildRequires: mvn(jaxen:jaxen)
%if %{with_check}
BuildRequires: mvn(org.testng:testng)
BuildRequires: mvn(xalan:xalan)
BuildRequires: mvn(xerces:xercesImpl)
%endif
%description
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,
dom4j is an Open Source XML framework for Java. 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 demo
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
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description manual
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.
DOM and SAX and is seamlessly integrated with full XPath support.
%package javadoc
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
Summary: Javadoc for %{name}
%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.
Javadoc for %{name}.
%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
%patch1 -p1 -b .sourcetarget
%patch2 -p1 -b .javadoc
%patch3 -p1
%patch4 -p1
%patch5 -p1
perl -pi -e 's/
//g' LICENSE.txt docs/clover/*.css docs/style/*.css docs/xref/*.css docs/xref-test/*.css src/doc/style/*.css docs/benchmarks/xpath/*.java
%autosetup -p1 -n %{name}-version-%{version}
pushd lib
ln -sf $(build-classpath xpp2)
ln -sf $(build-classpath relaxngDatatype)
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
%{mvn_alias} org.%{name}:%{name} %{name}:%{name}
%{mvn_file} : %{name}/%{name} %{name}
cp %{SOURCE1} pom.xml
sed -i 's/runtime/compile/' pom.xml
%if %{with_check}
# test deps missing from pom
%pom_add_dep xalan:xalan::test
%pom_add_dep org.testng:testng:6.8.21:test
%pom_add_dep xerces:xercesImpl::test
%endif
# Remove support for code which depends on ancient / deprecated classes
# xpp2 (deprecated and not developed since 2003)
rm -r src/main/java/org/dom4j/xpp
rm src/main/java/org/dom4j/io/XPPReader.java
# The datatype code depends on msv (deprecated and not developed since 2013)
rm -r src/main/java/org/dom4j/datatype
rm -r src/test/java/org/dom4j/datatype
%pom_remove_dep net.java.dev.msv:xsdlib
# dom4j supports multiple parsers, remove support for unpackaged parsers
rm src/main/java/org/dom4j/io/XPP3Reader.java
rm src/test/java/org/dom4j/io/XPP3ReaderTest.java
%pom_remove_dep xpp3:xpp3
%pom_remove_dep pull-parser:pull-parser
%pom_remove_dep javax.xml.stream:stax-api
# Remove non-deterministic tests
rm src/test/java/org/dom4j/ThreadingTest.java
rm src/test/java/org/dom4j/util/PerThreadSingletonTest.java
%build
export CLASSPATH=$(build-classpath jaxen relaxngDatatype xpp3 xpp2)
export OPT_JAR_LIST="junit ant/ant-junit"
rm -rf src/java/org/dom4j/datatype
ant package release-javadoc
%mvn_build -- \
-Dproject.build.sourceEncoding=UTF-8 \
%if !%{with_check}
-Dmaven.test.skip=true
%endif
-Dmaven.compiler.source=1.8 \
-Dmaven.compiler.target=1.8
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
cp -p build/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%mvn_install
mkdir -p %{buildroot}/%{_mavenpomdir}
install -m 644 %{SOURCE2} %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
%files -f .mfiles
%license LICENSE
%doc README.md
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr build/doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
# manual
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
rm -rf docs/apidocs
cp -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version}
# demo
mkdir -p %{buildroot}%{_datadir}/%{name}/classes/org/dom4j
cp -pr xml %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/%{name}/src
cp -pr src/samples %{buildroot}%{_datadir}/%{name}/src
#cp -pr build/classes/org/dom4j/samples $RPM_BUILD_ROOT%%{_datadir}/%%{name}/classes/org/dom4j
install -m 0755 run.sh %{buildroot}%{_datadir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_docdir}/%{name}-%{version}
%fdupes -s %{buildroot}%{_datadir}/%{name}
%files
%defattr(0644,root,root,0755)
%license LICENSE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_mavenpomdir}/*
%{_datadir}/maven-metadata/%{name}.xml*
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}
%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}
%files demo
%defattr(-,root,root,0755)
%{_datadir}/%{name}
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.6.1-34
- Converting the 'Release' tag to the '[number].[distribution]' format.
* Fri Jan 21 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 2.0.3-3
- Initial CBL-Mariner import from Fedora 36 (license: MIT).
- License verified.
* Fri Nov 27 2020 Ruying Chen <v-ruyche@microsoft.com> - 1.6.1-33.4
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Use javapackages-local-bootstrap to avoid build cycle.
- Set javadoc Xdoclint:none.
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 17 2020 Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Security fix: [bsc#1169760, CVE-2020-10683]
* External Entity vulnerability in default SAX parser
* Add dom4j-CVE-2020-10683.patch
* Fri Jan 25 2019 Cédric Bosdonnat <cbosdonnat@suse.com>
- Build STAXEventReader, STAXEventWriter and the data types.
[bsc#1123158]
* Added patch dom4j-enable-stax-datatypes.patch
* Tue Sep 18 2018 pmonrealgonzalez@suse.com
- Security fix: [bsc#1105443, CVE-2018-1000632]
* Version prior to version 2.1.1 contains a CWE-91: XML
Injectionvulnerability in Class: Element. Methods: addElement,
addAttribute that canresult in an attacker tampering with XML
documents through.
* Added dom4j-CVE-2018-1000632.patch
* Tue Jul 10 2018 fstrba@suse.com
- Added patch:
* dom4j-javadoc.patch
+ Don't load urls while building javadoc in environment without
connectivity
* Wed May 16 2018 fstrba@suse.com
- Modified patch:
* dom4j-sourcetarget.patch
+ Build with source and target 8 to prepare for a possible
removal of 1.6 compatibility
* Fri Sep 8 2017 fstrba@suse.com
- Added patch:
* dom4j-sourcetarget.patch
+ Use java source and target level 1.6 in order to allow
building with jdk9
* Fri May 19 2017 mpluskal@suse.com
- Update dependencies
* Wed Mar 18 2015 tchvatal@suse.com
- Fix build with new javapackages-tools
* Tue Jul 8 2014 tchvatal@suse.com
- Do not depend on ant-trax and run spec-cleaner.
* Mon Sep 9 2013 tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
* Wed Aug 28 2013 mvyskocil@suse.com
- use add_maven_depmap from javapackages-tools
- drop repolib part (never built)
- drop pointless jarjar
- unversioned javadoc
* Fri Mar 23 2012 cfarrell@suse.com
- license update: Apache-1.1
SPDX
* Sun Sep 18 2011 jengelh@medozas.de
- Remove redundant tags/sections from specfile
(cf. packaging guidelines)
* 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)
* Thu Apr 29 2021 Hans de Goede <hdegoede@redhat.com> - 0:2.0.3-1
- New upstream version 2.0.3
- Fix CVE-2018-1000632 (rhbz#1620535)
* Thu Apr 29 2021 Hans de Goede <hdegoede@redhat.com> - 0:2.0.0-14
- Drop the org.dom4j.datatype bits, these depend on the obsolete msv project and
no Fedora packages runtime require msv, so no package seem to need these bits.
- Drop dom4j-demo and dom4j-manual Obsoletes, these no longer exist since F27.
- Fix FTBFS (rhbz#1923601)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 24 2020 Fabio Valentini <decathorpe@gmail.com> - 0:2.0.0-11
- Add a small patch to fix build with Java 11.
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 0:2.0.0-10
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 17 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.0.0-6
- Remove dependency on bea-stax-api
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Oct 04 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0.0-3
- Explicitly specify source encoding
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Mar 29 2017 Michael Simacek <msimacek@redhat.com> - 0:2.0.0-1
- Upgrade to upstream version 2.0.0
* Wed Mar 22 2017 Michael Simacek <msimacek@redhat.com> - 0:1.6.1-30
- Drop support for ancient xpp2
* Tue Mar 7 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.1-29
- Don't hardcode package name
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6.1-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.1-27
- Fix build-dependency on jaxen
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Jun 09 2015 Michal Srb <msrb@redhat.com> - 0:1.6.1-24
- Add symlink for backward compatibility
* Mon Jun 08 2015 Michal Srb <msrb@redhat.com> - 0:1.6.1-23
- Adapt to current guidelines
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 29 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.1-21
- Use .mfiles generated during build
* Fri Dec 06 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-20
- Add ability to disable HTML handling
* Wed Oct 16 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-19
- Port to JAXP 1.4
* Wed Aug 07 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-18
- Unversioned doc dir (Resolves: #993729)
- See: http://fedoraproject.org/wiki/Changes/UnversionedDocdirs
* Fri Aug 02 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-17
- Add create-tarball.sh script to SRPM
* Thu Jul 25 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-16
- Properly remove references to ConcurrentReaderHashMap
* Tue Jul 02 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-15
- Remove file with unclear licensing (Resolves: rhbz#976180)
* Wed Jun 19 2013 Michal Srb <msrb@redhat.com> - 0:1.6.1-14
- Install license file with javadoc subpackage
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Nov 1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.1-12
- Add maven POM
* Mon Oct 29 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.1-11
- Cleanup source tarball from non-free content
- Resolves: rhbz#848875
* Fri Oct 12 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.1-10
- Disable test dependencies because tests are skipped
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Apr 6 2012 Alexander Kurtakov <akurtako@redhat.com> 0:1.6.1-8
- Simplify packaging and remove old things.
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.1-3
- drop repotag
* Wed Oct 17 2007 Deepak Bhole <dbhole@redhat.com> 1.6.1-2jpp.3
- Resaolve bz#302321: Add copyright header that was accidentally removed.
* Mon Mar 26 2007 Nuno Santos <nsantos@redhat.com> - 0:1.6.1-2jpp.2
- fix unowned directory
* Wed Feb 14 2007 Jeff Johnston <jjohnstn@redhat.com> - 0:1.6.1-2jpp.1
- Resolves: #227049
- Updated per Fedora package review process
- Modified dom4j-1.6.1-build_xml.patch to include jaxp 1.2 apis on
boot classpath
- Added new patch for javadocs
- Add buildrequires for jaxp = 1.2
* Mon Jan 30 2006 Ralph Apel <r.apel@r-apel.de> - 0:1.6.1-2jpp
- Change STAX dependency to free bea-stax and bea-stax-api
* Wed Aug 17 2005 Ralph Apel <r.apel@r-apel.de> - 0:1.6.1-1jpp
- Upgrade to 1.6.1
- Now requires xpp3 additionally to xpp2
* Thu Sep 09 2004 Ralph Apel <r.apel@r-apel.de> - 0:1.5-1jpp
- Upgrade to 1.5
- Drop saxpath requirement as this is now included in jaxen
* Fri Aug 20 2004 Ralph Apel <r.apel@r-apel.de> - 0:1.4-3jpp
- Upgrade to Ant 1.6.X
- Build with ant-1.6.2
* Tue Jul 06 2004 Ralph Apel <r.apel@r-apel.de> - 0:1.4-2jpp
- Replace non-free msv with free relaxngDatatype xsdlib isorelax msv-strict
- Relax some versioned dependencies
* Mon Jan 19 2004 Ralph Apel <r.apel@r-apel.de> - 0:1.4-1jpp
- First JPackage release

View File

@ -1,132 +0,0 @@
#!/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 "$@"

View File

@ -1,127 +0,0 @@
From ea4609eca531916ac347686c048bebdb7b4b6e0d Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 2 Jun 2017 14:37:35 +0200
Subject: [PATCH] Backport fix for CVE-2017-5645
---
.../apache/log4j/FilteredObjectInputStream.java | 65 ++++++++++++++++++++++
src/main/java/org/apache/log4j/net/SocketNode.java | 17 +++++-
2 files changed, 80 insertions(+), 2 deletions(-)
create mode 100644 src/main/java/org/apache/log4j/FilteredObjectInputStream.java
diff --git a/src/main/java/org/apache/log4j/FilteredObjectInputStream.java b/src/main/java/org/apache/log4j/FilteredObjectInputStream.java
new file mode 100644
index 0000000..b9ef20c
--- /dev/null
+++ b/src/main/java/org/apache/log4j/FilteredObjectInputStream.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.log4j;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamClass;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Extended ObjectInputStream that only allows certain classes to be deserialized.
+ *
+ * Backported from 2.8.2
+ */
+public class FilteredObjectInputStream extends ObjectInputStream {
+
+ private static final List REQUIRED_JAVA_CLASSES = Arrays.asList(new String[] {
+ // Types of non-trainsient fields of LoggingEvent
+ "java.lang.String",
+ "java.util.Hashtable",
+ // ThrowableInformation
+ "[Ljava.lang.String;"
+ });
+
+ private final Collection allowedClasses;
+
+ public FilteredObjectInputStream(final InputStream in, final Collection allowedClasses) throws IOException {
+ super(in);
+ this.allowedClasses = allowedClasses;
+ }
+
+ protected Class resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
+ String name = desc.getName();
+ if (!(isAllowedByDefault(name) || allowedClasses.contains(name))) {
+ throw new InvalidObjectException("Class is not allowed for deserialization: " + name);
+ }
+ return super.resolveClass(desc);
+ }
+
+ private static boolean isAllowedByDefault(final String name) {
+ return name.startsWith("org.apache.log4j.") ||
+ name.startsWith("[Lorg.apache.log4j.") ||
+ REQUIRED_JAVA_CLASSES.contains(name);
+ }
+
+}
diff --git a/src/main/java/org/apache/log4j/net/SocketNode.java b/src/main/java/org/apache/log4j/net/SocketNode.java
index e977f13..f95bb10 100644
--- a/src/main/java/org/apache/log4j/net/SocketNode.java
+++ b/src/main/java/org/apache/log4j/net/SocketNode.java
@@ -22,6 +22,10 @@ import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.ObjectInputStream;
import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import org.apache.log4j.FilteredObjectInputStream;
import org.apache.log4j.Logger;
import org.apache.log4j.spi.LoggerRepository;
@@ -53,8 +57,9 @@ public class SocketNode implements Runnable {
this.socket = socket;
this.hierarchy = hierarchy;
try {
- ois = new ObjectInputStream(
- new BufferedInputStream(socket.getInputStream()));
+ ois = new FilteredObjectInputStream(
+ new BufferedInputStream(socket.getInputStream()),
+ getAllowedClasses());
} catch(InterruptedIOException e) {
Thread.currentThread().interrupt();
logger.error("Could not open ObjectInputStream to "+socket, e);
@@ -65,6 +70,14 @@ public class SocketNode implements Runnable {
}
}
+ private Collection getAllowedClasses() {
+ Collection allowedClasses = new ArrayList();
+ String property = System.getProperty("org.apache.log4j.net.allowedClasses");
+ if (property != null)
+ allowedClasses.addAll(Arrays.asList(property.split(",")));
+ return allowedClasses;
+ }
+
//public
//void finalize() {
//System.err.println("-------------------------Finalize called");
--
2.9.4

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Name=Chainsaw
GenericName=Log4j Log Viewer
Exec=chainsaw
Icon=chainsaw.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Development;Monitor;X-JPackage;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,37 +0,0 @@
#!/bin/sh
#
# Chainsaw (log4j) startup script
#
# JPackage Project <http://www.jpackage.org/>
# $Id$
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Source system prefs
if [ -r /etc/chainsaw.conf ]; then
. /etc/chainsaw.conf
fi
# Source user prefs
if [ -r "$HOME/.chainsawrc" ]; then
. "$HOME/.chainsawrc"
fi
# Configuration
MAIN_CLASS=org.apache.log4j.chainsaw.Main
BASE_JARS="log4j xml-commons-apis jaxp_parser_impl"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

View File

@ -1,14 +0,0 @@
Index: build.xml
===================================================================
--- build.xml.orig 2009-12-10 12:10:48.324389951 +0100
+++ build.xml 2009-12-10 12:11:02.125266268 +0100
@@ -517,8 +517,7 @@
--&gt;'
bottom="Copyright 2000-2007 Apache Software Foundation.">
- <link href="http://java.sun.com/j2se/1.3/docs/api/"/>
- <link href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
+ <link href="${jdk.javadoc}"/>
<classpath refid="compile.classpath"/>
</javadoc>

View File

@ -1,50 +0,0 @@
Index: src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
===================================================================
--- src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java.orig 2009-12-10 12:10:48.754263787 +0100
+++ src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java 2009-12-10 12:10:53.073264414 +0100
@@ -340,7 +340,7 @@
String home = System.getProperty("user.home");
String sep = System.getProperty("file.separator");
- return home + sep + "lf5" + sep + CONFIG_FILE_NAME;
+ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME;
}
//--------------------------------------------------------------------------
Index: src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
===================================================================
--- src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java.orig 2009-12-10 12:10:48.755263943 +0100
+++ src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java 2009-12-10 12:10:53.074264009 +0100
@@ -167,14 +167,14 @@
/**
* Creates the directory where the MRU file list will be written.
- * The "lf5" directory is created in the Documents and Settings
+ * The ".logfactor5" directory is created in the Documents and Settings
* directory on Windows 2000 machines and where ever the user.home
* variable points on all other platforms.
*/
public static void createConfigurationDirectory() {
String home = System.getProperty("user.home");
String sep = System.getProperty("file.separator");
- File f = new File(home + sep + "lf5");
+ File f = new File(home + sep + ".logfactor5");
if (!f.exists()) {
try {
f.mkdir();
@@ -260,7 +260,7 @@
String home = System.getProperty("user.home");
String sep = System.getProperty("file.separator");
- return home + sep + "lf5" + sep + CONFIG_FILE_NAME;
+ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME;
}
/**
@@ -282,4 +282,4 @@
//--------------------------------------------------------------------------
// Nested Top-Level Classes or Interfaces
//--------------------------------------------------------------------------
-}
\ No newline at end of file
+}

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Name=LogFactor5
Comment=Graphical user interface for managing log4j log messages
Exec=logfactor5
Icon=logfactor5.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Application;Development;Monitor;X-JPackage;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 856 B

View File

@ -1,27 +0,0 @@
#!/bin/sh
#
# LogFactor5 (log4j) startup script
#
# JPackage Project <http://www.jpackage.org/>
# $Id: jd.xslt.jd.xslt.script,v 1.1 2002/07/25 11:35:28 scop Exp $
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Configuration
MAIN_CLASS=org.apache.log4j.lf5.StartLogFactor5
BASE_JARS="log4j xml-commons-apis jaxp_parser_impl"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

View File

@ -1,13 +0,0 @@
Index: build.xml
===================================================================
--- build.xml.orig
+++ build.xml
@@ -167,7 +167,7 @@
<and>
<available classname="javax.management.MBeanInfo"
classpath="${jmx.jar}"/>
- <available classname="com.sun.jdmk.comm.HtmlAdaptorServer">
+ <available classname="mx4j.tools.adaptor.AdaptorServerSocketFactory">
<classpath>
<pathelement location="${jmx.jar}"/>
<pathelement location="${javaee-api.jar}"/>

View File

@ -1,18 +0,0 @@
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date: 2018-01-10
Drop javadoc timestamp
to make package build more reproducible
Index: apache-log4j-1.2.17/build.xml
===================================================================
--- apache-log4j-1.2.17.orig/build.xml
+++ apache-log4j-1.2.17/build.xml
@@ -516,6 +516,7 @@
limitations under the License.
--&gt;'
bottom="Copyright 2000-2007 Apache Software Foundation.">
+ <arg value="-notimestamp" />
<link href="${jdk.javadoc}"/>
<classpath refid="compile.classpath"/>

View File

@ -1,4 +0,0 @@
-- log4j DTD catalog --
-- JPackage Project <http://www.jpackage.org/> --
DOCTYPE log4j:configuration log4j.dtd

View File

@ -1,21 +0,0 @@
diff -urEbwB apache-log4j-1.2.17/build.xml apache-log4j-1.2.17.new/build.xml
--- apache-log4j-1.2.17/build.xml 2012-05-06 13:00:28.000000000 +0200
+++ apache-log4j-1.2.17.new/build.xml 2020-03-20 13:54:30.581916159 +0100
@@ -433,6 +433,17 @@
${stem}/config/*.class"
excludes="**/UnitTest**">
<manifest>
+ <attribute name="Bundle-Description" value="Apache Log4j 1.2"/>
+ <attribute name="Bundle-DocURL" value="http://logging.apache.org/log4j/1.2"/>
+ <attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
+ <attribute name="Bundle-ManifestVersion" value="2"/>
+ <attribute name="Bundle-Name" value="Apache Log4j"/>
+ <attribute name="Bundle-SymbolicName" value="org.apache.log4j"/>
+ <attribute name="Bundle-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Bundle-Version" value="${version}"/>
+ <attribute name="Export-Package" value="org.apache.log4j;version=&quot;${version}&quot;,org.apache.log4j.config;version=&quot;${version}&quot;,org.apache.log4j.helpers;version=&quot;${version}&quot;,org.apache.log4j.jdbc;version=&quot;${version}&quot;,org.apache.log4j.jmx;version=&quot;${version}&quot;,org.apache.log4j.net;version=&quot;${version}&quot;,org.apache.log4j.or;version=&quot;${version}&quot;,org.apache.log4j.or.jms;version=&quot;${version}&quot;,org.apache.log4j.or.sax;version=&quot;${version}&quot;,org.apache.log4j.pattern;version=&quot;${version}&quot;,org.apache.log4j.rewrite;version=&quot;${version}&quot;,org.apache.log4j.spi;version=&quot;${version}&quot;,org.apache.log4j.varia;version=&quot;${version}&quot;,org.apache.log4j.xml;version=&quot;${version}&quot;"/>
+ <attribute name="Import-Package" value="javax.jms;resolution:=optional,javax.mail;resolution:=optional,javax.mail.internet;resolution:=optional,javax.management,javax.naming,javax.xml.parsers,org.w3c.dom,org.xml.sax,org.xml.sax.helpers"/>
+ <attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=1.6))&quot;"/>
<section name="org/apache/log4j">
<attribute name="Implementation-Title" value="log4j"/>
<attribute name="Implementation-Version" value="${version}"/>

View File

@ -1,12 +0,0 @@
{
"Signatures": {
"log4j-1.2.17.tar.gz": "a528e3771ee6234661b5eb0fa02e14faee89dfec38de94088c163ddf2a0a8663",
"log4j-chainsaw.desktop": "44b1dde33c2217a3ccf4be0649d3d4feeba3e0255714b4688b5e6dc746dade9b",
"log4j-chainsaw.png": "c5e0a6768847fbde583d9d34a3ad378b79aa4ee11969e4dec5e500708186a878",
"log4j-chainsaw.sh": "16cfe8ba623f187af5a4d8ac742e58d4e5ddf3f42b6cca0861a02efcacd7f39c",
"log4j-logfactor5.desktop": "51e075141c0c2aa3750bdcc4ec3c06869d70b670e377ddc688502434cf8d1d35",
"log4j-logfactor5.png": "53ff5c48822434cb626ef6dcd8e78776978157275945b957fc54d5f410647f36",
"log4j-logfactor5.sh": "481fba488062f649b5cdbafeb7de4a6a0e595e793cfe70cf44ea0435dbd71ac3",
"log4j.catalog": "dcbc15ab7a0e47fb72171f6847065bbfebaadd289266590ece9f9c7907030723"
}
}

View File

@ -1,346 +0,0 @@
Vendor: Microsoft Corporation
Distribution: Mariner
#
# spec file for package log4j12
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%global flavor bootstrap
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%else
%bcond_with bootstrap
%endif
%define real log4j12
Version: 1.2.17
Release: 4%{?dist}
Summary: Java logging tool
License: Apache-2.0
URL: https://logging.apache.org/log4j/
Source0: http://www.apache.org/dist/logging/log4j/%{version}/log4j-%{version}.tar.gz
# Converted from src/java/org/apache/log4j/lf5/viewer/images/lf5_small_icon.gif
Source1: log4j-logfactor5.png
Source2: log4j-logfactor5.sh
Source3: log4j-logfactor5.desktop
# Converted from docs/images/logo.jpg
Source4: log4j-chainsaw.png
Source5: log4j-chainsaw.sh
Source6: log4j-chainsaw.desktop
Source7: log4j.catalog
Patch0: log4j-logfactor5-userdir.patch
Patch1: log4j-javadoc-xlink.patch
Patch2: log4j-mx4j-tools.patch
# PATCH-FIX-OPENSUSE -- Drop javadoc timestamp
Patch3: log4j-reproducible.patch
# PATCH-FIX-UPSTREAM bsc#1159646 CVE-2019-17571 deserialization of untrusted data in SocketServer
Patch4: log4j-CVE-2019-17571.patch
# PATCH-FIX-OPENSUSE -- add bundle manifest
Patch5: log4j12-bundle_manifest.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local-bootstrap
BuildRequires: openjdk8
BuildRequires: perl
Requires: javapackages-tools
Requires: jaxp_parser_impl
Requires: xml-apis
Requires(pre): coreutils
Obsoletes: log4j < 1.3
Obsoletes: log4j-mini < 1.3
BuildArch: noarch
%if %{with bootstrap}
Name: %{real}-mini
Provides: %{real} = %{version}-%{release}
%else
Name: %{real}
BuildRequires: geronimo-jaf-1_0_2-api
BuildRequires: geronimo-jms-1_1-api
BuildRequires: javamail
BuildRequires: mx4j
#!BuildIgnore: apache-commons-discovery
#!BuildIgnore: apache-commons-logging
#!BuildIgnore: axis
Provides: %{real}-mini
Obsoletes: %{real}-mini
#!BuildRequires: %{real}-mini
%endif
%description
Log4j is a tool to help the programmer output log statements to a
variety of output targets.
%if %{without bootstrap}
%package manual
Summary: Java logging tool (Manual)
# Manual's api directory is a symlink to javadoc
Requires: %{name}-javadoc
%description manual
Documentation manual for Java logging tool log4j.
%package javadoc
Summary: Java logging tool (Documentation)
%description javadoc
Documentation javadoc for Java logging tool log4j.
%endif
%prep
%setup -q -n apache-log4j-%{version}
%patch0
%patch1
%patch2
%patch3 -p1
%patch4 -p1
%if %{without bootstrap}
%patch5 -p1
%endif
sed -i 's/\r//g' LICENSE NOTICE src/site/resources/css/*.css
# remove all the stuff we'll build ourselves
find . \( -name "*.jar" -o -name "*.class" \) -exec rm -f {} \;
rm -rf docs/api
# fix encoding of mailbox files
for i in contribs/JimMoore/mail*;do
iconv --from=ISO-8859-1 --to=UTF-8 "$i" > new
mv new "$i"
done
%build
%{ant} \
-Djavamail.jar=$(build-classpath javamail/mailapi) \
-Dactivation.jar=$(build-classpath jaf) \
-Djaxp.jaxp.jar.jar=$(build-classpath jaxp_parser_impl) \
-Djms.jar=$(build-classpath jms) \
-Djmx.jar=$(build-classpath mx4j/mx4j) \
-Djmx-extra.jar=$(build-classpath mx4j/mx4j-tools) \
-Djndi.jar=$(build-classpath jndi) \
-Djavac.source=1.6 -Djavac.target=1.6 \
-Djdk.javadoc=%{_javadocdir}/java \
jar \
%if %{without bootstrap}
javadoc
%endif
%install
# jars
mkdir -p %{buildroot}%{_javadir}/%{real}
cp -a dist/lib/log4j-%{version}.jar %{buildroot}%{_javadir}/%{real}/log4j.jar
#pom
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{real}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{real}/log4j.pom
%add_maven_depmap %{real}/log4j.pom %{real}/log4j.jar -v "1.2.17,1.2.16,1.2.15,1.2.14,1.2.13,1.2.12,12"
%if %{without bootstrap}
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -a docs/api/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
rm -rf docs/api
ln -s %{_javadocdir}/%{name} docs/api
%endif
# scripts
mkdir -p %{buildroot}%{_bindir}
install -p -m 755 %{SOURCE2} %{buildroot}%{_bindir}/logfactor5
install -p -m 755 %{SOURCE5} %{buildroot}%{_bindir}/chainsaw
# freedesktop.org menu entries and icons
mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps}
cp -a %{SOURCE1} \
%{buildroot}%{_datadir}/pixmaps/logfactor5.png
cp -a %{SOURCE3} \
%{buildroot}%{_datadir}/applications/jpackage-logfactor5.desktop
cp -a %{SOURCE4} \
%{buildroot}%{_datadir}/pixmaps/chainsaw.png
cp -a %{SOURCE6} \
%{buildroot}%{_datadir}/applications/jpackage-chainsaw.desktop
# DTD and the SGML catalog (XML catalog handled in scriptlets)
mkdir -p %{buildroot}%{_datadir}/sgml/%{name}
cp -a src/main/resources/org/apache/log4j/xml/log4j.dtd \
%{buildroot}%{_datadir}/sgml/%{name}
cp -a %{SOURCE7} \
%{buildroot}%{_datadir}/sgml/%{name}/catalog
# fix perl location
perl -p -i -e 's|/opt/perl5/bin/perl|perl|' \
contribs/KitchingSimon/udpserver.pl
%post
# Note that we're using versioned catalog, so this is always ok.
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
%{_bindir}/install-catalog --add \
%{_sysconfdir}/sgml/%{name}-%{version}-%{release}.cat \
%{_datadir}/sgml/%{name}/catalog > /dev/null || :
fi
if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then
%{_bindir}/xmlcatalog --noout --add system log4j.dtd \
file://%{_datadir}/sgml/%{name}/log4j.dtd %{_sysconfdir}/xml/catalog \
> /dev/null || :
fi
%preun
if [ $1 -eq 0 ]; then
if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then
%{_bindir}/xmlcatalog --noout --del log4j.dtd \
%{_sysconfdir}/xml/catalog > /dev/null || :
fi
fi
%postun
# Note that we're using versioned catalog, so this is always ok.
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
%{_bindir}/install-catalog --remove \
%{_sysconfdir}/sgml/%{name}-%{version}-%{release}.cat \
%{_datadir}/sgml/%{name}/catalog > /dev/null || :
fi
%files -f .mfiles
%license LICENSE
%doc NOTICE
%{_bindir}/*
%{_javadir}/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/sgml/%{name}
%if %{without bootstrap}
%files manual
%doc docs/* contribs
%files javadoc
%dir %{_javadocdir}/%{name}
%{_javadocdir}/%{name}/*
%endif
%changelog
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.2.17-4
- Converting the 'Release' tag to the '[number].[distribution]' format.
* Fri Nov 13 2020 Ruying Chen <v-ruyche@microsoft.com> - 1.2.17-3.5
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Use javapackages-local-bootstrap to avoid build cycle.
- Switch to bootstrap to avoid build cycle.
- Fix linebreak in sed command.
- Remove distro specific update-desktop-files.
- Change distro specific jndi to equivalent openjdk8.
* Fri Mar 20 2020 Fridrich Strba <fstrba@suse.com>
- Added patch:
* log4j12-bundle_manifest.patch
+ Add a bundle manifest to the log4j12 package so that it can
be used by eclipse
* Tue Jan 7 2020 Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Security fix: [bsc#1159646, CVE-2019-17571]
* Remote code execution: Deserialization of untrusted data in SocketServer
* Backported from CVE-2017-5645 for Log4j 2.8.2
- Add log4j-CVE-2019-17571.patch
* Tue Jan 7 2020 Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Remove script jpackage-mini-prepare.sh
* Mon Jan 6 2020 Fridrich Strba <fstrba@suse.com>
- Let both the log4j12 and log4j12-mini packages obsolete the log4j
and log4j-mini < 1.3 in order to simplify upgrades
* Tue Oct 1 2019 Fridrich Strba <fstrba@suse.com>
- Rename to log4j12/log4j12-mini as a compatibility packages
- Convert to multibuild
- Clean up with the spec-cleaner
- Install maven pom files even with the mini package
* Tue Jan 22 2019 Fridrich Strba <fstrba@suse.com>
- Build against a generic javamail provider instead of against
classpathx-mail
* Tue Jan 15 2019 Fridrich Strba <fstrba@suse.com>
- Let log4j provide the log4j-mini and obsolete it too.
- Remove conflicts on each other
* Thu Dec 13 2018 Fridrich Strba <fstrba@suse.com>
- Depend on the generic xml-apis
* Thu Oct 18 2018 Fridrich Strba <fstrba@suse.com>
- Install and package the maven pom and metadata files for the
non-bootstrap log4j
* Wed Jul 25 2018 fstrba@suse.com
- Require at least java 8 for build
* Wed Jan 10 2018 bwiedemann@suse.com
- Add log4j-reproducible.patch to drop javadoc timestamps to make
package builds more reproducible (boo#1047218)
* Tue Sep 12 2017 fstrba@suse.com
- Specify java source and target level 1.6 to allow building with
jdk9
* Mon Mar 2 2015 tchvatal@suse.com
- Version bump to 1.2.17 latest 1.2 series:
* No short changelog provided - many small changes
- Try to avoid cycle between log4j and apache-common-loggings
- Remove obsoleted patch:
* log4j-jmx-Agent.patch
- Refresh patch to apply to new source:
* log4j-mx4j-tools.patch
* Mon Mar 2 2015 tchvatal@suse.com
- Cleanup with a spec-cleaner so I can understand what
is going around here.
* Thu Sep 12 2013 mvyskocil@suse.com
- log4j and log4j-mini are in conflict
* Mon Sep 9 2013 tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
* Tue Jul 16 2013 mls@suse.de
- get rid of wrong dir modifier in filelist
* Thu Dec 10 2009 mvyskocil@suse.cz
- refreshed patches
* log4j-javadoc-xlink.patch
* log4j-jmx-Agent.patch
* log4j-logfactor5-userdir.patch
* log4j-mx4j-tools.patch
* Wed Jul 16 2008 coolo@suse.de
- even more packages to build ignore
* Fri Jun 27 2008 coolo@suse.de
- avoid build cycle between axis and log4j
* Tue May 6 2008 mvyskocil@suse.cz
- removed a dots in a names of geronimo-* packages
* Tue Apr 8 2008 mvyskocil@suse.cz
- updated to 1.2.5 [bnc#355798]
- merged a spec with jpackage 1.7
- the ant arguments was splitted to several lines
- new BuildRequires:
- classpathx-javamail
- geronimo-jaf
- geronimo-jms
- a new patches to break of a dependendy on Sun's HtmlAdaptorServer
(replaced by HttpAdaptor from mx4j package)
- added a gjc build branch
- created an autogenerated -mini specfile used for bootstrap (hint from sbrabec@suse.cz)
- added an explicit provides of log4j symbol for log4j-mini (automatically by script)
- replaced a name `macro' by `real', because the -mini package has a different name
- disable the javadoc and manual subpackages for -mini build
* Thu Jun 7 2007 sbrabec@suse.cz
- Removed invalid desktop Category "Application" (#254654).
* Fri May 18 2007 dbornkessel@suse.de
- removed mx4j BuildReq to avoid build cycle ... apparently it was not used at compile time
* Tue May 8 2007 dbornkessel@suse.de
- use mx4j instead of jmx
* Wed Feb 15 2006 stbinner@suse.de
- add GenericName to .desktop files
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 8 2005 jsmeix@suse.de
- Current version 1.2.12 from JPackage.org
* Wed Sep 28 2005 dmueller@suse.de
- add norootforbuild
* Thu Nov 25 2004 ro@suse.de
- added suse_update_desktop_file
* Thu Sep 23 2004 mskibbe@suse.de
- change specfile(suse_update_desktop_file)
* Thu Sep 16 2004 skh@suse.de
- Fix prerequires for javadoc subpackage.
* Thu Sep 2 2004 skh@suse.de
- Initial package created with version 1.2.8 (JPackage 1.5)

View File

@ -22,10 +22,10 @@ Distribution: Mariner
%global base_name slf4j
Name: %{base_name}-sources
Version: 1.7.30
Release: 3%{?dist}
Release: 4%{?dist}
Summary: SLF4J Source JARs
# the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT
License: MIT AND Apache-2.0
License: ASL 2.0 and MIT
Group: Development/Libraries/Java
URL: https://www.slf4j.org/
Source0: https://github.com/qos-ch/%{base_name}/archive/v_%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -46,10 +46,11 @@ cp -p %{SOURCE1} APACHE-LICENSE
# Compat symlinks
%{mvn_file} ':{*}' %{base_name}/@1
%{mvn_package} :::sources:
%pom_disable_module slf4j-log4j12
%build
rm -f */src/main/resources/META-INF/MANIFEST.MF
for i in api ext jcl jdk14 log4j12 nop simple; do
for i in api ext jcl jdk14 nop simple; do
mkdir -p %{base_name}-${i}/target
jar cf %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar -C %{base_name}-${i}/src/main/java .
jar uf %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar -C %{base_name}-${i}/src/main/resources .
@ -64,7 +65,7 @@ done
%install
install -dm 0755 %{buildroot}%{_javadir}/%{base_name}
for i in api ext jcl jdk14 log4j12 nop simple; do
for i in api ext jcl jdk14 nop simple; do
install -pm 0644 %{base_name}-${i}/target/%{base_name}-${i}-%{version}-sources.jar \
%{buildroot}%{_javadir}/%{base_name}/%{base_name}-${i}-sources.jar
%add_maven_depmap org.slf4j:%{base_name}-${i}:jar:sources:%{version} %{base_name}/%{base_name}-${i}-sources.jar
@ -79,6 +80,10 @@ done
%license LICENSE.txt APACHE-LICENSE
%changelog
* Tue Jan 25 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7.30-4
- Removing dependency on "log4j12".
- License verified.
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7.30-3
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Converting the 'Release' tag to the '[number].[distribution]' format.

View File

@ -21,10 +21,9 @@ Distribution: Mariner
Name: slf4j
Version: 1.7.30
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Simple Logging Facade for Java
# the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT
License: MIT AND Apache-2.0
License: MIT
Group: Development/Libraries/Java
URL: https://www.slf4j.org/
Source0: https://github.com/qos-ch/%{name}/archive/v_%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -42,7 +41,6 @@ BuildRequires: javapackages-local-bootstrap
BuildRequires: javapackages-tools
BuildRequires: javassist >= 3.4
BuildRequires: junit >= 3.8.2
BuildRequires: log4j12-mini
Requires: cal10n
Requires: java
# this is ugly hack, which creates package which requires the same,
@ -84,14 +82,6 @@ Requires: mvn(org.slf4j:slf4j-api) = %{version}
%description jdk14
SLF4J JDK14 Binding.
%package log4j12
Summary: SLF4J LOG4J-12 Binding
Group: Development/Libraries/Java
Requires: mvn(org.slf4j:slf4j-api) = %{version}
%description log4j12
SLF4J LOG4J-12 Binding.
%package jcl
Summary: SLF4J JCL Binding
Group: Development/Libraries/Java
@ -111,6 +101,7 @@ Extensions to the SLF4J API.
%package -n jcl-over-slf4j
Summary: JCL 1.1.1 implemented over SLF4J
License: ASL 2.0
Group: Development/Libraries/Java
Requires: mvn(org.slf4j:slf4j-api) = %{version}
@ -119,6 +110,7 @@ JCL 1.1.1 implemented over SLF4J.
%package -n log4j-over-slf4j
Summary: Log4j implemented over SLF4J
License: ASL 2.0
Group: Development/Libraries/Java
Requires: mvn(org.slf4j:slf4j-api) = %{version}
@ -165,9 +157,10 @@ done
sed -i "/Import-Package/s/$/;resolution:=optional/" slf4j-api/src/main/resources/META-INF/MANIFEST.MF
%pom_change_dep -r -f ::::: :::::
%pom_disable_module slf4j-log4j12
%build
export CLASSPATH=$(build-classpath log4j12/log4j-12 \
export CLASSPATH=$(build-classpath \
commons-logging \
commons-lang3 \
javassist-3.14.0 \
@ -182,7 +175,7 @@ ant -Dmaven2.jpp.mode=true \
%install
# jars
install -d -m 0755 %{buildroot}%{_javadir}/%{name}
for i in api ext jcl jdk14 log4j12 nop simple; do
for i in api ext jcl jdk14 nop simple; do
install -m 644 slf4j-${i}/target/slf4j-${i}-%{version}.jar \
%{buildroot}%{_javadir}/%{name}/${i}.jar
ln -sf ${i}.jar %{buildroot}%{_javadir}/%{name}/%{name}-${i}.jar
@ -193,7 +186,7 @@ done
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
for i in api ext jcl jdk14 log4j12 nop simple; do
for i in api ext jcl jdk14 nop simple; do
%pom_remove_parent slf4j-${i}
%pom_xpath_inject "pom:project" "
<groupId>org.slf4j</groupId>
@ -210,7 +203,7 @@ done
for i in api nop simple; do
%add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar
done
for i in ext jcl jdk14 log4j12 jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do
for i in ext jcl jdk14 jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do
%add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar -f ${i}
done
@ -235,9 +228,6 @@ rm -rf target/site
%files jdk14 -f .mfiles-jdk14
%{_javadir}/%{name}/%{name}-jdk14.jar
%files log4j12 -f .mfiles-log4j12
%{_javadir}/%{name}/%{name}-log4j12.jar
%files jcl -f .mfiles-jcl
%{_javadir}/%{name}/%{name}-jcl.jar
@ -257,6 +247,10 @@ rm -rf target/site
%{_docdir}/%{name}-%{version}/site
%changelog
* Mon Jan 24 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7.30-4
- Removing dependency on "log4j12".
- License verified.
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7.30-3
- Converting the 'Release' tag to the '[number].[distribution]' format.

View File

@ -0,0 +1,464 @@
From bf0462e3c293863947dde1c22a62c3d4a187a70c Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 31 Oct 2019 14:35:40 +0100
Subject: [PATCH 1/2] Port to apache-commons-lang3
---
pom.xml | 6 +++---
.../velocity/app/event/implement/EscapeHtmlReference.java | 4 ++--
.../app/event/implement/EscapeJavaScriptReference.java | 4 ++--
.../velocity/app/event/implement/EscapeSqlReference.java | 5 +++--
.../velocity/app/event/implement/EscapeXmlReference.java | 2 +-
src/java/org/apache/velocity/runtime/RuntimeInstance.java | 2 +-
.../org/apache/velocity/runtime/VelocimacroFactory.java | 2 +-
src/java/org/apache/velocity/runtime/directive/Block.java | 2 +-
.../org/apache/velocity/runtime/directive/RuntimeMacro.java | 2 +-
src/java/org/apache/velocity/runtime/parser/Parser.java | 2 +-
.../apache/velocity/runtime/parser/ParserTokenManager.java | 2 +-
.../apache/velocity/runtime/parser/node/ASTDirective.java | 2 +-
.../org/apache/velocity/runtime/parser/node/ASTMethod.java | 4 ++--
.../velocity/runtime/parser/node/ASTStringLiteral.java | 2 +-
.../org/apache/velocity/runtime/parser/node/NodeUtils.java | 2 +-
.../velocity/runtime/parser/node/PropertyExecutor.java | 2 +-
.../velocity/runtime/parser/node/SetPropertyExecutor.java | 4 ++--
.../org/apache/velocity/runtime/parser/node/SimpleNode.java | 4 ++--
.../velocity/runtime/resource/ResourceManagerImpl.java | 4 ++--
.../runtime/resource/loader/ClasspathResourceLoader.java | 2 +-
.../runtime/resource/loader/DataSourceResourceLoader.java | 2 +-
.../runtime/resource/loader/FileResourceLoader.java | 2 +-
.../velocity/runtime/resource/loader/JarResourceLoader.java | 2 +-
.../runtime/resource/loader/StringResourceLoader.java | 2 +-
.../velocity/runtime/resource/loader/URLResourceLoader.java | 2 +-
.../org/apache/velocity/util/introspection/ClassMap.java | 2 +-
.../org/apache/velocity/io/UnicodeInputStreamTestCase.java | 2 +-
src/test/org/apache/velocity/test/BaseTestCase.java | 2 +-
.../org/apache/velocity/test/MethodCacheKeyTestCase.java | 2 +-
29 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/pom.xml b/pom.xml
index 77a8e383..eee15b34 100644
--- a/pom.xml
+++ b/pom.xml
@@ -148,9 +148,9 @@
<version>3.2.1</version>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.4</version>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.9</version>
</dependency>
<dependency>
<groupId>oro</groupId>
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java
index 6d98b45c..e1469957 100644
--- a/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
* under the License.
*/
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
/**
* Escape all HTML entities.
@@ -39,7 +39,7 @@ public class EscapeHtmlReference extends EscapeReference
*/
protected String escape(Object text)
{
- return StringEscapeUtils.escapeHtml(text.toString());
+ return StringEscapeUtils.escapeHtml4(text.toString());
}
/**
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java
index ea49ddbf..12f38f47 100644
--- a/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
* under the License.
*/
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
/**
* Escapes the characters in a String to be suitable for use in JavaScript.
@@ -39,7 +39,7 @@ public class EscapeJavaScriptReference extends EscapeReference
*/
protected String escape(Object text)
{
- return StringEscapeUtils.escapeJavaScript(text.toString());
+ return StringEscapeUtils.escapeEcmaScript(text.toString());
}
/**
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
index 585cb6c6..39e04f43 100644
--- a/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
* under the License.
*/
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
/**
* Escapes the characters in a String to be suitable to pass to an SQL query.
@@ -39,7 +39,8 @@ public class EscapeSqlReference extends EscapeReference
*/
protected String escape(Object text)
{
- return StringEscapeUtils.escapeSql(text.toString());
+ // See https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html#escapeSql(java.lang.String)
+ return StringUtils.replace(text.toString(), "'", "''");
}
/**
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java
index 3d5b40f0..fbb525cb 100644
--- a/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
* under the License.
*/
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
/**
* Escape all XML entities.
diff --git a/src/java/org/apache/velocity/runtime/RuntimeInstance.java b/src/java/org/apache/velocity/runtime/RuntimeInstance.java
index 670c083d..f877114d 100644
--- a/src/java/org/apache/velocity/runtime/RuntimeInstance.java
+++ b/src/java/org/apache/velocity/runtime/RuntimeInstance.java
@@ -32,7 +32,7 @@ import java.util.Map;
import java.util.Properties;
import org.apache.commons.collections.ExtendedProperties;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.Template;
import org.apache.velocity.app.event.EventCartridge;
import org.apache.velocity.app.event.EventHandler;
diff --git a/src/java/org/apache/velocity/runtime/VelocimacroFactory.java b/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
index 8756b66f..70e3d489 100644
--- a/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
+++ b/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
@@ -26,7 +26,7 @@ import java.util.Map;
import java.util.Vector;
import java.util.ArrayList;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.Template;
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.directive.Directive;
diff --git a/src/java/org/apache/velocity/runtime/directive/Block.java b/src/java/org/apache/velocity/runtime/directive/Block.java
index f5fdfa85..b136543d 100755
--- a/src/java/org/apache/velocity/runtime/directive/Block.java
+++ b/src/java/org/apache/velocity/runtime/directive/Block.java
@@ -23,7 +23,7 @@ import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.TemplateInitException;
import org.apache.velocity.runtime.Renderable;
diff --git a/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java b/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
index 090b5522..d22ac4ed 100644
--- a/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
+++ b/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
@@ -23,7 +23,7 @@ import java.io.IOException;
import java.io.Writer;
import java.util.List;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
diff --git a/src/java/org/apache/velocity/runtime/parser/Parser.java b/src/java/org/apache/velocity/runtime/parser/Parser.java
index 1253381f..b8e7112e 100644
--- a/src/java/org/apache/velocity/runtime/parser/Parser.java
+++ b/src/java/org/apache/velocity/runtime/parser/Parser.java
@@ -10,7 +10,7 @@ import org.apache.velocity.runtime.directive.Directive;
import org.apache.velocity.runtime.directive.Macro;
import org.apache.velocity.runtime.directive.MacroParseException;
import org.apache.velocity.util.StringUtils;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.runtime.RuntimeConstants;
/**
diff --git a/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java b/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
index ce00d99d..9563a1fb 100644
--- a/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
+++ b/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
@@ -9,7 +9,7 @@ import org.apache.velocity.runtime.directive.Directive;
import org.apache.velocity.runtime.directive.Macro;
import org.apache.velocity.runtime.directive.MacroParseException;
import org.apache.velocity.util.StringUtils;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.runtime.RuntimeConstants;
/** Token Manager. */
diff --git a/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java b/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
index 74727729..8fc59737 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
@@ -22,7 +22,7 @@ package org.apache.velocity.runtime.parser.node;
import java.io.IOException;
import java.io.Writer;
-import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
diff --git a/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java b/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
index 489429bb..df54dd93 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
@@ -21,8 +21,8 @@ package org.apache.velocity.runtime.parser.node;
import java.lang.reflect.InvocationTargetException;
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.app.event.EventHandlerUtil;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.MethodInvocationException;
diff --git a/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java b/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
index 2267993c..82cca27a 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
@@ -21,7 +21,7 @@ import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.TemplateInitException;
import org.apache.velocity.exception.VelocityException;
diff --git a/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java b/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
index 713a86ae..0ac03fbc 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
@@ -19,7 +19,7 @@ package org.apache.velocity.runtime.parser.node;
* under the License.
*/
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.context.Context;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.runtime.parser.ParserConstants;
diff --git a/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java b/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java
index 8c78228e..20d6c185 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java
@@ -21,7 +21,7 @@ package org.apache.velocity.runtime.parser.node;
import java.lang.reflect.InvocationTargetException;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.RuntimeLogger;
import org.apache.velocity.runtime.log.Log;
diff --git a/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java b/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java
index 0078d023..80887fad 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java
@@ -21,8 +21,8 @@ package org.apache.velocity.runtime.parser.node;
import java.lang.reflect.InvocationTargetException;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.log.Log;
import org.apache.velocity.util.introspection.Introspector;
diff --git a/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java b/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
index 108846f8..6372830f 100644
--- a/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
+++ b/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
@@ -22,8 +22,8 @@ package org.apache.velocity.runtime.parser.node;
import java.io.IOException;
import java.io.Writer;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
diff --git a/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java b/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
index 778b42a9..a396e42f 100644
--- a/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
+++ b/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
@@ -158,7 +158,7 @@ public class ResourceManagerImpl
Object cacheObject = null;
- if (org.apache.commons.lang.StringUtils.isNotEmpty(cacheClassName))
+ if (org.apache.commons.lang3.StringUtils.isNotEmpty(cacheClassName))
{
try
{
@@ -534,7 +534,7 @@ public class ResourceManagerImpl
* this strikes me as bad...
*/
- if (!org.apache.commons.lang.StringUtils.equals(resource.getEncoding(), encoding))
+ if (!org.apache.commons.lang3.StringUtils.equals(resource.getEncoding(), encoding))
{
log.warn("Declared encoding for template '" +
resource.getName() +
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
index 52d09a98..bf48aa45 100644
--- a/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
+++ b/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
@@ -22,7 +22,7 @@ package org.apache.velocity.runtime.resource.loader;
import java.io.InputStream;
import org.apache.commons.collections.ExtendedProperties;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.resource.Resource;
import org.apache.velocity.util.ClassUtils;
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
index f85b6d62..38ec30dc 100644
--- a/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
+++ b/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
@@ -218,7 +218,7 @@ public class DataSourceResourceLoader extends ResourceLoader
public synchronized InputStream getResourceStream(final String name)
throws ResourceNotFoundException
{
- if (org.apache.commons.lang.StringUtils.isEmpty(name))
+ if (org.apache.commons.lang3.StringUtils.isEmpty(name))
{
throw new ResourceNotFoundException("DataSourceResourceLoader: Template name was empty or null");
}
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
index 923274a7..8580caeb 100644
--- a/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
+++ b/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
@@ -118,7 +118,7 @@ public class FileResourceLoader extends ResourceLoader
/*
* Make sure we have a valid templateName.
*/
- if (org.apache.commons.lang.StringUtils.isEmpty(templateName))
+ if (org.apache.commons.lang3.StringUtils.isEmpty(templateName))
{
/*
* If we don't get a properly formed templateName then
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
index 054d890e..71d6c083 100644
--- a/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
+++ b/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
@@ -195,7 +195,7 @@ public class JarResourceLoader extends ResourceLoader
{
InputStream results = null;
- if (org.apache.commons.lang.StringUtils.isEmpty(source))
+ if (org.apache.commons.lang3.StringUtils.isEmpty(source))
{
throw new ResourceNotFoundException("Need to have a resource!");
}
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
index 245c10b8..86a08b9d 100644
--- a/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
+++ b/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
@@ -26,7 +26,7 @@ import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import org.apache.commons.collections.ExtendedProperties;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.resource.Resource;
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
index de066367..74ab86a6 100644
--- a/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
+++ b/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
@@ -26,7 +26,7 @@ import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
import org.apache.commons.collections.ExtendedProperties;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.resource.Resource;
diff --git a/src/java/org/apache/velocity/util/introspection/ClassMap.java b/src/java/org/apache/velocity/util/introspection/ClassMap.java
index 00512892..2e128b7e 100644
--- a/src/java/org/apache/velocity/util/introspection/ClassMap.java
+++ b/src/java/org/apache/velocity/util/introspection/ClassMap.java
@@ -23,7 +23,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.lang.text.StrBuilder;
+import org.apache.commons.lang3.text.StrBuilder;
import org.apache.velocity.runtime.log.Log;
import org.apache.velocity.util.MapFactory;
diff --git a/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java b/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java
index 02499985..4b0b254f 100644
--- a/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java
+++ b/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java
@@ -27,7 +27,7 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang3.ArrayUtils;
/**
diff --git a/src/test/org/apache/velocity/test/BaseTestCase.java b/src/test/org/apache/velocity/test/BaseTestCase.java
index 0ea00cbd..798a322b 100644
--- a/src/test/org/apache/velocity/test/BaseTestCase.java
+++ b/src/test/org/apache/velocity/test/BaseTestCase.java
@@ -353,7 +353,7 @@ public abstract class BaseTestCase extends TestCase implements TemplateTestBase
buf.append(baseFile.getPath());
}
- if (org.apache.commons.lang.StringUtils.isNotEmpty(ext))
+ if (org.apache.commons.lang3.StringUtils.isNotEmpty(ext))
{
buf.append('.').append(ext);
}
diff --git a/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java b/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java
index 77dfc54e..4befc6ef 100644
--- a/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java
+++ b/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java
@@ -21,7 +21,7 @@ package org.apache.velocity.test;
import junit.framework.TestCase;
-import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.velocity.runtime.parser.node.ASTMethod;
/**
--
2.25.4

View File

@ -0,0 +1,25 @@
From b2eee6ccc6ef24e084567a0a38d21fa3765df6ad Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 15 May 2020 09:56:26 +0200
Subject: [PATCH 2/2] Force use of JDK log chute
---
.../org/apache/velocity/runtime/defaults/velocity.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/java/org/apache/velocity/runtime/defaults/velocity.properties b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
index 750a59af..855118b9 100644
--- a/src/java/org/apache/velocity/runtime/defaults/velocity.properties
+++ b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
@@ -23,7 +23,7 @@
# default LogChute to use: default: AvalonLogChute, Log4JLogChute, CommonsLogLogChute, ServletLogChute, JdkLogChute
# ----------------------------------------------------------------------------
-runtime.log.logsystem.class = org.apache.velocity.runtime.log.AvalonLogChute,org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute
+runtime.log.logsystem.class = org.apache.velocity.runtime.log.JdkLogChute
# ---------------------------------------------------------------------------
# This is the location of the Velocity Runtime log.
--
2.25.4

View File

@ -0,0 +1,77 @@
From 3be84770e7fbe6f000f0c002905e86fe1412d551 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 11 Mar 2021 16:22:50 +0100
Subject: [PATCH] CVE-2020-13936
From upstream patches:
https://github.com/apache/velocity-engine/commit/1ba60771d23dae7e6b3138ae6bee09cf6f9d2485
https://github.com/apache/velocity-engine/commit/15909056fe51f5d39d49e101d706d3075876dde4
https://github.com/apache/velocity-engine/commit/3f5d477bb4f4397bed2d2926c35dcef7de3aae3e
---
.../velocity/runtime/defaults/velocity.properties | 15 ++++++++++-----
.../introspection/SecureIntrospectorImpl.java | 9 +++++++++
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/java/org/apache/velocity/runtime/defaults/velocity.properties b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
index 855118b..a8a9231 100644
--- a/src/java/org/apache/velocity/runtime/defaults/velocity.properties
+++ b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
@@ -245,15 +245,16 @@ runtime.introspector.uberspect = org.apache.velocity.util.introspection.Uberspec
# accessed.
# ----------------------------------------------------------------------------
+# Prohibit reflection
introspector.restrict.packages = java.lang.reflect
# The two most dangerous classes
+# ClassLoader, Thread, and subclasses disabled by default in SecureIntrospectorImpl
-introspector.restrict.classes = java.lang.Class
-introspector.restrict.classes = java.lang.ClassLoader
-
-# Restrict these for extra safety
+# Restrict these system classes. Note that anything in this list is matched exactly.
+# (Subclasses must be explicitly named to be included).
+introspector.restrict.classes = java.lang.Class
introspector.restrict.classes = java.lang.Compiler
introspector.restrict.classes = java.lang.InheritableThreadLocal
introspector.restrict.classes = java.lang.Package
@@ -262,8 +263,12 @@ introspector.restrict.classes = java.lang.Runtime
introspector.restrict.classes = java.lang.RuntimePermission
introspector.restrict.classes = java.lang.SecurityManager
introspector.restrict.classes = java.lang.System
-introspector.restrict.classes = java.lang.Thread
introspector.restrict.classes = java.lang.ThreadGroup
introspector.restrict.classes = java.lang.ThreadLocal
+# Restrict instance managers for common servlet containers (Tomcat, JBoss, Jetty)
+introspector.restrict.classes = org.apache.catalina.core.DefaultInstanceManager
+introspector.restrict.classes = org.apache.tomcat.SimpleInstanceManager
+introspector.restrict.classes = org.wildfly.extension.undertow.deployment.UndertowJSPInstanceManager
+introspector.restrict.classes = org.eclipse.jetty.util.DecoratedObjectFactory
diff --git a/src/java/org/apache/velocity/util/introspection/SecureIntrospectorImpl.java b/src/java/org/apache/velocity/util/introspection/SecureIntrospectorImpl.java
index f317b1c..25fc84d 100644
--- a/src/java/org/apache/velocity/util/introspection/SecureIntrospectorImpl.java
+++ b/src/java/org/apache/velocity/util/introspection/SecureIntrospectorImpl.java
@@ -121,6 +121,15 @@ public class SecureIntrospectorImpl extends Introspector implements SecureIntros
return true;
}
+ /**
+ * Always disallow ClassLoader, Thread and subclasses
+ */
+ if (ClassLoader.class.isAssignableFrom(clazz) ||
+ Thread.class.isAssignableFrom(clazz))
+ {
+ return false;
+ }
+
/**
* check the classname (minus any array info)
* whether it matches disallowed classes or packages
--
2.29.2

View File

@ -1,346 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>4</version>
</parent>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
<name>Apache Velocity</name>
<url>http://velocity.apache.org/engine/devel/</url>
<description>Apache Velocity is a general purpose template engine.</description>
<inceptionYear>2000</inceptionYear>
<packaging>jar</packaging>
<prerequisites>
<maven>2.0.9</maven>
</prerequisites>
<build>
<defaultGoal>install</defaultGoal>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<xdocDirectory>${basedir}/xdocs/docs</xdocDirectory>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</build>
<distributionManagement>
<site>
<id>velocity.apache.org</id>
<url>scpexe://people.apache.org/www/velocity.apache.org/engine/releases/velocity-1.7</url>
</site>
<repository>
<id>apache.releases</id>
<name>Apache Release Distribution Repository</name>
<url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
</repository>
<snapshotRepository>
<id>apache.snapshots</id>
<name>Apache Development Snapshot Repository</name>
<url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
</snapshotRepository>
</distributionManagement>
<developers>
<developer>
<name>Will Glass-Husain</name>
<id>wglass</id>
<email>wglass@forio.com</email>
<organization>Forio Business Simulations</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Geir Magnusson Jr.</name>
<id>geirm</id>
<email>geirm@optonline.net</email>
<organization>Independent (DVSL Maven)</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Daniel Rall</name>
<id>dlr</id>
<email>dlr@finemaltcoding.com</email>
<organization>CollabNet, Inc.</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Henning P. Schmiedehausen</name>
<id>henning</id>
<email>hps@intermeta.de</email>
<organization>INTERMETA - Gesellschaft für Mehrwertdienste mbH</organization>
<roles>
<role>Java Developer</role>
</roles>
<timezone>2</timezone>
</developer>
<developer>
<name>Nathan Bubna</name>
<id>nbubna</id>
<email>nathan@esha.com</email>
<organization>ESHA Research</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>werken-xpath</groupId>
<artifactId>werken-xpath</artifactId>
<version>0.9.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.7.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependencies</report>
<report>issue-tracking</report>
<report>license</report>
<report>summary</report>
<report>scm</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.0</version>
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
<report>jira-report</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<issueLinkTemplate>${jira.browse.url}/%ISSUE%</issueLinkTemplate>
<!-- Apache JIRA, Component Engine -->
<component>12311337</component>
<!-- FixFor 1.6 -->
<filter>fixfor=12310290&amp;sorter/field=issuekey&amp;sorter/order=ASC</filter>
<maxEntries>100</maxEntries>
<teamlist>http://velocity.apache.org/who-we-are.html</teamlist>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<tag>TODO</tag>
<tag>FIXME</tag>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<configuration>
<links>
<link>http://java.sun.com/j2se/1.4.2/docs/api</link>
<link>http://jakarta.apache.org/oro/api</link>
<link>http://jakarta.apache.org/commons/lang/api-release</link>
<link>http://jakarta.apache.org/commons/collections/api-release</link>
<link>http://www.jdom.org/docs/apidocs</link>
<link>http://logging.apache.org/log4j/docs/api</link>
<link>http://excalibur.apache.org/apidocs</link>
<link>http://tomcat.apache.org/tomcat-4.1-doc/servletapi</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<xmlOutput>true</xmlOutput>
<threshold>Low</threshold>
<effort>Max</effort>
<excludeFilterFile>build/findbugs-exclude.xml</excludeFilterFile>
<findbugsXmlOutputDirectory>xdocs</findbugsXmlOutputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
</plugins>
</reporting>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/velocity/engine/trunk</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/velocity/engine/trunk</developerConnection>
<tag>HEAD</tag>
<url>http://svn.apache.org/viewvc/velocity/engine/trunk</url>
</scm>
<properties>
<jira.browse.url>https://issues.apache.org/jira/browse</jira.browse.url>
</properties>
<issueManagement>
<system>JIRA</system>
<url>${jira.browse.url}/VELOCITY</url>
</issueManagement>
</project>

View File

@ -1,12 +0,0 @@
--- build/build.xml.sav 2007-08-25 16:17:48.000000000 +0200
+++ build/build.xml 2007-08-25 16:18:14.000000000 +0200
@@ -139,7 +139,9 @@
<!-- sets up the build environment (classpath and libs) -->
<!-- =================================================================== -->
<target name="build-prepare">
+<!--
<ant antfile="${velocity.build.dir}/download.xml" target="build-download" />
+-->
<!-- Build classpath -->
<path id="velocity.build.classpath">

View File

@ -1,6 +1,5 @@
{
"Signatures": {
"velocity-1.7.pom": "a3f97ceab5f073ed93ef8fe6304e35252d83ecf2442c83fe0492b8b73da3b40b",
"velocity-1.7.tar.gz": "6cabbc45ead01b32e9833db31b1726f2e34f5ff6a03346df9822e70909d06766"
"velocity-engine-1.7.tar.gz": "1ad5b758f7afe8af9251c73b5fee8ed27428639c90c941f368df0f01cf0d38b8"
}
}

View File

@ -1,61 +1,29 @@
Vendor: Microsoft Corporation
Distribution: Mariner
#
# spec file for package velocity
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#
%bcond_with bootstrap
Summary: Java-based template engine
Name: velocity
Version: 1.7
Release: 9%{?dist}
Summary: Java-based template engine
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://velocity.apache.org/
Source0: http://www.apache.org/dist/velocity/engine/%{version}/%{name}-%{version}.tar.gz
Source1: %{name}-%{version}.pom
Patch0: velocity-build_xml.patch
BuildRequires: ant >= 1.6.5
BuildRequires: ant-junit
BuildRequires: antlr
BuildRequires: avalon-logkit
BuildRequires: commons-collections
BuildRequires: commons-lang
BuildRequires: commons-logging
BuildRequires: fdupes
BuildRequires: hsqldb
BuildRequires: javapackages-local-bootstrap
BuildRequires: jdom >= 1.0-1
BuildRequires: junit
BuildRequires: log4j12 >= 1.1
BuildRequires: oro
BuildRequires: plexus-classworlds
BuildRequires: servletapi4
BuildRequires: werken-xpath
Requires: avalon-logkit
Requires: commons-collections
Requires: commons-lang
Requires: java >= 1.6.0
Requires: jdom >= 1.0-1
Requires: log4j12 >= 1.1
Requires: oro
Requires: servletapi4
Requires: werken-xpath
Release: 37%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://velocity.apache.org/
Source0: https://github.com/apache/%{name}-engine/archive/refs/tags/%{version}.tar.gz#/%{name}-engine-%{version}.tar.gz
Patch1: 0001-Port-to-apache-commons-lang3.patch
Patch2: 0002-Force-use-of-JDK-log-chute.patch
Patch3: 0003-CVE-2020-13936.patch
BuildArch: noarch
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(commons-collections:commons-collections)
BuildRequires: mvn(org.apache.commons:commons-lang3)
BuildRequires: mvn(org.apache:apache:pom:)
%endif
%description
Velocity is a Java-based template engine. It permits anyone to use the
simple yet powerful template language to reference objects defined in
@ -77,207 +45,355 @@ template services for the Turbine web application framework.
Velocity+Turbine provides a template service that will allow web
applications to be developed according to a true MVC model.
%package manual
Summary: Manual for %{name}
Group: Development/Libraries/Java
%description manual
Velocity is a Java-based template engine. It permits anyone to use the
simple yet powerful template language to reference objects defined in
Java code.
When Velocity is used for web development, Web designers can work in
parallel with Java programmers to develop web sites according to the
Model-View-Controller (MVC) model, meaning that web page designers can
focus solely on creating a site that looks good, and programmers can
focus solely on writing top-notch code. Velocity separates Java code
from the web pages, making the web site more maintainable over the long
run and providing a viable alternative to Java Server Pages (JSPs) or
PHP.
Velocity's capabilities reach well beyond the realm of web sites; for
example, it can generate SQL and PostScript and XML (see Anakia for more
information on XML transformations) from templates. It can be used
either as a standalone utility for generating source code and reports,
or as an integrated component of other systems. Velocity also provides
template services for the Turbine web application framework.
Velocity+Turbine provides a template service that will allow web
applications to be developed according to a true MVC model.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
Velocity is a Java-based template engine. It permits anyone to use the
simple yet powerful template language to reference objects defined in
Java code.
When Velocity is used for web development, Web designers can work in
parallel with Java programmers to develop web sites according to the
Model-View-Controller (MVC) model, meaning that web page designers can
focus solely on creating a site that looks good, and programmers can
focus solely on writing top-notch code. Velocity separates Java code
from the web pages, making the web site more maintainable over the long
run and providing a viable alternative to Java Server Pages (JSPs) or
PHP.
Velocity's capabilities reach well beyond the realm of web sites; for
example, it can generate SQL and PostScript and XML (see Anakia for more
information on XML transformations) from templates. It can be used
either as a standalone utility for generating source code and reports,
or as an integrated component of other systems. Velocity also provides
template services for the Turbine web application framework.
Velocity+Turbine provides a template service that will allow web
applications to be developed according to a true MVC model.
%package demo
Summary: Demo for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
%description demo
Velocity is a Java-based template engine. It permits anyone to use the
simple yet powerful template language to reference objects defined in
Java code.
When Velocity is used for web development, Web designers can work in
parallel with Java programmers to develop web sites according to the
Model-View-Controller (MVC) model, meaning that web page designers can
focus solely on creating a site that looks good, and programmers can
focus solely on writing top-notch code. Velocity separates Java code
from the web pages, making the web site more maintainable over the long
run and providing a viable alternative to Java Server Pages (JSPs) or
PHP.
Velocity's capabilities reach well beyond the realm of web sites; for
example, it can generate SQL and PostScript and XML (see Anakia for more
information on XML transformations) from templates. It can be used
either as a standalone utility for generating source code and reports,
or as an integrated component of other systems. Velocity also provides
template services for the Turbine web application framework.
Velocity+Turbine provides a template service that will allow web
applications to be developed according to a true MVC model.
Javadoc for %{name}.
%prep
%setup -q
# Remove all binary libs used in compiling the package.
# Note that velocity has some jar files containing macros under
# examples and test that should not be removed.
#find build -name '*.jar' -exec rm -f \{\} \;
for j in $(find . -name "*.jar" | grep -v /test/); do
mv $j $j.no
done
%patch0 -b .sav0
%autosetup -p1 -n %{name}-engine-%{version}
cp %{SOURCE1} pom.xml
find . -name '*.jar' ! -name 'test*.jar' -print -delete
find . -name '*.class' ! -name 'Foo.class' -print -delete
%pom_remove_parent pom.xml
# Disable unneeded features
rm -r src/java/org/apache/velocity/{anakia,texen,servlet,convert}
rm src/java/org/apache/velocity/runtime/log/{Avalon,Log4J}Log{Chute,System}.java
rm src/java/org/apache/velocity/runtime/log/{CommonsLog,Servlet}LogChute.java
rm src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java
rm src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
rm src/java/org/apache/velocity/app/event/implement/Escape{Html,JavaScript,Sql,Xml,}Reference.java
%pom_remove_dep :oro
%pom_remove_dep :jdom
%pom_remove_dep :commons-logging
%pom_remove_dep :log4j
%pom_remove_dep :servlet-api
%pom_remove_dep :logkit
%pom_remove_dep :ant
%pom_remove_dep :werken-xpath
%{mvn_alias} : %{name}:%{name}
%build
#export JAVA_HOME=%{_jvmdir}/java-1.5.0
# Use servletapi4 instead of servletapi5 in CLASSPATH
mkdir -p bin/test-lib
pushd bin/test-lib
ln -sf $(build-classpath hsqldb)
ln -sf $(build-classpath junit)
popd
mkdir -p bin/lib
pushd bin/lib
ln -sf $(build-classpath ant)
ln -sf $(build-classpath antlr)
ln -sf $(build-classpath avalon-logkit)
ln -sf $(build-classpath commons-collections)
ln -sf $(build-classpath commons-lang)
ln -sf $(build-classpath commons-logging)
ln -sf $(build-classpath jdom)
ln -sf $(build-classpath log4j12/log4j-12)
ln -sf $(build-classpath oro)
# Use servletapi4 instead of servletapi5 in CLASSPATH
ln -sf $(build-classpath servletapi4)
ln -sf $(build-classpath werken-xpath)
ln -sf $(build-classpath plexus/classworlds)
popd
export CLASSPATH=$(build-classpath jdom commons-collections commons-lang werken-xpath antlr)
CLASSPATH=$CLASSPATH:$(pwd)/test/texen-classpath/test.jar
export OPT_JAR_LIST="ant/ant-junit junit"
#FIXME: tests failed on CommonsExtPropTestCase
#but resulting files seems to be same
ant \
-Djavac.source=1.6 -Djavac.target=1.6 \
-buildfile build/build.xml \
jar javadocs
%{mvn_build} -f
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -p -m 644 bin/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap -a velocity:velocity
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
rm -rf docs/api
# zero-length file
rm -r test/issues/velocity-537/compare/velocity537.vm.cmp
# data
install -d -m 755 %{buildroot}%{_datadir}/%{name}
cp -pr examples test %{buildroot}%{_datadir}/%{name}
%fdupes -s %{buildroot}%{_datadir}/%{name}
%{mvn_install}
%files -f .mfiles
%license LICENSE NOTICE
%doc README.txt
%files manual
%doc docs/*
%files javadoc
%{_javadocdir}/%{name}
%files demo
%{_datadir}/%{name}
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7-9
- Converting the 'Release' tag to the '[number].[distribution]' format.
* Mon Jan 24 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7-37
- Initial CBL-Mariner import from Fedora 36 (license: MIT).
- License verified.
* Mon Nov 16 2020 Ruying Chen <v-ruyche@microsoft.com> - 1.7-8.4
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Use javapackages-local-bootstrap to avoid build cycle.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Oct 1 2019 Fridrich Strba <fstrba@suse.com>
- Build against the compatibility package log4j12
* Mon Apr 8 2019 Fridrich Strba <fstrba@suse.com>
- Do not depend on the apache-parent, since we are not building
using Maven.
* Thu Feb 14 2019 Fridrich Strba <fstrba@suse.com>
- Build against the new plexus-classworlds package
* Mon Nov 5 2018 Fridrich Strba <fstrba@suse.com>
- Add alias "velocity:velocity" to the maven artifact
* Tue Sep 19 2017 fstrba@suse.com
- Fix buid with jdk9: specify java source and target level 1.6
* Fri May 19 2017 tchvatal@suse.com
- Remove unneeded deps
* Fri May 19 2017 dziolkowski@suse.com
- New build dependency: javapackages-local
* Wed Mar 18 2015 tchvatal@suse.com
- Fix build with new javapackages-tools
* Fri Dec 5 2014 p.drouand@gmail.com
- Update to version 1.7
+ No changelog available
- Add requirement to commons-logging; new dependency
- Remove java-devel >= 1.6.0 requirement; not needed anymore
- Do not copy convert folder; doesn't exist anymore
* Fri Jun 27 2014 tchvatal@suse.com
- Fix build on SLE11
* Wed Sep 11 2013 mvyskocil@suse.com
- use add_maven_depmap from javapackages-tools
* Mon Sep 9 2013 tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
* Mon Dec 17 2012 mvyskocil@suse.com
- require avalon-logkit
* drop excalibur from Factory
* Wed Jun 3 2009 mvyskocil@suse.cz
- Initial SUSE packaging
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-35
- Bootstrap build
- Non-bootstrap build
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Sep 11 2020 Fabio Valentini <decathorpe@gmail.com> - 0:1.7-33
- Default to JDK logging and drop commons-logging and log4j12 implementations.
* Thu Jul 30 2020 Fabio Valentini <decathorpe@gmail.com> - 0:1.7-32
- Port to commons-lang3.
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Jiri Vanek <jvanek@redhat.com> - 0:1.7-30
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Mon Jul 13 2020 Mat Booth <mat.booth@redhat.com> - 0:1.7-29
- Ignore test case that fails on Java 11
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0:1.7-28
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Fri May 15 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-27
- Build with Maven
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-26
- Mass rebuild for javapackages-tools 201902
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-25
- Mass rebuild for javapackages-tools 201901
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 31 2018 Michael Simacek <msimacek@redhat.com> - 0:1.7-24
- Repack the tarball without binaries
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Feb 07 2017 Michael Simacek <msimacek@redhat.com> - 0:1.7-20
- Add hsqldb conditional
- Switch to glassfish-servlet-api
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jul 22 2015 gil cattaneo <puntogil@libero.it> 0:1.7-18
- fix FTBFS rhbz#1240035
- fix BR list, change log4j with log4j12
- set javac source/target to 1.6
- disable Java8doc doclint
- remove werken-xpath Import/Export refences in manifest file
- resolve some rpmlint problems
- remove zero-length file
- introduce license macro
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Nov 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-16
- Update to current packaging guidelines
* Thu Sep 4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-15
- Require hsqldb-lib instead of hsqldb
* Wed Jun 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-14
- Apply patch for log4j 1.2.17
* Wed Jun 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-13
- Use log4j 1.2 compat package
- Skip Java 8 incompatible test
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-11
- Use .mfiles generated during build
* Sat Sep 21 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-10
- Port from werken-xpath to jdom
- Resolves: rhbz#875817
* Mon Aug 05 2013 Michal Srb <msrb@redhat.com> - 0:1.7-9
- Fix FTBFS (Resolves: #992852)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Nov 21 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-6
- Install NOTICE files
- Resolves: rhbz#879021
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jun 05 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7-4
- Use new tomcat-servlet-api
- Update to latest guidelines
* Fri Feb 17 2012 Deepak Bhole <dbhole@redhat.com> - 0:1.7-3
- Resolved rhbz#791045
- Added patch from Omaid Majid <omajid@redhat.com> to fix build with Java 7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 21 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7-1
- Update to latest version
- Drop old patches
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Dec 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.6.4-2
- Add compatibility depmap
* Wed Nov 3 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.6.4-1
- Rebase to latest upstream
- Fix problems from bz#226525
* Thu Oct 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.6.3-5
- Use apache-commons-collections instead of jakarta name
- Use tomcat6 for dependency instead of tomcat5 (bz#640660)
* Mon Jun 7 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.6.3-4
- Fix BR/R for jakarta-commons-rename.
* Sat Feb 13 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-3
- Get (Build)Requires right
* Sat Feb 13 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-2
- Require all of the packages in the POM
- Add dist to version
* Fri Jan 15 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-1
- Update to 1.6.3
- Remove dependency on avalon-logkit
- Add maven metadata and pom
* Sun Jan 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.4-10.5
- Drop gcj_support.
- Fix groups and url.
- Use upstream tarball.
* Mon Aug 10 2009 Ville Skyttä <ville.skytta@iki.fi> - 0:1.4-10.4
- Convert specfile to UTF-8.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4-9.4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Fri Apr 24 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0:1.4-8.4
- Fix FTBFS: added velocity-enum.patch (enum is a reserved keyword in java >= 1.5)
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4-8.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Jul 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.4-7.3
- drop repotag
* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.4-7jpp.2
- fix license tag
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.4-7jpp.1
- Autorebuild for GCC 4.3
* Tue Aug 08 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-6jpp.1
- Resync with latest from JPP.
- Partially adopt new naming convention.
* Sat Jul 22 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-5jpp_2fc
- Rebuilt
* Sat Jul 22 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-5jpp_1fc
- Merge with latest from JPP.
- Remove fileversion and my_version macros.
- Remove notexentests patch and replace with a patch to disable
- failure on tests.
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:1.4-3jpp_8fc
- Rebuilt
* Tue Jul 18 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.4-3jpp_7fc
- Build on all archs.
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:1.4-3jpp_6fc
- rebuild
* Wed Mar 8 2006 Rafael Schloming <rafaels@redhat.com> - 0:1.4-3jpp_5fc
- excluded s390[x] and ppc64 due to eclipse
* Mon Mar 6 2006 Jeremy Katz <katzj@redhat.com> - 0:1.4-3jpp_4fc
- stop scriptlet spew
* Wed Dec 21 2005 Jesse Keating <jkeating@redhat.com> - 0:1.4-3jpp_3fc
- rebuilt again
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> - 0:1.4-3jpp_2fc
- rebuilt
* Tue Nov 8 2005 Vadim Nasardinov <vadimn@redhat.com> - 0:1.4-3jpp_1fc
- Converted from ISO-8859-1 to UTF-8
* Wed Jun 15 2005 Gary Benson <gbenson@redhat.com> 0:1.4-3jpp_1fc
- Build into Fedora.
* Thu Jun 9 2005 Gary Benson <gbenson@redhat.com>
- Remove jarfiles from the tarball.
* Mon Jun 6 2005 Gary Benson <gbenson@redhat.com>
- Build with servletapi5.
- Add NOTICE file as per Apache License version 2.0.
- Skip some failing tests.
* Mon Oct 18 2004 Fernando Nasser <fnasser@redhat.com> 0:1.4-3jpp_1rh
- First Red Hat build
* Thu Sep 23 2004 Ralph Apel <r.apel at r-apel.de> 0:1.4-3jpp
- Adapt to jdom-1.0-1 replacing org.jdom.input.DefaultJDOMFactory
by org.jdom.DefaultJDOMFactory in AnakiaJDOMFactory.java
as well as using org.jdom.output.Format in AnakiaTask.java
- Therefore require jdom >= 0:1.0-1
* Thu Sep 02 2004 Ralph Apel <r.apel at r-apel.de> 0:1.4-2jpp
- Build with ant-1.6.2
* Mon Jun 07 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:1.4-1jpp
- 1.4 final
- Patch #0 is unnecessary (upstream)
- We have to build velocity against servletapi3
* Wed Feb 18 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:1.4-0.rc1.2jpp
- Fix a few jpackage related .spec typos, oops.
* Wed Feb 18 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:1.4-0.rc1.1jpp
- Added Patch #0 (velocity-1.4-rc1-ServletTest.patch) from CVS which fixes
build problems.
* Sun May 25 2003 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.1-2jpp
- Add Epochs to dependencies.
- Add explicit defattrs.
- Add non-versioned javadoc symlinks.
- Use sed instead of bash 2 extension when symlinking jars during build.
- Use full URL in Source.
- Fix -javadoc Group tag.
- Drop patch in favour of ant options.
- BuildRequire jpackage-utils and antlr (latter needed for Anakia tests).
* Sat May 24 2003 Richard Bullington-McGuire <rbulling@pkrinternet.com> 1.3.1-1jpp
- 1.3.1 stable release
* Fri May 23 2003 Richard Bullington-McGuire <rbulling@pkrinternet.com> 1.3-1jpp
- 1.3 stable release
- Updated for JPackage 1.5
- Run JUnit regression tests as part of the build process
- Added patch file to fix test case classpath for JUnit standard locations
* Mon May 06 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.3-0.rc1.1jpp
- 1.3.0rc1
- dropped patch
- versioned dir for javadoc
- no dependencies for manual and javadoc packages
- stricter dependency for demo package
* Wed Dec 12 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.2-1jpp
- 1.2
- regenerated patch and corrected manifest
- requires and buildrequires jdom >= 1.0-0.b7.1
* Wed Dec 5 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.1-4jpp
- javadoc into javadoc package
* Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 1.1-3jpp
- removed packager tag
- new jpp extension
* Thu Nov 1 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.1-2jpp
- first unified release
- s/jPackage/JPackage
* Fri Sep 14 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.1-1jpp
- first Mandrake release

View File

@ -1,22 +0,0 @@
--- ws-jaxme-0.5.2/src/js/org/apache/ws/jaxme/js/pattern/CompiledClassReflector.java 2005-07-28 21:47:58.000000000 +0200
+++ ws-jaxme-0.5.2/src/js/org/apache/ws/jaxme/js/pattern/CompiledClassReflector.java 2017-10-06 17:25:25.213569086 +0200
@@ -34,18 +34,7 @@
* {@link JavaSource}.</p>
*/
protected JavaMethod getMethod(JavaSource pSource, Method pMethod) {
- JavaMethod method = pSource.newJavaMethod(pMethod.getName(),
- JavaQNameImpl.getInstance(pMethod.getReturnType()),
- JavaSource.PUBLIC);
- Class[] classes = pMethod.getParameterTypes();
- for (int i = 0; i < classes.length; i++) {
- method.addParam(classes[i], "arg" + i);
- }
- Class[] exceptions = pMethod.getExceptionTypes();
- for (int i = 0; i < exceptions.length; i++) {
- method.addThrows(exceptions[i]);
- }
- return method;
+ return pSource.newJavaMethod(pMethod);
}
/** Returns the compiled class being used to gather information.

View File

@ -1,29 +0,0 @@
--- ./ant/docs.xml.sav 2006-05-19 20:00:29.000000000 -0400
+++ ./ant/docs.xml 2006-05-19 20:01:01.000000000 -0400
@@ -165,7 +165,9 @@
force="${force}"
style="${docbookxsl.home}/html/chunk.xsl">
<xmlcatalog>
- <dtd publicid="-//OASIS//DTD DocBook XML V4.1.2//EN" location="${docbook.home}/docbookx.dtd"/>
+ <catalogpath>
+ <pathelement location="/etc/xml/catalog"/>
+ </catalogpath>
</xmlcatalog>
</style>
</target>
@@ -180,10 +182,12 @@
force="${force}"
style="${docbookxsl.home}/html/chunk.xsl">
<xmlcatalog>
- <dtd publicid="-//OASIS//DTD DocBook XML V4.1.2//EN" location="${docbook.home}/docbookx.dtd"/>
+ <catalogpath>
+ <pathelement location="/etc/xml/catalog"/>
+ </catalogpath>
</xmlcatalog>
<factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</style>
</target>
</project>
-
\ No newline at end of file
+

View File

@ -1,11 +0,0 @@
diff --git a/ant/docs.xml b/ant/docs.xml
--- a/ant/docs.xml
+++ b/ant/docs.xml
@@ -84,6 +84,7 @@
</path>
<javadoc
access="protected"
+ additionalparam="-Xdoclint:none"
author="true"
classpathref="docs.class.path"
destdir="${build.apidocs}"

View File

@ -1,11 +0,0 @@
--- ./ant/docs.xml.sav 2006-05-19 19:59:02.000000000 -0400
+++ ./ant/docs.xml 2006-05-19 19:59:07.000000000 -0400
@@ -69,7 +69,7 @@
<fail>Missing DocBook, terminating.</fail>
</target>
- <target name="Docs.all" depends="javadoc,docbook.html,old.releases,forrest,replace"
+ <target name="Docs.all" depends="javadoc,docbook.html,old.releases"
description="Generates the documentation"/>
<target name="javadoc" depends="all"

View File

@ -1,176 +0,0 @@
--- src/jaxme/org/apache/ws/jaxme/impl/JMMarshallerImpl.java
+++ src/jaxme/org/apache/ws/jaxme/impl/JMMarshallerImpl.java
@@ -21,16 +21,22 @@
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
+import java.io.File;
import javax.xml.bind.JAXBException;
import javax.xml.bind.MarshalException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.PropertyException;
+import javax.xml.bind.attachment.AttachmentMarshaller;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamResult;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.validation.Schema;
import org.apache.ws.jaxme.*;
import org.apache.ws.jaxme.JMElement;
@@ -430,4 +436,55 @@
public Node getNode(java.lang.Object contentTree) throws JAXBException {
throw new UnsupportedOperationException("JaxMe doesn't support live DOM views");
}
+
+
+// added to support JDK6
+
+ public void marshal(Object jaxbElement, File output) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void marshal(Object jaxbElement, XMLStreamWriter writer) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void marshal(Object jaxbElement, XMLEventWriter writer) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAdapter(XmlAdapter adapter) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAdapter(Class type, XmlAdapter adapter) {
+ throw new UnsupportedOperationException();
+ }
+
+ public XmlAdapter getAdapter(Class type) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAttachmentMarshaller(AttachmentMarshaller am) {
+ throw new UnsupportedOperationException();
+ }
+
+ public AttachmentMarshaller getAttachmentMarshaller() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setSchema(Schema schema) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Schema getSchema() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setListener(Listener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Listener getListener() {
+ throw new UnsupportedOperationException();
+ }
}
--- src/jaxme/org/apache/ws/jaxme/impl/JMUnmarshallerImpl.java
+++ src/jaxme/org/apache/ws/jaxme/impl/JMUnmarshallerImpl.java
@@ -26,6 +26,10 @@
import javax.xml.bind.JAXBException;
import javax.xml.bind.UnmarshalException;
import javax.xml.bind.UnmarshallerHandler;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.attachment.AttachmentUnmarshaller;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
@@ -33,6 +37,9 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamSource;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.validation.Schema;
import org.apache.ws.jaxme.JMUnmarshaller;
import org.apache.ws.jaxme.util.DOMSerializer;
@@ -177,4 +184,71 @@
public UnmarshallerHandler getUnmarshallerHandler() {
return new JMUnmarshallerHandlerImpl(this);
}
+
+
+// added to support JDK6
+
+ public Object unmarshal(Reader reader) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public JAXBElement unmarshal(Node node, Class declaredType) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public JAXBElement unmarshal(Source source, Class declaredType) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object unmarshal(XMLStreamReader reader) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public JAXBElement unmarshal(XMLStreamReader reader, Class declaredType) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object unmarshal(XMLEventReader reader) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public JAXBElement unmarshal(XMLEventReader reader, Class declaredType) throws JAXBException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setSchema(Schema schema) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Schema getSchema() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAdapter(XmlAdapter adapter) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAdapter(Class type, XmlAdapter adapter) {
+ throw new UnsupportedOperationException();
+ }
+
+ public XmlAdapter getAdapter(Class type) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) {
+ throw new UnsupportedOperationException();
+ }
+
+ public AttachmentUnmarshaller getAttachmentUnmarshaller() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setListener(Listener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Listener getListener() {
+ throw new UnsupportedOperationException();
+ }
}

View File

@ -1,72 +0,0 @@
--- ws-jaxme-0.5.2/ant/jm.xml 2012-07-27 12:18:59.000000000 +0200
+++ ws-jaxme-0.5.2/ant/jm.xml 2012-07-27 16:07:58.924849227 +0200
@@ -128,7 +128,7 @@
<target name="JM.compile" depends="dirs,JM.precompile">
<javac classpathref="jaxme.class.path" debug="${debug}"
optimize="${optimize}" destdir="${build.jm.classes}"
- source="1.3" target="1.3"
+ source="1.6" target="1.6"
failonerror="true">
<src>
<pathelement location="${src.jm}"/>
@@ -185,7 +185,7 @@
<target name="JM.localtest" depends="JM.generate">
<javac debug="${debug}"
optimize="${optimize}" destdir="${build.jm.classes}"
- source="1.3" target="1.3"
+ source="1.6" target="1.6"
failonerror="true">
<src>
<pathelement location="${src.jm}"/>
--- ws-jaxme-0.5.2/ant/js.xml 2012-07-27 12:18:59.000000000 +0200
+++ ws-jaxme-0.5.2/ant/js.xml 2012-07-27 16:08:26.538504008 +0200
@@ -71,7 +71,7 @@
<target name="JS.compile" depends="JS.antlr,init">
<javac destdir="${build.js.classes}" debug="${debug}"
- source="1.3" target="1.3"
+ source="1.6" target="1.6"
optimize="${optimize}" classpathref="js.class.path">
<src>
<pathelement location="${src.js}"/>
@@ -160,7 +160,7 @@
<javac destdir="${build.js.test.classes}"
debug="${debug}" optimize="${optimize}"
includes="org/apache/ws/jaxme/js/junit/**/*"
- source="1.3" target="1.3"
+ source="1.6" target="1.6"
classpathref="js.test.path">
<src path="${src.js}"/>
<src path="${build.js.src}"/>
--- ws-jaxme-0.5.2/ant/macros.xml 2005-07-14 20:32:17.000000000 +0200
+++ ws-jaxme-0.5.2/ant/macros.xml 2012-07-27 16:08:37.033372804 +0200
@@ -54,7 +54,7 @@
<mkdir dir="@{destdir}"/>
<javac destdir="@{destdir}" srcdir="@{srcdir}" debug="${debug}"
optimize="${optimize}" classpathref="@{classpathref}"
- excludes="@{excludes}" source="1.3" target="1.3">
+ excludes="@{excludes}" source="1.6" target="1.6">
<exclude name="@{java14classes}" unless="have14"/>
</javac>
</sequential>
diff -up ws-jaxme-0.5.2/ant/pm.xml ws-jaxme-0.5.2/ant/pm.xml
--- ws-jaxme-0.5.2/ant/pm.xml 2012-07-27 12:18:59.000000000 +0200
+++ ws-jaxme-0.5.2/ant/pm.xml 2012-07-27 16:08:42.912299308 +0200
@@ -70,7 +70,7 @@
<target name="PM.compile" depends="dirs,JM.all">
<javac classpathref="pm.class.path" debug="${debug}"
optimize="${optimize}" destdir="${build.pm.classes}"
- source="1.3" target="1.3"
+ source="1.6" target="1.6"
srcdir="${src.pm}">
<exclude name="org/apache/ws/jaxme/pm/junit/**/*"/>
<exclude name="org/apache/ws/jaxme/**/api4j/*" unless="have.inoapi4j"/>
@@ -112,7 +112,7 @@
<target name="PM.generate.compile" depends="PM.generate">
<javac debug="${debug}"
- source="1.3" target="1.3"
+ source="1.6" target="1.6"
optimize="${optimize}" destdir="${build.pm.test.classes}">
<classpath>
<path refid="pm.class.path"/>

View File

@ -1,28 +0,0 @@
--- ./src/jaxme/org/apache/ws/jaxme/util/Base64Binary.java.sav 2007-02-12 12:33:45.000000000 -0500
+++ ./src/jaxme/org/apache/ws/jaxme/util/Base64Binary.java 2007-02-12 12:35:20.000000000 -0500
@@ -18,8 +18,7 @@
import java.io.IOException;
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
+import org.apache.commons.codec.binary.Base64;
/** A utility class for working with base64 encoding.
@@ -37,13 +36,13 @@
* base64 encoded byte array.
*/
public static byte[] decode(String pValue) throws IOException {
- return (new BASE64Decoder()).decodeBuffer(pValue);
+ return (new Base64()).decode(pValue.getBytes());
}
/** Converts the base64 encoded byte array <code>pValue</code>
* into a string.
*/
public static String encode(byte[] pValue) {
- return (new BASE64Encoder()).encode(pValue);
+ return new String((new Base64()).encodeBase64(pValue));
}
}

View File

@ -1,5 +0,0 @@
{
"Signatures": {
"ws-jaxme-0.5.2-src.tar.bz2": "cebd76671407b490176d42ea2ae02224ee599624cec20bf3afcab0a1ceebf4ee"
}
}

View File

@ -1,215 +0,0 @@
Vendor: Microsoft Corporation
Distribution: Mariner
#
# spec file for package ws-jaxme
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#
%define base_name jaxme
Name: ws-jaxme
Version: 0.5.2
Release: 7%{?dist}
Summary: Open source implementation of JAXB
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://ws.apache.org
Source0: ws-jaxme-%{version}-src.tar.bz2
Patch0: ws-jaxme-docs_xml.patch
Patch1: ws-jaxme-catalog.patch
Patch2: ws-jaxme-java6.patch
Patch3: ws-jaxme-sourcetarget.patch
Patch4: ws-jaxme-use-commons-codec.patch
Patch5: ws-jaxme-0.5.2-proxygenerator.patch
Patch6: ws-jaxme-doclint-ignore.patch
BuildRequires: ant >= 1.6
BuildRequires: ant-apache-resolver
BuildRequires: antlr
BuildRequires: apache-commons-codec
BuildRequires: docbook-xsl-stylesheets
BuildRequires: docbook-dtd-xml
BuildRequires: hsqldb
BuildRequires: java-devel >= 1.6
BuildRequires: javapackages-tools
BuildRequires: jaxp_transform_impl
BuildRequires: junit >= 3.8.1
BuildRequires: log4j12
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-commons-resolver
BuildRequires: xmldb-api
BuildArch: noarch
%description
A Java/XML binding compiler takes as input a schema description (in
most cases an XML schema, but it may be a DTD, a RelaxNG schema,
a Java class inspected via reflection, or a database schema). The
output is a set of Java classes: * A Java bean class matching the
schema description. (If the schema was obtained via Java
reflection, the original Java bean class.)
* Read a conforming XML document and convert it into the equivalent
Java bean.
* Vice versa, marshal the Java bean back into the original XML
document.
%package javadoc
Summary: Open source implementation of JAXB
Group: Development/Libraries/Java
%description javadoc
A Java/XML binding compiler takes as input a schema description (in
most cases an XML schema, but it may be a DTD, a RelaxNG schema,
a Java class inspected via reflection, or a database schema). The
output is a set of Java classes: * A Java bean class matching the
schema description. (If the schema was obtained via Java
reflection, the original Java bean class.)
* Read a conforming XML document and convert it into the equivalent
Java bean.
* Vice versa, marshal the Java bean back into the original XML
document.
%package manual
Summary: Open source implementation of JAXB
Group: Development/Libraries/Java
%description manual
A Java/XML binding compiler takes as input a schema description (in
most cases an XML schema, but it may be a DTD, a RelaxNG schema,
a Java class inspected via reflection, or a database schema). The
output is a set of Java classes: * A Java bean class matching the
schema description. (If the schema was obtained via Java
reflection, the original Java bean class.)
* Read a conforming XML document and convert it into the equivalent
Java bean.
* Vice versa, marshal the Java bean back into the original XML
document.
%prep
%setup -q
find . -name "*.jar" | xargs rm
%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .java6
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
export OPT_JAR_LIST="ant/ant-trax jaxp_transform_impl ant/ant-apache-resolver"
export CLASSPATH=$(build-classpath \
antlr \
apache-commons-codec \
hsqldb \
log4j12/log4j-12 \
xalan-j2 \
xalan-j2-serializer \
xmldb-api \
xerces-j2 \
xml-commons-apis \
xml-commons-resolver \
junit)
ant Docs.all \
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
-Dbuild.sysclasspath=first \
-Ddocbook.home=%{_datadir}/xml/docbook \
-Ddocbookxsl.home=%{_datadir}/xml/docbook/xsl-stylesheets-1.79.1
%install
install -dm 755 %{buildroot}%{_javadir}/%{base_name}
for jar in dist/*.jar; do
jbs=`basename ${jar}`
jnm=`echo ${jbs} | sed -e 's|\.jar||'`
install -Dpm 644 ${jar} \
%{buildroot}%{_javadir}/%{base_name}/ws-${jnm}.jar
done
(cd %{buildroot}%{_javadir}/%{base_name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
(cd %{buildroot}%{_javadir}/%{base_name} && for jar in ws-*.jar; do ln -sf ${jar} `echo $jar| sed "s|ws-||g"`; done)
#javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr build/docs/src/documentation/content/apidocs %{buildroot}%{_javadocdir}/%{name}
#manual
install -dm 755 %{buildroot}%{_docdir}/%{name}-%{version}
cp -pr build/docs/src/documentation/content/manual %{buildroot}%{_docdir}/%{name}-%{version}
%files
%doc LICENSE
%{_javadir}/%{base_name}
%files javadoc
%{_javadocdir}/%{name}
%files manual
%doc %{_docdir}/%{name}-%{version}
%changelog
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 0.5.2-7
- Converting the 'Release' tag to the '[number].[distribution]' format.
* Wed Dec 02 2020 Joe Schmitt <joschmit@microsoft.com> - 0.5.2-6.4
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Set javadoc Xdoclint:none with ws-jaxme-doclint-ignore.patch.
- Add dependency on docbook-dtd-xml and update docbook paths.
* Tue Oct 1 2019 Fridrich Strba <fstrba@suse.com>
- Build against new compatibility package log4j12
* Fri Oct 5 2018 Fridrich Strba <fstrba@suse.com>
- Fix for a build breakages on i586 with jdk11
* Working around a possible race condition
* Allows building with jdk11
* Fri Sep 28 2018 Fridrich Strba <fstrba@suse.com>
- BuildConflict with java-devel >= 11, since it fails intermitently
on i586 with jdk11
* Mon Dec 4 2017 thomas.schraitle@suse.com
- Fix catalog paths in ws-jaxme-catalog.patch
The DocBook XML 4.1.2 DTD cannot be retrieved from SGML catalogs
(/etc/sgml/catalog) but from XML catalogs (/etc/xml/catalog).
Corrected path from /etc/sgml/catalog to /etc/xml/catalog.
* Fri Oct 6 2017 fstrba@suse.com
- Allow building with jdk9
- Attached patch:
* ws-jaxme-0.5.2-proxygenerator.patch
- Generate correctly proxies even if the interface has static
methods that are allowed in jdk8+
* Tue Sep 12 2017 fstrba@suse.com
- Upgrade to 0.5.2
- BuildConflict with java-devel >= 1.9, since this package cannot
be built with jdk9
- BuildRequire java-devel >= 1.6
- Specify java source and target level 1.6
- Modified patch:
* ws-jaxme-java6.patch
- Adapt to the new context
- Added patches:
* ws-jaxme-sourcetarget.patch
- Build with java source and target level 1.6
* ws-jaxme-use-commons-codec.patch
- Use apache-commons-codec for base64 functionality instead
or private APIs that can disapear any time
* Fri Jul 11 2014 tchvatal@suse.com
- Do not version javadoc dir.
* Tue Jul 8 2014 tchvatal@suse.com
- Do not depend on ant-trax.
* Mon Sep 9 2013 tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
* Thu May 14 2009 mvyskocil@suse.cz
- Initial SUSE packaging (based on jpackage.org 5.0)

View File

@ -0,0 +1,25 @@
From c7b2913a7d552929a3182901466db69ba40e4340 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 12 Dec 2019 08:51:36 +0100
Subject: [PATCH 1/3] Remove unused import
---
.../java/org/apache/xbean/propertyeditor/PropertyEditors.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java b/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
index dda3bf4d..5c6285f2 100644
--- a/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
+++ b/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
@@ -19,8 +19,6 @@ package org.apache.xbean.propertyeditor;
import java.beans.PropertyEditorManager;
import java.lang.reflect.Type;
-import com.sun.org.apache.regexp.internal.RE;
-
/**
* The property editor manager. This orchestrates Geronimo usage of
* property editors, allowing additional search paths to be added and
--
2.21.0

View File

@ -1,35 +0,0 @@
From 5b1a0fe4400bffddd1ab31af91beaef7bb560f6c Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Thu, 12 May 2016 11:40:13 +0200
Subject: [PATCH 1/3] Unshade ASM
---
.../org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
index dea2f2a..303dfc3 100644
--- a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
+++ b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
@@ -17,12 +17,12 @@
*/
package org.apache.xbean.recipe;
-import org.apache.xbean.asm5.ClassReader;
-import org.apache.xbean.asm5.ClassVisitor;
-import org.apache.xbean.asm5.Label;
-import org.apache.xbean.asm5.MethodVisitor;
-import org.apache.xbean.asm5.Opcodes;
-import org.apache.xbean.asm5.Type;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
import java.io.IOException;
import java.io.InputStream;
--
2.9.3

View File

@ -0,0 +1,42 @@
From 4f7a61dcd47ed0dee2d78e31e2dd50b88ab42f25 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 12 Dec 2019 08:51:57 +0100
Subject: [PATCH 2/3] Unbundle ASM
---
.../xbean/recipe/XbeanAsmParameterNameLoader.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
index 20b646c..9e96775 100644
--- a/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
+++ b/xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
@@ -17,11 +17,11 @@
*/
package org.apache.xbean.recipe;
-import org.apache.xbean.asm9.ClassReader;
-import org.apache.xbean.asm9.ClassVisitor;
-import org.apache.xbean.asm9.Label;
-import org.apache.xbean.asm9.MethodVisitor;
-import org.apache.xbean.asm9.Type;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Type;
import java.io.IOException;
import java.io.InputStream;
@@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
-import static org.apache.xbean.asm9.shade.commons.AsmConstants.ASM_VERSION;
+import static org.apache.xbean.asm9.original.commons.AsmConstants.ASM_VERSION;
/**
* Implementation of ParameterNameLoader that uses ASM to read the parameter names from the local variable table in the
--
2.29.2

View File

@ -1,689 +0,0 @@
From 928bd5a98dc500a31197a56c8f6c5e19a3a273f8 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 21 Nov 2014 10:51:38 +0100
Subject: [PATCH 3/3] Port to QDox 2.0
---
pom.xml | 2 +-
.../blueprint/generator/QdoxMappingLoader.java | 144 +++++++++++---------
.../xbean/spring/generator/QdoxMappingLoader.java | 148 ++++++++++++---------
.../org/apache/xbean/spring/generator/Type.java | 7 +-
4 files changed, 166 insertions(+), 135 deletions(-)
diff --git a/pom.xml b/pom.xml
index 6e53649..9132fe4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -297,7 +297,7 @@
<dependency>
<groupId>com.thoughtworks.qdox</groupId>
<artifactId>qdox</artifactId>
- <version>1.6.3</version>
+ <version>2.0-M5</version>
</dependency>
<dependency>
diff --git a/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/QdoxMappingLoader.java b/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/QdoxMappingLoader.java
index 6635937..e17fd08 100644
--- a/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/QdoxMappingLoader.java
+++ b/xbean-blueprint/src/main/java/org/apache/xbean/blueprint/generator/QdoxMappingLoader.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@@ -31,14 +32,17 @@ import java.util.TreeSet;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import com.thoughtworks.qdox.JavaDocBuilder;
+import com.thoughtworks.qdox.JavaProjectBuilder;
import com.thoughtworks.qdox.model.BeanProperty;
import com.thoughtworks.qdox.model.DocletTag;
import com.thoughtworks.qdox.model.JavaClass;
+import com.thoughtworks.qdox.model.JavaConstructor;
import com.thoughtworks.qdox.model.JavaMethod;
+import com.thoughtworks.qdox.model.JavaModel;
import com.thoughtworks.qdox.model.JavaParameter;
import com.thoughtworks.qdox.model.JavaSource;
-import com.thoughtworks.qdox.model.Type;
+import com.thoughtworks.qdox.model.JavaType;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -62,7 +66,7 @@ public class QdoxMappingLoader implements MappingLoader {
private final String defaultNamespace;
private final File[] srcDirs;
private final String[] excludedClasses;
- private Type collectionType;
+ private JavaClass collectionType;
public QdoxMappingLoader(String defaultNamespace, File[] srcDirs, String[] excludedClasses) {
this.defaultNamespace = defaultNamespace;
@@ -79,7 +83,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
public Set<NamespaceMapping> loadNamespaces() throws IOException {
- JavaDocBuilder builder = new JavaDocBuilder();
+ JavaProjectBuilder builder = new JavaProjectBuilder();
log.debug("Source directories: ");
@@ -92,11 +96,11 @@ public class QdoxMappingLoader implements MappingLoader {
getSourceFiles(sourceDirectory, excludedClasses, builder);
}
- collectionType = builder.getClassByName("java.util.Collection").asType();
+ collectionType = builder.getClassByName("java.util.Collection");
return loadNamespaces(builder);
}
- private Set<NamespaceMapping> loadNamespaces(JavaDocBuilder builder) {
+ private Set<NamespaceMapping> loadNamespaces(JavaProjectBuilder builder) {
// load all of the elements
List<ElementMapping> elements = loadElements(builder);
@@ -131,14 +135,14 @@ public class QdoxMappingLoader implements MappingLoader {
return Collections.unmodifiableSet(namespaces);
}
- private List<ElementMapping> loadElements(JavaDocBuilder builder) {
- JavaSource[] javaSources = builder.getSources();
+ private List<ElementMapping> loadElements(JavaProjectBuilder builder) {
+ Collection<JavaSource> javaSources = builder.getSources();
List<ElementMapping> elements = new ArrayList<ElementMapping>();
for (JavaSource javaSource : javaSources) {
- if (javaSource.getClasses().length == 0) {
+ if (javaSource.getClasses().isEmpty()) {
log.info("No Java Classes defined in: " + javaSource.getURL());
} else {
- JavaClass[] classes = javaSource.getClasses();
+ Collection<JavaClass> classes = javaSource.getClasses();
for (JavaClass javaClass : classes) {
ElementMapping element = loadElement(builder, javaClass);
if (element != null && !javaClass.isAbstract()) {
@@ -152,7 +156,7 @@ public class QdoxMappingLoader implements MappingLoader {
return elements;
}
- private ElementMapping loadElement(JavaDocBuilder builder, JavaClass javaClass) {
+ private ElementMapping loadElement(JavaProjectBuilder builder, JavaClass javaClass) {
DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION);
if (xbeanTag == null) {
return null;
@@ -176,7 +180,7 @@ public class QdoxMappingLoader implements MappingLoader {
Map<String, AttributeMapping> attributesByPropertyName = new HashMap<String, AttributeMapping>();
for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) {
- BeanProperty[] beanProperties = jClass.getBeanProperties();
+ Collection<BeanProperty> beanProperties = jClass.getBeanProperties();
for (BeanProperty beanProperty : beanProperties) {
// we only care about properties with a setter
if (beanProperty.getMutator() != null) {
@@ -219,9 +223,9 @@ public class QdoxMappingLoader implements MappingLoader {
String destroyMethod = null;
String factoryMethod = null;
for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) {
- JavaMethod[] methods = javaClass.getMethods();
+ Collection<JavaMethod> methods = javaClass.getMethods();
for (JavaMethod method : methods) {
- if (method.isPublic() && !method.isConstructor()) {
+ if (method.isPublic()) {
if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) {
initMethod = method.getName();
}
@@ -237,22 +241,43 @@ public class QdoxMappingLoader implements MappingLoader {
}
List<List<ParameterMapping>> constructorArgs = new ArrayList<List<ParameterMapping>>();
- JavaMethod[] methods = javaClass.getMethods();
- for (JavaMethod method : methods) {
- JavaParameter[] parameters = method.getParameters();
- if (isValidConstructor(factoryMethod, method, parameters)) {
- List<ParameterMapping> args = new ArrayList<ParameterMapping>(parameters.length);
- for (JavaParameter parameter : parameters) {
- AttributeMapping attributeMapping = attributesByPropertyName.get(parameter.getName());
- if (attributeMapping == null) {
- attributeMapping = loadParameter(parameter);
-
- attributes.add(attributeMapping);
- attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping);
+ if (factoryMethod == null) {
+ Collection<JavaConstructor> constructors = javaClass.getConstructors();
+ for (JavaConstructor constructor : constructors) {
+ Collection<JavaParameter> parameters = constructor.getParameters();
+ if (constructor.isPublic() && parameters.size() > 0) {
+ List<ParameterMapping> args = new ArrayList<ParameterMapping>(parameters.size());
+ for (JavaParameter parameter : parameters) {
+ AttributeMapping attributeMapping = attributesByPropertyName.get(parameter.getName());
+ if (attributeMapping == null) {
+ attributeMapping = loadParameter(parameter, constructor);
+
+ attributes.add(attributeMapping);
+ attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping);
+ }
+ args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null)));
}
- args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null)));
+ constructorArgs.add(Collections.unmodifiableList(args));
+ }
+ }
+ } else {
+ Collection<JavaMethod> methods = javaClass.getMethods();
+ for (JavaMethod method : methods) {
+ Collection<JavaParameter> parameters = method.getParameters();
+ if (method.isPublic() && parameters.size() > 0 && method.getName().equals(factoryMethod)) {
+ List<ParameterMapping> args = new ArrayList<ParameterMapping>(parameters.size());
+ for (JavaParameter parameter : parameters) {
+ AttributeMapping attributeMapping = attributesByPropertyName.get(parameter.getName());
+ if (attributeMapping == null) {
+ attributeMapping = loadParameter(parameter, method);
+
+ attributes.add(attributeMapping);
+ attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping);
+ }
+ args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null)));
+ }
+ constructorArgs.add(Collections.unmodifiableList(args));
}
- constructorArgs.add(Collections.unmodifiableList(args));
}
}
@@ -303,7 +328,7 @@ public class QdoxMappingLoader implements MappingLoader {
interfaces);
}
- private List<String> getFullyQualifiedNames(JavaClass[] implementedInterfaces) {
+ private List<String> getFullyQualifiedNames(Collection<JavaClass> implementedInterfaces) {
ArrayList<String> l = new ArrayList<String>();
for (JavaClass implementedInterface : implementedInterfaces) {
l.add(implementedInterface.getFullyQualifiedName());
@@ -395,19 +420,19 @@ public class QdoxMappingLoader implements MappingLoader {
return defaultDescription;
}
- private AttributeMapping loadParameter(JavaParameter parameter) {
+ private AttributeMapping loadParameter(JavaParameter parameter, JavaModel methodOrConstructor) {
String parameterName = parameter.getName();
String parameterDescription = getParameterDescription(parameter);
// first attempt to load the attribute from the java beans accessor methods
- JavaClass javaClass = parameter.getParentMethod().getParentClass();
+ JavaClass javaClass = parameter.getParentClass();
BeanProperty beanProperty = javaClass.getBeanProperty(parameterName);
if (beanProperty != null) {
AttributeMapping attributeMapping = loadAttribute(beanProperty, parameterDescription);
// if the attribute mapping is null, the property was tagged as hidden and this is an error
if (attributeMapping == null) {
throw new InvalidModelException("Hidden property usage: " +
- "The construction method " + toMethodLocator(parameter.getParentMethod()) +
+ "The construction method " + toMethodLocator(parameter.getParentClass(), methodOrConstructor) +
" can not use a hidded property " + parameterName);
}
return attributeMapping;
@@ -426,9 +451,9 @@ public class QdoxMappingLoader implements MappingLoader {
private String getParameterDescription(JavaParameter parameter) {
String parameterName = parameter.getName();
- DocletTag[] tags = parameter.getParentMethod().getTagsByName("param");
+ Collection<DocletTag> tags = parameter.getTagsByName("param");
for (DocletTag tag : tags) {
- if (tag.getParameters()[0].equals(parameterName)) {
+ if (tag.getParameters().get(0).equals(parameterName)) {
String parameterDescription = tag.getValue().trim();
if (parameterDescription.startsWith(parameterName)) {
parameterDescription = parameterDescription.substring(parameterName.length()).trim();
@@ -439,18 +464,6 @@ public class QdoxMappingLoader implements MappingLoader {
return null;
}
- private boolean isValidConstructor(String factoryMethod, JavaMethod method, JavaParameter[] parameters) {
- if (!method.isPublic() || parameters.length == 0) {
- return false;
- }
-
- if (factoryMethod == null) {
- return method.isConstructor();
- } else {
- return method.getName().equals(factoryMethod);
- }
- }
-
private static String getProperty(DocletTag propertyTag, String propertyName) {
return getProperty(propertyTag, propertyName, null);
}
@@ -477,14 +490,17 @@ public class QdoxMappingLoader implements MappingLoader {
return false;
}
- private org.apache.xbean.blueprint.generator.Type toMappingType(Type type, String nestedType) {
+ private org.apache.xbean.blueprint.generator.Type toMappingType(JavaType type, String nestedType) {
try {
- if (type.isArray()) {
- return org.apache.xbean.blueprint.generator.Type.newArrayType(type.getValue(), type.getDimensions());
- } else if (type.isA(collectionType)) {
- if (nestedType == null) nestedType = "java.lang.Object";
- return org.apache.xbean.blueprint.generator.Type.newCollectionType(type.getValue(),
- org.apache.xbean.blueprint.generator.Type.newSimpleType(nestedType));
+ if (type instanceof JavaClass) {
+ JavaClass clazz = (JavaClass)type;
+ if (clazz.isArray()) {
+ return org.apache.xbean.blueprint.generator.Type.newArrayType(type.getValue(), clazz.getDimensions());
+ } else if (clazz.isA(collectionType)) {
+ if (nestedType == null) nestedType = "java.lang.Object";
+ return org.apache.xbean.blueprint.generator.Type.newCollectionType(type.getValue(),
+ org.apache.xbean.blueprint.generator.Type.newSimpleType(nestedType));
+ }
}
} catch (Throwable t) {
log.debug("Could not load type mapping", t);
@@ -492,26 +508,28 @@ public class QdoxMappingLoader implements MappingLoader {
return org.apache.xbean.blueprint.generator.Type.newSimpleType(type.getValue());
}
- private static String toMethodLocator(JavaMethod method) {
+ private static String toMethodLocator(JavaClass parentClass, JavaModel methodOrConstructor) {
+ JavaMethod method = methodOrConstructor instanceof JavaMethod ? (JavaMethod) methodOrConstructor : null;
+ JavaConstructor constructor = methodOrConstructor instanceof JavaConstructor ? (JavaConstructor) methodOrConstructor : null;
StringBuffer buf = new StringBuffer();
- buf.append(method.getParentClass().getFullyQualifiedName());
- if (!method.isConstructor()) {
+ buf.append(parentClass.getFullyQualifiedName());
+ if (method != null) {
buf.append(".").append(method.getName());
}
buf.append("(");
- JavaParameter[] parameters = method.getParameters();
- for (int i = 0; i < parameters.length; i++) {
- JavaParameter parameter = parameters[i];
+ List<JavaParameter> parameters = method != null ? method.getParameters() : constructor.getParameters();
+ for (int i = 0; i < parameters.size(); i++) {
+ JavaParameter parameter = parameters.get(i);
if (i > 0) {
buf.append(", ");
}
buf.append(parameter.getName());
}
- buf.append(") : ").append(method.getLineNumber());
+ buf.append(") : ").append(method != null ? method.getLineNumber() : constructor.getLineNumber());
return buf.toString();
}
- private static void getSourceFiles(File base, String[] excludedClasses, JavaDocBuilder builder) throws IOException {
+ private static void getSourceFiles(File base, String[] excludedClasses, JavaProjectBuilder builder) throws IOException {
if (base.isDirectory()) {
listAllFileNames(base, "", excludedClasses, builder);
} else {
@@ -519,7 +537,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
}
- private static void listAllFileNames(File base, String prefix, String[] excludedClasses, JavaDocBuilder builder) throws IOException {
+ private static void listAllFileNames(File base, String prefix, String[] excludedClasses, JavaProjectBuilder builder) throws IOException {
if (!base.canRead() || !base.isDirectory()) {
throw new IllegalArgumentException(base.getAbsolutePath());
}
@@ -536,7 +554,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
}
- private static void listAllJarEntries(File base, String[] excludedClasses, JavaDocBuilder builder) throws IOException {
+ private static void listAllJarEntries(File base, String[] excludedClasses, JavaProjectBuilder builder) throws IOException {
JarFile jarFile = new JarFile(base);
for (Enumeration entries = jarFile.entries(); entries.hasMoreElements(); ) {
JarEntry entry = (JarEntry) entries.nextElement();
diff --git a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
index 94bd7a1..228117e 100644
--- a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
+++ b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@@ -31,14 +32,17 @@ import java.util.TreeSet;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import com.thoughtworks.qdox.JavaDocBuilder;
+import com.thoughtworks.qdox.JavaProjectBuilder;
import com.thoughtworks.qdox.model.BeanProperty;
import com.thoughtworks.qdox.model.DocletTag;
import com.thoughtworks.qdox.model.JavaClass;
+import com.thoughtworks.qdox.model.JavaConstructor;
import com.thoughtworks.qdox.model.JavaMethod;
+import com.thoughtworks.qdox.model.JavaModel;
import com.thoughtworks.qdox.model.JavaParameter;
import com.thoughtworks.qdox.model.JavaSource;
-import com.thoughtworks.qdox.model.Type;
+import com.thoughtworks.qdox.model.JavaType;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -62,7 +66,7 @@ public class QdoxMappingLoader implements MappingLoader {
private final String defaultNamespace;
private final File[] srcDirs;
private final String[] excludedClasses;
- private Type collectionType;
+ private JavaClass collectionType;
public QdoxMappingLoader(String defaultNamespace, File[] srcDirs, String[] excludedClasses) {
this.defaultNamespace = defaultNamespace;
@@ -79,7 +83,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
public Set<NamespaceMapping> loadNamespaces() throws IOException {
- JavaDocBuilder builder = new JavaDocBuilder();
+ JavaProjectBuilder builder = new JavaProjectBuilder();
log.debug("Source directories: ");
@@ -92,11 +96,11 @@ public class QdoxMappingLoader implements MappingLoader {
getSourceFiles(sourceDirectory, excludedClasses, builder);
}
- collectionType = builder.getClassByName("java.util.Collection").asType();
+ collectionType = builder.getClassByName("java.util.Collection");
return loadNamespaces(builder);
}
- private Set<NamespaceMapping> loadNamespaces(JavaDocBuilder builder) {
+ private Set<NamespaceMapping> loadNamespaces(JavaProjectBuilder builder) {
// load all of the elements
List<ElementMapping> elements = loadElements(builder);
@@ -131,14 +135,14 @@ public class QdoxMappingLoader implements MappingLoader {
return Collections.unmodifiableSet(namespaces);
}
- private List<ElementMapping> loadElements(JavaDocBuilder builder) {
- JavaSource[] javaSources = builder.getSources();
+ private List<ElementMapping> loadElements(JavaProjectBuilder builder) {
+ Collection<JavaSource> javaSources = builder.getSources();
List<ElementMapping> elements = new ArrayList<ElementMapping>();
for (JavaSource javaSource : javaSources) {
- if (javaSource.getClasses().length == 0) {
+ if (javaSource.getClasses().isEmpty()) {
log.info("No Java Classes defined in: " + javaSource.getURL());
} else {
- JavaClass[] classes = javaSource.getClasses();
+ Collection<JavaClass> classes = javaSource.getClasses();
for (JavaClass javaClass : classes) {
ElementMapping element = loadElement(builder, javaClass);
if (element != null && !javaClass.isAbstract()) {
@@ -152,7 +156,7 @@ public class QdoxMappingLoader implements MappingLoader {
return elements;
}
- private ElementMapping loadElement(JavaDocBuilder builder, JavaClass javaClass) {
+ private ElementMapping loadElement(JavaProjectBuilder builder, JavaClass javaClass) {
DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION);
if (xbeanTag == null) {
return null;
@@ -176,7 +180,7 @@ public class QdoxMappingLoader implements MappingLoader {
Map<String, AttributeMapping> attributesByPropertyName = new HashMap<String, AttributeMapping>();
for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) {
- BeanProperty[] beanProperties = jClass.getBeanProperties();
+ Collection<BeanProperty> beanProperties = jClass.getBeanProperties();
for (BeanProperty beanProperty : beanProperties) {
// we only care about properties with a setter
if (beanProperty.getMutator() != null) {
@@ -219,9 +223,9 @@ public class QdoxMappingLoader implements MappingLoader {
String destroyMethod = null;
String factoryMethod = null;
for (JavaClass jClass = javaClass; jClass != null; jClass = jClass.getSuperJavaClass()) {
- JavaMethod[] methods = javaClass.getMethods();
+ Collection<JavaMethod> methods = javaClass.getMethods();
for (JavaMethod method : methods) {
- if (method.isPublic() && !method.isConstructor()) {
+ if (method.isPublic()) {
if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) {
initMethod = method.getName();
}
@@ -237,27 +241,48 @@ public class QdoxMappingLoader implements MappingLoader {
}
List<List<ParameterMapping>> constructorArgs = new ArrayList<List<ParameterMapping>>();
- JavaMethod[] methods = javaClass.getMethods();
- for (JavaMethod method : methods) {
- JavaParameter[] parameters = method.getParameters();
- if (isValidConstructor(factoryMethod, method, parameters)) {
- List<ParameterMapping> args = new ArrayList<ParameterMapping>(parameters.length);
- for (JavaParameter parameter : parameters) {
- AttributeMapping attributeMapping = attributesByPropertyName.get(parameter.getName());
- if (attributeMapping == null) {
- attributeMapping = loadParameter(parameter);
-
- attributes.add(attributeMapping);
- attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping);
+ if (factoryMethod == null) {
+ Collection<JavaConstructor> constructors = javaClass.getConstructors();
+ for (JavaConstructor constructor : constructors) {
+ Collection<JavaParameter> parameters = constructor.getParameters();
+ if (constructor.isPublic() && parameters.size() > 0) {
+ List<ParameterMapping> args = new ArrayList<ParameterMapping>(parameters.size());
+ for (JavaParameter parameter : parameters) {
+ AttributeMapping attributeMapping = attributesByPropertyName.get(parameter.getName());
+ if (attributeMapping == null) {
+ attributeMapping = loadParameter(parameter, constructor);
+
+ attributes.add(attributeMapping);
+ attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping);
+ }
+ args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null)));
}
- args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null)));
+ constructorArgs.add(Collections.unmodifiableList(args));
+ }
+ }
+ } else {
+ Collection<JavaMethod> methods = javaClass.getMethods();
+ for (JavaMethod method : methods) {
+ Collection<JavaParameter> parameters = method.getParameters();
+ if (method.isPublic() && parameters.size() > 0 && method.getName().equals(factoryMethod)) {
+ List<ParameterMapping> args = new ArrayList<ParameterMapping>(parameters.size());
+ for (JavaParameter parameter : parameters) {
+ AttributeMapping attributeMapping = attributesByPropertyName.get(parameter.getName());
+ if (attributeMapping == null) {
+ attributeMapping = loadParameter(parameter, method);
+
+ attributes.add(attributeMapping);
+ attributesByPropertyName.put(attributeMapping.getPropertyName(), attributeMapping);
+ }
+ args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(), null)));
+ }
+ constructorArgs.add(Collections.unmodifiableList(args));
}
- constructorArgs.add(Collections.unmodifiableList(args));
}
}
HashSet<String> interfaces = new HashSet<String>();
- interfaces.addAll(getFullyQualifiedNames(javaClass.getImplementedInterfaces()));
+ interfaces.addAll(getFullyQualifiedNames(javaClass.getInterfaces()));
JavaClass actualClass = javaClass;
if (factoryClass != null) {
@@ -282,7 +307,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
p = s;
superClasses.add(p.getFullyQualifiedName());
- interfaces.addAll(getFullyQualifiedNames(p.getImplementedInterfaces()));
+ interfaces.addAll(getFullyQualifiedNames(p.getInterfaces()));
}
return new ElementMapping(namespace,
@@ -303,7 +328,7 @@ public class QdoxMappingLoader implements MappingLoader {
interfaces);
}
- private List<String> getFullyQualifiedNames(JavaClass[] implementedInterfaces) {
+ private List<String> getFullyQualifiedNames(Collection<JavaClass> implementedInterfaces) {
ArrayList<String> l = new ArrayList<String>();
for (JavaClass implementedInterface : implementedInterfaces) {
l.add(implementedInterface.getFullyQualifiedName());
@@ -395,19 +420,19 @@ public class QdoxMappingLoader implements MappingLoader {
return defaultDescription;
}
- private AttributeMapping loadParameter(JavaParameter parameter) {
+ private AttributeMapping loadParameter(JavaParameter parameter, JavaModel methodOrConstructor) {
String parameterName = parameter.getName();
String parameterDescription = getParameterDescription(parameter);
// first attempt to load the attribute from the java beans accessor methods
- JavaClass javaClass = parameter.getParentMethod().getParentClass();
+ JavaClass javaClass = parameter.getDeclaringClass();
BeanProperty beanProperty = javaClass.getBeanProperty(parameterName);
if (beanProperty != null) {
AttributeMapping attributeMapping = loadAttribute(beanProperty, parameterDescription);
// if the attribute mapping is null, the property was tagged as hidden and this is an error
if (attributeMapping == null) {
throw new InvalidModelException("Hidden property usage: " +
- "The construction method " + toMethodLocator(parameter.getParentMethod()) +
+ "The construction method " + toMethodLocator(parameter.getDeclaringClass(), methodOrConstructor) +
" can not use a hidded property " + parameterName);
}
return attributeMapping;
@@ -426,9 +451,9 @@ public class QdoxMappingLoader implements MappingLoader {
private String getParameterDescription(JavaParameter parameter) {
String parameterName = parameter.getName();
- DocletTag[] tags = parameter.getParentMethod().getTagsByName("param");
+ Collection<DocletTag> tags = parameter.getTagsByName("param");
for (DocletTag tag : tags) {
- if (tag.getParameters()[0].equals(parameterName)) {
+ if (tag.getParameters().get(0).equals(parameterName)) {
String parameterDescription = tag.getValue().trim();
if (parameterDescription.startsWith(parameterName)) {
parameterDescription = parameterDescription.substring(parameterName.length()).trim();
@@ -439,18 +464,6 @@ public class QdoxMappingLoader implements MappingLoader {
return null;
}
- private boolean isValidConstructor(String factoryMethod, JavaMethod method, JavaParameter[] parameters) {
- if (!method.isPublic() || parameters.length == 0) {
- return false;
- }
-
- if (factoryMethod == null) {
- return method.isConstructor();
- } else {
- return method.getName().equals(factoryMethod);
- }
- }
-
private static String getProperty(DocletTag propertyTag, String propertyName) {
return getProperty(propertyTag, propertyName, null);
}
@@ -477,14 +490,17 @@ public class QdoxMappingLoader implements MappingLoader {
return false;
}
- private org.apache.xbean.spring.generator.Type toMappingType(Type type, String nestedType) {
+ private org.apache.xbean.spring.generator.Type toMappingType(JavaType type, String nestedType) {
try {
- if (type.isArray()) {
- return org.apache.xbean.spring.generator.Type.newArrayType(type.getValue(), type.getDimensions());
- } else if (type.isA(collectionType)) {
- if (nestedType == null) nestedType = "java.lang.Object";
- return org.apache.xbean.spring.generator.Type.newCollectionType(type.getValue(),
- org.apache.xbean.spring.generator.Type.newSimpleType(nestedType));
+ if (type instanceof JavaClass) {
+ JavaClass clazz = (JavaClass)type;
+ if (clazz.isArray()) {
+ return org.apache.xbean.spring.generator.Type.newArrayType(type.getValue(), clazz.getDimensions());
+ } else if (clazz.isA(collectionType)) {
+ if (nestedType == null) nestedType = "java.lang.Object";
+ return org.apache.xbean.spring.generator.Type.newCollectionType(type.getValue(),
+ org.apache.xbean.spring.generator.Type.newSimpleType(nestedType));
+ }
}
} catch (Throwable t) {
log.debug("Could not load type mapping", t);
@@ -492,26 +508,28 @@ public class QdoxMappingLoader implements MappingLoader {
return org.apache.xbean.spring.generator.Type.newSimpleType(type.getValue());
}
- private static String toMethodLocator(JavaMethod method) {
+ private static String toMethodLocator(JavaClass parentClass, JavaModel methodOrConstructor) {
+ JavaMethod method = methodOrConstructor instanceof JavaMethod ? (JavaMethod) methodOrConstructor : null;
+ JavaConstructor constructor = methodOrConstructor instanceof JavaConstructor ? (JavaConstructor) methodOrConstructor : null;
StringBuffer buf = new StringBuffer();
- buf.append(method.getParentClass().getFullyQualifiedName());
- if (!method.isConstructor()) {
+ buf.append(parentClass.getFullyQualifiedName());
+ if (method != null) {
buf.append(".").append(method.getName());
}
buf.append("(");
- JavaParameter[] parameters = method.getParameters();
- for (int i = 0; i < parameters.length; i++) {
- JavaParameter parameter = parameters[i];
+ List<JavaParameter> parameters = method != null ? method.getParameters() : constructor.getParameters();
+ for (int i = 0; i < parameters.size(); i++) {
+ JavaParameter parameter = parameters.get(i);
if (i > 0) {
buf.append(", ");
}
buf.append(parameter.getName());
}
- buf.append(") : ").append(method.getLineNumber());
+ buf.append(") : ").append(method != null ? method.getLineNumber() : constructor.getLineNumber());
return buf.toString();
}
- private static void getSourceFiles(File base, String[] excludedClasses, JavaDocBuilder builder) throws IOException {
+ private static void getSourceFiles(File base, String[] excludedClasses, JavaProjectBuilder builder) throws IOException {
if (base.isDirectory()) {
listAllFileNames(base, "", excludedClasses, builder);
} else {
@@ -519,7 +537,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
}
- private static void listAllFileNames(File base, String prefix, String[] excludedClasses, JavaDocBuilder builder) throws IOException {
+ private static void listAllFileNames(File base, String prefix, String[] excludedClasses, JavaProjectBuilder builder) throws IOException {
if (!base.canRead() || !base.isDirectory()) {
throw new IllegalArgumentException(base.getAbsolutePath());
}
@@ -536,7 +554,7 @@ public class QdoxMappingLoader implements MappingLoader {
}
}
- private static void listAllJarEntries(File base, String[] excludedClasses, JavaDocBuilder builder) throws IOException {
+ private static void listAllJarEntries(File base, String[] excludedClasses, JavaProjectBuilder builder) throws IOException {
JarFile jarFile = new JarFile(base);
for (Enumeration entries = jarFile.entries(); entries.hasMoreElements(); ) {
JarEntry entry = (JarEntry) entries.nextElement();
diff --git a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java
index 5eac64c..0d9fa63 100644
--- a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java
+++ b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java
@@ -41,12 +41,7 @@ public class Type {
public static Type newArrayType(String type, int dimensions) {
if (type == null) throw new NullPointerException("type");
if (dimensions < 1) throw new IllegalArgumentException("dimensions must be atleast one");
- StringBuffer buf = new StringBuffer(type.length() + (dimensions * 2));
- buf.append(type);
- for (int i = 0; i < dimensions; i ++) {
- buf.append("[]");
- }
- return new Type(buf.toString(), newSimpleType(type));
+ return new Type(type, newSimpleType(type.replaceAll("\\[\\]", "")));
}
public static Type newCollectionType(String collectionType, Type elementType) {
--
2.9.3

View File

@ -0,0 +1,35 @@
From 28e37850d8343f44f82e3138c772dd65d1d0ff2f Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 12 Dec 2019 08:52:26 +0100
Subject: [PATCH 3/3] Remove dependency on log4j and commons-logging
---
.../xbean/propertyeditor/PropertyEditorRegistry.java | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java b/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java
index e7e17edd..be302861 100644
--- a/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java
+++ b/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditorRegistry.java
@@ -84,18 +84,6 @@ public class PropertyEditorRegistry implements Closeable {
register(new VectorEditor());
register(new WeakHashMapEditor());
- try {
- register(new Log4jConverter());
- } catch (final Throwable e) {
- // no-op
- }
-
- try {
- register(new CommonsLoggingConverter());
- } catch (final Throwable e) {
- // no-op
- }
-
return this;
}
--
2.21.0

View File

@ -1,5 +1,5 @@
{
"Signatures": {
"xbean-4.5-source-release.zip": "501a3cdacd5c42d0e5f691a0c3fd903a5f335f0d446f96c0be52ab0c58533b17"
"xbean-4.18-source-release.zip": "c23355e3584961addb3d04ba3777e70314d37e3cf265992a961974f1eb762e50"
}
}

View File

@ -1,175 +1,345 @@
%bcond_with bootstrap
Summary: Java plugin based web server
Name: xbean
Version: 4.18
Release: 6%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Mariner
#
# spec file for package xbean
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: xbean
Version: 4.5
Release: 6%{?dist}
Summary: Java plugin based web server
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://geronimo.apache.org/xbean/
Source0: http://repo2.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
# Fix dependency on xbean-asm4-shaded to original objectweb-asm
Patch0: 0001-Unshade-ASM.patch
Patch2: 0003-Port-to-QDox-2.0.patch
BuildRequires: apache-commons-logging
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local-bootstrap
BuildRequires: log4j12
BuildRequires: objectweb-asm >= 5
BuildRequires: slf4j
BuildRequires: unzip
# The code uses sun.misc.URLClassloader
BuildConflicts: java-devel >= 9
BuildConflicts: java-headless >= 9
# Avoid build cycles
BuildConflicts: java-devel-openj9
BuildConflicts: java-headless-openj9
Requires: objectweb-asm >= 5
Requires: slf4j
Source0: https://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
Patch1: 0001-Remove-unused-import.patch
Patch2: 0002-Unbundle-ASM.patch
Patch3: 0003-Remove-dependency-on-log4j-and-commons-logging.patch
BuildArch: noarch
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.osgi:org.osgi.core)
BuildRequires: mvn(org.ow2.asm:asm)
BuildRequires: mvn(org.ow2.asm:asm-commons)
BuildRequires: mvn(org.slf4j:slf4j-api)
%endif
%description
XBean is a plugin-based server analogous to Eclipse being a
plugin-based IDE. XBean is able to discover, download and install
server plugins from an Internet-based repository. Support for
multiple IoC systems, support for running with no IoC system, JMX
without JMX code, lifecycle and class loader management, and a Spring
integration is included.
The goal of XBean project is to create a plugin based server
analogous to Eclipse being a plugin based IDE. XBean will be able to
discover, download and install server plugins from an Internet based
repository. In addition, we include support for multiple IoC systems,
support for running with no IoC system, JMX without JMX code,
lifecycle and class loader management, and a rock solid Spring
integration.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides API documentation for xbean.
This package provides %{summary}.
%prep
%setup -q
# build failing on this due to doxia-sitetools problems
rm src/site/site.xml
%autosetup -p1
%patch0 -p1
%patch2 -p1
cp xbean-asm-util/src/main/java/org/apache/xbean/asm9/original/commons/AsmConstants.java xbean-reflect/src/main/java/org/apache/xbean/recipe/
# Parent POM is not packaged
%pom_remove_parent
%pom_remove_dep mx4j:mx4j
%pom_remove_dep -r :xbean-asm5-shaded
%pom_remove_dep -r :xbean-finder-shaded
%pom_disable_module xbean-asm5-shaded
%pom_disable_module xbean-finder-shaded
%pom_xpath_remove pom:scope xbean-asm-util
%pom_xpath_remove pom:optional xbean-asm-util
# Prevent modules depending on springframework from building.
%pom_remove_dep org.springframework:
%pom_disable_module xbean-classloader
%pom_disable_module xbean-spring
%pom_disable_module maven-xbean-plugin
rm -rf maven-xbean-plugin
# blueprint FTBFS, disable for now
%pom_disable_module xbean-classpath
%pom_disable_module xbean-bundleutils
%pom_disable_module xbean-asm9-shaded
%pom_disable_module xbean-finder-shaded
%pom_disable_module xbean-naming
%pom_disable_module xbean-blueprint
%pom_disable_module xbean-spring
%pom_disable_module xbean-telnet
%pom_disable_module maven-xbean-plugin
%pom_remove_dep :commons-logging-api xbean-reflect
%pom_remove_dep :log4j xbean-reflect
%pom_remove_dep :xbean-asm9-shaded xbean-reflect
find -name CommonsLoggingConverter.java -delete
find -name Log4jConverter.java -delete
# Plugins useful for upstream only
%pom_remove_plugin :apache-rat-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_dep :xbean-bundleutils xbean-finder
rm -r xbean-finder/src/main/java/org/apache/xbean/finder{,/archive}/Bundle*
%pom_disable_module xbean-bundleutils
%pom_disable_module xbean-telnet
# maven-xbean-plugin invocation makes no sense as there are no namespaces
%pom_remove_plugin :maven-xbean-plugin xbean-classloader
# As auditing tool RAT is useful for upstream only.
%pom_remove_plugin :apache-rat-plugin
# disable copy of internal aries-blueprint
sed -i "s|<Private-Package>|<!--Private-Package>|" xbean-blueprint/pom.xml
sed -i "s|</Private-Package>|</Private-Package-->|" xbean-blueprint/pom.xml
%pom_change_dep -r -f ::::: :::::
# Disable one test that fails on JDK 11
sed -i '/testGetBytecode/i@org.junit.Ignore' xbean-finder/src/test/java/org/apache/xbean/finder/archive/MJarJarArchiveTest.java
%build
for i in xbean-asm-util xbean-classpath xbean-finder xbean-naming xbean-reflect; do
pushd $i
mkdir -p build/classes
javac -d build/classes -encoding utf-8 -source 6 -target 6 \
-cp $(build-classpath log4j12/log4j-12 commons-logging-api slf4j/api objectweb-asm/asm objectweb-asm/asm-commons):../xbean-asm-util/xbean-asm-util.jar \
$(find src/main/java -name *.java)
jar cf $i.jar -C build/classes .
popd
done
mkdir -p build/apidoc
javadoc -d build/apidoc -source 6 -encoding utf-8 \
-Xdoclint:none \
-classpath $(build-classpath log4j12/log4j-12 commons-logging-api slf4j/api objectweb-asm/asm objectweb-asm/asm-commons) \
$(for i in xbean-asm-util xbean-classpath xbean-finder xbean-naming xbean-reflect; do find $i/src/main/java -name *.java; done | xargs)
%mvn_build -- -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7
%install
# jars && poms
install -dm 755 %{buildroot}%{_javadir}/%{name}
install -dm 755 %{buildroot}%{_mavenpomdir}/%{name}
for i in xbean-asm-util xbean-classpath xbean-finder xbean-naming xbean-reflect; do
install -m 0644 $i/$i.jar %{buildroot}%{_javadir}/%{name}
%pom_remove_parent ${i}
%pom_xpath_inject pom:project "<groupId>org.apache.xbean</groupId><version>%{version}</version>" ${i}
install -m 0644 $i/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/$i.pom
%add_maven_depmap %{name}/$i.pom %{name}/$i.jar
done
# javadoc
install -dm 755 %{buildroot}/%{_javadocdir}/%{name}
cp -aL build/apidoc/* %{buildroot}/%{_javadocdir}/%{name}
%fdupes -s %{buildroot}/%{_javadocdir}/%{name}
%mvn_install
%files -f .mfiles
%license LICENSE
%doc NOTICE
%license LICENSE NOTICE
%files javadoc
%{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.5-6
- Converting the 'Release' tag to the '[number].[distribution]' format.
* Tue Jan 25 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.18-6
- Initial CBL-Mariner import from Fedora 36 (license: MIT).
- License verified.
* Fri Nov 13 2020 Ruying Chen <v-ruyche@microsoft.com> - 4.5-5.5
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
- Use javapackages-local-bootstrap to avoid build cycle.
- Disable javadoc Xdoclint.
* Tue Nov 02 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.18-5
- Set explicit Java compiler source/target levels to 1.7
* Mon Jan 27 2020 Fridrich Strba <fstrba@suse.com>
- On supported platforms, avoid building with OpenJ9, in order to
prevent build cycles
* Sat Oct 5 2019 Fridrich Strba <fstrba@suse.com>
- Remove references to parent from all pom files
- Avoid version-less dependencies
* Tue Oct 1 2019 Fridrich Strba <fstrba@suse.com>
- Build against the new log4j12 compat package
* Thu Apr 4 2019 Fridrich Strba <fstrba@suse.com>
- Do not require optional dependencies
* Thu Feb 7 2019 Jan Engelhardt <jengelh@inai.de>
- Trim future goals from description.
- Avoid double-shipping documentation.
* Thu Oct 25 2018 Fridrich Strba <fstrba@suse.com>
- Initial packaging of xbean version 4.5
- Spec file inspired by Fedora rpm package
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.18-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 21 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.18-3
- Enable xbean-finder
- Resolves: rhbz#1969297
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.18-2
- Bootstrap build
- Non-bootstrap build
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.15-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 26 2021 Marian Koncek <mkoncek@redhat.com> - 4.18-1
- Update to upstream version 4.18
* Wed Sep 09 2020 Fabio Valentini <decathorpe@gmail.com> - 4.15-6
- Switch from log4j 1.2 compat package to log4j 1.2 API shim.
* Wed Jul 29 2020 Marian Koncek <mkoncek@redhat.com> - 4.17-1
- Update to upsteam version 4.17
* Wed Jul 29 2020 Mat Booth <mat.booth@redhat.com> - 4.15-5
- Remove springframework conditionals, the deps are a long time removed from
Fedora and this simplifies the spec a bit
- Disable unused modules that can't build on JDK 11
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 4.15-4
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Thu Jun 25 2020 Jeff Johnston <jjohnstn@redhat.com> - 4.15-3
- Fix JVM as 1.8.0 as package cannot be built with Java 9 and above
* Fri May 15 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.14-4
- Remove dependency on log4j and commons-logging
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Nov 13 2019 Fabio Valentini <decathorpe@gmail.com> - 4.15-1
- Update to version 4.15.
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.14-3
- Mass rebuild for javapackages-tools 201902
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.14-2
- Disable all modules except xbean-reflect
* Wed Sep 18 2019 Fabio Valentini <decathorpe@gmail.com> - 4.14-2
- Migrate from the obsolete felix-osgi-core to osgi-core.
* Tue Aug 20 2019 Fabio Valentini <decathorpe@gmail.com> - 4.14-1
- Update to version 4.14.
* Sun Jul 28 2019 Fabio Valentini <decathorpe@gmail.com> - 4.9-5
- Disable support for spring and groovy.
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jul 09 2019 Fabio Valentini <decathorpe@gmail.com> - 4.9-3
- Disable eclipse equinox functionality to fix the FTBFS issue on 32bit arches.
* Wed Jun 26 2019 Marian Koncek <mkoncek@redhat.com> - 4.14-1
- Update to upstream version 4.14
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.8-2
- Mass rebuild for javapackages-tools 201901
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Aug 07 2018 Michael Simacek <msimacek@redhat.com> - 4.9-1
- Update to upstream version 4.9
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Apr 19 2018 Michael Simacek <msimacek@redhat.com> - 4.8-1
- Update to upstream version 4.8
* Tue Mar 13 2018 Michael Simacek <msimacek@redhat.com> - 4.6-1
- Update to upstream version 4.6
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 1 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5-6
- Introduce groovy build conditional
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 4.5-5
- Fix build with conditionals
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 4.5-4
- Port to current QDox
* Thu Jun 16 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5-3
- Add missing build-requires
* Thu May 12 2016 Michael Simacek <msimacek@redhat.com> - 4.5-2
- Enable xbean-asm-util
* Mon May 02 2016 Michael Simacek <msimacek@redhat.com> - 4.5-1
- Update to upstream version 4.5
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 24 2015 Michael Simacek <msimacek@redhat.com> - 4.4-1
- Update to upstream version 4.4
- Rebase patches
- Remove obsolete groovy patch
* Mon Jul 13 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3-1
- Update to upstream version 4.3
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 1 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2-1
- Update to upstream version 4.2
* Thu Feb 5 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-2
- Fix patch unshading ASM
* Fri Nov 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-1
- Update to upstream version 4.1
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Apr 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.17-1
- Update to upstream version 3.17
- Add patch for Eclipse Luna
* Thu Dec 5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.16-1
- Update to upstream version 3.16
* Thu Aug 08 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.13-4
- Update to latest packaging guidelines
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Apr 29 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.13-2
- Remove unneeded BR: maven-idea-plugin
* Fri Mar 15 2013 Michal Srb <msrb@redhat.com> - 3.13-1
- Update to upstream version 3.13
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 3.12-5
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local
* Mon Dec 17 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-4
- Enable xbean-spring, resolves rhbz#887496
- Disable xbean-blueprint due to FTBFS
* Mon Oct 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-3
- Replace eclipse-rcp requires with eclipse-equinox-osgi
- Reenable Equinox
* Tue Oct 16 2012 gil cattaneo <puntogil@libero.it> - 3.12-2
- Enable xbean-blueprint and xbean-classloader modules
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-1
- Update to upstream version 3.12
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-8
- Revert previous changes.
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-7
- Disable parts dependent on Eclipse (for bootstraping purpose).
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-6
- Implement equinox and spring conditionals
* Mon Sep 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-5
- Fix eclipse requires
* Mon Aug 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-4
- Fix felix-framework enabling patch
* Mon Aug 6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-3
- Enable xbean-spring
- Enable maven-xbean-plugin
- Remove RPM bug workaround
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jul 13 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-1
- Update to the upstream version 3.11.1
- Force use of Equinox instead of Felix
- Convert patch to POM macros
* Thu May 3 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-5
- Remove mx4j from deps (javax.management provided by JDK 1.5+)
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-4
- BR felix-framework instead of felix-osgi-core.
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-3
- Do not build equinox specific parts for RHEL.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 6 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-1
- Update to latest upstream version
- Build with maven 3
- Packaging & guidelines fixes
* Sat May 28 2011 Marek Goldmann <mgoldman@redhat.com> - 3.7-7
- Added xbean-finder and xbean-bundleutils submodules
* Fri Mar 4 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-6
- Add comment for removing javadoc
- Fix maven 3 build
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Dec 6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-4
- Fix pom filename (Resolves rhbz#655827)
- Add depmap for main pom file
- Fixes according to new guidelines (versionless jars, javadocs)
* Fri Jul 30 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-3
- Use javadoc:aggregate to generate javadocs
* Fri Jul 9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-2
- Add license to javadoc subpackage
* Mon Jun 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-1
- First release

View File

@ -2,8 +2,8 @@
"Signatures": {
"xml-apis-2.0.2.pom": "a902d962402c02f4c1a57c5a2303a608a8ac3aef5cd145e1980563447603d606",
"xml-apis-ext-1.3.04.pom": "1b5939a9310a59c0df0c03726721d5fc9521e87d6c203bfa7220bae82a30d9e8",
"xml-commons-apis-1.4.01.tar.gz": "733451afc78f7de7ff147330278fa8991d687255014ba37e4397592ac5f23c07",
"xml-commons-apis-MANIFEST.MF": "0e6f58c302c1918472404ae561302522c8eb80ec2c3be4430ee3904695564b01",
"xml-commons-apis-ext-MANIFEST.MF": "3e0acbc9897f8ae4b3aaff08ce2140bcd203ffaed37fd3d4444e2f64bc87e01a",
"xml-commons-external-1.4.01-src.tar.xz": "6a3e7fc5a6714e22722f10fb4b8ae4cfa23d066d48b607721c9b17aa761dd75e"
"xml-commons-apis-ext-MANIFEST.MF": "3e0acbc9897f8ae4b3aaff08ce2140bcd203ffaed37fd3d4444e2f64bc87e01a"
}
}

View File

@ -1,3 +1,5 @@
%global underscore_version $(echo %{version} | cut -d. -f1-3 --output-delimiter="_")
Vendor: Microsoft Corporation
Distribution: Mariner
#
@ -20,19 +22,18 @@ Distribution: Mariner
Name: xml-commons-apis
Version: 1.4.01
Release: 4%{?dist}
Release: 5%{?dist}
Summary: APIs for DOM, SAX, and JAXP
License: Apache-2.0 AND W3C AND SUSE-Public-Domain
License: ASL 2.0 AND W3C AND SUSE-Public-Domain
Group: Development/Libraries/Java
URL: http://xml.apache.org/commons/
URL: https://xml.apache.org/commons/
# From source control because the published tarball doesn't include some docs:
# svn export http://svn.apache.org/repos/asf/xerces/xml-commons/tags/xml-commons-external-1_4_01/java/external
# tar cJf xml-commons-external-1.4.01-src.tar.xz external
Source0: xml-commons-external-1.4.01-src.tar.xz
# toolkit/scripts/svn2source.sh https://svn.apache.org/repos/asf/xerces/xml-commons/tags/xml-commons-external-%%{underscore_version}/java/external %%{name}-%%{version}
Source0: https://svn.apache.org/repos/asf/xerces/xml-commons/tags/xml-commons-external-%{underscore_version}/java/external#/%{name}-%{version}.tar.gz
Source1: %{name}-MANIFEST.MF
Source2: %{name}-ext-MANIFEST.MF
Source3: http://repo1.maven.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.pom
Source4: http://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.pom
Source3: https://repo1.maven.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.pom
Source4: https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.pom
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel
@ -46,11 +47,6 @@ Provides: xml-commons-jaxp-1.1-apis
Provides: xml-commons-jaxp-1.2-apis
Provides: xml-commons-jaxp-1.3-apis
Provides: xml-commons-jaxp-1.4-apis
Obsoletes: xerces-j2-xml-apis
Obsoletes: xml-commons-jaxp-1.1-apis
Obsoletes: xml-commons-jaxp-1.2-apis
Obsoletes: xml-commons-jaxp-1.3-apis
Obsoletes: xml-commons-jaxp-1.4-apis
BuildArch: noarch
%description
@ -58,22 +54,8 @@ xml-commons-apis is designed to organize and have common packaging for
the various externally-defined standard interfaces for XML. This
includes the DOM, SAX, and JAXP.
%package manual
Summary: Manual for %{name}
Group: Documentation/HTML
%description manual
%{summary}.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
%{summary}.
%prep
%setup -q -n external
%autosetup
# Make sure upstream hasn't sneaked in any jars we don't know about
find "(" -name "*.class" -o -name "*.jar" ")" -delete
@ -90,7 +72,7 @@ sed -i '/distributionManagement/,/\/distributionManagement/ {d}' *.pom
%pom_remove_parent xml-apis-ext*.pom
%build
ant -Dant.build.javac.source=6 -Dant.build.javac.target=6 jar javadoc
ant -Dant.build.javac.source=8 -Dant.build.javac.target=8 jar
# inject OSGi manifests
jar ufm build/xml-apis.jar %{SOURCE1}
@ -123,11 +105,6 @@ install -pm 644 xml-apis-[0-9]*.pom %{buildroot}%{_mavenpomdir}/xml-commons-apis
install -pm 644 xml-apis-ext*.pom %{buildroot}%{_mavenpomdir}/xml-commons-apis-ext.pom
%add_maven_depmap xml-commons-apis-ext.pom xml-commons-apis-ext.jar -a xerces:dom3-xml-apis
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -a build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
# prevent apis javadoc from being included in doc
rm -rf build/docs/javadoc
%fdupes -s build/docs/
@ -137,13 +114,12 @@ rm -rf build/docs/javadoc
%doc NOTICE README.dom.txt README-sax README.sax.txt
%{_javadir}/*
%files manual
%doc build/docs/*
%files javadoc
%{_javadocdir}/%{name}
%changelog
* Thu Jan 20 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.4.01-5
- Updated spec to enabled build with new tooling.
- Removed 'javadoc' and 'manual' subpackages.
- License verified.
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.4.01-4
- Converting the 'Release' tag to the '[number].[distribution]' format.

File diff suppressed because one or more lines are too long

View File

@ -194,6 +194,7 @@
"docbook5-schemas",
"docbook5-style-xsl",
"dogtail",
"dom4j",
"dos2unix",
"dotconf",
"dovecot",
@ -2183,6 +2184,7 @@
"v4l-utils",
"varnish",
"varnish-modules",
"velocity",
"vhostmd",
"vino",
"virglrenderer",
@ -2222,6 +2224,7 @@
"x3270",
"xapian-core",
"Xaw3d",
"xbean",
"xcb-proto",
"xcb-util",
"xcb-util-image",
@ -2465,7 +2468,6 @@
"aqute-bnd",
"args4j",
"atinject",
"avalon-logkit",
"base64coder",
"bazel-workspaces",
"bcel",
@ -2482,7 +2484,6 @@
"cglib",
"cni",
"cri-o",
"dom4j",
"easymock",
"ecj",
"envoy",
@ -2538,7 +2539,6 @@
"libcontainers-common",
"libva",
"libvdpau",
"log4j12",
"lynx",
"maven",
"maven-antrun-plugin",
@ -2636,11 +2636,8 @@
"snakeyaml",
"testng",
"trilead-ssh2",
"velocity",
"werken-xpath",
"ws-jaxme",
"xalan-j2",
"xbean",
"xcursor-themes",
"xerces-j2",
"xml-commons-apis",

View File

@ -245,8 +245,8 @@
"type": "other",
"other": {
"name": "ant-antlr",
"version": "1.10.9",
"downloadUrl": "https://www.apache.org/dist/ant/source/apache-ant-1.10.9-src.tar.xz"
"version": "1.10.11",
"downloadUrl": "https://www.apache.org/dist/ant/source/apache-ant-1.10.11-src.tar.gz"
}
}
},
@ -275,8 +275,8 @@
"type": "other",
"other": {
"name": "ant-junit",
"version": "1.10.9",
"downloadUrl": "https://www.apache.org/dist/ant/source/apache-ant-1.10.9-src.tar.xz"
"version": "1.10.11",
"downloadUrl": "https://www.apache.org/dist/ant/source/apache-ant-1.10.11-src.tar.gz"
}
}
},
@ -2923,6 +2923,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "dom4j",
"version": "2.0.3",
"downloadUrl": "https://github.com/dom4j/dom4j/archive/version-2.0.3.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -28988,7 +28998,7 @@
"other": {
"name": "velocity",
"version": "1.7",
"downloadUrl": "http://www.apache.org/dist/velocity/engine/1.7/velocity-1.7.tar.gz"
"downloadUrl": "https://github.com/apache/velocity-engine/archive/refs/tags/1.7.tar.gz"
}
}
},
@ -29438,8 +29448,8 @@
"type": "other",
"other": {
"name": "xbean",
"version": "4.5",
"downloadUrl": "http://repo2.maven.org/maven2/org/apache/xbean/xbean/4.5/xbean-4.5-source-release.zip"
"version": "4.18",
"downloadUrl": "https://repo1.maven.org/maven2/org/apache/xbean/xbean/4.18/xbean-4.18-source-release.zip"
}
}
},
@ -29863,6 +29873,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "xml-commons-apis",
"version": "1.4.01",
"downloadUrl": "https://svn.apache.org/repos/asf/xerces/xml-commons/tags/xml-commons-external-1_4_01/java/external"
}
}
},
{
"component": {
"type": "other",

40
toolkit/scripts/svn2source.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Best effort tool to convert SVN tags into source tarballs.
# $1 - SVN tag URL.
# $2 - Tarball name.
set -e
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo "Usage: $0 REPO_URL TARBALL_NAME"
exit 1
fi
REPO="$1"
EXPORT_DIR="$2"
TARBALL_NAME="$EXPORT_DIR.tar.gz"
MANIFEST="$(mktemp -t)"
function clean_up {
rm -rf "$EXPORT_DIR"
rm -f "$MANIFEST"
}
trap clean_up EXIT SIGINT SIGTERM
umask 000
svn export "$REPO" "$EXPORT_DIR"
find "$EXPORT_DIR" -type f | sed 's/^\.*\/*//'| sort > "$MANIFEST"
tar -cf "$TARBALL_NAME" \
--sort=name \
--mtime="2021-04-26 00:00Z" \
--owner 0 --group 0 --numeric-owner \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
--files-from "$MANIFEST"
echo "Packed '$TARBALL_NAME'."
sha256sum "$TARBALL_NAME"