From e066d64cc5a7cac73c62948936a8989d8ca44cb99475dd5569fe2155dcf40da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 16:37:12 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main maven-doxia-sitetools revision 4820b4e273fffc8952dfdbb34c9266a0 --- .gitattributes | 23 +++ ...-Remove-dependency-on-velocity-tools.patch | 92 +++++++++ doxia-sitetools-1.11.1-source-release.zip | 3 + maven-doxia-sitetools-build.tar.xz | 3 + maven-doxia-sitetools.changes | 59 ++++++ maven-doxia-sitetools.spec | 177 ++++++++++++++++++ 6 files changed, 357 insertions(+) create mode 100644 .gitattributes create mode 100644 0002-Remove-dependency-on-velocity-tools.patch create mode 100644 doxia-sitetools-1.11.1-source-release.zip create mode 100644 maven-doxia-sitetools-build.tar.xz create mode 100644 maven-doxia-sitetools.changes create mode 100644 maven-doxia-sitetools.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /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-Remove-dependency-on-velocity-tools.patch b/0002-Remove-dependency-on-velocity-tools.patch new file mode 100644 index 0000000..356a4e9 --- /dev/null +++ b/0002-Remove-dependency-on-velocity-tools.patch @@ -0,0 +1,92 @@ +From da397953bd73068c4ab8d219ec91e312fd3d5d55 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Mon, 6 Feb 2017 14:27:53 +0100 +Subject: [PATCH 2/2] Remove dependency on velocity-tools + +--- + .../doxia/siterenderer/DefaultSiteRenderer.java | 58 +--------------------- + 1 file changed, 2 insertions(+), 56 deletions(-) + +diff --git a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +index c31688d..58058b3 100644 +--- a/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java ++++ b/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java +@@ -76,31 +76,11 @@ import org.apache.maven.doxia.parser.mod + import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink; + import org.apache.maven.doxia.util.XmlValidator; + import org.apache.velocity.Template; ++import org.apache.velocity.VelocityContext; + import org.apache.velocity.context.Context; + import org.apache.velocity.exception.ParseErrorException; + import org.apache.velocity.exception.ResourceNotFoundException; + import org.apache.velocity.exception.VelocityException; +-import org.apache.velocity.tools.Scope; +-import org.apache.velocity.tools.ToolManager; +-import org.apache.velocity.tools.config.ConfigurationUtils; +-import org.apache.velocity.tools.config.EasyFactoryConfiguration; +-import org.apache.velocity.tools.config.FactoryConfiguration; +-import org.apache.velocity.tools.generic.AlternatorTool; +-import org.apache.velocity.tools.generic.ClassTool; +-import org.apache.velocity.tools.generic.ComparisonDateTool; +-import org.apache.velocity.tools.generic.ContextTool; +-import org.apache.velocity.tools.generic.ConversionTool; +-import org.apache.velocity.tools.generic.DisplayTool; +-import org.apache.velocity.tools.generic.EscapeTool; +-import org.apache.velocity.tools.generic.FieldTool; +-import org.apache.velocity.tools.generic.LinkTool; +-import org.apache.velocity.tools.generic.LoopTool; +-import org.apache.velocity.tools.generic.MathTool; +-import org.apache.velocity.tools.generic.NumberTool; +-import org.apache.velocity.tools.generic.RenderTool; +-import org.apache.velocity.tools.generic.ResourceTool; +-import org.apache.velocity.tools.generic.SortTool; +-import org.apache.velocity.tools.generic.XmlTool; + import org.codehaus.plexus.PlexusContainer; + import org.codehaus.plexus.component.annotations.Component; + import org.codehaus.plexus.component.annotations.Requirement; +@@ -495,41 +475,7 @@ public class DefaultSiteRenderer + */ + protected Context createToolManagedVelocityContext( SiteRenderingContext siteRenderingContext ) + { +- Locale locale = siteRenderingContext.getLocale(); +- String dateFormat = siteRenderingContext.getDecoration().getPublishDate().getFormat(); +- +- EasyFactoryConfiguration config = new EasyFactoryConfiguration( false ); +- config.property( "safeMode", Boolean.FALSE ); +- config.toolbox( Scope.REQUEST ) +- .tool( ContextTool.class ) +- .tool( LinkTool.class ) +- .tool( LoopTool.class ) +- .tool( RenderTool.class ); +- config.toolbox( Scope.APPLICATION ).property( "locale", locale ) +- .tool( AlternatorTool.class ) +- .tool( ClassTool.class ) +- .tool( ComparisonDateTool.class ).property( "format", dateFormat ) +- .tool( ConversionTool.class ).property( "dateFormat", dateFormat ) +- .tool( DisplayTool.class ) +- .tool( EscapeTool.class ) +- .tool( FieldTool.class ) +- .tool( MathTool.class ) +- .tool( NumberTool.class ) +- .tool( ResourceTool.class ).property( "bundles", new String[] { "site-renderer" } ) +- .tool( SortTool.class ) +- .tool( XmlTool.class ); +- +- FactoryConfiguration customConfig = ConfigurationUtils.findInClasspath( TOOLS_LOCATION ); +- +- if ( customConfig != null ) +- { +- config.addConfiguration( customConfig ); +- } +- +- ToolManager manager = new ToolManager( false, false ); +- manager.configure( config ); +- +- return manager.createContext(); ++ return new VelocityContext(); + } + + /** +-- +2.9.3 + diff --git a/doxia-sitetools-1.11.1-source-release.zip b/doxia-sitetools-1.11.1-source-release.zip new file mode 100644 index 0000000..5ac8327 --- /dev/null +++ b/doxia-sitetools-1.11.1-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5d1e30d32129af3d026a1347efb2005824c44cf1674716a21692f4a7698057a +size 555803 diff --git a/maven-doxia-sitetools-build.tar.xz b/maven-doxia-sitetools-build.tar.xz new file mode 100644 index 0000000..a7f5b8c --- /dev/null +++ b/maven-doxia-sitetools-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ad19cb2a7b7ef07794675477bbe0ee1a8977595ce7dc82233dac766e096f080 +size 3484 diff --git a/maven-doxia-sitetools.changes b/maven-doxia-sitetools.changes new file mode 100644 index 0000000..4b415a6 --- /dev/null +++ b/maven-doxia-sitetools.changes @@ -0,0 +1,59 @@ +------------------------------------------------------------------- +Sat Sep 23 18:10:46 UTC 2023 - Fridrich Strba + +- Upgrade to upstream version 1.11.1 + * Bug + + DOXIASITETOOLS-221: CLIRR can't find previous version + * Improvement + + DOXIASITETOOLS-228: Remove all   in + default-site-macros.vm and replace by a space + + DOXIASITETOOLS-234: improve documentation on site.xml + inheritance vs interpolation + * Task + + DOXIASITETOOLS-236: Deprecate Doxia Sitetools Doc Renderer + * Dependency upgrade + + DOXIASITETOOLS-219: fix javadoc issues with JDK 8 when + generating documentation + + DOXIASITETOOLS-223: wrong coordinates for jai_core: hyphen + should be underscore + + DOXIASITETOOLS-226: Use latest JUnit version 4.13.2 + + DOXIASITETOOLS-231: Upgrade Plexus Utils to 3.3.0 + + DOXIASITETOOLS-232: Upgrade Plexus Interpolation to 1.26 + + DOXIASITETOOLS-233: Upgrade Maven Doxia to 1.10 + + DOXIASITETOOLS-237: Upgrade Maven Doxia to 1.11.1 +- Modified patch: + * 0002-Remove-dependency-on-velocity-tools.patch + + rediff to changes context +- Removed patch: + * 0001-Port-to-plexus-utils-3.0.24.patch + + not needed with this version + +------------------------------------------------------------------- +Fri May 13 09:12:53 UTC 2022 - Fridrich Strba + +- Fix build with modello 2.0.0 + +------------------------------------------------------------------- +Tue Mar 22 13:00:40 UTC 2022 - Fridrich Strba + +- Build with source and target levels 8 + +------------------------------------------------------------------- +Tue May 11 13:08:02 UTC 2021 - Fridrich Strba + +- Do not build against the legacy guava20 any more + +------------------------------------------------------------------- +Wed Mar 11 11:41:31 UTC 2020 - Fridrich Strba + +- Upgrade to upstream version 1.9.2 +- Modified patches: + * 0001-Port-to-plexus-utils-3.0.24.patch + * 0002-Remove-dependency-on-velocity-tools.patch + + fix incorrect line end + +------------------------------------------------------------------- +Thu Mar 28 20:37:01 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-doxia-sitetools 1.7.5 +- Generate and customize ant build files diff --git a/maven-doxia-sitetools.spec b/maven-doxia-sitetools.spec new file mode 100644 index 0000000..0c73ae1 --- /dev/null +++ b/maven-doxia-sitetools.spec @@ -0,0 +1,177 @@ +# +# spec file +# +# 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/ +# + + +%global parent maven-doxia +%global subproj sitetools +Name: %{parent}-%{subproj} +Version: 1.11.1 +Release: 0 +Summary: Doxia 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-sitetools/%{version}/doxia-%{subproj}-%{version}-source-release.zip +Source1: %{name}-build.tar.xz +Patch1: 0002-Remove-dependency-on-velocity-tools.patch +BuildRequires: ant +BuildRequires: apache-commons-cli +BuildRequires: apache-commons-collections +BuildRequires: apache-commons-io +BuildRequires: apache-commons-lang3 +BuildRequires: atinject +BuildRequires: fdupes +BuildRequires: google-guice +BuildRequires: guava +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local >= 6 +BuildRequires: jdom2 +BuildRequires: maven-doxia-core +BuildRequires: maven-doxia-logging-api +BuildRequires: maven-doxia-module-fo +BuildRequires: maven-doxia-module-xhtml +BuildRequires: maven-doxia-sink-api +BuildRequires: maven-lib +BuildRequires: maven-reporting-api +BuildRequires: modello >= 2.0.0 +BuildRequires: objectweb-asm +BuildRequires: plexus-classworlds +BuildRequires: plexus-cli +BuildRequires: plexus-containers-component-annotations +BuildRequires: plexus-i18n +BuildRequires: plexus-interpolation +BuildRequires: plexus-metadata-generator +BuildRequires: plexus-utils +BuildRequires: plexus-velocity +BuildRequires: qdox +BuildRequires: sisu-inject +BuildRequires: sisu-plexus +BuildRequires: unzip +BuildRequires: velocity +BuildRequires: xbean +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: xz +BuildRequires: mvn(org.apache.maven.doxia:doxia-module-apt) +BuildRequires: mvn(org.apache.maven.doxia:doxia-module-fml) +BuildRequires: mvn(org.apache.maven.doxia:doxia-module-xdoc) +BuildRequires: mvn(org.apache.maven.doxia:doxia-module-xhtml5) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildArch: noarch + +%description +Doxia is a content generation framework which aims to provide its +users with powerful 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 javadoc +Summary: Javadoc for %{name} +Group: Development/Libraries/Java + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n doxia-%{subproj}-%{version} -a1 +%patch1 -p1 + +# migrate to maven 3 +%pom_xpath_set //pom:mavenVersion 3.8.6 doxia-integration-tools +%pom_change_dep :maven-artifact-manager :maven-core doxia-integration-tools +%pom_change_dep :maven-project :maven-compat doxia-integration-tools + +# complains +%pom_remove_plugin :apache-rat-plugin + +%pom_remove_plugin org.codehaus.mojo:clirr-maven-plugin +%pom_remove_dep net.sourceforge.htmlunit:htmlunit doxia-site-renderer/pom.xml +%pom_remove_dep -r :velocity-tools + +%pom_xpath_inject "pom:plugin[pom:artifactId[text()='modello-maven-plugin']]/pom:configuration" \ + "true" doxia-decoration-model + +rm -rf $(find -type d -name itext) +%pom_remove_dep -r :doxia-module-itext + +%pom_remove_dep -r :doxia-module-markdown + +%{mvn_alias} :doxia-integration-tools org.apache.maven.shared:maven-doxia-tools + +%build +mkdir -p lib +build-jar-repository -s lib \ + atinject \ + apache-commons-collections \ + apache-commons-lang3 \ + commons-cli \ + commons-io \ + guava/guava \ + guice/google-guice \ + jdom2/jdom2 \ + maven-doxia/doxia-core \ + maven-doxia/doxia-logging-api \ + maven-doxia/doxia-module-fo \ + maven-doxia/doxia-module-xhtml \ + maven-doxia/doxia-module-xhtml5 \ + maven-doxia/doxia-sink-api \ + maven/maven-artifact \ + maven/maven-core \ + maven/maven-plugin-api \ + maven/maven-project \ + maven-reporting-api/maven-reporting-api \ + objectweb-asm/asm \ + org.eclipse.sisu.inject \ + org.eclipse.sisu.plexus \ + plexus-classworlds \ + plexus/cli \ + plexus-containers/plexus-component-annotations \ + plexus-i18n/plexus-i18n \ + plexus/interpolation \ + plexus-metadata-generator \ + plexus/utils \ + plexus-velocity/plexus-velocity \ + qdox \ + velocity \ + xbean/xbean-reflect +# tests can't run because of missing deps +%{ant} -Dtest.skip=true package javadoc + +mkdir -p target/site/apidocs +for i in \ + doxia-decoration-model \ + doxia-skin-model \ + doxia-integration-tools \ + doxia-site-renderer \ + doxia-doc-renderer; 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 + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%dir %{_javadir}/%{name} + +%files javadoc -f .mfiles-javadoc + +%changelog