rebuilt without gcj and with java 11 [release 1.1.3-2mamba;Fri Dec 10 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 00:06:22 +01:00
parent cdfd10ec98
commit 71a8159232
8 changed files with 837 additions and 170 deletions

View File

@ -1,20 +0,0 @@
--- common_build.xml 2009-11-16 10:25:34.000000000 +0100
+++ common_build.xml-gil 2011-01-22 14:12:08.000000000 +0100
@@ -1071,6 +1071,7 @@
<path refid="classpath" />
</classpath>
<src path="${src.dir}" />
+ <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/cache/**"/>
</javac>
</target>
@@ -1356,6 +1357,9 @@
doctitle="${impl.title} documentation">
<link href="http://java.sun.com/j2se/${javac.source}.0/docs/api/" />
<classpath refid="classpath" />
+ <packageset dir="source">
+ <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/cache/**"/>
+ </packageset>
</javadoc>
</target>

View File

@ -0,0 +1,44 @@
--- libloader-1.1.3/build.properties 2009-11-17 14:12:00.000000000 +0000
+++ libloader-1.1.3/build.properties 2009-11-17 14:12:48.000000000 +0000
@@ -1,4 +1,4 @@
-project.revision=TRUNK-SNAPSHOT
+project.revision=1.1.3
ivy.artifact.group=pentaho-library
ivy.artifact.id=libloader
impl.title=LibLoader
@@ -6,4 +6,6 @@
src.dir=${basedir}/source
dependency.libbase.revision=1.1.3
dependency.libpixie.revision=1.1.3
-testsrc.dir=${basedir}/test
\ No newline at end of file
+testsrc.dir=${basedir}/test
+antcontrib.available=true
+build.cache.dir=lib
--- libloader-1.1.3/common_build.xml 2009-11-17 14:55:31.000000000 +0000
+++ libloader-1.1.3/common_build.xml 2009-11-17 14:56:48.000000000 +0000
@@ -1071,6 +1071,7 @@
<path refid="classpath" />
</classpath>
<src path="${src.dir}" />
+ <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/**"/>
</javac>
</target>
@@ -1356,6 +1357,9 @@
doctitle="${impl.title} documentation">
<link href="http://java.sun.com/j2se/${javac.source}.0/docs/api/" />
<classpath refid="classpath" />
+ <packageset dir="source">
+ <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/**"/>
+ </packageset>
</javadoc>
</target>
@@ -1648,4 +1652,4 @@
</dot-classpath>
</target>
-</project>
\ No newline at end of file
+</project>

View File

@ -1,18 +0,0 @@
--- build.properties 2009-11-16 10:25:34.000000000 +0100
+++ build.properties-gil 2011-01-22 13:50:48.000000000 +0100
@@ -1,4 +1,4 @@
-project.revision=TRUNK-SNAPSHOT
+project.revision=1.1.3
ivy.artifact.group=pentaho-library
ivy.artifact.id=libloader
impl.title=LibLoader
@@ -6,4 +6,6 @@
src.dir=${basedir}/source
dependency.libbase.revision=1.1.3
dependency.libpixie.revision=1.1.3
-testsrc.dir=${basedir}/test
\ Manca newline alla fine del file
+testsrc.dir=${basedir}/test
+antcontrib.available=true
+build.cache.dir=lib
\ Manca newline alla fine del file

View File

@ -1,20 +0,0 @@
--- common_build.xml 2009-11-16 10:25:34.000000000 +0100
+++ common_build.xml-gil 2011-01-22 13:54:13.000000000 +0100
@@ -1071,6 +1071,7 @@
<path refid="classpath" />
</classpath>
<src path="${src.dir}" />
+ <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/**"/>
</javac>
</target>
@@ -1356,6 +1357,9 @@
doctitle="${impl.title} documentation">
<link href="http://java.sun.com/j2se/${javac.source}.0/docs/api/" />
<classpath refid="classpath" />
+ <packageset dir="source">
+ <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/**"/>
+ </packageset>
</javadoc>
</target>

View File

@ -0,0 +1,28 @@
--- libloader-1.1.3/common_build.xml 2020-05-05 19:56:04.431079128 +0100
+++ libloader-1.1.3/common_build.xml 2020-05-05 19:56:16.062171410 +0100
@@ -136,8 +136,8 @@
<property name="javac.deprecation"
value="true"
description="Indicates whether source should be compiled with deprecation information" />
- <property name="javac.source" value="1.5" description="Provide source compatibility with specified release" />
- <property name="javac.target" value="1.5" description="Generate class files for specific VM version" />
+ <property name="javac.source" value="1.8" description="Provide source compatibility with specified release" />
+ <property name="javac.target" value="1.8" description="Generate class files for specific VM version" />
<!-- Build Cache properties -->
<property name="build.cache.dir"
@@ -1353,13 +1353,11 @@
nodeprecatedlist="false"
nodeprecated="false"
packagenames="${javadoc.packagenames}"
+ excludepackagenames="org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache.*,org.pentaho.reporting.libraries.resourceloader.modules.factory.svg.*,org.pentaho.reporting.libraries.resourceloader.modules.factory.wmf.*"
sourcepath="${src.dir}"
doctitle="${impl.title} documentation">
<link href="http://java.sun.com/j2se/${javac.source}.0/docs/api/" />
<classpath refid="classpath" />
- <packageset dir="source">
- <exclude name="org/pentaho/reporting/libraries/resourceloader/modules/**"/>
- </packageset>
</javadoc>
</target>

View File

@ -0,0 +1,224 @@
diff --git a/common_build.xml b/common_build.xml
index d9fe4b6..4eb9f28 100644
--- a/common_build.xml
+++ b/common_build.xml
@@ -152,9 +152,6 @@
<property name="cobertura.build.cache.dir"
value="${build.cache.dir}/cobertura"
description="Directory where the Cobertura jar (and dependencies) is placed after it is auto-downloaded by the build" />
- <property name="antcontrib.build.cache.dir"
- value="${build.cache.dir}/ant-contrib"
- description="Directory where the Ant-Contrib jar (and dependencies) is placed after it is auto-downloaded by the build" />
<property name="pentaho.build.cache.dir"
value="${build.cache.dir}/pentaho"
description="Directory where the Pentaho ant tasks jar (and dependencies) is placed after it is auto-downloaded by the build" />
@@ -324,69 +321,6 @@
<dirset dir="${testclasses.dir}" />
</path>
-
- <!--=======================================================================
- install-antcontrib
-
- (Fetches and) installs ant-contrib tasks.
- ====================================================================-->
- <target name="install-antcontrib"
- depends="antcontrib.download-check">
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <fileset dir="${antcontrib.build.cache.dir}">
- <include name="*.jar" />
- </fileset>
- </classpath>
- </taskdef>
- </target>
-
-
- <!--=======================================================================
- antcontrib.download-check
-
- Fetches ant-contrib from sourceforge if it is not already present
- ====================================================================-->
- <target name="antcontrib.download-check">
- <condition property="antcontrib.available">
- <and>
- <available file="${antcontrib.build.cache.dir}" />
- <available classname="net.sf.antcontrib.logic.IfTask">
- <classpath>
- <fileset dir="${antcontrib.build.cache.dir}">
- <include name="*.jar" />
- </fileset>
- </classpath>
- </available>
- </and>
- </condition>
- <antcall target="antcontrib.download" />
- </target>
-
-
- <!--=======================================================================
- antcontrib.download
-
- Fetches ant-contrib from sourceforge
- ====================================================================-->
- <target name="antcontrib.download" unless="antcontrib.available">
- <mkdir dir="${tmp.build.cache.dir}" />
- <get src="http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b3-bin.zip"
- dest="${tmp.build.cache.dir}/antcontrib.zip"
- usetimestamp="true" />
- <unzip src="${tmp.build.cache.dir}/antcontrib.zip" dest="${tmp.build.cache.dir}">
- <patternset>
- <include name="**/*.jar" />
- </patternset>
- </unzip>
- <copy todir="${antcontrib.build.cache.dir}">
- <fileset dir="${tmp.build.cache.dir}/ant-contrib">
- <include name="**/*.jar" />
- </fileset>
- </copy>
- </target>
-
-
<!--=======================================================================
init
@@ -445,7 +379,7 @@
(Fetches and) installs the SVN ANT for use by this ant script
====================================================================-->
<target name="install-svnant"
- depends="install-antcontrib, svnant.download-check">
+ depends="svnant.download-check">
<if>
<istrue value="${svnant.isinstalled}" />
<then>
@@ -492,57 +426,12 @@
<!--=======================================================================
- set-build.id
-
- Sets a property build.id to the either "development" or the svn revision
- if in release mode
- ====================================================================-->
- <target name="set-build.id" unless="build.id" depends="install-antcontrib">
- <if>
- <istrue value="${release}" />
- <then>
- <antcallback target="svn-revision" return="svn.revision" />
- <property name="build.id" value="${svn.revision}" />
- </then>
- <else>
- <property name="build.id" value="development" />
- </else>
- </if>
- </target>
-
- <!--=================================================================================
- version-properties: common Ant driven version file generation. Projects that produce
- a package or packages should run this target. Projects that produce
- jars only should NOT.
- ===================================================================================-->
- <target name="version-properties" depends="set-build.id">
- <tstamp>
- <format property="build.time" pattern="yyyy/MM/dd hh:mm aa"/>
- </tstamp>
- <propertyfile
- file="version.properties" comment="Release Build version info">
- <entry key="release.major.number" value="${release.major.number}" />
- <entry key="release.minor.number" value="${release.minor.number}" />
- <entry key="release.milestone.number" value="${release.milestone.number}" />
- <entry key="release.candidate.token" value="${release.candidate.token}" />
- <entry key="impl.vendor" value="${impl.vendor}" />
- <entry key="impl.version" value="${release.major.number}.${release.minor.number}.${release.milestone.number}.${build.id}" />
- <entry key="impl.title" value="${impl.title}" />
- <entry key="buildDate" value="${build.time}"/>
- <entry key="svn.revision" value="${build.id}"/>
- <entry key="release.build.number" default="0" type="int" operation="+" value="1" pattern="0000"/>
- </propertyfile>
- <property file="${basedir}/version.properties"/>
- </target>
-
-
- <!--=======================================================================
install-ivy
(Fetches and) installs the IVY jar for use by this ant script
====================================================================-->
<target name="install-ivy"
- depends="install-antcontrib,ivy.download-check">
+ depends="ivy.download-check">
<if>
<istrue value="${ivy.isinstalled}" />
<then>
@@ -602,7 +491,7 @@
Verifies that there are no SNAPSHOT dependencies defined in the ivy xml.
If there are SNAPSHOTS, fail the release build.
====================================================================-->
- <target name="ivy.check-releasable" depends="install-ivy, install-antcontrib">
+ <target name="ivy.check-releasable" depends="install-ivy">
<if>
<istrue value="${release}" />
<then>
@@ -769,7 +658,7 @@
Publishes the jar file for this project to a Maven2 repository.
====================================================================-->
<target name="publish-pentaho-nojar"
- depends="install-antcontrib,create-pom,ivy.deliver">
+ depends="create-pom,ivy.deliver">
<antcall target="maven-publish-dependencies">
<param name="publish.groupId" value="${ivy.artifact.group}" />
<param name="publish.artifactId" value="${ivy.artifact.id}" />
@@ -1079,30 +968,12 @@
<!--=======================================================================
compile.res_copy
- Copies any needed resources into the classes directory. Will not
- duplicate copying of resources from src tree (handled by compile.src_copy
- if jar.include.source is set.
+ Copies any needed resources into the classes directory.
====================================================================-->
- <target name="compile.res_copy" depends="install-antcontrib">
- <if>
- <available file="${res.dir}" />
- <then>
- <copy todir="${classes.dir}">
- <fileset dir="${res.dir}" />
- </copy>
- </then>
- </if>
-
- <if>
- <not>
- <isset property="jar.include.source" />
- </not>
- <then>
- <copy todir="${classes.dir}" flatten="false">
- <fileset dir="${src.dir}" excludes="**/*.java" />
- </copy>
- </then>
- </if>
+ <target name="compile.res_copy">
+ <copy todir="${classes.dir}" flatten="false">
+ <fileset dir="${src.dir}" excludes="**/*.java" />
+ </copy>
</target>
@@ -1152,7 +1023,7 @@
Creates a jar file from the bin directory
====================================================================-->
- <target name="jar" depends="compile,set-build.id,generate.manifest" description="Jars up the bin directory after a compile">
+ <target name="jar" depends="compile,generate.manifest" description="Jars up the bin directory after a compile">
<jar destfile="${dist.dir}/${ivy.artifact.id}-${project.revision}.jar" manifest="${dist.manifest.file}">
<fileset dir="${classes.dir}" />
</jar>
@@ -1165,7 +1036,7 @@
Creates a new manifest file if one is not specified, or updates
an existing manifest file if one is specified.
====================================================================-->
- <target name="generate.manifest" depends="init,set-build.id">
+ <target name="generate.manifest" depends="init">
<delete file="${dist.manifest.file}" />
<touch file="${dist.manifest.file}" />
<copy file="${manifest.file}" tofile="${dist.manifest.file}" overwrite="true" failonerror="false" />

View File

@ -0,0 +1,515 @@
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java 2021-04-07 10:55:58.343147414 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java 2021-04-07 11:08:48.389599751 +0100
@@ -22,8 +22,8 @@
import java.util.Iterator;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.base.config.Configuration;
import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
@@ -34,7 +34,7 @@
*/
public class DefaultResourceManagerBackend implements ResourceManagerBackend
{
- private static final Log logger = LogFactory.getLog(DefaultResourceManagerBackend.class);
+ private static final Logger logger = Logger.getLogger(DefaultResourceManagerBackend.class.getName());
private ArrayList resourceLoaders;
private ArrayList resourceBundleLoaders;
@@ -280,9 +280,9 @@
{
// ignore it, try the next factory ...
exception = rex;
- if (logger.isDebugEnabled())
+ if (logger.isLoggable(Level.CONFIG))
{
- logger.debug("Failed at " + fact.getClass() + ": ", rex);
+ logger.config("Failed at " + fact.getClass() + ": " + rex);
}
}
}
@@ -413,7 +413,7 @@
{
throw new UnrecognizedLoaderException("Invalid key: No resource-loader registered for schema: " + key.getSchema());
}
- logger.debug("Loaded " + key);
+ logger.config("Loaded " + key);
return loader.load(key);
}
@@ -451,7 +451,7 @@
ResourceLoader.class);
if (loader != null)
{
- //Log.debug("Registering loader for " + loader.getSchema());
+ //Log.config("Registering loader for " + loader.getSchema());
registerLoader(loader);
}
}
@@ -465,7 +465,7 @@
ResourceManager.class, ResourceBundleLoader.class);
if (loader != null)
{
- //Log.debug("Registering loader for " + loader.getSchema());
+ //Log.config("Registering loader for " + loader.getSchema());
registerBundleLoader(loader);
}
}
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 10:55:58.342147402 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 11:05:40.206289803 +0100
@@ -27,8 +27,8 @@
import java.util.Collections;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
/**
* Creation-Date: 05.12.2007, 19:15:56
@@ -37,7 +37,7 @@
*/
public class DrawableWrapper
{
- private static final Log logger = LogFactory.getLog(DrawableWrapper.class);
+ private static final Logger logger = Logger.getLogger(DrawableWrapper.class.getName());
private static final Map drawables = Collections.synchronizedMap(new HashMap());
private Object backend;
@@ -67,9 +67,9 @@
Modifier.isAbstract(modifiers) ||
Modifier.isStatic(modifiers))
{
- if (logger.isWarnEnabled())
+ if (logger.isLoggable(Level.WARNING))
{
- logger.warn("DrawMethod is not valid: " + aClass + '#' + drawMethod);
+ logger.warning("DrawMethod is not valid: " + aClass + '#' + drawMethod);
}
drawMethod = null;
}
@@ -77,9 +77,9 @@
catch (NoSuchMethodException e)
{
// ignore exception
- if (logger.isWarnEnabled())
+ if (logger.isLoggable(Level.WARNING))
{
- logger.warn("The object is not a drawable: " + aClass);
+ logger.warning("The object is not a drawable: " + aClass);
}
drawMethod = null;
}
@@ -141,9 +141,9 @@
}
catch (Exception e)
{
- if (logger.isDebugEnabled())
+ if (logger.isLoggable(Level.CONFIG))
{
- logger.warn("Invoking draw failed:", e);
+ logger.warning("Invoking draw failed: " + e);
}
}
}
@@ -167,9 +167,9 @@
}
catch (Exception e)
{
- if (logger.isWarnEnabled())
+ if (logger.isLoggable(Level.WARNING))
{
- logger.warn("Invoking getPreferredSize failed:", e);
+ logger.warning("Invoking getPreferredSize failed: " + e);
}
return null;
}
@@ -193,9 +193,9 @@
}
catch (Exception e)
{
- if (logger.isWarnEnabled())
+ if (logger.isLoggable(Level.WARNING))
{
- logger.warn("Invoking isKeepAspectRatio failed:", e);
+ logger.warning("Invoking isKeepAspectRatio failed: " + e);
}
return false;
}
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java 2021-04-07 11:03:22.711602044 +0100
@@ -24,8 +24,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.resourceloader.ResourceData;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
@@ -43,7 +42,7 @@
public class FileResourceLoader implements ResourceLoader
{
public static final String SCHEMA_NAME = FileResourceLoader.class.getName();
- private static final Log logger = LogFactory.getLog(FileResourceLoader.class);
+ private static final Logger logger = Logger.getLogger(FileResourceLoader.class.getName());
public FileResourceLoader()
{
@@ -210,7 +209,7 @@
}
// Log information
- logger.debug("Serializing a File Resource Key...");
+ logger.config("Serializing a File Resource Key...");
if (key.getParent() != null)
{
throw new ResourceException
@@ -224,7 +223,7 @@
final String strIdentifier = file.getCanonicalPath();
final String result = ResourceKeyUtils.createStringResourceKey
(key.getSchema().toString(), strIdentifier, key.getFactoryParameters());
- logger.debug("Serialized File Resource Key: [" + result + "]");
+ logger.config("Serialized File Resource Key: [" + result + "]");
return result;
}
catch (IOException ioe)
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java 2021-04-07 10:55:58.343147414 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java 2021-04-07 11:01:56.064538444 +0100
@@ -21,8 +21,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.resourceloader.ResourceData;
import org.pentaho.reporting.libraries.resourceloader.ResourceException;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java 2021-04-07 10:55:58.343147414 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java 2021-04-07 11:03:14.370499656 +0100
@@ -21,8 +21,7 @@
import java.util.Map;
import java.net.URL;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.resourceloader.ResourceData;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
@@ -41,7 +40,7 @@
public class ClassloaderResourceLoader implements ResourceLoader
{
public static final String SCHEMA_NAME = ClassloaderResourceLoader.class.getName();
- private static final Log logger = LogFactory.getLog(ClassloaderResourceLoader.class);
+ private static final Logger logger = Logger.getLogger(ClassloaderResourceLoader.class.getName());
public ClassloaderResourceLoader()
{
@@ -197,7 +196,7 @@
}
// Log information
- logger.debug("Serializing a Classloader Resource Key...");
+ logger.config("Serializing a Classloader Resource Key...");
if (key.getParent() != null)
{
throw new ResourceException
@@ -207,7 +206,7 @@
// Serialize the key
final String result = ResourceKeyUtils.createStringResourceKey(key.getSchema().toString(),
(String) key.getIdentifier(), key.getFactoryParameters());
- logger.debug("Serialized Classloader Resource Key: [" + result + "]");
+ logger.config("Serialized Classloader Resource Key: [" + result + "]");
return result;
}
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 11:03:41.998838804 +0100
@@ -22,8 +22,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.resourceloader.ResourceData;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
@@ -40,7 +39,7 @@
public class URLResourceLoader implements ResourceLoader
{
public static final String SCHEMA_NAME = URLResourceLoader.class.getName();
- private static final Log logger = LogFactory.getLog(URLResourceLoader.class);
+ private static final Logger logger = Logger.getLogger(URLResourceLoader.class.getName());
public URLResourceLoader()
{
@@ -188,10 +187,10 @@
}
// Log information
- logger.debug("Serializing a Classloader Resource Key...");
+ logger.config("Serializing a Classloader Resource Key...");
if (key.getParent() != null)
{
- logger.warn("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
+ logger.warning("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
+ key.getParent() + "]");
}
@@ -199,7 +198,7 @@
final URL url = (URL) key.getIdentifier();
final String result = ResourceKeyUtils.createStringResourceKey
(key.getSchema().toString(), url.toExternalForm(), key.getFactoryParameters());
- logger.debug("Serialized Classloader Resource Key: [" + result + "]");
+ logger.config("Serialized Classloader Resource Key: [" + result + "]");
return result;
}
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java 2021-04-07 11:02:18.522814132 +0100
@@ -21,8 +21,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.resourceloader.ResourceData;
import org.pentaho.reporting.libraries.resourceloader.ResourceException;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
@@ -40,7 +39,7 @@
public class ZipResourceLoader implements ResourceLoader
{
public static final String SCHEMA_NAME = ZipResourceLoader.class.getName();
- private static final Log logger = LogFactory.getLog(ZipResourceLoader.class);
+ private static final Logger logger = Logger.getLogger(ZipResourceLoader.class.getName());
public ZipResourceLoader()
{
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:55:58.345147438 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:58:52.758288370 +0100
@@ -20,8 +20,7 @@
import org.pentaho.reporting.libraries.base.boot.AbstractModule;
import org.pentaho.reporting.libraries.base.boot.ModuleInitializeException;
import org.pentaho.reporting.libraries.base.boot.SubSystem;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
/**
* Creation-Date: 13.04.2006, 16:29:07
@@ -30,7 +29,7 @@
*/
public class EHCacheModule extends AbstractModule
{
- public static final Log CACHE_MONITOR = LogFactory.getLog(EHCacheModule.class.getName() + "#CacheLog");
+ public static final Logger CACHE_MONITOR = Logger.getLogger(EHCacheModule.class.getName() + "#CacheLog");
public EHCacheModule() throws ModuleInitializeException
{
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java 2021-04-07 10:55:58.345147438 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java 2021-04-07 10:59:17.251589016 +0100
@@ -20,8 +20,7 @@
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheException;
import net.sf.ehcache.Element;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.resourceloader.Resource;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.cache.ResourceFactoryCache;
@@ -110,7 +109,7 @@
}
}
- private static final Log logger = LogFactory.getLog(EHResourceFactoryCache.class);
+ private static final Logger logger = Logger.getLogger(EHResourceFactoryCache.class.getName());
private Cache factoryCache;
public EHResourceFactoryCache(final Cache factoryCache)
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 10:55:58.342147402 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 11:06:27.248867251 +0100
@@ -27,8 +27,8 @@
import java.util.Iterator;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.base.util.CSVQuoter;
import org.pentaho.reporting.libraries.base.util.CSVTokenizer;
import org.pentaho.reporting.libraries.base.util.IOUtils;
@@ -42,7 +42,7 @@
{
private static final String DELIMITER = ";";
private static final String SERIALIZATION_PREFIX = "resourcekey:";
- private static final Log logger = LogFactory.getLog(ResourceManager.class);
+ private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
/**
* Returns a string representation of the ResourceKey based on the pieces that are passed as parameters
@@ -169,7 +169,7 @@
sb.append(quoter.doQuoting(entrySb.toString()));
}
- logger.debug("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
+ logger.config("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
return sb.toString();
}
@@ -226,9 +226,9 @@
params.put(key, value);
}
- if (logger.isDebugEnabled())
+ if (logger.isLoggable(Level.CONFIG))
{
- logger.debug("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
+ logger.config("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
+ "] -> map of size " + params.size());
}
return params;
@@ -369,7 +369,7 @@
}
catch (IOException e)
{
- logger.error("Error closing input stream", e);
+ logger.severe("Error closing input stream: " + e);
}
}
}
diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java
--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java 2021-04-07 10:55:58.344147426 +0100
+++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java 2021-04-07 11:07:50.557889876 +0100
@@ -22,8 +22,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.pentaho.reporting.libraries.base.config.Configuration;
import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
import org.pentaho.reporting.libraries.resourceloader.cache.BundleCacheResourceWrapper;
@@ -57,7 +57,7 @@
*/
public final class ResourceManager
{
- private static final Log logger = LogFactory.getLog(ResourceManager.class);
+ private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
private ResourceManagerBackend backend;
public static final String BUNDLE_LOADER_PREFIX = "org.pentaho.reporting.libraries.resourceloader.bundle.loader.";
@@ -273,7 +273,7 @@
final ResourceBundleData bundle = loadResourceBundle(key);
if (bundle != null)
{
- logger.debug("Loaded bundle for key " + key);
+ logger.config("Loaded bundle for key " + key);
return bundle;
}
final ResourceKey parent = key.getParent();
@@ -283,7 +283,7 @@
final ResourceBundleData parentData = loadResourceBundle(parent);
if (parentData != null)
{
- logger.debug("Loaded bundle for key (derivate) " + key);
+ logger.config("Loaded bundle for key (derivate) " + key);
return parentData.deriveData(key);
}
}
@@ -400,9 +400,9 @@
newResource = backend.create(derivedManager, resourceBundleData, context, target);
if (isResourceCacheable(newResource))
{
- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
+ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
{
- EHCacheModule.CACHE_MONITOR.debug("Storing created bundle-resource for key: " + key);
+ EHCacheModule.CACHE_MONITOR.config("Storing created bundle-resource for key: " + key);
}
factoryCache.put(newResource);
if (key != newResource.getSource())
@@ -412,9 +412,9 @@
}
else
{
- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
+ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
{
- EHCacheModule.CACHE_MONITOR.debug("Created bundle-resource is not cacheable for " + key);
+ EHCacheModule.CACHE_MONITOR.config("Created bundle-resource is not cacheable for " + key);
}
}
}
@@ -423,17 +423,17 @@
newResource = backend.create(this, loadedData, context, target);
if (isResourceCacheable(newResource))
{
- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
+ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
{
- EHCacheModule.CACHE_MONITOR.debug("Storing created resource for key: " + key);
+ EHCacheModule.CACHE_MONITOR.config("Storing created resource for key: " + key);
}
factoryCache.put(newResource);
}
else
{
- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
+ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
{
- EHCacheModule.CACHE_MONITOR.debug("Created resource is not cacheable for " + key);
+ EHCacheModule.CACHE_MONITOR.config("Created resource is not cacheable for " + key);
}
}
}
@@ -556,7 +556,7 @@
{
if (failedModules.contains(dataCacheProviderClass) == false)
{
- logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
+ logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
failedModules.add(dataCacheProviderClass);
}
}
@@ -593,7 +593,7 @@
{
if (failedModules.contains(dataCacheProviderClass) == false)
{
- logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
+ logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
failedModules.add(dataCacheProviderClass);
}
}
@@ -630,7 +630,7 @@
{
if (failedModules.contains(cacheProviderClass) == false)
{
- logger.warn("Failed to create factory cache: " + e.getLocalizedMessage());
+ logger.warning("Failed to create factory cache: " + e.getLocalizedMessage());
failedModules.add(cacheProviderClass);
}
}

View File

@ -1,120 +1,52 @@
%define with_gcj 1
%define javahome %{_jvmdir}/jdk
Name: java-jfree-libloader Name: java-jfree-libloader
Version: 1.1.3 Version: 1.1.3
Release: 1mamba Release: 2mamba
Summary: LibLoader is a resource loading framework Summary: LibLoader is a resource loading framework
Group: Development/Libraries/Java Group: Development/Libraries/Java
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://reporting.pentaho.org/ URL: https://community.hitachivantara.com/home
# http://sourceforge.net/projects/jfreereport/ Source: http://downloads.sourceforge.net/project/jfreereport/02.%20Libraries/%{version}-stable/libloader-%{version}.zip
# cvs -d:pserver:anonymous@jfreereport.cvs.sourceforge.net:/cvsroot/jfreereport login Patch0: java-jfree-libloader-1.1.3-build.patch
# cvs -z3 -d:pserver:anonymous@jfreereport.cvs.sourceforge.net:/cvsroot/jfreereport co -P libloader Patch1: java-jfree-libloader-1.1.3-java11.patch
#Source: http://downloads.sourceforge.net/project/jfreereport/30.%20OpenOffice%20Branches/OOo31/libloader-%{version}-OOo31.zip Patch2: java-jfree-libloader-1.1.3-remove-antcontrib-support.patch
Source: http://downloads.sourceforge.net/project/jfreereport/02.%20Libraries/1.1.3-stable/libloader-1.1.3.zip Patch3: java-jfree-libloader-1.1.3-remove-commons-logging.patch
Patch0: java-jfree-libloader-1.1.3-build_properties.patch
# disable echache support (require hibernate3, ..., jboss, ..., spring, ...)
Patch1: java-jfree-libloader-1.1.3-common_build_xml.patch
# add batik & libpixie support only
Patch2: java-jfree-libloader-1.1.3-01-common_build_xml.patch
License: LGPL License: LGPL
BuildRequires: ant-contribb3 ## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
BuildRequires: apache-ant BuildRequires: apache-ant
BuildRequires: jakarta-commons-logging
BuildRequires: java-jfree-libbase BuildRequires: java-jfree-libbase
BuildRequires: apache-batik
#BuildRequires: java-backport-util-concurrent
#BuildRequires: java-ehcache
#BuildRequires: java-jsr107cache
BuildRequires: java-jfree-libpixie
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: xml-commons-apis
Requires: java-jfree-libbase Requires: java-jfree-libbase
Requires: jpackage-utils Requires: javapackages
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
LibLoader is a general purpose resource loading framework. It has been designed to allow to load resources from any physical location and to allow the processing of that content data in a generic way, totally transparent to the user of that library. LibLoader is a general purpose resource loading framework. It has been designed to allow to load resources from any physical location and to allow the processing of that content data in a generic way, totally transparent to the user of that library.
%if %with_gcj
%package gcj
Group: System/Libraries/Java
Summary: GCJ support for %{name}
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: java-gcj-compat
BuildRequires: libgcc
BuildRequires: libgcj4-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
Requires: java-gcj-compat
%description gcj
LibLoader is a resource loading framework.
This package contains GCJ support for %{name}.
%endif
%package javadoc %package javadoc
Group: Documentation Group: Documentation
Summary: Javadoc for %{name} Summary: Javadoc for %{name}
%description javadoc %description javadoc
LibLoader is a resource loading framework. LibLoader is a resource loading framework.
This package contains documentation for %{name}. This package contains documentation for %{name}.
%prep %prep
%setup -q -c
%patch0 -p1 -b .build
%patch1 -p1 -b .java11
%patch2 -p1 -b .remove-antcontrib-support
%patch3 -p1 -b .remove-commons-logging
%setup -q -c -n libloader find . -name "*.jar" -exec rm -f {} \;
%patch0 mkdir -p lib
#%patch1 build-jar-repository -s -p lib libbase
%patch2 cd lib
ln -s /usr/share/java/ant ant-contrib
for j in $(find . -name "*.jar"); do
rm -rf $j
done
mkdir -p lib test-lib
ln -sf $(build-classpath commons-logging) lib/commons-logging.jar
ln -sf $(build-classpath commons-logging-api) lib/commons-logging-api-1.0.4.jar
ln -sf $(build-classpath libbase) lib/libbase-%{version}.jar
ln -sf $(build-classpath libpixie) lib/libpixie-%{version}.jar
#ln -sf $(build-classpath junit-3.8.2) test-lib/junit-3.8.1.jar
#ln -sf $(build-classpath backport-util-concurrent) lib/backport-util-concurrent-3.0.jar
#ln -sf $(build-classpath jsr107cache) lib/jsr107cache-1.0.jar
#ln -sf $(build-classpath ehcache-1.4.1) lib/ehcache-1.4.1.jar
ln -sf $(build-classpath batik-awt-util) lib/batik-awt-util-1.6.jar
ln -sf $(build-classpath batik-bridge) lib/batik-bridge-1.6.jar
ln -sf $(build-classpath batik-css) lib/batik-css-1.6.jar
ln -sf $(build-classpath batik-dom) lib/batik-dom-1.6.jar
ln -sf $(build-classpath batik-ext) lib/batik-ext-1.6.jar
ln -sf $(build-classpath batik-gui-util) lib/batik-gui-util-1.6.jar
ln -sf $(build-classpath batik-gvt) lib/batik-gvt-1.6.jar
ln -sf $(build-classpath batik-parser) lib/batik-parser-1.6.jar
ln -sf $(build-classpath batik-script) lib/batik-script-1.6.jar
ln -sf $(build-classpath batik-svg-dom) lib/batik-svg-dom-1.6.jar
ln -sf $(build-classpath batik-util) lib/batik-util-1.6.jar
ln -sf $(build-classpath batik-xml) lib/batik-xml-1.6.jar
ln -sf $(build-classpath xml-commons-apis-ext) lib/xml-apis-1.0.b2.jar
ln -s %{_javadir}/ant lib/ant-contrib
for txt in ChangeLog.txt licence-LGPL.txt README.txt; do
%{__perl} -pi -e 's/\r$//g' $txt
done
%build %build
unset JAVA_HOME ant jar javadoc
export JAVA_HOME=%{javahome}
export CLASSPATH=$(build-classpath ant-contribb3 batik-all libpixie junit-3.8.2 commons-logging xml-commons-apis-ext)
ant \
jar javadoc
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -133,10 +65,6 @@ install -pm 644 dist/libloader-%{version}.jar %{buildroot}%{_javadir}/libloader-
mkdir -p %{buildroot}%{_javadocdir}/libloader mkdir -p %{buildroot}%{_javadocdir}/libloader
cp -pr bin/javadoc/docs/api/* %{buildroot}%{_javadocdir}/libloader cp -pr bin/javadoc/docs/api/* %{buildroot}%{_javadocdir}/libloader
%if %with_gcj
%{_bindir}/aot-compile-rpm
%endif
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -144,30 +72,16 @@ cp -pr bin/javadoc/docs/api/* %{buildroot}%{_javadocdir}/libloader
%defattr(-,root,root) %defattr(-,root,root)
%{_javadir}/libloader-%{version}.jar %{_javadir}/libloader-%{version}.jar
%{_javadir}/libloader.jar %{_javadir}/libloader.jar
%doc ChangeLog.txt licence-LGPL.txt README.txt %doc licence-LGPL.txt
%if %with_gcj
%post gcj
if [ -x %{_bindir}/rebuild-gcj-db ] ; then
%{_bindir}/rebuild-gcj-db
fi
%postun gcj
if [ -x %{_bindir}/rebuild-gcj-db ] ; then
%{_bindir}/rebuild-gcj-db
fi
%files gcj
%defattr(-,root,root)
%{_libdir}/gcj/java-jfree-libloader/libloader-%{version}.jar.db
%{_libdir}/gcj/java-jfree-libloader/libloader-%{version}.jar.so
%endif
%files javadoc %files javadoc
%defattr(-,root,root) %defattr(-,root,root)
%{_javadocdir}/libloader %{_javadocdir}/libloader
%changelog %changelog
* Fri Dec 10 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.3-2mamba
- rebuilt without gcj and with java 11
* Sat Jan 22 2011 gil <puntogil@libero.it> 1.1.3-1mamba * Sat Jan 22 2011 gil <puntogil@libero.it> 1.1.3-1mamba
- update to 1.1.3 - update to 1.1.3