From 85e67601b9a57d6024c8dc58c3cf7ba22063bfa53cf801e3b6362e6fd6749011 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 10 Mar 2020 12:39:17 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-doxia-sitetools?expand=0&rev=3 --- 0001-Port-to-plexus-utils-3.0.24.patch | 32 ++-- ...-Remove-dependency-on-velocity-tools.patch | 148 +++++++++--------- doxia-sitetools-1.7.5-source-release.zip | 3 - doxia-sitetools-1.9.2-source-release.zip | 3 + maven-doxia-sitetools-build.tar.xz | 4 +- maven-doxia-sitetools.spec | 15 +- 6 files changed, 104 insertions(+), 101 deletions(-) delete mode 100644 doxia-sitetools-1.7.5-source-release.zip create mode 100644 doxia-sitetools-1.9.2-source-release.zip diff --git a/0001-Port-to-plexus-utils-3.0.24.patch b/0001-Port-to-plexus-utils-3.0.24.patch index f7b8738..b723cc4 100644 --- a/0001-Port-to-plexus-utils-3.0.24.patch +++ b/0001-Port-to-plexus-utils-3.0.24.patch @@ -12,22 +12,22 @@ index 9bc3ef2..c31688d 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 @@ -559,7 +559,15 @@ public class DefaultSiteRenderer - // doxiaSiteRendererVersion - InputStream inputStream = this.getClass().getResourceAsStream( "/META-INF/" - + "maven/org.apache.maven.doxia/doxia-site-renderer/pom.properties" ); -- Properties properties = PropertyUtils.loadProperties( inputStream ); -+ Properties properties; -+ try -+ { -+ properties = PropertyUtils.loadProperties( inputStream ); -+ } -+ catch ( IOException exc ) -+ { -+ properties = null; -+ } - if ( inputStream == null ) - { - getLogger().debug( "pom.properties for doxia-site-renderer could not be found." ); + // doxiaSiteRendererVersion + InputStream inputStream = this.getClass().getResourceAsStream( "/META-INF/" + + "maven/org.apache.maven.doxia/doxia-site-renderer/pom.properties" ); +- Properties properties = PropertyUtils.loadProperties( inputStream ); ++ Properties properties; ++ try ++ { ++ properties = PropertyUtils.loadProperties( inputStream ); ++ } ++ catch ( IOException exc ) ++ { ++ properties = null; ++ } + if ( inputStream == null ) + { + getLogger().debug( "pom.properties for doxia-site-renderer could not be found." ); -- 2.9.3 diff --git a/0002-Remove-dependency-on-velocity-tools.patch b/0002-Remove-dependency-on-velocity-tools.patch index 29b2744..e62e88c 100644 --- a/0002-Remove-dependency-on-velocity-tools.patch +++ b/0002-Remove-dependency-on-velocity-tools.patch @@ -12,81 +12,81 @@ 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.module.ParserModuleNotFoundException; - 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; + 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; @@ -481,41 +461,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(); - } - - /** + */ + 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.7.5-source-release.zip b/doxia-sitetools-1.7.5-source-release.zip deleted file mode 100644 index 88ba521..0000000 --- a/doxia-sitetools-1.7.5-source-release.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5108049a3b18d9106c3b203070195b6211d871a443466debe88e68474629862 -size 533944 diff --git a/doxia-sitetools-1.9.2-source-release.zip b/doxia-sitetools-1.9.2-source-release.zip new file mode 100644 index 0000000..95e3608 --- /dev/null +++ b/doxia-sitetools-1.9.2-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8e40dc08a95d4af9d65fd3e481f548ff1e106efb36fc97bd1f10d048ad47c1c +size 547948 diff --git a/maven-doxia-sitetools-build.tar.xz b/maven-doxia-sitetools-build.tar.xz index 8ba8149..e1735ce 100644 --- a/maven-doxia-sitetools-build.tar.xz +++ b/maven-doxia-sitetools-build.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78a55a2617440be1b4f52923dc2f74bc4c1ff4a0b71206f98927f1304285bc31 -size 3444 +oid sha256:ca18e722d595a0006d6e23d2fa6b5d56668d307086d011232c900d060e40882f +size 3464 diff --git a/maven-doxia-sitetools.spec b/maven-doxia-sitetools.spec index c0be6b0..dd18e83 100644 --- a/maven-doxia-sitetools.spec +++ b/maven-doxia-sitetools.spec @@ -1,7 +1,7 @@ # -# spec file for package maven +# spec file for package maven-doxia-sitetools # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -19,13 +19,13 @@ %global parent maven-doxia %global subproj sitetools Name: %{parent}-%{subproj} -Version: 1.7.5 +Version: 1.9.2 Release: 0 Summary: Doxia content generation framework License: Apache-2.0 Group: Development/Libraries/Java -URL: http://maven.apache.org/doxia/ -Source0: http://repo2.maven.org/maven2/org/apache/maven/doxia/doxia-sitetools/%{version}/doxia-%{subproj}-%{version}-source-release.zip +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 Patch0: 0001-Port-to-plexus-utils-3.0.24.patch Patch1: 0002-Remove-dependency-on-velocity-tools.patch @@ -68,8 +68,8 @@ 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-markdown) 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 @@ -113,6 +113,8 @@ API documentation for %{name}. 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 @@ -128,6 +130,7 @@ build-jar-repository -s lib \ 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-artifact-2.0.2 \ From 8ce0881f96612224b1e7cfbd9bd7dfa162e4b93cbae4f5987fad43b744b4df02 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 11 Mar 2020 11:42:39 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-doxia-sitetools?expand=0&rev=4 --- maven-doxia-sitetools.changes | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maven-doxia-sitetools.changes b/maven-doxia-sitetools.changes index 1d8bf0b..f69c4f9 100644 --- a/maven-doxia-sitetools.changes +++ b/maven-doxia-sitetools.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +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