#6 Update to upstream version 1.3.0
Merged 6 months ago by mizdebsk. Opened 6 months ago by mizdebsk.
rpms/ mizdebsk/apache-commons-logging rebase-1.3.0  into  rawhide

file modified
+1
@@ -2,3 +2,4 @@ 

  /commons-logging-1.1.2-src.tar.gz

  /commons-logging-1.1.3-src.tar.gz

  /commons-logging-1.2-src.tar.gz

+ /commons-logging-1.3.0-src.tar.gz

@@ -1,99 +0,0 @@ 

- From d71aa7acc93b944b159ac63f85d9ba1a566f5a8d Mon Sep 17 00:00:00 2001

- From: Mikolaj Izdebski <mizdebsk@redhat.com>

- Date: Tue, 29 Jul 2014 09:00:03 +0200

- Subject: [PATCH 1/2] Generate different Bundle-SymbolicName for different JARs

- 

- ---

-  pom.xml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++

-  1 file changed, 55 insertions(+)

- 

- diff --git a/pom.xml b/pom.xml

- index cdad31c..5707595 100644

- --- a/pom.xml

- +++ b/pom.xml

- @@ -179,6 +179,52 @@ under the License.

-    <build>

-      <plugins>

-  

- +      <plugin>

- +        <groupId>org.apache.felix</groupId>

- +        <artifactId>maven-bundle-plugin</artifactId>

- +        <executions>

- +          <execution>

- +            <id>tests-bundle-manifest</id>

- +            <phase>process-classes</phase>

- +            <goals>

- +              <goal>manifest</goal>

- +            </goals>

- +            <configuration>

- +              <manifestLocation>${project.build.directory}/osgi-tests</manifestLocation>

- +              <instructions>

- +                <Bundle-SymbolicName>${commons.osgi.symbolicName}.tests</Bundle-SymbolicName>

- +              </instructions>

- +            </configuration>

- +          </execution>

- +          <execution>

- +            <id>api-bundle-manifest</id>

- +            <phase>process-classes</phase>

- +            <goals>

- +              <goal>manifest</goal>

- +            </goals>

- +            <configuration>

- +              <manifestLocation>${project.build.directory}/osgi-api</manifestLocation>

- +              <instructions>

- +                <Bundle-SymbolicName>${commons.osgi.symbolicName}.api</Bundle-SymbolicName>

- +              </instructions>

- +            </configuration>

- +          </execution>

- +          <execution>

- +            <id>adapters-bundle-manifest</id>

- +            <phase>process-classes</phase>

- +            <goals>

- +              <goal>manifest</goal>

- +            </goals>

- +            <configuration>

- +              <manifestLocation>${project.build.directory}/osgi-adapters</manifestLocation>

- +              <instructions>

- +                <Bundle-SymbolicName>${commons.osgi.symbolicName}.adapters</Bundle-SymbolicName>

- +              </instructions>

- +            </configuration>

- +          </execution>

- +        </executions>

- +      </plugin>

- +

-        <!--

-          - We want to create four jarfiles from this project: normal, tests, api

-          - and adapters. The first two are handled by the normal jar:jar and

- @@ -202,6 +248,9 @@ under the License.

-              </goals>

-              <configuration>

-                <jarName>commons-logging</jarName>

- +              <archive>

- +                <manifestFile>${project.build.directory}/osgi-tests/MANIFEST.MF</manifestFile>

- +              </archive>

-              </configuration>

-            </execution>

-  

- @@ -213,6 +262,9 @@ under the License.

-              </goals>

-              <configuration>

-                <jarName>${project.artifactId}-api-${project.version}</jarName>

- +              <archive>

- +                <manifestFile>${project.build.directory}/osgi-api/MANIFEST.MF</manifestFile>

- +              </archive>

-                <includes>

-                  <include>org/apache/commons/logging/*.class</include>

-                  <include>org/apache/commons/logging/impl/LogFactoryImpl*.class</include>

- @@ -237,6 +289,9 @@ under the License.

-              </goals>

-              <configuration>

-                <jarName>${project.artifactId}-adapters-${project.version}</jarName>

- +              <archive>

- +                <manifestFile>${project.build.directory}/osgi-adapters/MANIFEST.MF</manifestFile>

- +              </archive>

-                <includes>

-                  <include>org/apache/commons/logging/impl/**.class</include>

-                  <include>META-INF/LICENSE.txt</include>

- -- 

- 2.5.5

- 

@@ -1,160 +0,0 @@ 

- From d8356a58efde0808cabede14b4f1b2473fa73170 Mon Sep 17 00:00:00 2001

- From: Mikolaj Izdebski <mizdebsk@redhat.com>

- Date: Tue, 31 May 2016 10:52:12 +0200

- Subject: [PATCH 2/2] Port to maven-jar-plugin 3.0.0

- 

- ---

-  pom.xml                                            | 47 +++++-----------------

-  .../logging/pathable/ChildFirstTestCase.java       |  8 ++--

-  .../logging/pathable/ParentFirstTestCase.java      |  8 ++--

-  3 files changed, 17 insertions(+), 46 deletions(-)

- 

- diff --git a/pom.xml b/pom.xml

- index 5707595..c5d8d37 100644

- --- a/pom.xml

- +++ b/pom.xml

- @@ -237,6 +237,10 @@ under the License.

-          <artifactId>maven-jar-plugin</artifactId>

-          <executions>

-            <execution>

- +	    <id>default-jar</id>

- +	    <phase>skip</phase>

- +	  </execution>

- +	  <execution>

-              <!--

-                - The custom test framework requires the unit test code to be

-                - in a jarfile so it can control its place in the classpath.

- @@ -261,7 +265,7 @@ under the License.

-                <goal>jar</goal>

-              </goals>

-              <configuration>

- -              <jarName>${project.artifactId}-api-${project.version}</jarName>

- +              <classifier>api</classifier>

-                <archive>

-                  <manifestFile>${project.build.directory}/osgi-api/MANIFEST.MF</manifestFile>

-                </archive>

- @@ -288,7 +292,7 @@ under the License.

-                <goal>jar</goal>

-              </goals>

-              <configuration>

- -              <jarName>${project.artifactId}-adapters-${project.version}</jarName>

- +              <classifier>adapters</classifier>

-                <archive>

-                  <manifestFile>${project.build.directory}/osgi-adapters/MANIFEST.MF</manifestFile>

-                </archive>

- @@ -346,39 +350,6 @@ under the License.

-  

-        <plugin>

-          <!--

- -          - Attach the adapters and api jars to the normal artifact. This way

- -          - they will be deployed when the normal artifact is deployed.

- -          -->

- -        <groupId>org.codehaus.mojo</groupId>

- -        <artifactId>build-helper-maven-plugin</artifactId>

- -        <version>1.0</version>

- -        <executions>

- -          <execution>

- -            <id>attach-artifacts</id>

- -            <phase>package</phase>

- -            <goals>

- -              <goal>attach-artifact</goal>

- -            </goals>

- -            <configuration>

- -              <artifacts>

- -                <artifact>

- -                  <file>${project.build.directory}/${project.artifactId}-adapters-${project.version}.jar</file>

- -                  <type>jar</type>

- -                  <classifier>adapters</classifier>

- -                </artifact>

- -                <artifact>

- -                  <file>${project.build.directory}/${project.artifactId}-api-${project.version}.jar</file>

- -                  <type>jar</type>

- -                  <classifier>api</classifier>

- -                </artifact>

- -              </artifacts>

- -            </configuration>

- -          </execution>

- -        </executions>

- -      </plugin>

- -

- -      <plugin>

- -        <!--

-            - Many of JCL's tests use tricky techniques to place the generated

-            - JCL jarfiles on the classpath in various configurations. This means

-            - that those tests must be run *after* the "package" build phase.

- @@ -442,9 +413,9 @@ under the License.

-                    <logkit>${logkit:logkit:jar}</logkit>

-                    <servlet-api>${javax.servlet:servlet-api:jar}</servlet-api>

-                    <commons-logging>target/${project.build.finalName}.jar</commons-logging>

- -                  <commons-logging-api>target/${project.artifactId}-api-${project.version}.jar</commons-logging-api>

- -                  <commons-logging-adapters>target/${project.artifactId}-adapters-${project.version}.jar</commons-logging-adapters>

- -                  <testclasses>target/commons-logging-tests.jar</testclasses>

- +                  <commons-logging-api>target/${project.artifactId}-${project.version}-api.jar</commons-logging-api>

- +                  <commons-logging-adapters>target/${project.artifactId}-${project.version}-adapters.jar</commons-logging-adapters>

- +                  <testclasses>target/commons-logging-${project.version}-tests.jar</testclasses>

-                </systemPropertyVariables>

-              </configuration>

-            </execution>

- diff --git a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java

- index 1aeb12d..eb67ec1 100644

- --- a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java

- +++ b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java

- @@ -213,11 +213,11 @@ public class ChildFirstTestCase extends TestCase {

-          // getResource where it is accessable to both classloaders. The one visible

-          // to the child should be returned. The URL returned will be of form

-          //  jar:file:/x/y.jar!path/to/resource. The filename part should include the jarname

- -        // of form commons-logging-adapters-nnnn.jar, not commons-logging-nnnn.jar

- +        // of form commons-logging-nnnn-adapters.jar, not commons-logging-nnnn.jar

-          resource = childLoader.getResource("org/apache/commons/logging/impl/Log4JLogger.class");

-          assertNotNull("Unable to locate Log4JLogger.class resource", resource);

-          assertTrue("Incorrect source for Log4JLogger class",

- -                resource.toString().indexOf("/commons-logging-adapters-1.") > 0);

- +                resource.toString().indexOf("/commons-logging-1.2-adapters.jar!") > 0);

-      }

-  

-      /**

- @@ -269,9 +269,9 @@ public class ChildFirstTestCase extends TestCase {

-          urlsToStrings[1] = urls[1].toString();

-          Arrays.sort(urlsToStrings);

-          assertTrue("Incorrect source for Log4JLogger class",

- -                urlsToStrings[0].indexOf("/commons-logging-1.") > 0);

- +                urlsToStrings[0].indexOf("/commons-logging-1.2-adapters.jar!") > 0);

-          assertTrue("Incorrect source for Log4JLogger class",

- -                urlsToStrings[1].indexOf("/commons-logging-adapters-1.") > 0);

- +                urlsToStrings[1].indexOf("/commons-logging-1.2.jar!") > 0);

-      }

-  

-      /**

- diff --git a/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java b/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java

- index f9bf452..fc10c8e 100644

- --- a/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java

- +++ b/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java

- @@ -210,11 +210,11 @@ public class ParentFirstTestCase extends TestCase {

-          // getResource where it is accessable to both classloaders. The one visible

-          // to the parent should be returned. The URL returned will be of form

-          //  jar:file:/x/y.jar!path/to/resource. The filename part should include the jarname

- -        // of form commons-logging-nnnn.jar, not commons-logging-adapters-nnnn.jar

- +        // of form commons-logging-nnnn.jar, not commons-logging-nnnn-adapters.jar

-          resource = childLoader.getResource("org/apache/commons/logging/impl/Log4JLogger.class");

-          assertNotNull("Unable to locate Log4JLogger.class resource", resource);

-          assertTrue("Incorrect source for Log4JLogger class",

- -                resource.toString().indexOf("/commons-logging-1.") > 0);

- +                resource.toString().indexOf("/commons-logging-1.2.jar!") > 0);

-      }

-      

-      /**

- @@ -259,9 +259,9 @@ public class ParentFirstTestCase extends TestCase {

-          urlsToStrings[1] = urls[1].toString();

-          Arrays.sort(urlsToStrings);

-          assertTrue("Incorrect source for Log4JLogger class",

- -                urlsToStrings[0].indexOf("/commons-logging-1.") > 0);

- +                urlsToStrings[0].indexOf("/commons-logging-1.2-adapters.jar!") > 0);

-          assertTrue("Incorrect source for Log4JLogger class",

- -                urlsToStrings[1].indexOf("/commons-logging-adapters-1.") > 0);

- +                urlsToStrings[1].indexOf("/commons-logging-1.2.jar!") > 0);

-          

-      }

-  

- -- 

- 2.5.5

- 

file modified
+17 -14
@@ -1,19 +1,15 @@ 

  %bcond_with bootstrap

  

  Name:           apache-commons-logging

- Version:        1.2

- Release:        35%{?dist}

+ Version:        1.3.0

+ Release:        1%{?dist}

  Summary:        Apache Commons Logging

  License:        Apache-2.0

  URL:            https://commons.apache.org/proper/commons-logging/

  BuildArch:      noarch

  ExclusiveArch:  %{java_arches} noarch

  

- Source0:        http://www.apache.org/dist/commons/logging/source/commons-logging-%{version}-src.tar.gz

- Source2:        http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.pom

- 

- Patch0:         0001-Generate-different-Bundle-SymbolicName-for-different.patch

- Patch1:         0002-Port-to-maven-jar-plugin-3.0.0.patch

+ Source0:        https://www.apache.org/dist/commons/logging/source/commons-logging-%{version}-src.tar.gz

  

  %if %{with bootstrap}

  BuildRequires:  javapackages-bootstrap
@@ -44,13 +40,18 @@ 

  %prep

  %autosetup -p1 -n commons-logging-%{version}-src

  

- %pom_remove_dep -r :avalon-framework

- %pom_remove_dep -r :logkit

+ %pom_remove_dep :avalon-framework

+ %pom_remove_dep :logkit

  rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java

  rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java

  rm -r src/test/java/org/apache/commons/logging/{avalon,logkit}

  rm src/test/java/org/apache/commons/logging/pathable/{Parent,Child}FirstTestCase.java

  

+ %if %{with bootstrap}

+ %pom_remove_dep :log4j

+ %pom_remove_dep :log4j-core

+ %endif

+ 

  # Avoid hard-coded versions in OSGi metadata

  %pom_xpath_set "pom:properties/pom:commons.osgi.import" '*;resolution:=optional'

  
@@ -63,15 +64,14 @@ 

  %mvn_file ":commons-logging{*}" "commons-logging@1" "%{name}@1"

  %mvn_alias ":commons-logging{*}" "org.apache.commons:commons-logging@1" "apache:commons-logging@1"

  

+ %mvn_package ":::{*}:"

+ 

  # Remove log4j12 tests

  rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12

  

  %build

- %mvn_build -- -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7 -Dcommons.osgi.symbolicName=org.apache.commons.logging

- 

- # The build produces more artifacts from one pom

- %mvn_artifact %{SOURCE2} target/commons-logging-%{version}-api.jar

- %mvn_artifact commons-logging:commons-logging-adapters:%{version} target/commons-logging-%{version}-adapters.jar

+ # missing test dependencies

+ %mvn_build -f

  

  %install

  %mvn_install
@@ -81,6 +81,9 @@ 

  %doc PROPOSAL.html RELEASE-NOTES.txt

  

  %changelog

+ * Mon Dec 04 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-1

+ - Update to upstream version 1.3.0

+ 

  * Fri Sep 01 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-35

  - Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (commons-logging-1.2-src.tar.gz) = 9f3761184950f2f13e85d8bc447709ab8be631dfd231b4f053f8147468db1bf71fb116ddba95e39f4afc4cf28c742e07d40c7a637f28004a60dc13935f9609f9

+ SHA512 (commons-logging-1.3.0-src.tar.gz) = 20cc40c7d7848da618801a86333f3984151d3089f806e5d7a1e92c83c1f90d330f1c7ded5d0ae70e48dd9de684f2e5da32de24fa2c406f6b419f77704c0e74f8