]> source.dussan.org Git - aspectj.git/commitdiff
Add POM to download libs (WIP) which previously were committed to SCM
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 17 Mar 2021 01:12:46 +0000 (08:12 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Mon, 29 Mar 2021 06:52:01 +0000 (13:52 +0700)
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
libx/pom.xml [new file with mode: 0644]
pom.xml
testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java

diff --git a/libx/pom.xml b/libx/pom.xml
new file mode 100644 (file)
index 0000000..cc7a9f9
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.aspectj</groupId>
+    <artifactId>aspectj-parent</artifactId>
+    <version>1.9.7.BUILD-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>libx</artifactId>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>3.1.2</version>
+        <executions>
+          <execution>
+            <id>copy</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <!--
+                    Binary 1.6.3 is identical to committed version, but 1.6.5 only contains bugfixes and comes with
+                    sources on Maven Central.
+
+                    TODO: Find all optionals (optional.jar in older Ant versions, now under lib/ant/lib in this
+                          repository) as separate Maven dependencies.
+                  -->
+                  <groupId>ant</groupId>
+                  <artifactId>ant</artifactId>
+                  <version>1.6.5</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>ant</outputDirectory>
+                  <destFileName>ant.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <!--
+                    Binary 1.6.3 is identical to committed version, but 1.6.5 only contains bugfixes and comes with
+                    sources on Maven Central.
+                  -->
+                  <groupId>ant</groupId>
+                  <artifactId>ant</artifactId>
+                  <version>1.6.5</version>
+                  <type>jar</type>
+                  <classifier>sources</classifier>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>ant</outputDirectory>
+                  <destFileName>ant-src.zip</destFileName>
+                </artifactItem>
+
+                <!--
+                  How relevant is JRockit in 2021?
+                  https://en.wikipedia.org/wiki/JRockit
+                  https://www.oracle.com/java/jrockit.html
+
+                  There are only org.aspectj.weaver.loadtime.JRockitAgent + tests. If we would get rid of that class,
+                  all the rest and jrockit.jar could also go away.
+                -->
+
+                <artifactItem>
+                  <!-- Binary is identical to committed version in branch 'jdtcore-new' -->
+                  <groupId>com.googlecode.jarjar</groupId>
+                  <artifactId>jarjar</artifactId>
+                  <version>1.3</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>jarjar</outputDirectory>
+                  <destFileName>jarjar-1.3.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <!--
+                    Binary jdiff:jdiff:1.0.9 is available on Maven Central, but different from committed version.
+                    There are API changes, some classes referenced in org.aspectj.testing.util.TestUtil are unavailable.
+                    Therefore, we would have to try and port the existing functionality, making sure the tests still
+                    run.
+
+                    Downloading snapshot from
+                    https://sourceforge.net/p/jedit/svn/24818/tree/plugins/JDiffPlugin/tags/jdiffplugin-1_2_2/jdiff/
+                    produces exactly identical source files as in the committed JAR. But there is no corresponding Maven
+                    artifact or even binary download package. We would have to compile the code within AspectJ and
+                    deploy it locally or Sonatype (Maven Central) or maven.springframework.org.
+
+                    Downloading source or binary packages from
+                    https://sourceforge.net/projects/jedit-plugins/files/JDiffPlugin/1.3/
+                    also has identical source files (except for tiny copyright changes), but contains more classes
+                    (a superset of the committed ones). Again, there is no Maven artifact for it.
+
+                    Another option would be to include the only 4 Java classes into the 'testing-util' source tree. They
+                    are only used from there and could easily be compiled together with the module, package names
+                    relocated or not.
+                  -->
+                  <!-- TODO: In commit c89830fe jdiff.jar was accidentally unpacked + committed -> delete -->
+                  <groupId>jdiff</groupId>
+                  <artifactId>jdiff</artifactId>
+                  <version>1.0.9</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>jdiff</outputDirectory>
+                  <destFileName>jdiff.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <!-- Binary is identical to committed version -->
+                  <groupId>junit</groupId>
+                  <artifactId>junit</artifactId>
+                  <version>3.8.1</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>junit</outputDirectory>
+                  <destFileName>junit.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <!-- Binary is identical to committed version -->
+                  <groupId>junit</groupId>
+                  <artifactId>junit</artifactId>
+                  <version>3.8.1</version>
+                  <type>jar</type>
+                  <classifier>sources</classifier>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>junit</outputDirectory>
+                  <destFileName>junit-src.zip</destFileName>
+                </artifactItem>
+
+                <!-- Jython does not seem to be used anywhere in AspectJ -->
+
+                <artifactItem>
+                  <!-- Binary is a bit newer than committed version, but produces identical results in 'docs' -->
+                  <groupId>saxon</groupId>
+                  <artifactId>saxon</artifactId>
+                  <version>6.5.3</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>saxon</outputDirectory>
+                  <destFileName>saxon.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <!-- Binary is identical to committed version -->
+                  <groupId>regexp</groupId>
+                  <artifactId>regexp</artifactId>
+                  <version>1.2</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>regexp</outputDirectory>
+                  <destFileName>jakarta-regexp-1.2.jar</destFileName>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/pom.xml b/pom.xml
index 14952e6a78934450a5dae6699df01a17655102f3..06e84edd3878d99587f301a6fa461e91c3704b01 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -39,6 +39,7 @@
                <module>build</module>
                <module>run-all-junit-tests</module>
                <module>docs</module>
+               <module>libx</module>
 
                <!-- create the important artifacts we care about -->
                <module>aspectjrt</module>
index 68e14ec2eb405445eab093d46ac11937fe779155..05a8cafa1d428d0929c39861c843acf721c20189 100644 (file)
@@ -1,13 +1,13 @@
 /* *******************************************************************
  * Copyright (c) 2004 IBM Corporation
- * All rights reserved. 
- * This program and the accompanying materials are made available 
- * under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution and is available at 
- * http://www.eclipse.org/legal/epl-v10.html 
- *  
- * Contributors: 
- *     Adrian Colyer, 
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Adrian Colyer,
  * ******************************************************************/
 package org.aspectj.testing;
 
@@ -68,17 +68,17 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
 
        public XMLBasedAjcTestCase() {
        }
-       
+
        /**
         * You must define a suite() method in subclasses, and return the result of calling this method. (Don't you hate static methods
         * in programming models). For example:
-        * 
+        *
         * <pre>
         * public static Test suite() {
         *       return XMLBasedAjcTestCase.loadSuite(MyTestCaseClass.class);
         * }
         * </pre>
-        * 
+        *
         * @param testCaseClass
         * @return
         */
@@ -224,10 +224,15 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
                }
        }
 
-       /*
+       /**
         * The rules for parsing a suite spec file. The Digester using bean properties to match attributes in the XML document to
         * properties in the associated classes, so this simple implementation should be very easy to maintain and extend should you
         * ever need to.
+        *
+        * See also <a href="http://commons.apache.org/proper/commons-digester/commons-digester-2.1/core.html">
+        * this introduction (archived for version 2.1)</a>. AspectJ uses version 1.3, though.
+        *
+        * @return a newly created XML digester
         */
        protected Digester getDigester() {
                Digester digester = new Digester();
@@ -279,7 +284,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.aspectj.tools.ajc.AjcTestCase#setUp()
         */
        protected void setUp() throws Exception {
@@ -358,7 +363,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
                ClassPath cp = new ClassPath(cpentry + File.pathSeparator + System.getProperty("java.class.path"));
                return SyntheticRepository.getInstance(cp);
        }
-       
+
        protected byte[] loadFileAsByteArray(File f) {
                try {
                        byte[] bs = new byte[100000];
@@ -383,7 +388,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
        protected Method getMethodStartsWith(JavaClass jc, String prefix) {
                return getMethodStartsWith(jc,prefix,1);
        }
-       
+
        protected Attribute getAttributeStartsWith(Attribute[] attributes, String prefix) {
                StringBuilder buf = new StringBuilder();
                for (Attribute a: attributes) {
@@ -395,7 +400,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
                fail("Failed to find '"+prefix+"' in attributes:\n"+buf.toString());
                return null;
        }
-       
+
        protected Method getMethodStartsWith(JavaClass jc, String prefix, int whichone) {
                Method[] meths = jc.getMethods();
                for (Method method : meths) {
@@ -519,5 +524,5 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
                return null;
        }
 
-       
+
 }