diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-29 13:51:20 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-29 13:52:01 +0700 |
commit | 887cb2d8849f21f25a840674ffbffdc4ae4a8a8c (patch) | |
tree | 0b5be6256dd6922bc4ea6b370cd62a02ea45d09f | |
parent | 883c07f8187fdca69527fcbe4e2b50bda861611f (diff) | |
download | aspectj-887cb2d8849f21f25a840674ffbffdc4ae4a8a8c.tar.gz aspectj-887cb2d8849f21f25a840674ffbffdc4ae4a8a8c.zip |
Replace system-scoped dependency on commons by granular dependencies
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>
-rw-r--r-- | libx/pom.xml | 38 | ||||
-rw-r--r-- | org.aspectj.matcher/pom.xml | 9 | ||||
-rw-r--r-- | pom.xml | 12 | ||||
-rw-r--r-- | run-all-junit-tests/pom.xml | 2 | ||||
-rw-r--r-- | testing-drivers/pom.xml | 2 | ||||
-rw-r--r-- | testing/pom.xml | 8 | ||||
-rw-r--r-- | tests/pom.xml | 2 | ||||
-rw-r--r-- | weaver/pom.xml | 2 |
8 files changed, 45 insertions, 30 deletions
diff --git a/libx/pom.xml b/libx/pom.xml index fcd092162..27d3ce767 100644 --- a/libx/pom.xml +++ b/libx/pom.xml @@ -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> @@ -238,11 +238,11 @@ <!-- 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 --> @@ -260,22 +260,22 @@ <!-- 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> @@ -395,7 +395,7 @@ 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> @@ -431,7 +431,7 @@ 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> @@ -449,7 +449,7 @@ 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> @@ -488,7 +488,7 @@ 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> @@ -524,7 +524,7 @@ 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> @@ -542,7 +542,7 @@ 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> diff --git a/org.aspectj.matcher/pom.xml b/org.aspectj.matcher/pom.xml index 2af081949..b81290162 100644 --- a/org.aspectj.matcher/pom.xml +++ b/org.aspectj.matcher/pom.xml @@ -30,15 +30,12 @@ <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> @@ -16,6 +16,12 @@ <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> @@ -192,6 +198,12 @@ <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> diff --git a/run-all-junit-tests/pom.xml b/run-all-junit-tests/pom.xml index a6407370d..a4d186e26 100644 --- a/run-all-junit-tests/pom.xml +++ b/run-all-junit-tests/pom.xml @@ -227,6 +227,7 @@ <version>${project.version}</version> <type>test-jar</type> </dependency> +<!-- <dependency> <groupId>commons</groupId> <artifactId>commons</artifactId> @@ -234,6 +235,7 @@ <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> diff --git a/testing-drivers/pom.xml b/testing-drivers/pom.xml index f3ac5fa36..8268d073f 100644 --- a/testing-drivers/pom.xml +++ b/testing-drivers/pom.xml @@ -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> diff --git a/testing/pom.xml b/testing/pom.xml index bbbe67319..9017efedd 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -133,11 +133,9 @@ <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> diff --git a/tests/pom.xml b/tests/pom.xml index f325b7bd2..97ea6c30c 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -118,6 +118,7 @@ <artifactId>ant-launcher</artifactId> <version>${lib.ant.version}</version> </dependency> +<!-- <dependency> <groupId>commons</groupId> <artifactId>commons</artifactId> @@ -125,6 +126,7 @@ <scope>system</scope> <systemPath>${project.basedir}/../lib/commons/commons.jar</systemPath> </dependency> +--> </dependencies> diff --git a/weaver/pom.xml b/weaver/pom.xml index 48703bf81..fcbae1c8b 100644 --- a/weaver/pom.xml +++ b/weaver/pom.xml @@ -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> |