From bd639ea4eb5fb77d7d965de3e6fe53d6b0944c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 19 Feb 2024 15:44:15 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 maven-doxia revision c6a06ede79563f4698b80d27f1f61be6 --- .gitattributes | 23 +++ 0002-Commons-configuration2.patch | 72 +++++++ doxia-1.12.0-source-release.zip | 3 + maven-doxia-build.tar.xz | 3 + maven-doxia.changes | 85 ++++++++ maven-doxia.spec | 310 ++++++++++++++++++++++++++++++ 6 files changed, 496 insertions(+) create mode 100644 .gitattributes create mode 100644 0002-Commons-configuration2.patch create mode 100644 doxia-1.12.0-source-release.zip create mode 100644 maven-doxia-build.tar.xz create mode 100644 maven-doxia.changes create mode 100644 maven-doxia.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0002-Commons-configuration2.patch b/0002-Commons-configuration2.patch new file mode 100644 index 0000000..2b51f61 --- /dev/null +++ b/0002-Commons-configuration2.patch @@ -0,0 +1,72 @@ +--- doxia-1.12.0/doxia-modules/doxia-module-fo/pom.xml.orig 2023-01-09 21:09:18.000000000 -0700 ++++ doxia-1.12.0/doxia-modules/doxia-module-fo/pom.xml 2023-06-12 15:58:35.171254714 -0600 +@@ -71,9 +71,9 @@ under the License. + + + +- commons-configuration +- commons-configuration +- 1.10 ++ org.apache.commons ++ commons-configuration2 ++ 2.9.0 + + + commons-collections +--- doxia-1.12.0/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java.orig 2023-01-09 21:09:18.000000000 -0700 ++++ doxia-1.12.0/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java 2023-06-12 17:00:19.630450286 -0600 +@@ -20,14 +20,16 @@ package org.apache.maven.doxia.module.fo + */ + + import java.io.File; ++import java.io.FileReader; + import java.io.IOException; + import java.util.List; + + import javax.swing.text.MutableAttributeSet; + import javax.swing.text.SimpleAttributeSet; + +-import org.apache.commons.configuration.ConfigurationException; +-import org.apache.commons.configuration.XMLConfiguration; ++import org.apache.commons.configuration2.XMLConfiguration; ++import org.apache.commons.configuration2.ex.ConfigurationException; ++import org.apache.commons.configuration2.io.FileLocatorUtils; + import org.apache.maven.doxia.sink.impl.SinkUtils; + import org.codehaus.plexus.util.ReaderFactory; + +@@ -55,9 +57,6 @@ public class FoConfiguration + { + this.config = new XMLConfiguration(); + +- // necessary because some attributes contain commas: +- config.setDelimiterParsingDisabled( true ); +- + loadDefaultConfig(); + } + +@@ -75,10 +74,11 @@ public class FoConfiguration + throws IOException + { + config.clear(); ++ config.initFileLocator( FileLocatorUtils.fileLocator().basePath( configFile.getParent() ).fileName( configFile.getName() ).create() ); + + try + { +- config.load( configFile ); ++ config.read( new FileReader(configFile) ); + } + catch ( ConfigurationException cex ) + { +@@ -182,9 +182,11 @@ public class FoConfiguration + /** Load the default fo configuration file. */ + private void loadDefaultConfig() + { ++ config.initFileLocator( FileLocatorUtils.fileLocator().sourceURL( getClass().getResource( "/fo-styles.xslt" ) ).create() ); ++ + try + { +- config.load( ReaderFactory.newXmlReader( getClass().getResourceAsStream( "/fo-styles.xslt" ) ) ); ++ config.read( ReaderFactory.newXmlReader( getClass().getResourceAsStream( "/fo-styles.xslt" ) ) ); + } + catch ( ConfigurationException | IOException cex ) + { diff --git a/doxia-1.12.0-source-release.zip b/doxia-1.12.0-source-release.zip new file mode 100644 index 0000000..91be917 --- /dev/null +++ b/doxia-1.12.0-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d22e25c0f8f687b0fc83ee2c78a118ad2f48cbda89d6c91a79f2cd4e9f87f755 +size 1336220 diff --git a/maven-doxia-build.tar.xz b/maven-doxia-build.tar.xz new file mode 100644 index 0000000..2f86970 --- /dev/null +++ b/maven-doxia-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab05e18998e64d53317936318cbac5d2494ea4825f2d2cc025081889ab6fa285 +size 5136 diff --git a/maven-doxia.changes b/maven-doxia.changes new file mode 100644 index 0000000..fc53275 --- /dev/null +++ b/maven-doxia.changes @@ -0,0 +1,85 @@ +------------------------------------------------------------------- +Tue Sep 26 21:09:43 UTC 2023 - Fridrich Strba + +- Added patch: + * 0002-Commons-configuration2.patch + + port to commons-configuration2 in order to remove dependency + on old commons-lang + +------------------------------------------------------------------- +Sat Sep 23 17:46:16 UTC 2023 - Fridrich Strba + +- Upgrade to upstream version 1.12.0 + * Changes + + DOXIA-409: Upgrade to FOP 2.2 + + DOXIA-497: Fix rendering links and paragraphs inside tables + + DOXIA-584: Rewrite .md and .markdown links to .html + + DOXIA-576 Upgrade HttpComponents: httpclient to 4.5.8 and + httpcore to 4.4.11 + + DOXIA-570: Escape links to xml based figureGraphics image + elements + + SECURITY: Use HTTPS to resolve dependencies in Maven Build + + MNGSITE-393: remove old Maven 1 and 2 info + + DOXIA-612: update commons-lang to 3.8.1 + + DOXIA-610: Drop dependency to outdated Log4j + + Fix Java 7 compatibility that was broken with DOXIA-616 + + DOXIA-618: import tests from maven-site-plugin + + DOXIA-609: Fixed crosslinks starting with a dot in markdown + files + + replace deprecated class from commons-lang + + fill in some generic types +- Removed patch: + * 0001-Fix-itext-dependency.patch + + no need to patch a module that we disable + +------------------------------------------------------------------- +Fri May 13 09:03:45 UTC 2022 - Fridrich Strba + +- Fix build with modello 2.0.0 + +------------------------------------------------------------------- +Tue Feb 22 18:20:02 UTC 2022 - Fridrich Strba + +- Do not build against the log4j12 packages + +------------------------------------------------------------------- +Tue Feb 22 11:34:40 UTC 2022 - Fridrich Strba + +- Fix the version of the log4j that doxia-module-fo needs at + runtime + +------------------------------------------------------------------- +Tue May 11 13:06:41 UTC 2021 - Fridrich Strba + +- Do not build against the legacy guava20 any more + +------------------------------------------------------------------- +Sat Mar 14 08:07:06 UTC 2020 - Fridrich Strba + +- Set obsoletes to make upgrades easier + +------------------------------------------------------------------- +Wed Mar 11 11:37:57 UTC 2020 - Fridrich Strba + +- Update to upstream version 1.9.1 +- Removed patches: + * 0002-Update-to-Plexus-Container-1.5.5.patch + * 0003-Disable-tests-which-rely-on-ordering-in-set.patch + * 0004-Port-to-fop-2.0.patch + + Not needed in this build any more + +------------------------------------------------------------------- +Tue Oct 1 12:18:33 UTC 2019 - Fridrich Strba + +- Build against the compatibility package log4j12 + +------------------------------------------------------------------- +Thu Apr 4 15:53:45 UTC 2019 - Jan Engelhardt + +- Trim marketing and filler wording from description. + +------------------------------------------------------------------- +Thu Mar 28 15:13:45 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-doxia 1.7 +- Generate and customize ant build files diff --git a/maven-doxia.spec b/maven-doxia.spec new file mode 100644 index 0000000..1a6241a --- /dev/null +++ b/maven-doxia.spec @@ -0,0 +1,310 @@ +# +# spec file for package maven-doxia +# +# Copyright (c) 2023 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: maven-doxia +Version: 1.12.0 +Release: 0 +Summary: Content generation framework +License: Apache-2.0 +Group: Development/Libraries/Java +URL: https://maven.apache.org/doxia/ +Source0: https://repo1.maven.org/maven2/org/apache/maven/doxia/doxia/%{version}/doxia-%{version}-source-release.zip +Source1: %{name}-build.tar.xz +Patch0: 0002-Commons-configuration2.patch +BuildRequires: ant +BuildRequires: apache-commons-cli +BuildRequires: apache-commons-collections +BuildRequires: apache-commons-configuration2 +BuildRequires: apache-commons-lang3 +BuildRequires: apache-commons-text +BuildRequires: atinject +BuildRequires: fdupes +BuildRequires: google-guice +BuildRequires: guava +BuildRequires: httpcomponents-client +BuildRequires: httpcomponents-core +BuildRequires: javapackages-local +BuildRequires: jdom2 +BuildRequires: modello >= 2.0.0 +BuildRequires: objectweb-asm +BuildRequires: parboiled +BuildRequires: pegdown +BuildRequires: plexus-classworlds +BuildRequires: plexus-cli +BuildRequires: plexus-containers-component-annotations +BuildRequires: plexus-metadata-generator +BuildRequires: plexus-utils +BuildRequires: qdox +BuildRequires: sisu-inject +BuildRequires: sisu-plexus +BuildRequires: unzip +BuildRequires: xbean +BuildRequires: xmlgraphics-commons +BuildRequires: xmlgraphics-fop +BuildRequires: xmlunit +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: mvn(log4j:log4j) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildArch: noarch + +%description +Doxia is a content generation framework which provides techniques for +generating static and dynamic content. Doxia can be used to generate +static sites in addition to being incorporated into dynamic content +generation systems like blogs, wikis and content management systems. + +%package core +Summary: Core module for %{name} +Group: Development/Libraries/Java +Obsoletes: %{name}-module-itext +Obsoletes: %{name}-module-markdown + +%description core +This package provides %{summary}. + +%package logging-api +Summary: Logging-api module for %{name} +Group: Development/Libraries/Java + +%description logging-api +This package provides %{summary}. + +%package module-apt +Summary: APT module for %{name} +Group: Development/Libraries/Java + +%description module-apt +This package provides %{summary}. + +%package module-confluence +Summary: Confluence module for %{name} +Group: Development/Libraries/Java + +%description module-confluence +This package provides %{summary}. + +%package module-docbook-simple +Summary: Simplified DocBook module for %{name} +Group: Development/Libraries/Java + +%description module-docbook-simple +This package provides %{summary}. + +%package module-fml +Summary: FML module for %{name} +Group: Development/Libraries/Java + +%description module-fml +This package provides %{summary}. + +%package module-fo +Summary: FO module for %{name} +Group: Development/Libraries/Java + +%description module-fo +This package provides %{summary}. + +%package module-latex +Summary: Latex module for %{name} +Group: Development/Libraries/Java + +%description module-latex +This package provides %{summary}. + +%package module-rtf +Summary: RTF module for %{name} +Group: Development/Libraries/Java + +%description module-rtf +This package provides %{summary}. + +%package module-twiki +Summary: TWiki module for %{name} +Group: Development/Libraries/Java + +%description module-twiki +This package provides %{summary}. + +%package module-xdoc +Summary: XDoc module for %{name} +Group: Development/Libraries/Java + +%description module-xdoc +This package provides %{summary}. + +%package module-xhtml +Summary: XHTML module for %{name} +Group: Development/Libraries/Java + +%description module-xhtml +This package provides %{summary}. + +%package module-xhtml5 +Summary: XHTML5 module for %{name} +Group: Development/Libraries/Java + +%description module-xhtml5 +This package provides %{summary}. + +%package sink-api +Summary: Sink-api module for %{name} +Group: Development/Libraries/Java + +%description sink-api +This package provides %{summary}. + +%package test-docs +Summary: Test-docs module for %{name} +Group: Development/Libraries/Java + +%description test-docs +This package provides %{summary}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n doxia-%{version} -a1 +%patch0 -p1 + +# we don't have clirr-maven-plugin +%pom_remove_plugin org.codehaus.mojo:clirr-maven-plugin pom.xml + +# complains +%pom_remove_plugin :apache-rat-plugin + +# requires network +rm doxia-core/src/test/java/org/apache/maven/doxia/util/XmlValidatorTest.java + +%pom_disable_module doxia-module-itext doxia-modules +%pom_disable_module doxia-module-markdown doxia-modules + +%{mvn_package} :doxia __noinstall +%{mvn_package} :doxia-modules __noinstall +%{mvn_package} :{*} @1 + +%build +mkdir -p lib +build-jar-repository -s lib \ + atinject \ + apache-commons-text \ + commons-cli \ + commons-configuration2 \ + commons-lang3 \ + guava/guava \ + guice/google-guice \ + httpcomponents/httpclient \ + httpcomponents/httpcore \ + jdom2/jdom2 \ + objectweb-asm/asm \ + org.eclipse.sisu.inject \ + org.eclipse.sisu.plexus \ + parboiled/core \ + pegdown \ + plexus-classworlds \ + plexus/cli \ + plexus-containers/plexus-component-annotations \ + plexus-metadata-generator \ + plexus/utils \ + qdox \ + xbean/xbean-reflect \ + xmlgraphics-commons \ + xmlgraphics-fop + +%{ant} -Dtest.skip=true \ + package javadoc + +mkdir -p target/site/apidocs + +%{mvn_artifact} pom.xml +for i in \ + doxia-logging-api \ + doxia-sink-api \ + doxia-test-docs \ + doxia-core; do + %{mvn_artifact} ${i}/pom.xml ${i}/target/${i}-%{version}.jar + if [ -d ${i}/target/site/apidocs ]; then + cp -r ${i}/target/site/apidocs target/site/apidocs/${i} + fi +done + +%{mvn_artifact} doxia-modules/pom.xml +for i in \ + doxia-module-apt \ + doxia-module-confluence \ + doxia-module-docbook-simple \ + doxia-module-fml \ + doxia-module-fo \ + doxia-module-latex \ + doxia-module-rtf \ + doxia-module-twiki \ + doxia-module-xdoc \ + doxia-module-xhtml \ + doxia-module-xhtml5; do + %{mvn_artifact} doxia-modules/${i}/pom.xml doxia-modules/${i}/target/${i}-%{version}.jar + if [ -d doxia-modules/${i}/target/site/apidocs ]; then + cp -r doxia-modules/${i}/target/site/apidocs target/site/apidocs/${i} + fi +done + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files core -f .mfiles-doxia-core + +%files logging-api -f .mfiles-doxia-logging-api +%license LICENSE +%doc NOTICE + +%files module-apt -f .mfiles-doxia-module-apt + +%files module-confluence -f .mfiles-doxia-module-confluence + +%files module-docbook-simple -f .mfiles-doxia-module-docbook-simple + +%files module-fml -f .mfiles-doxia-module-fml + +%files module-fo -f .mfiles-doxia-module-fo + +%files module-latex -f .mfiles-doxia-module-latex + +%files module-rtf -f .mfiles-doxia-module-rtf + +%files module-twiki -f .mfiles-doxia-module-twiki + +%files module-xdoc -f .mfiles-doxia-module-xdoc + +%files module-xhtml -f .mfiles-doxia-module-xhtml + +%files module-xhtml5 -f .mfiles-doxia-module-xhtml5 + +%files sink-api -f .mfiles-doxia-sink-api + +%files test-docs -f .mfiles-doxia-test-docs + +%files javadoc -f .mfiles-javadoc +%license LICENSE +%doc NOTICE + +%changelog