]> source.dussan.org Git - aspectj.git/commitdiff
Replace system-scoped dependency on commons by granular dependencies
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Mon, 29 Mar 2021 06:51:20 +0000 (13:51 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Mon, 29 Mar 2021 06:52:01 +0000 (13:52 +0700)
There are only two direct dependencies used in AspectJ code:
  - Commons Digester (module 'testing')
  - Commons Logging (module 'org.aspectj.matcher')

I declared those two and experimentally removed all the other
system-scoped dependencies, as it should be. Let's see if the build
works with transitive dependencies.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
libx/pom.xml
org.aspectj.matcher/pom.xml
pom.xml
run-all-junit-tests/pom.xml
testing-drivers/pom.xml
testing/pom.xml
tests/pom.xml
weaver/pom.xml

index fcd092162f231dfdf184382e1d45d3c39787e37e..27d3ce76715cfa0b5869e86bd217d5bfd9a6276f 100644 (file)
@@ -55,9 +55,9 @@
               <goal>wget</goal>
             </goals>
             <configuration>
-              <url>https://github.com/apache/commons-beanutils/archive/refs/tags/BEANUTILS_1_4.zip</url>
+              <url>https://github.com/apache/commons-beanutils/archive/refs/tags/${lib.commons.beanutils.tag}.zip</url>
               <outputDirectory>commons</outputDirectory>
-              <outputFileName>commons-beanutils-1.4-sources.jar</outputFileName>
+              <outputFileName>commons-beanutils-${lib.commons.beanutils.version}-sources.jar</outputFileName>
               <sha1>b2c02afe7e6475cd7c811932b8415d171a8afa00</sha1>
             </configuration>
           </execution>
@@ -81,9 +81,9 @@
               <goal>wget</goal>
             </goals>
             <configuration>
-              <url>https://github.com/apache/commons-digester/archive/refs/tags/DIGESTER_1_3.zip</url>
+              <url>https://github.com/apache/commons-digester/archive/refs/tags/${lib.commons.digester.tag}.zip</url>
               <outputDirectory>commons</outputDirectory>
-              <outputFileName>commons-digester-1.3-sources.jar</outputFileName>
+              <outputFileName>commons-digester-${lib.commons.digester.version}-sources.jar</outputFileName>
               <sha1>49f653c7ea726301c564f9662b72c051fee9390a</sha1>
             </configuration>
           </execution>
@@ -94,9 +94,9 @@
               <goal>wget</goal>
             </goals>
             <configuration>
-              <url>https://github.com/apache/commons-logging/archive/refs/tags/LOGGING_1_0_1.zip</url>
+              <url>https://github.com/apache/commons-logging/archive/refs/tags/${lib.commons.logging.tag}.zip</url>
               <outputDirectory>commons</outputDirectory>
-              <outputFileName>commons-logging-1.0.1-sources.jar</outputFileName>
+              <outputFileName>commons-logging-${lib.commons.logging.version}-sources.jar</outputFileName>
               <sha1>c61a373f6d50ff8fcfba900934f7254d44f9735b</sha1>
             </configuration>
           </execution>
                   <!-- TODO: not used anywhere -> remove -->
                   <groupId>commons-beanutils</groupId>
                   <artifactId>commons-beanutils</artifactId>
-                  <version>1.4</version>
+                  <version>${lib.commons.beanutils.version}</version>
                   <type>jar</type>
                   <overWrite>false</overWrite>
                   <outputDirectory>commons</outputDirectory>
-                  <destFileName>commons-beanutils-1.4.jar</destFileName>
+                  <destFileName>commons-beanutils-${lib.commons.beanutils.version}.jar</destFileName>
                 </artifactItem>
                 <artifactItem>
                   <!-- Binary is identical to committed version -->
                   <!-- TODO: used in module 'testing' -->
                   <groupId>commons-digester</groupId>
                   <artifactId>commons-digester</artifactId>
-                  <version>1.3</version>
+                  <version>${lib.commons.digester.version}</version>
                   <type>jar</type>
                   <overWrite>false</overWrite>
                   <outputDirectory>commons</outputDirectory>
-                  <destFileName>commons-digester-1.3.jar</destFileName>
+                  <destFileName>commons-digester-${lib.commons.digester.version}.jar</destFileName>
                 </artifactItem>
                 <artifactItem>
                   <!-- Binary is identical to committed version -->
-                  <!-- TODO: used in modules 'org.aspectj.matcher', 'testing'   -->
+                  <!-- TODO: used in modules 'org.aspectj.matcher' -->
                   <groupId>commons-logging</groupId>
                   <artifactId>commons-logging</artifactId>
-                  <version>1.0.1</version>
+                  <version>${lib.commons.logging.version}</version>
                   <type>jar</type>
                   <overWrite>false</overWrite>
                   <outputDirectory>commons</outputDirectory>
-                  <destFileName>commons-logging-1.0.1.jar</destFileName>
+                  <destFileName>commons-logging-${lib.commons.logging.version}.jar</destFileName>
                 </artifactItem>
 
               </artifactItems>
                       This is why we use the TrueZIP plugin: It can seamlessly copy out of or into ZIP files as if they
                       were normal file system paths. No additional moves and deletes with Antrun are necessary.
                     -->
-                    <directory>commons/commons-beanutils-1.4.jar</directory>
+                    <directory>commons/commons-beanutils-${lib.commons.beanutils.version}.jar</directory>
                     <outputDirectory>commons/commons.jar</outputDirectory>
                   </fileset>
                 </configuration>
                       This is why we use the TrueZIP plugin: It can seamlessly copy out of or into ZIP files as if they
                       were normal file system paths. No additional moves and deletes with Antrun are necessary.
                     -->
-                    <directory>commons/commons-digester-1.3.jar</directory>
+                    <directory>commons/commons-digester-${lib.commons.digester.version}.jar</directory>
                     <outputDirectory>commons/commons.jar</outputDirectory>
                   </fileset>
                 </configuration>
                       This is why we use the TrueZIP plugin: It can seamlessly copy out of or into ZIP files as if they
                       were normal file system paths. No additional moves and deletes with Antrun are necessary.
                     -->
-                    <directory>commons/commons-logging-1.0.1.jar</directory>
+                    <directory>commons/commons-logging-${lib.commons.logging.version}.jar</directory>
                     <outputDirectory>commons/commons.jar</outputDirectory>
                   </fileset>
                 </configuration>
                       This is why we use the TrueZIP plugin: It can seamlessly copy out of or into ZIP files as if they
                       were normal file system paths. No additional moves and deletes with Antrun are necessary.
                     -->
-                    <directory>commons/commons-beanutils-1.4-sources.jar/commons-beanutils-BEANUTILS_1_4/src/java</directory>
+                    <directory>commons/commons-beanutils-${lib.commons.beanutils.version}-sources.jar/commons-beanutils-${lib.commons.beanutils.tag}/src/java</directory>
                     <outputDirectory>commons/commons-src.zip</outputDirectory>
                   </fileset>
                 </configuration>
                       This is why we use the TrueZIP plugin: It can seamlessly copy out of or into ZIP files as if they
                       were normal file system paths. No additional moves and deletes with Antrun are necessary.
                     -->
-                    <directory>commons/commons-digester-1.3-sources.jar/commons-digester-DIGESTER_1_3/src/java</directory>
+                    <directory>commons/commons-digester-${lib.commons.digester.version}-sources.jar/commons-digester-${lib.commons.digester.tag}/src/java</directory>
                     <outputDirectory>commons/commons-src.zip</outputDirectory>
                   </fileset>
                 </configuration>
                       This is why we use the TrueZIP plugin: It can seamlessly copy out of or into ZIP files as if they
                       were normal file system paths. No additional moves and deletes with Antrun are necessary.
                     -->
-                    <directory>commons/commons-logging-1.0.1-sources.jar/commons-logging-LOGGING_1_0_1/src/java</directory>
+                    <directory>commons/commons-logging-${lib.commons.logging.version}-sources.jar/commons-logging-${lib.commons.logging.tag}/src/java</directory>
                     <outputDirectory>commons/commons-src.zip</outputDirectory>
                   </fileset>
                 </configuration>
index 2af08194935cb14505142b53c0d40f969e4f177e..b81290162127e3dfa389c0b628dbae404ee6f81c 100644 (file)
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>commons</groupId>
-      <artifactId>commons</artifactId>
-      <version>1.0</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>${lib.commons.logging.version}</version>
     </dependency>
   </dependencies>
 
-
   <build>
     <plugins>
      <plugin>
diff --git a/pom.xml b/pom.xml
index 56ffa2ff78f10f30bce5f628f81c5df54b2d72a9..d08245d5570f1a3b0de06ef151498ce1a3eac1c9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                <lib.ant.version>1.6.3</lib.ant.version>
                <lib.ant.xerces.version>2.6.2</lib.ant.xerces.version>
                <lib.regexp.version>1.2</lib.regexp.version>
+               <lib.commons.beanutils.version>1.4</lib.commons.beanutils.version>
+               <lib.commons.beanutils.tag>BEANUTILS_1_4</lib.commons.beanutils.tag>
+               <lib.commons.digester.version>1.3</lib.commons.digester.version>
+               <lib.commons.digester.tag>DIGESTER_1_3</lib.commons.digester.tag>
+               <lib.commons.logging.version>1.0.1</lib.commons.logging.version>
+               <lib.commons.logging.tag>LOGGING_1_0_1</lib.commons.logging.tag>
        </properties>
 
        <modules>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
+                       <dependency>
+                               <!-- Because commons-digester:commons-digester:1.3 refers to version 1.4-dev -->
+                               <groupId>commons-beanutils</groupId>
+                               <artifactId>commons-beanutils</artifactId>
+                               <version>${lib.commons.beanutils.version}</version>
+                       </dependency>
                </dependencies>
        </dependencyManagement>
 
index a6407370d326edff18a1d9d15b8601761776472d..a4d186e26e0a16c7ded832e318a8cf3b7cd7048e 100644 (file)
                        <version>${project.version}</version>
                        <type>test-jar</type>
                </dependency>
+<!--
                <dependency>
                        <groupId>commons</groupId>
                        <artifactId>commons</artifactId>
                        <scope>system</scope>
                        <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath>
                </dependency>
+-->
                <dependency>
                        <!-- Identical to lib/ant/lib/ant.jar, a former system-scoped dependency -->
                        <groupId>ant</groupId>
index f3ac5fa3648a0da863209b6d40a8f621b4732ac3..8268d073f81fa2453ba87d8e0c211e98edfe4151 100644 (file)
@@ -55,6 +55,7 @@
       <artifactId>asm</artifactId>
       <version>${project.version}</version>
     </dependency>
+<!--
     <dependency>
       <groupId>commons</groupId>
       <artifactId>commons</artifactId>
@@ -62,6 +63,7 @@
       <scope>system</scope>
       <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath>
     </dependency>
+-->
     <dependency>
       <groupId>org.aspectj</groupId>
       <artifactId>testing</artifactId>
index bbbe673194fa45f927574c24ff4fb74bba6dfe51..9017efedd001a97df8bb1a415690af98b29199b9 100644 (file)
       <version>4.13</version>
     </dependency>
     <dependency>
-      <groupId>commons</groupId>
-      <artifactId>commons</artifactId>
-      <version>1.0</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath>
+      <groupId>commons-digester</groupId>
+      <artifactId>commons-digester</artifactId>
+      <version>${lib.commons.digester.version}</version>
     </dependency>
     <dependency>
       <groupId>org.aspectj</groupId>
index f325b7bd27e1a3e04dcfb038395dc4b289f5aad3..97ea6c30c34592519a77146477735cf19f175fe2 100644 (file)
                        <artifactId>ant-launcher</artifactId>
                        <version>${lib.ant.version}</version>
                </dependency>
+<!--
                <dependency>
                        <groupId>commons</groupId>
                        <artifactId>commons</artifactId>
                        <scope>system</scope>
                        <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath>
                </dependency>
+-->
        </dependencies>
 
 
index 48703bf81dd019ae7d1c3d06b71721c6f5d87717..fcbae1c8bbcfc78beba90e6908444255c1cc01ce 100644 (file)
@@ -66,6 +66,7 @@
       <artifactId>bcel-builder</artifactId>
       <version>${project.version}</version>
     </dependency>
+<!--
     <dependency>
       <groupId>commons</groupId>
       <artifactId>commons</artifactId>
@@ -73,6 +74,7 @@
       <scope>system</scope>
       <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath>
     </dependency>
+-->
     <dependency>
       <groupId>asm</groupId>
       <artifactId>asm</artifactId>