]> source.dussan.org Git - aspectj.git/commitdiff
Update ASM and fix packaging for matcher artifact
authorAndy Clement <aclement@pivotal.io>
Sat, 18 Jul 2020 00:29:08 +0000 (17:29 -0700)
committerAndy Clement <aclement@pivotal.io>
Sat, 18 Jul 2020 00:29:08 +0000 (17:29 -0700)
24 files changed:
ajdoc/pom.xml
aspectjmatcher/aspectjmatcher-assembly.xml [new file with mode: 0644]
aspectjmatcher/aspectjmatcher-sources-assembly.xml [new file with mode: 0644]
aspectjmatcher/pom.xml [new file with mode: 0644]
aspectjtools/pom.xml
aspectjweaver/pom.xml
build/build.xml
build/usedForMavenUpload/aspectjmatcher.pom [new file with mode: 0644]
build/usedForMavenUpload/aspectjrt.pom
build/usedForMavenUpload/aspectjtools.pom
build/usedForMavenUpload/aspectjweaver.pom
lib/asm/asm-4.2.jar [deleted file]
lib/asm/asm-4.2.renamed.jar [deleted file]
lib/asm/asm-5.0.4.jar [deleted file]
lib/asm/asm-5.0.4.renamed.jar [deleted file]
lib/asm/asm-7.2.jar [deleted file]
lib/asm/asm-7.2.renamed.jar [deleted file]
lib/asm/asm-8.0.1.jar [new file with mode: 0644]
lib/asm/asm-8.0.1.renamed.jar [new file with mode: 0644]
lib/asm/build.xml
org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
pom.xml
tests/pom.xml
weaver/pom.xml

index 427ed4b061ef441bfd0fb9b46fad3c28a40e2280..f5046dadc36447ed07f4394387dc555776be37f8 100644 (file)
@@ -48,7 +48,7 @@
       <artifactId>asm</artifactId>
       <version>1.0</version>
       <scope>system</scope>
-      <systemPath>${project.basedir}/../lib/asm/asm-7.2.renamed.jar</systemPath>
+      <systemPath>${project.basedir}/../lib/asm/asm-8.0.1.renamed.jar</systemPath>
     </dependency>
   </dependencies>
 </project>
diff --git a/aspectjmatcher/aspectjmatcher-assembly.xml b/aspectjmatcher/aspectjmatcher-assembly.xml
new file mode 100644 (file)
index 0000000..2a95e6f
--- /dev/null
@@ -0,0 +1,38 @@
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+
+       <id>aspectjmatcher</id>
+       
+       <formats>
+               <format>jar</format>
+       </formats>
+       
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       <fileSets>
+               <fileSet>
+                       <directory>../util/target/classes</directory>
+                       <outputDirectory>.</outputDirectory>
+                       <excludes>
+                               <exclude>META-INF/maven/**</exclude>
+                       </excludes>
+               </fileSet>
+               <fileSet>
+                       <directory>../bridge/target/classes</directory>
+                       <outputDirectory>.</outputDirectory>
+                       <excludes>
+                               <exclude>META-INF/maven/**</exclude>
+                       </excludes>
+               </fileSet>
+               <fileSet>
+                       <directory>../org.aspectj.matcher/target/classes</directory>
+                       <outputDirectory>.</outputDirectory>
+                       <excludes>
+                               <exclude>META-INF/maven/**</exclude>
+                       </excludes>
+               </fileSet>
+       </fileSets>
+
+</assembly>
+
diff --git a/aspectjmatcher/aspectjmatcher-sources-assembly.xml b/aspectjmatcher/aspectjmatcher-sources-assembly.xml
new file mode 100644 (file)
index 0000000..cb55a46
--- /dev/null
@@ -0,0 +1,29 @@
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+
+       <id>sources</id>
+
+       <formats>
+               <format>jar</format>
+       </formats>
+
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       <fileSets>
+               <fileSet>
+                       <directory>../util/src/main/java</directory>
+                       <outputDirectory>.</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <directory>../bridge/src/main/java</directory>
+                       <outputDirectory>.</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <directory>../org.aspectj.matcher/src/main/java</directory>
+                       <outputDirectory>.</outputDirectory>
+               </fileSet>
+       </fileSets>
+
+</assembly>
+
diff --git a/aspectjmatcher/pom.xml b/aspectjmatcher/pom.xml
new file mode 100644 (file)
index 0000000..e791fa9
--- /dev/null
@@ -0,0 +1,140 @@
+<?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.6.BUILD-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>aspectjmatcher</artifactId>
+       <packaging>pom</packaging>
+       <name>AspectJ Matcher</name>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>matcher</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
+
+       <build>
+               <plugins>
+
+                       <!-- skip creation of test-jar in here -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>test-jar</id>
+                                               <phase></phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       
+                       
+                       <!--
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-antrun-plugin</artifactId>
+                               <version>1.6</version>
+                               <executions>
+                                       <execution>
+                                               <id>unzipasm</id>
+                                               <phase>validate</phase>
+                                               <configuration>
+                                                       <tasks>
+                                                               <echo message="unzip jarjar'd asm" />
+                                                               <unzip
+                                                                       src="${project.basedir}/../lib/asm/asm-8.0.1.renamed.jar"
+                                                                       dest="target/asm-unzipped" />
+                                                       </tasks>
+                                               </configuration>
+                                               <goals>
+                                                       <goal>run</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       -->
+
+                       <plugin>
+                               <artifactId>maven-assembly-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>aspectjmatcher-assembly</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <finalName>aspectjmatcher-${project.version}</finalName>
+                                                       <appendAssemblyId>false</appendAssemblyId>
+                                                       <archive>
+                                                               <manifestEntries>
+                                                                       <Automatic-Module-Name>org.aspectj.matcher</Automatic-Module-Name>
+                                                                       <!--
+                                                                       <Premain-Class>org.aspectj.weaver.loadtime.Agent</Premain-Class>
+                                                                       <Agent-Class>org.aspectj.weaver.loadtime.Agent</Agent-Class>
+                                                                       <Can-Redefine-Classes>true</Can-Redefine-Classes>
+                                                                       -->
+                                                               </manifestEntries>
+
+
+                                                               <manifestSections>
+                                                                       <manifestSection>
+                                                                               <name>org/aspectj/matcher/</name>
+                                                                               <manifestEntries>
+
+                                                                                       <Specification-Title>AspectJ Matcher Classes</Specification-Title>
+                                                                                       <Specification-Version>${project.version}</Specification-Version>
+                                                                                       <Specification-Vendor>https://www.eclipse.org/aspectj/</Specification-Vendor>
+
+                                                                                       <Implementation-Title>org.aspectj.matcher</Implementation-Title>
+                                                                                       <Implementation-Version>${project.version}</Implementation-Version>
+                                                                                       <Implementation-Vendor>https://www.eclipse.org/aspectj/</Implementation-Vendor>
+
+                                                                                       <Bundle-Name>AspectJ Matcher</Bundle-Name>
+                                                                                       <Bundle-Version>${project.version}</Bundle-Version>
+                                                                                       <Bundle-Copyright>(C) Copyright 1999-2001 Xerox Corporation,
+                                                                                               2002 Palo Alto Research Center, Incorporated (PARC),
+                                                                                               2003-2020 Contributors. All Rights Reserved</Bundle-Copyright>
+                                                                               </manifestEntries>
+                                                                       </manifestSection>
+                                                               </manifestSections>
+                                                       </archive>
+
+                                                       <descriptors>
+                                                               <descriptor>aspectjmatcher-assembly.xml</descriptor>
+                                                       </descriptors>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>aspectjmatcher-sources-assembly</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <classifier>sources</classifier>
+                                                       <finalName>aspectjmatcher-${project.version}</finalName>
+                                                       <archive>
+                                                       </archive>
+                                                       <descriptors>
+                                                               <descriptor>aspectjmatcher-sources-assembly.xml</descriptor>
+                                                       </descriptors>
+                                               </configuration>
+                                       </execution>
+
+                               </executions>
+                       </plugin>
+
+               </plugins>
+       </build>
+</project>
index ad284ea12ad182c5d1186002bd7689a91d9dbbe0..bcfa35a527605eb9f37fe4b6fa252c47e0e2fa50 100644 (file)
@@ -50,7 +50,7 @@
                                                        <tasks>
                                                                <echo message="unzip jarjar'd asm" />
                                                                <unzip
-                                                                       src="${project.basedir}/../lib/asm/asm-7.2.renamed.jar"
+                                                                       src="${project.basedir}/../lib/asm/asm-8.0.1.renamed.jar"
                                                                        dest="target/asm-unzipped" />
                                                        </tasks>
                                                </configuration>
index 58adaae07485163209325edf123f7863070d7305..6d8b94e99a44d46511ba6e0883c2cb33c005ef21 100644 (file)
@@ -50,7 +50,7 @@
                                                        <tasks>
                                                                <echo message="unzip jarjar'd asm" />
                                                                <unzip
-                                                                       src="${project.basedir}/../lib/asm/asm-7.2.renamed.jar"
+                                                                       src="${project.basedir}/../lib/asm/asm-8.0.1.renamed.jar"
                                                                        dest="target/asm-unzipped" />
                                                        </tasks>
                                                </configuration>
index eeb019c333e0144198737c21ec40f359b4ead1c7..5739088711244ced332b9e357afb5b4b2d8c03c3 100644 (file)
@@ -797,40 +797,55 @@ To use testing client jar in tests,
 ant -propertyfile XXX publishtomaven
 -->
   <target name="publishtomaven_snapshot" depends="maven.init">
-    <property name="build.root" value="/Users/aclement/gits/org.aspectj/aj-build"/>
+    <property name="build.root" value="/Users/aclement/gits/org.aspectj"/>
+
 
     <property name="adjusted.release.type" value="snapshot"/>
     <property name="maven.central.repository" value="s3://maven.springframework.org/${adjusted.release.type}"/>
+<!--
+    <property name="maven.central.repository" value="https://repo.spring.io/libs-snapshot-local/org/aspectj/aspectjweaver"/>
+-->
+
+<!-- aspectjtools/target/aspectjtools-1.9.6.BUILD-SNAPSHOT.jar -->
 
     <property name="bin.jars.folder" value="${build.root}/dist/tools/lib"/>
     <property name="src.jars.folder" value="${build.root}/src"/>
-    <property name="suffix" value="DEVELOPMENT"/>
+    <property name="suffix" value="1.9.6.BUILD-SNAPSHOT"/>
 
     <!-- ASPECTJRT -->
-    <maven:deploy file="${bin.jars.folder}/aspectjrt.jar">
+    <maven:deploy file="${build.root}/aspectjrt/target/aspectjrt-${suffix}.jar">
       <remoteRepository url="${maven.central.repository}">
         <authentication username="${accessKey}" passphrase="${secretKey}"/>
       </remoteRepository>
       <pom file="usedForMavenUpload/aspectjrt.pom"/>
-      <attach file="${src.jars.folder}/aspectjrt${suffix}-src.jar" classifier="sources"/>
+      <attach file="${build.root}/aspectjrt/target/aspectjrt-${suffix}-sources.jar" classifier="sources"/>
     </maven:deploy>
 
     <!-- ASPECTJTOOLS -->
-    <maven:deploy file="${bin.jars.folder}/aspectjtools.jar">
+    <maven:deploy file="${build.root}/aspectjtools/target/aspectjtools-${suffix}.jar">
       <remoteRepository url="${maven.central.repository}">
         <authentication username="${accessKey}" passphrase="${secretKey}"/>
       </remoteRepository>
       <pom file="usedForMavenUpload/aspectjtools.pom"/>
-      <attach file="${src.jars.folder}/aspectjtools${suffix}-src.jar" classifier="sources"/>
+      <attach file="${build.root}/aspectjtools/target/aspectjtools-${suffix}-sources.jar" classifier="sources"/>
     </maven:deploy>
 
     <!-- ASPECTJWEAVER -->
-    <maven:deploy file="${bin.jars.folder}/aspectjweaver.jar">
+    <maven:deploy file="${build.root}/aspectjweaver/target/aspectjweaver-${suffix}.jar">
       <remoteRepository url="${maven.central.repository}">
         <authentication username="${accessKey}" passphrase="${secretKey}"/>
       </remoteRepository>
       <pom file="usedForMavenUpload/aspectjweaver.pom"/>
-      <attach file="${src.jars.folder}/aspectjweaver${suffix}-src.jar" classifier="sources"/>
+      <attach file="${build.root}/aspectjweaver/target/aspectjweaver-${suffix}-sources.jar" classifier="sources"/>
+    </maven:deploy>
+       
+    <!-- ASPECTJMATCHER -->
+    <maven:deploy file="${build.root}/aspectjmatcher/target/aspectjmatcher-${suffix}.jar">
+      <remoteRepository url="${maven.central.repository}">
+        <authentication username="${accessKey}" passphrase="${secretKey}"/>
+      </remoteRepository>
+      <pom file="usedForMavenUpload/aspectjmatcher.pom"/>
+      <attach file="${build.root}/aspectjmatcher/target/aspectjmatcher-${suffix}-sources.jar" classifier="sources"/>
     </maven:deploy>
 
   </target>
diff --git a/build/usedForMavenUpload/aspectjmatcher.pom b/build/usedForMavenUpload/aspectjmatcher.pom
new file mode 100644 (file)
index 0000000..909c06c
--- /dev/null
@@ -0,0 +1,25 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.aspectj</groupId>
+  <artifactId>aspectjmatcher</artifactId>
+  <packaging>jar</packaging>
+  <version>1.9.6.BUILD-SNAPSHOT</version>
+  <name>AspectJ matcher</name>
+  <description>The AspectJ matcher can be used for matching pointcuts</description>
+  <url>http://www.aspectj.org</url>
+
+  <licenses>
+    <license>
+      <name>Eclipse Public License - v 1.0</name>
+      <url>http://www.eclipse.org/legal/epl-v10.html</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <scm>
+    <url>http://dev.eclipse.org/viewcvs/index.cgi/org.aspectj/?root=Tools_Project</url>
+  </scm>
+
+</project>
index e4eb4dab8a32137a4d258c21dde7b5adf08c851c..9189f6c9f7f59b9c0f76caa2e62ca6e55a02ef85 100644 (file)
@@ -5,7 +5,7 @@
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjrt</artifactId>
   <packaging>jar</packaging>
-  <version>1.9.3.BUILD-SNAPSHOT</version>
+  <version>1.9.6.BUILD-SNAPSHOT</version>
   <name>AspectJ runtime</name>
   <description>The runtime needed to execute a program using AspectJ</description>
   <url>http://www.aspectj.org</url>
index dffd59c4bf1f518ca0c20b9f8aef1792ed78aeb7..da1cd2ce34953f5bb021a17e8a77472553874ee5 100644 (file)
@@ -5,7 +5,7 @@
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjtools</artifactId>
   <packaging>jar</packaging>
-  <version>1.9.3.BUILD-SNAPSHOT</version>
+  <version>1.9.6.BUILD-SNAPSHOT</version>
   <name>AspectJ tools</name>
   <description>Tools from the AspectJ project</description>
   <url>http://www.aspectj.org</url>
index 64f312708fbc1c5e6a583276b10ab7025ed8053f..011c91af4917167eee58ecef138117df0813462e 100644 (file)
@@ -5,7 +5,7 @@
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjweaver</artifactId>
   <packaging>jar</packaging>
-  <version>1.9.3.BUILD-SNAPSHOT</version>
+  <version>1.9.6.BUILD-SNAPSHOT</version>
   <name>AspectJ weaver</name>
   <description>The AspectJ weaver introduces advices to java classes</description>
   <url>http://www.aspectj.org</url>
diff --git a/lib/asm/asm-4.2.jar b/lib/asm/asm-4.2.jar
deleted file mode 100644 (file)
index 693913d..0000000
Binary files a/lib/asm/asm-4.2.jar and /dev/null differ
diff --git a/lib/asm/asm-4.2.renamed.jar b/lib/asm/asm-4.2.renamed.jar
deleted file mode 100644 (file)
index bf59c15..0000000
Binary files a/lib/asm/asm-4.2.renamed.jar and /dev/null differ
diff --git a/lib/asm/asm-5.0.4.jar b/lib/asm/asm-5.0.4.jar
deleted file mode 100644 (file)
index cdb283d..0000000
Binary files a/lib/asm/asm-5.0.4.jar and /dev/null differ
diff --git a/lib/asm/asm-5.0.4.renamed.jar b/lib/asm/asm-5.0.4.renamed.jar
deleted file mode 100644 (file)
index b27bcf7..0000000
Binary files a/lib/asm/asm-5.0.4.renamed.jar and /dev/null differ
diff --git a/lib/asm/asm-7.2.jar b/lib/asm/asm-7.2.jar
deleted file mode 100644 (file)
index 5058db4..0000000
Binary files a/lib/asm/asm-7.2.jar and /dev/null differ
diff --git a/lib/asm/asm-7.2.renamed.jar b/lib/asm/asm-7.2.renamed.jar
deleted file mode 100644 (file)
index 7b81da1..0000000
Binary files a/lib/asm/asm-7.2.renamed.jar and /dev/null differ
diff --git a/lib/asm/asm-8.0.1.jar b/lib/asm/asm-8.0.1.jar
new file mode 100644 (file)
index 0000000..744fecc
Binary files /dev/null and b/lib/asm/asm-8.0.1.jar differ
diff --git a/lib/asm/asm-8.0.1.renamed.jar b/lib/asm/asm-8.0.1.renamed.jar
new file mode 100644 (file)
index 0000000..d98456a
Binary files /dev/null and b/lib/asm/asm-8.0.1.renamed.jar differ
index c0407bd2aead9c17edbf1be0ba5a6e3e09723a57..87ae0b5686d16101fd68803a71e6ce2fe88c513d 100644 (file)
@@ -4,8 +4,8 @@
     <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"/>
 
        <target name="package" description="Jarjar asm-NNN.jar and prefix package name with aj">
-               <jarjar destfile="asm-7.2.renamed.jar">
-                 <zipfileset src="asm-7.2.jar" excludes="module-info.class"/>
+               <jarjar destfile="asm-8.0.1.renamed.jar">
+                 <zipfileset src="asm-8.0.1.jar" excludes="module-info.class"/>
                  <rule pattern="org.objectweb.asm.**" result="aj.org.objectweb.asm.@1"/>
                </jarjar>
        </target> 
index 45d2f1ad1435c6e4e28c910b545060ccf11ecb3b..3d45720579e4f2ff82c505ed663683c523a5b3ff 100644 (file)
@@ -66,14 +66,14 @@ public abstract class AjcTestCase extends TestCase {
        // see Ajc and AntSpec
        public static final String DEFAULT_CLASSPATH_ENTRIES =
                        Ajc.outputFolders("bridge","util","loadtime","weaver","asm","testing-client","runtime","org.aspectj.matcher")
-//                     File.pathSeparator + ".." + File.separator + "bridge" + File.separator
-//                     + "bin" + File.pathSeparator + ".." + File.separator + "util" + File.separator + "bin" + File.pathSeparator + ".."
-//                     + File.separator + "loadtime" + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "weaver"
-//                     + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "weaver5" + File.separator + "bin"
-//                     + File.pathSeparator + ".." + File.separator + "asm" + File.separator + "bin" + File.pathSeparator + ".."
-//                     + File.separator + "testing-client" + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "runtime"
-//                     + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "aspectj5rt" + File.separator + "bin"
-//                     + File.pathSeparator + ".." + File.separator + "org.aspectj.matcher" + File.separator + "bin"
+                       //                      File.pathSeparator + ".." + File.separator + "bridge" + File.separator
+                       //                      + "bin" + File.pathSeparator + ".." + File.separator + "util" + File.separator + "bin" + File.pathSeparator + ".."
+                       //                      + File.separator + "loadtime" + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "weaver"
+                       //                      + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "weaver5" + File.separator + "bin"
+                       //                      + File.pathSeparator + ".." + File.separator + "asm" + File.separator + "bin" + File.pathSeparator + ".."
+                       //                      + File.separator + "testing-client" + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "runtime"
+                       //                      + File.separator + "bin" + File.pathSeparator + ".." + File.separator + "aspectj5rt" + File.separator + "bin"
+                       //                      + File.pathSeparator + ".." + File.separator + "org.aspectj.matcher" + File.separator + "bin"
                        + File.pathSeparator
                        + ".." + File.separator + "lib" + File.separator + "junit" + File.separator
                        + "junit.jar"
@@ -94,7 +94,7 @@ public abstract class AjcTestCase extends TestCase {
                        + File.separator
                        + "bcel-verifier.jar"
 
-                       + File.pathSeparator + ".." +  File.separator + "lib" + File.separator + "asm" + File.separator + "asm-7.2.renamed.jar"
+                       + File.pathSeparator + ".." +  File.separator + "lib" + File.separator + "asm" + File.separator + "asm-8.0.1.renamed.jar"
 
                        // When the build machine executes the tests, it is using code built into jars rather than code build into
                        // bin directories. This means for the necessary types to be found we have to put these jars on the classpath:
@@ -175,11 +175,11 @@ public abstract class AjcTestCase extends TestCase {
                        StringBuffer srcFileName = new StringBuffer();
                        if (srcFile != null) {
                                char[] chars = srcFile.toCharArray();
-                               for (int i = 0; i < chars.length; i++) {
-                                       if ((chars[i] == '\\') || (chars[i] == '/')) {
+                               for (char c : chars) {
+                                       if ((c == '\\') || (c == '/')) {
                                                srcFileName.append(File.separator);
                                        } else {
-                                               srcFileName.append(chars[i]);
+                                               srcFileName.append(c);
                                        }
                                }
                                this.sourceFileName = srcFileName.toString();
@@ -233,8 +233,8 @@ public abstract class AjcTestCase extends TestCase {
                                if (extraLocations.size() != seeAlsos.length) {
                                        return false;
                                }
-                               for (int i = 0; i < seeAlsos.length; i++) {
-                                       if (!hasAMatch(extraLocations, seeAlsos[i])) {
+                               for (ISourceLocation seeAlso : seeAlsos) {
+                                       if (!hasAMatch(extraLocations, seeAlso)) {
                                                return false;
                                        }
                                }
@@ -277,11 +277,11 @@ public abstract class AjcTestCase extends TestCase {
                        }
                        if (seeAlsos != null) {
                                buff.append("\n\twith see alsos:");
-                               for (int i = 0; i < seeAlsos.length; i++) {
+                               for (ISourceLocation seeAlso : seeAlsos) {
                                        buff.append("\t\t");
-                                       buff.append(seeAlsos[i].getSourceFile().getPath());
+                                       buff.append(seeAlso.getSourceFile().getPath());
                                        buff.append(":");
-                                       buff.append(seeAlsos[i].getLine());
+                                       buff.append(seeAlso.getLine());
                                }
                        }
                        return buff.toString();
@@ -479,9 +479,9 @@ public abstract class AjcTestCase extends TestCase {
                        addExtra(failureReport, "weaveInfo", extraWeaves);
                        failureReport.append("\ncommand was: ajc");
                        String[] args = result.getArgs();
-                       for (int i = 0; i < args.length; i++) {
+                       for (String arg : args) {
                                failureReport.append(" ");
-                               failureReport.append(args[i]);
+                               failureReport.append(arg);
                        }
                        String report = failureReport.toString();
                        System.err.println(failureReport);
@@ -524,8 +524,8 @@ public abstract class AjcTestCase extends TestCase {
         */
        protected List newMessageList(Message[] messages) {
                List ret = new ArrayList();
-               for (int i = 0; i < messages.length; i++) {
-                       ret.add(messages[i]);
+               for (Message message : messages) {
+                       ret.add(message);
                }
                return ret;
        }
@@ -618,7 +618,7 @@ public abstract class AjcTestCase extends TestCase {
 
                /* Sandbox -> AspectJ -> Extension -> Bootstrap */
                if ( !useFullLTW && useLTW) {
-//                     URLClassLoader testLoader = (URLClassLoader) getClass().getClassLoader();
+                       //                      URLClassLoader testLoader = (URLClassLoader) getClass().getClassLoader();
                        /*
                         * Create a new AspectJ class loader using the existing test CLASSPATH and any missing Java 5 projects
                         */
@@ -648,8 +648,8 @@ public abstract class AjcTestCase extends TestCase {
                                ProcessBuilder pb = new ProcessBuilder(tokenizeCommand(command));
                                pb.directory( new File(ajc.getSandboxDirectory().getAbsolutePath()));
                                exec = pb.start();
-                       BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
-                       BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
+                               BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
+                               BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
                                exec.waitFor();
                                lastRunResult = createResultFromBufferReaders(command,stdInput, stdError);
                        } catch (Exception e) {
@@ -678,8 +678,8 @@ public abstract class AjcTestCase extends TestCase {
                                ProcessBuilder pb = new ProcessBuilder(tokenizeCommand(command));
                                pb.directory( new File(ajc.getSandboxDirectory().getAbsolutePath()));
                                exec = pb.start();
-                       BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
-                       BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
+                               BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
+                               BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
                                exec.waitFor();
                                lastRunResult = createResultFromBufferReaders(command,stdInput, stdError);
                        } catch (Exception e) {
@@ -690,9 +690,9 @@ public abstract class AjcTestCase extends TestCase {
                } else if (vmargs!=null && (vmargs.contains("--enable-preview") || vmargs.contains("--add-modules") || vmargs.contains("--limit-modules") || vmargs.contains("--add-reads"))) {
                        // If --add-modules supplied, need to fork the test
                        try {
-//                             if (mp.indexOf("$runtime") != -1) {
-//                                     mp = mp.replace(mp.indexOf("$runtime"),"$runtime".length(),TestUtil.aspectjrtPath().toString());
-//                             }
+                               //                              if (mp.indexOf("$runtime") != -1) {
+                               //                                      mp = mp.replace(mp.indexOf("$runtime"),"$runtime".length(),TestUtil.aspectjrtPath().toString());
+                               //                              }
                                if (cp.indexOf("aspectjrt")==-1) {
                                        cp.append(File.pathSeparator).append(TestUtil.aspectjrtPath().getPath());
                                }
@@ -702,8 +702,8 @@ public abstract class AjcTestCase extends TestCase {
                                ProcessBuilder pb = new ProcessBuilder(tokenizeCommand(command));
                                pb.directory( new File(ajc.getSandboxDirectory().getAbsolutePath()));
                                exec = pb.start();
-                       BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
-                       BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
+                               BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
+                               BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
                                exec.waitFor();
                                lastRunResult = createResultFromBufferReaders(command,stdInput, stdError);
                        } catch (Exception e) {
@@ -725,18 +725,18 @@ public abstract class AjcTestCase extends TestCase {
                command.append(cp.toString());
                command.append(" ");
                command.append(className);
-               for (int i = 0; i < args.length; i++) {
+               for (String arg : args) {
                        command.append(" ");
-                       command.append(args[i]);
+                       command.append(arg);
                }
-//             try {
-//                     // Enable the security manager
-//                     Policy.setPolicy(new MyPolicy());
-//                     SecurityManager sm = new SecurityManager();
-//                     System.setSecurityManager(sm);
-//             } catch (SecurityException se) {
-//                     // SecurityManager already set
-//             }
+               //              try {
+               //                      // Enable the security manager
+               //                      Policy.setPolicy(new MyPolicy());
+               //                      SecurityManager sm = new SecurityManager();
+               //                      System.setSecurityManager(sm);
+               //              } catch (SecurityException se) {
+               //                      // SecurityManager already set
+               //              }
 
                ClassLoader contexClassLoader = Thread.currentThread().getContextClassLoader();
                try {
@@ -768,14 +768,14 @@ public abstract class AjcTestCase extends TestCase {
                        fail("Exception thrown by " + className + ".main(String[]) :" + invTgt.getTargetException());
                } finally {
 
-//                     try {
-//                             // Enable the security manager
-//                             SecurityManager sm = new SecurityManager();
-//                             System.setSecurityManager(null);
-//                     } catch (SecurityException se) {
-//                             se.printStackTrace();
-//                             // SecurityManager already set
-//                     }
+                       //                      try {
+                       //                              // Enable the security manager
+                       //                              SecurityManager sm = new SecurityManager();
+                       //                              System.setSecurityManager(null);
+                       //                      } catch (SecurityException se) {
+                       //                              se.printStackTrace();
+                       //                              // SecurityManager already set
+                       //                      }
                        Thread.currentThread().setContextClassLoader(contexClassLoader);
                        stopCapture(baosErr, baosOut);
                        lastRunResult = new RunResult(command.toString(), new String(baosOut.toByteArray()), new String(baosErr.toByteArray()));
@@ -803,53 +803,53 @@ public abstract class AjcTestCase extends TestCase {
                PrintWriter stdOutWriter = new PrintWriter(baosOut);
                PrintWriter stdErrWriter = new PrintWriter(baosErr);
 
-                       while ((line = stdInput.readLine()) != null) {
-                               stdOutWriter.println(line);
-                               System.out.println(line);
-                       }
-                       stdOutWriter.flush();
-                       while ((line = stdError.readLine()) != null) {
-                               stdErrWriter.println(line);
-                               System.err.println(line);
+               while ((line = stdInput.readLine()) != null) {
+                       stdOutWriter.println(line);
+                       System.out.println(line);
+               }
+               stdOutWriter.flush();
+               while ((line = stdError.readLine()) != null) {
+                       stdErrWriter.println(line);
+                       System.err.println(line);
 
-                       }
-                       stdErrWriter.flush();
+               }
+               stdErrWriter.flush();
 
-                       baosOut.close();
-                       baosErr.close();
+               baosOut.close();
+               baosErr.close();
 
-                       return new RunResult(command.toString(), new String(baosOut.toByteArray()), new String(baosErr.toByteArray()));
+               return new RunResult(command.toString(), new String(baosOut.toByteArray()), new String(baosErr.toByteArray()));
        }
 
-//     static class MyPolicy extends Policy {
-//
-//             @Override
-//             public boolean implies(ProtectionDomain domain, Permission permission) {
-//                     // if (permission != SecurityConstants.GET_POLICY_PERMISSION) {
-//                     // // System.out.println(domain + " " + permission.getName());
-//                     // System.out.println(permission.getName());
-//                     // }
-//                     // if (true) {
-//                     // return true;
-//                     // }
-//                     if (permission instanceof PropertyPermission) {
-//                             return true;
-//                     }
-//                     if (permission instanceof RuntimePermission) {
-//                             return true;
-//                     }
-//                     if (permission instanceof FilePermission) {
-//                             // System.out.println(permission);
-//                             return true;
-//                     }
-//                     if (permission instanceof ReflectPermission) {
-//                             return true;
-//                     }
-//                     // System.out.println(permission);
-//                     return super.implies(domain, permission);
-//                     // return true;
-//             }
-//     }
+       //      static class MyPolicy extends Policy {
+       //
+       //              @Override
+       //              public boolean implies(ProtectionDomain domain, Permission permission) {
+       //                      // if (permission != SecurityConstants.GET_POLICY_PERMISSION) {
+       //                      // // System.out.println(domain + " " + permission.getName());
+       //                      // System.out.println(permission.getName());
+       //                      // }
+       //                      // if (true) {
+       //                      // return true;
+       //                      // }
+       //                      if (permission instanceof PropertyPermission) {
+       //                              return true;
+       //                      }
+       //                      if (permission instanceof RuntimePermission) {
+       //                              return true;
+       //                      }
+       //                      if (permission instanceof FilePermission) {
+       //                              // System.out.println(permission);
+       //                              return true;
+       //                      }
+       //                      if (permission instanceof ReflectPermission) {
+       //                              return true;
+       //                      }
+       //                      // System.out.println(permission);
+       //                      return super.implies(domain, permission);
+       //                      // return true;
+       //              }
+       //      }
 
        /*
         * Must create weaving class loader reflectively using new parent so we don't have a reference to a World loaded from CLASSPATH
@@ -906,48 +906,48 @@ public abstract class AjcTestCase extends TestCase {
         * @param args the String[] args to fix up
         * @return the String[] args to use
         */
-    protected String[] fixupArgs(String[] args) {
-        if (null == args) {
-                return null;
-        }
-        int cpIndex = -1;
-        boolean hasruntime = false;
-        for (int i = 0; i < args.length - 1; i++) {
-                args[i] = adaptToPlatform(args[i]);
-                if ("-classpath".equals(args[i])) {
-                        cpIndex = i;
-                        args[i + 1] = substituteSandbox(args[i + 1]);
-                        String next = args[i + 1];
-                        hasruntime = ((null != next) && (-1 != next.indexOf("aspectjrt.jar")));
-                } else if ("-p".equals(args[i]) || "--module-path".equals(args[i])) {
-                    args[i + 1] = substituteSandbox(args[i + 1]);
-                }
-        }
-        if (-1 == cpIndex) {
-                String[] newargs = new String[args.length + 2];
-                newargs[0] = "-classpath";
-                newargs[1] = TestUtil.aspectjrtPath(false).getPath();
-                System.arraycopy(args, 0, newargs, 2, args.length);
-                args = newargs;
-                cpIndex = 1;
-        } else {
-                if (!hasruntime) {
-                        cpIndex++;
-                        String[] newargs = new String[args.length];
-                        System.arraycopy(args, 0, newargs, 0, args.length);
-                        newargs[cpIndex] = args[cpIndex] + File.pathSeparator + TestUtil.aspectjrtPath().getPath();
-                        args = newargs;
-                }
-        }
-        boolean needsJRTFS = LangUtil.is19VMOrGreater();
-        if (needsJRTFS) {
-                if (args[cpIndex].indexOf(LangUtil.JRT_FS) == -1) {
-                        String jrtfsPath = LangUtil.getJrtFsFilePath();
-                        args[cpIndex] = jrtfsPath + File.pathSeparator + args[cpIndex];
-                }
-        }
-        return args;
-}
+       protected String[] fixupArgs(String[] args) {
+               if (null == args) {
+                       return null;
+               }
+               int cpIndex = -1;
+               boolean hasruntime = false;
+               for (int i = 0; i < args.length - 1; i++) {
+                       args[i] = adaptToPlatform(args[i]);
+                       if ("-classpath".equals(args[i])) {
+                               cpIndex = i;
+                               args[i + 1] = substituteSandbox(args[i + 1]);
+                               String next = args[i + 1];
+                               hasruntime = ((null != next) && (-1 != next.indexOf("aspectjrt.jar")));
+                       } else if ("-p".equals(args[i]) || "--module-path".equals(args[i])) {
+                               args[i + 1] = substituteSandbox(args[i + 1]);
+                       }
+               }
+               if (-1 == cpIndex) {
+                       String[] newargs = new String[args.length + 2];
+                       newargs[0] = "-classpath";
+                       newargs[1] = TestUtil.aspectjrtPath(false).getPath();
+                       System.arraycopy(args, 0, newargs, 2, args.length);
+                       args = newargs;
+                       cpIndex = 1;
+               } else {
+                       if (!hasruntime) {
+                               cpIndex++;
+                               String[] newargs = new String[args.length];
+                               System.arraycopy(args, 0, newargs, 0, args.length);
+                               newargs[cpIndex] = args[cpIndex] + File.pathSeparator + TestUtil.aspectjrtPath().getPath();
+                               args = newargs;
+                       }
+               }
+               boolean needsJRTFS = LangUtil.is19VMOrGreater();
+               if (needsJRTFS) {
+                       if (args[cpIndex].indexOf(LangUtil.JRT_FS) == -1) {
+                               String jrtfsPath = LangUtil.getJrtFsFilePath();
+                               args[cpIndex] = jrtfsPath + File.pathSeparator + args[cpIndex];
+                       }
+               }
+               return args;
+       }
 
        private String adaptToPlatform(String s) {
                String ret = s.replace(';', File.pathSeparatorChar);
@@ -960,8 +960,8 @@ public abstract class AjcTestCase extends TestCase {
                        return in;
 
                List<T> out = new ArrayList<T>();
-               for (Iterator<T> iter = in.iterator(); iter.hasNext();) {
-                       out.add(iter.next());
+               for (T t : in) {
+                       out.add(t);
                }
                return out;
        }
@@ -997,9 +997,9 @@ public abstract class AjcTestCase extends TestCase {
                        buff.append("Missing expected ");
                        buff.append(type);
                        buff.append(" messages:\n");
-                       for (Iterator<AjcTestCase.Message> iter = messages.iterator(); iter.hasNext();) {
+                       for (Message message : messages) {
                                buff.append("\t");
-                               buff.append(iter.next().toString());
+                               buff.append(message.toString());
                                buff.append("\n");
                        }
                }
@@ -1021,12 +1021,12 @@ public abstract class AjcTestCase extends TestCase {
        // add any jars in the directory to the classpath
        private void getAnyJars(File dir, StringBuffer buff) {
                File[] files = dir.listFiles();
-               for (int i = 0; i < files.length; i++) {
-                       if (files[i].getName().endsWith(".jar")) {
+               for (File file : files) {
+                       if (file.getName().endsWith(".jar")) {
                                buff.append(File.pathSeparator);
-                               buff.append(files[i].getAbsolutePath());
-                       } else if (files[i].isDirectory()) {
-                               getAnyJars(files[i], buff);
+                               buff.append(file.getAbsolutePath());
+                       } else if (file.isDirectory()) {
+                               getAnyJars(file, buff);
                        }
                }
        }
diff --git a/pom.xml b/pom.xml
index e3a5ded007df953eba8c7b7e889cfc4424687d0f..32e00bfb4f545449bd9696424d82c80eb9a92800 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,7 @@
                <module>aspectjrt</module>
                <module>aspectjweaver</module>
                <module>aspectjtools</module>
+               <module>aspectjmatcher</module>
 
                <!-- build the java -jar'able installer -->
                <module>installer</module>
index 3b2ec7236eb86831511f03abd8753acca869a0b8..6a8cbaf5024cd722b08c75034a5a863c6896ad72 100644 (file)
@@ -55,7 +55,7 @@
                        <artifactId>asm</artifactId>
                        <version>1.0</version>
                        <scope>system</scope>
-                       <systemPath>${project.basedir}/../lib/asm/asm-7.2.renamed.jar</systemPath>
+                       <systemPath>${project.basedir}/../lib/asm/asm-8.0.1.renamed.jar</systemPath>
                </dependency>
                <dependency>
                        <groupId>org.aspectj</groupId>
index e26530accdb39993a5474c2fd1835e0cf375ea4c..a3104152ea8f8f925ba7889f353b6c7731ebcb5e 100644 (file)
@@ -79,7 +79,7 @@
       <artifactId>asm</artifactId>
       <version>1.0</version>
       <scope>system</scope>
-      <systemPath>${project.basedir}/../lib/asm/asm-7.2.renamed.jar</systemPath>
+      <systemPath>${project.basedir}/../lib/asm/asm-8.0.1.renamed.jar</systemPath>
     </dependency>
   </dependencies>
 </project>