public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jerry James <loganjerry@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/maven-doxia-sitetools] epel10: Adapt to plexus-velocity 2.0
Date: Sat, 14 Nov 2026 17:19:38 GMT [thread overview]
Message-ID: <179467677879.1.10939449214223658529.rpms-maven-doxia-sitetools-618efb2af9a2@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/maven-doxia-sitetools
Branch : epel10
Commit : 618efb2af9a2653aa3a8eb2a4ee602f9c7005c73
Author : Jerry James <loganjerry@gmail.com>
Date : 2024-01-26T11:10:33-07:00
Stats : +142/-27 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/maven-doxia-sitetools/c/618efb2af9a2653aa3a8eb2a4ee602f9c7005c73?branch=epel10
Log:
Adapt to plexus-velocity 2.0
---
diff --git a/maven-doxia-sitetools-velocity.patch b/maven-doxia-sitetools-velocity.patch
index e86c7ee..e074c1a 100644
--- a/maven-doxia-sitetools-velocity.patch
+++ b/maven-doxia-sitetools-velocity.patch
@@ -1,6 +1,116 @@
---- doxia-sitetools-1.11.1/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SkinResourceLoader.java.orig 2021-12-12 17:08:08.000000000 -0700
-+++ doxia-sitetools-1.11.1/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SkinResourceLoader.java 2023-08-30 11:32:53.968100980 -0600
-@@ -23,10 +23,14 @@ import java.io.ByteArrayInputStream;
+--- doxia-sitetools-1.11.1.orig/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java 2021-12-12 17:08:08.000000000 -0700
++++ doxia-sitetools-1.11.1/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java 2024-01-26 09:53:17.985943995 -0700
+@@ -59,7 +59,6 @@ import org.codehaus.plexus.util.IOUtil;
+ import org.codehaus.plexus.util.ReaderFactory;
+ import org.codehaus.plexus.util.xml.XmlStreamReader;
+ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+-import org.codehaus.plexus.velocity.SiteResourceLoader;
+ import org.codehaus.plexus.velocity.VelocityComponent;
+
+ /**
+--- doxia-sitetools-1.11.1.orig/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/SiteResourceLoader.java 1969-12-31 17:00:00.000000000 -0700
++++ doxia-sitetools-1.11.1/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/SiteResourceLoader.java 2024-01-26 11:05:53.255433767 -0700
+@@ -0,0 +1,97 @@
++package org.apache.maven.doxia.docrenderer;
++
++/*
++ * Copyright 2001-2016 Codehaus Foundation.
++ *
++ * Licensed 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.
++ */
++
++import org.apache.velocity.runtime.resource.loader.FileResourceLoader;
++import org.apache.velocity.runtime.resource.loader.ResourceLoader;
++import org.apache.velocity.exception.ResourceNotFoundException;
++import org.apache.velocity.util.ExtProperties;
++
++import java.io.File;
++import java.io.FileInputStream;
++import java.io.FileNotFoundException;
++import java.io.InputStreamReader;
++import java.io.Reader;
++import java.io.UnsupportedEncodingException;
++
++/**
++ * Allows you to dynamically add resources that you want to be processed by Velocity. For
++ * example if you want to generate a site and pull in some random files to be interpolated
++ * by Velocity you can use this resource loader.
++ *
++ * @author Jason van Zyl
++ * @deprecated use {@link FileResourceLoader}
++ */
++@Deprecated
++public class SiteResourceLoader
++ extends ResourceLoader
++{
++ private static String resource;
++
++ private static File resourceDir;
++
++ public static void setResource( String staticResource )
++ {
++ resource = staticResource;
++ resourceDir = new File( resource ).getParentFile();
++ }
++
++ public void init( ExtProperties p )
++ {
++ }
++
++ public Reader getResourceReader( String name, String encoding )
++ throws ResourceNotFoundException
++ {
++ if ( resource != null )
++ {
++ try
++ {
++ File f = new File( resourceDir, name );
++ if ( f.exists() )
++ {
++ return new InputStreamReader( new FileInputStream( f ), encoding );
++ }
++ else
++ {
++ return new InputStreamReader( new FileInputStream( resource ), encoding );
++ }
++ }
++ catch ( FileNotFoundException e )
++ {
++ throw new ResourceNotFoundException( "Cannot find resource, make sure you set the right resource." );
++ }
++ catch ( UnsupportedEncodingException ex )
++ {
++ throw new ResourceNotFoundException( "cannot read resource", ex );
++ }
++ }
++
++ return null;
++ }
++
++ public boolean isSourceModified( org.apache.velocity.runtime.resource.Resource resource )
++ {
++ return false; //To change body of implemented methods use File | Settings | File Templates.
++ }
++
++ public long getLastModified( org.apache.velocity.runtime.resource.Resource resource )
++ {
++ return 0;
++ }
++}
++
+--- doxia-sitetools-1.11.1.orig/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SkinResourceLoader.java 2021-12-12 17:08:08.000000000 -0700
++++ doxia-sitetools-1.11.1/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/SkinResourceLoader.java 2024-01-26 11:02:58.457776619 -0700
+@@ -23,11 +23,14 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -11,38 +121,40 @@
import org.apache.velocity.runtime.resource.Resource;
import org.apache.velocity.runtime.resource.loader.ResourceLoader;
import org.apache.velocity.exception.ResourceNotFoundException;
+-import org.apache.commons.collections.ExtendedProperties;
+import org.apache.velocity.util.ExtProperties;
- import org.apache.commons.collections.ExtendedProperties;
import org.codehaus.plexus.util.IOUtil;
-@@ -58,6 +62,19 @@ public class SkinResourceLoader
- return normalizeNewline( classLoader.getResourceAsStream( name ) );
+ /**
+@@ -41,13 +44,15 @@ import org.codehaus.plexus.util.IOUtil;
+ public class SkinResourceLoader
+ extends ResourceLoader
+ {
+- public void init( ExtendedProperties configuration )
++ public void init( ExtProperties configuration )
+ {
}
-+ public Reader getResourceReader( String source, String encoding )
-+ throws ResourceNotFoundException
-+ {
+- public synchronized InputStream getResourceStream( String name )
++ public synchronized Reader getResourceReader( String name, String encoding )
+ throws ResourceNotFoundException
+ {
+ try
-+ {
-+ return new InputStreamReader( getResourceStream( source ), encoding );
++ {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+ if ( name.startsWith( "/" ) )
+@@ -55,7 +60,12 @@ public class SkinResourceLoader
+ name = name.substring( 1 );
+ }
+
+- return normalizeNewline( classLoader.getResourceAsStream( name ) );
++ return new InputStreamReader( normalizeNewline( classLoader.getResourceAsStream( name ) ), encoding );
+ }
-+ catch (UnsupportedEncodingException uee)
++ catch (UnsupportedEncodingException ex)
+ {
-+ throw new ResourceNotFoundException( "cannot read resource", uee );
++ throw new ResourceNotFoundException( "cannot read resource", ex );
+ }
-+ }
-+
- InputStream normalizeNewline( InputStream in )
- throws ResourceNotFoundException
- {
-@@ -113,6 +130,10 @@ public class SkinResourceLoader
- }
}
-+ public void init( ExtProperties configuration )
-+ {
-+ }
-+
- public boolean isSourceModified( Resource resource )
- {
- return false;
+ InputStream normalizeNewline( InputStream in )
diff --git a/maven-doxia-sitetools.spec b/maven-doxia-sitetools.spec
index 2caa9f6..982efee 100644
--- a/maven-doxia-sitetools.spec
+++ b/maven-doxia-sitetools.spec
@@ -111,6 +111,9 @@ rm -rf $(find -type d -name itext)
%license LICENSE NOTICE
%changelog
+* Fri Jan 26 2024 Jerry James <loganjerry@gmail.com> - 1.11.1-9
+- Adapt to plexus-velocity 2.0
+
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
reply other threads:[~2026-11-14 17:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179467677879.1.10939449214223658529.rpms-maven-doxia-sitetools-618efb2af9a2@fedoraproject.org \
--to=loganjerry@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox