]> source.dussan.org Git - aspectj.git/commitdiff
Make all tests run on Java 16 via '-add-opens' JVM option java16-add-opens
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Tue, 23 Mar 2021 09:59:17 +0000 (16:59 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Tue, 23 Mar 2021 11:36:14 +0000 (18:36 +0700)
Due to JEP 260 (Encapsulate Most Internal APIs), aspect weaving on
Java 16 now requires '--add-opens java.base/java.lang=ALL-UNNAMED' on
the command line. Otherwise there will be illegal access exceptions for
some internal API calls AspectJ needs, most prominently when trying to
define classes in other packages or modules.

This had to be done on several levels:

  - Maven Surefire: running tests in a JVM directly forked by Surefire.
    In order to make this backwards compatible, I added two profiles
    with JDK-level-dependent auto-activation, one 8-15 and one 16+. In
    the latter a property containing the JVM parameter is defined, in
    the former it is empty, i.e. the JVM is started without the
    parameter. In Java 8 the parameter did not even exist, in Java 9+ we
    could use it, but we need to test how users use AspectJ.

  - RunSpec: Whenever an XML test is declared to use '<run>', we need to
    determine the current JVM version and again dynamically add the
    parameter when forking the target JVM.

  - AntSpec: Whenever an XML test is declared to use '<ant>', we need to
    determine the current JVM version dynamically add two properties
    usable from within Ant scripts: 'aj.addOpensKey' and
    'aj.addOpensValue'. Unfortunately, Ant needs to use two '<argLine>'
    parameters, because the two parts of the option are separated by a
    space character.

  - Ant scripts: When triggered by an AntSpec, each Ant target using LTW
    needs to manually set
      <jvmarg value="${aj.addOpensKey}"/>
      <jvmarg value="${aj.addOpensValue}"/>
    for each '<java>' task. It was quite tedious to find all(?) of them.

TODO: In the AspectJ 1.9.7 release notes we need to document that this
parameter is now needed for LTW.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
15 files changed:
pom.xml
run-all-junit-tests/pom.xml
testing-drivers/pom.xml
testing/src/test/java/org/aspectj/testing/AntSpec.java
testing/src/test/java/org/aspectj/testing/RunSpec.java
tests/bugs153/pr155033/ant.xml
tests/bugs153/pr157474/ant-server.xml
tests/bugs153/pr158957/ant.xml
tests/java5/ataspectj/ajc-ant.xml
tests/ltw/ant-server.xml
tests/ltw/ant.xml
tests/pom.xml
tests/profiling/build.xml
tests/src/test/java/org/aspectj/systemtest/ajc167/Ajc167Tests.java
tests/tracing/ant.xml

diff --git a/pom.xml b/pom.xml
index 16b3f2ba1d28f98da5531fd9190016586aae1dbd..14952e6a78934450a5dae6699df01a17655102f3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                <module>installer</module>
        </modules>
 
+       <!--
+    Caveat: Automatic, JDK-based profile activation can *not* be inherited by child POMs defining
+    the same profiles. Thus, we have to repeat activation conditions there.
+
+    Note: We can check if automatic profile activation works via mvn help:active-profiles.
+  -->
+       <profiles>
+               <profile>
+                       <id>jdk-8-to-15</id>
+                       <activation>
+                               <jdk>[1.8,16)</jdk>
+                       </activation>
+                       <properties>
+                               <jvm.arg.addOpens/>
+                       </properties>
+               </profile>
+               <profile>
+                       <id>jdk-16-to-xx</id>
+                       <activation>
+                               <jdk>[16,)</jdk>
+                       </activation>
+                       <properties>
+                               <jvm.arg.addOpens>--add-opens java.base/java.lang=ALL-UNNAMED</jvm.arg.addOpens>
+                       </properties>
+               </profile>
+       </profiles>
+
        <build>
+
                <pluginManagement>
                        <plugins>
                                <plugin>
                                        <artifactId>maven-surefire-plugin</artifactId>
                                        <version>2.22.2</version>
                                        <configuration>
-<!--
-                                               <testFailureIgnore>true</testFailureIgnore>
--->
+                                               <!--<testFailureIgnore>true</testFailureIgnore>-->
+                                               <argLine>${jvm.arg.addOpens}</argLine>
                                                <excludes>
                                                        <exclude>**/*ModuleTests.java</exclude>
                                                </excludes>
                                        </configuration>
                                </plugin>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-help-plugin</artifactId>
+                                       <version>3.2.0</version>
+                               </plugin>
                        </plugins>
                </pluginManagement>
+
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                </configuration>
                                <executions>
                                        <execution>
-<id>test-jar</id>
+                                               <id>test-jar</id>
                                                <goals>
                                                        <goal>test-jar</goal>
                                                </goals>
                                                <fileset>
                                                        <directory>.</directory>
                                                        <includes>
-<include>**/ajcore.*.txt</include>
-
-                                                               </includes>
+                                                               <include>**/ajcore.*.txt</include>
+                                                       </includes>
 <!--
-<excludes> <exclude>**/important.log</exclude> <exclude>**/another-important.log</exclude>
-                                                               </excludes> -->
+                                                       <excludes>
+                                                               <exclude>**/important.log</exclude>
+                                                               <exclude>**/another-important.log</exclude>
+                                                       </excludes>
+-->
                                                        <followSymlinks>false</followSymlinks>
                                                </fileset>
                                                <fileset>
                                                        <directory>aj-build</directory>
-                                                       <!-- <includes> <include>**/*.tmp</include> <include>**/*.log</include>
-                                                               </includes> <excludes> <exclude>**/important.log</exclude> <exclude>**/another-important.log</exclude>
-                                                               </excludes> -->
+<!--
+                                                       <includes>
+                                                               <include>**/*.tmp</include>
+                                                               <include>**/*.log</include>
+                                                       </includes>
+                                                       <excludes>
+                                                               <exclude>**/important.log</exclude>
+                                                               <exclude>**/another-important.log</exclude>
+                                                       </excludes>
+-->
                                                        <followSymlinks>false</followSymlinks>
                                                </fileset>
                                        </filesets>
                                </configuration>
                        </plugin>
 
+                       <!--
+                               This plugin is nice to have in the POM, because then it is easy to double-click a goal such as 'effective-pom',
+                               'active-profiles', 'effective-settings' or 'evaluate' from a modern IDE in order to get quick information about
+                               the current build configuration for any given module.
+                       -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-help-plugin</artifactId>
+                       </plugin>
+
                </plugins>
 
        </build>
index bcb21ca4e13d126ed6589e8f528e6907e7fb2ebf..3f63ea4d283ca7e63904d014b9ae22ce370a49f0 100644 (file)
                                                <artifactId>maven-surefire-plugin</artifactId>
                                                <configuration>
                                                        <testFailureIgnore>true</testFailureIgnore>
+                                                       <argLine>${jvm.arg.addOpens}</argLine>
                                                </configuration>
                                                <executions>
                                                        <execution>
                                <artifactId>maven-surefire-plugin</artifactId>
                                <configuration>
                                        <testFailureIgnore>true</testFailureIgnore>
+                                       <argLine>${jvm.arg.addOpens}</argLine>
                                </configuration>
                                <executions>
                                        <execution>
index 26de8eab978371095a25811f5e72fdec7956f418..f3ac5fa3648a0da863209b6d40a8f621b4732ac3 100644 (file)
   </dependencies>
 
   <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <configuration>
-                        <source>1.8</source>
-                        <target>1.8</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <configuration>
-                        <testFailureIgnore>false</testFailureIgnore>
-<excludes>
-<exclude>**/*AjcTestSpecAsTest*</exclude>
-</excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-</build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <testFailureIgnore>false</testFailureIgnore>
+          <argLine>${jvm.arg.addOpens}</argLine>
+          <excludes>
+            <exclude>**/*AjcTestSpecAsTest*</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
index 92ea2187765d94fae9e3c7a2f9d1c26d8c28fc85..b87f60894686efd5b9c463adc2a5f921c2f8575e 100644 (file)
@@ -26,21 +26,33 @@ import org.apache.tools.ant.taskdefs.Java;
 import org.apache.tools.ant.types.Path;
 import org.aspectj.tools.ajc.AjcTestCase;
 
+import static org.aspectj.util.LangUtil.is16VMOrGreater;
+
 /**
  * Element that allow to run an abritrary Ant target in a sandbox.
  * <p/>
- * Such a spec is used in a "<ajc-test><ant file="myAnt.xml" [target="..."] [verbose="true"]/> XML element. The "target" is
- * optional. If not set, default myAnt.xml target is used. The "file" file is looked up from the <ajc-test dir="..."/> attribute. If
- * "verbose" is set to "true", the ant -v output is piped, else nothing is reported except errors.
+ * Such a spec is used in a {@code <ajc-test><ant file="myAnt.xml" [target="..."] [verbose="true"]/>} XML element. The
+ * {@code target} is optional. If not set, default <i>myAnt.xml</i> target is used. The {@code file} is looked up from
+ * the {@code <ajc-test dir="..."/>} attribute. If @{code verbose} is set to {@code true}, the {@code ant -v} output is
+ * piped, else nothing is reported except errors.
  * <p/>
- * The called Ant target benefits from 2 implicit variables: "${aj.sandbox}" points to the test current sandbox folder. "aj.path" is
- * an Ant refid on the classpath formed with the sandbox folder + ltw + the AjcTestCase classpath (ie usually aspectjrt, junit, and
- * testing infra)
+ * The called Ant target benefits from some implicit variables:
+ * <ul>
+ *   <li>{@code ${aj.sandbox}} points to the test current sandbox folder.</li>
+ *   <li>
+ *     {@code ${aj.path}} is an Ant refid on the classpath formed with the sandbox folder + ltw + the AjcTestCase
+ *     classpath (i.e. usually aspectjrt, junit, and testing infra).
+ *   </li>
+ *   <li>
+ *     For Java 16+, {@code ${aj.addOpensKey}} and {@code ${aj.addOpensValue}} together add {@code --add-opens} and
+ *     {@code java.base/java.lang=ALL-UNNAMED} as JVM parameters. They have to be used together and consecutively in
+ *     this order as {@code jvmarg} parameter tags inside the {@code java} Ant task.
+ *   </li>
+ * </ul>
  * <p/>
- * Element "<stdout><line text="..">" and "<stderr><line text="..">" can be used. For now a full match is performed on the output of
- * the runned target only (not the whole Ant invocation). This is experimental and advised to use a "<junit>" task instead or a
- * "<java>" whose main that throws some exception upon failure.
- * 
+ * Element {@code <stdout><line text="..">} and {@code <stderr><line text="..">} can be used. For now, a full match is
+ * performed on the output of the runned target only (not the whole Ant invocation). This is experimental and you are
+ * advised to use a {@code <junit>} task instead or a {@code <java>} whose main throws some exception upon failure.
  * 
  * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
  */
@@ -92,6 +104,15 @@ public class AntSpec implements ITestStep {
                        // setup aj.dir "modules" folder
                        p.setUserProperty("aj.root", new File("..").getAbsolutePath());
 
+                       // On Java 16+, LTW no longer works without this parameter. Add the argument here and not in AjcTestCase::run,
+                       // because even if 'useLTW' and 'useFullLTW' are not set, we might in the future have tests for weaver attachment
+                       // during runtime. See also docs/dist/doc/README-187.html.
+                       // 
+                       // Attention: Ant 1.6.3 under Linux neither likes "" (empty string) nor " " (space), on Windows it would not be
+                       // a problem. So we use "_dummy" Java system properties, even though they pollute the command line. 
+                       p.setUserProperty("aj.addOpensKey", is16VMOrGreater() ? "--add-opens" : "-D_dummy");
+                       p.setUserProperty("aj.addOpensValue", is16VMOrGreater() ? "java.base/java.lang=ALL-UNNAMED" : "-D_dummy");
+
                        // create the test implicit path aj.path that contains the sandbox + regular test infra path
                        Path path = new Path(p, inTestCase.getSandboxDirectory().getAbsolutePath());
                        populatePath(path, DEFAULT_LTW_CLASSPATH_ENTRIES);
index 2fc786593a3abd50a1cad65e50aaa9de583554a7..f4dc98206294f6b100771d74e7d6129cffcd8b7d 100644 (file)
@@ -22,6 +22,8 @@ import java.util.StringTokenizer;
 import org.aspectj.tools.ajc.AjcTestCase;
 import org.aspectj.util.FileUtil;
 
+import static org.aspectj.util.LangUtil.is16VMOrGreater;
+
 /**
  * @author Adrian Colyer
  */
@@ -63,6 +65,13 @@ public class RunSpec implements ITestStep {
                try {
                        setSystemProperty("test.base.dir", inTestCase.getSandboxDirectory().getAbsolutePath());
 
+                       if (vmargs == null)
+                               vmargs = "";
+                       // On Java 16+, LTW no longer works without this parameter. Add the argument here and not in AjcTestCase::run,
+                       // because even if 'useLTW' and 'useFullLTW' are not set, we might in the future have tests for weaver attachment
+                       // during runtime. See also docs/dist/doc/README-187.html.
+                       vmargs += is16VMOrGreater() ? " --add-opens java.base/java.lang=ALL-UNNAMED" : "";
+
                        AjcTestCase.RunResult rr = inTestCase.run(getClassToRun(), getModuleToRun(), args, vmargs, getClasspath(), getModulepath(), useLtw, "true".equalsIgnoreCase(usefullltw));
 
                        if (stdErrSpec != null) {
index 5995cb9d5ffb8f7f07d48c52c4d728cabce33a7c..4f2dfb88553689661528dbb0ef0a8a71a97702bf 100644 (file)
             <jvmarg value="-Dorg.aspectj.weaver.Dump.condition=error"/>
                <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
-<!--           
+<!--
             <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
             <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
             <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
--->            
+-->
         </java>
     </target>
 
index af315984ad92aec0e5e328ee1c21f178bf66a822..73db721c9bd7be60078e7c31c9a17c15c00bd10b 100644 (file)
@@ -9,16 +9,18 @@
     <target name="TestServer with duplicate configuration">
         <copy file="${aj.root}/tests/bugs153/pr157474/server-applicationandlibrary.properties"
               tofile="${aj.sandbox}/server.properties"/>
-       
+
         <mkdir dir="${aj.sandbox}/Application"/>
         <copy file="${aj.root}/tests/bugs153/pr157474/aop-application.xml"
               tofile="${aj.sandbox}/Application/META-INF/aop.xml"/>
-       
+
         <java fork="yes" classname="org.aspectj.testing.server.TestServer" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>-->
                <arg path="${aj.sandbox}"/>
         </java>
index c2de686f1dcee2b93cc02aeedded8b86384cd8a5..ca5dbc2543c9a5edfe96471f12685c4106b27cbe 100644 (file)
@@ -20,6 +20,8 @@
             <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
             <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
             <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
index c3ac6bac8bd735fa06997b4b1aa0acf098204523..f69cfd4dd59f472c0870af75bee86dd3691f6fbd 100644 (file)
@@ -24,6 +24,8 @@
             <!-- use META-INF/aop.xml style -->
             <classpath path="ataspectj/pathentry"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
@@ -34,6 +36,8 @@
         <java fork="yes" classname="ataspectj.PerClauseTest" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>            -->
         </java>
     </target>
@@ -44,6 +48,8 @@
         <java fork="yes" classname="ataspectj.AroundInlineMungerTest" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
             <!--<jvmarg line="${jdwp}"/>--><!-- uncomment to debug with JDWP -->
         </java>
     </target>
@@ -54,6 +60,8 @@
         <java fork="yes" classname="ataspectj.AroundInlineMungerTest2" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
@@ -61,6 +69,8 @@
         <java fork="yes" classname="ataspectj.DumpTest" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
@@ -70,6 +80,8 @@
         <java fork="yes" classname="ataspectj.TestProxyGenerator" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
                 <pathelement path="${aj.sandbox}/main1.jar"/>
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
         </javac>
         <copy file="ataspectj/ltwlog/aop-silent.xml"
               tofile="${aj.sandbox}/META-INF/aop.xml"
-                 overwrite="yes"       
+                 overwrite="yes"
         />
         <java fork="yes" classname="ataspectj.ltwlog.MainSilent" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
         <copy file="ataspectj/ltwlog/aop-verbsoe.xml"
               tofile="${aj.sandbox}/META-INF/aop.xml"
-                 overwrite="yes"       
+                 overwrite="yes"
         />
         <java fork="yes" classname="ataspectj.ltwlog.MainVerbose" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
         <copy file="ataspectj/ltwlog/aop-verboseandshow.xml"
               tofile="${aj.sandbox}/META-INF/aop.xml"
-                         overwrite="yes"       
+                         overwrite="yes"
                />
         <java fork="yes" classname="ataspectj.ltwlog.MainVerboseAndShow" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
                 <pathelement path="${aj.root}/lib/asm/asm-2.0.jar"/>
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
     <target name="ltw.Decp">
         <copy file="ataspectj/aop-decptest.xml"
               tofile="${aj.sandbox}/META-INF/aop.xml"
-                 overwrite="yes"       
+                 overwrite="yes"
         />
         <java fork="yes" classname="ataspectj.DeclareParentsInterfaceTest" failonerror="yes">
             <classpath>
                 <path refid="aj.path"/>
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
 
         <copy file="ataspectj/aop-decptest.xml"
               tofile="${aj.sandbox}/META-INF/aop.xml"
-                 overwrite="yes"       
+                 overwrite="yes"
         />
        <java fork="yes" classname="ataspectj.DeclareParentsImplementsTest" failonerror="yes">
             <classpath>
                 <path refid="aj.path"/>
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+          <jvmarg value="${aj.addOpensKey}"/>
+          <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
                 <path refid="aj.path"/>
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-DaspectDeclared=true"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
         <!--Now ensure that the error is not produced when the declaration is made.-->
         <copy file="ataspectj/ltwreweavable/aop-ltwreweavable-omitted.xml"
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-DaspectDeclared=false"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
             <classpath refid="aj.path"/>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-Daj.weaving.verbose=true"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
         </java>
     </target>
 
                 <pathelement path="${aj.sandbox}/aspects.jar"/>
             </classpath>
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
-<!--           
--->            
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Djava.util.logging.config.file=${aj.root}/weaver5/testdata/logging.properties"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
 
-</project>
\ No newline at end of file
+</project>
index 31baef28fdec5f98b76e94afe17ad33dd84c81fb..c5f143fea504d9d98507635b09c8c05794679dba 100644 (file)
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
-               <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
-<!--            <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>-->
-               <arg path="${aj.sandbox}"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
+            <!--<jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>-->
+            <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
+            <arg path="${aj.sandbox}"/>
         </java>
     </target>
 
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
-               <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
-<!--            <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>-->
-               <arg path="${aj.sandbox}"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
+            <!--<jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>-->
+            <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
+            <arg path="${aj.sandbox}"/>
         </java>
     </target>
 
index dff2071e7424ec58592d68727d0cdcfc77329ab2..0cae97a3670647b2bfc97e8a3c72ef3a70fd722c 100644 (file)
         <java fork="yes" classname="HelloWorldWithException" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader"/>
-               <sysproperty key="aj.class.path" path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar"/>
-<!--           
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
+            <jvmarg value="-Dorg.aspectj.tracing.debug=true"/>
+<!--
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
--->            
-            <jvmarg value="-Dorg.aspectj.tracing.debug=true"/>
+-->
             <!-- use META-INF/aop.xml style -->
-<!--            <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
-<!--            <jvmarg line="${jdwp}"/>-->
+            <!--<jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
+            <!--<jvmarg line="${jdwp}"/>-->
+               <sysproperty key="aj.class.path" path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar"/>
         </java>
     </target>
 
         <java fork="yes" classname="HelloWorldWithException" failonerror="yes">
             <classpath refid="aj.path"/>
             <jvmarg value="-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader"/>
-               <sysproperty key="aj.class.path" path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar"/>
-               <sysproperty key="aj.aspect.path" path="${aj.sandbox}/handler.jar"/>
-<!--           
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
+            <jvmarg value="-Dorg.aspectj.tracing.debug=true"/>
+<!--
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
--->            
-            <jvmarg value="-Dorg.aspectj.tracing.debug=true"/>
+-->
             <!-- use META-INF/aop.xml style -->
-<!--            <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
-<!--            <jvmarg line="${jdwp}"/>-->
+            <!--<jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
+            <!--<jvmarg line="${jdwp}"/>-->
+               <sysproperty key="aj.class.path" path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar"/>
+               <sysproperty key="aj.aspect.path" path="${aj.sandbox}/handler.jar"/>
         </java>
     </target>
 
        <!-- We have three JARs files, two containing aspects (ExceptionHandler and Tracing)
             for which aop-ajc.xml files have been generate. However we supply our own
-            aop.xml which declares only ExceptionHandler. We then override the 
+            aop.xml which declares only ExceptionHandler. We then override the
             configuration search path -->
     <target name="override default path using -Dorg.aspectj.weaver.loadtime.configuration">
         <copy file="${aj.root}/tests/ltw/aop-orgaspectjweaverloadtimeconfiguration.xml"
             <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
             <!-- use META-INF/aop.xml style -->
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
 
-       <!-- Beware, this is complicated! We need to intercept class loading on 
+       <!-- Beware, this is complicated! We need to intercept class loading on
             the System class loader before any classes are loaded. We do this
             by replacing the URLClassLoader. We then define a custom
             SecurityManager that will be loaded _before_ the class loader
             hierarch is fully initialized. -->
     <target name="NPE with custom agent">
         <java fork="yes" classname="HelloWorldWithException" failonerror="yes">
-               
+
                <!-- Prepend custom URLClassLoader and append AspectJ
                     to bootclasspath -->
                <jvmarg value="-Xbootclasspath/p:${aj.sandbox}"/>
             <jvmarg value="-Xbootclasspath/a:${aj.bootpath}"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 
                <classpath>
                 <pathelement path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar:${aj.sandbox}/security.jar"/>
                <!-- Specify custom SecurityManager that will be loaded
                     and woven very early -->
                <jvmarg value="-Djava.security.manager=NullSecurityManager"/>
-               
+
             <jvmarg value="-Daj.weaving.verbose=true"/>
             <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
-               
-<!--           
+
+<!--
             <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
             <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
             <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
--->            
+-->
         </java>
     </target>
 
             <classpath refid="aj.path"/>
             <!-- use META-INF/aop.xml style -->
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
                <sysproperty key="org.aspectj.dump.directory" path="${aj.sandbox}"/>
             <!-- use META-INF/aop.xml style -->
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
-<!--            <jvmarg line="${jdwp}"/>-->
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
             <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
+<!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
 
index 3abcdde51b02fa2adb8d1c7b6d5a6751e9aad2b7..01a890f369f4edaae1d709e30183ffea06fae731 100644 (file)
 
 
        <build>
-               <pluginManagement>
                        <plugins>
                                <plugin>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-surefire-plugin</artifactId>
                                        <configuration combine.self="override">
                                                <testFailureIgnore>false</testFailureIgnore>
+                                               <argLine>${jvm.arg.addOpens}</argLine>
                                                <includes>
                                                        <include>**/TestsModuleTests*</include>
                                                </includes>
                                        </configuration>
                                </plugin>
                        </plugins>
-               </pluginManagement>
        </build>
 
 </project>
index 67ce475a1300f046f02b10e80744e090baf0000a..ccb4d8f826624563861cf42e371983ea22ec00ba 100644 (file)
@@ -2,12 +2,12 @@
 
 <!--
     Copyright 2006 contributors.
-  
-    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://eclipse.org/legal/epl-v10.html 
+
+    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://eclipse.org/legal/epl-v10.html
 
     Contributors: Adrian Colyer
 -->
 
        <!-- project.properties contains your local settings, not checked into CVS -->
        <property file="project.properties"/>
-       
+
        <!-- default property settings, version controlled -->
        <property file="build.properties"/>
 
        <!-- pull in the ant file defining the paths etc. for the target application -->
        <import file="${target.application.definitions.file}"/>
 
-       <!-- list of useful targets... -->              
+       <!-- list of useful targets... -->
        <target name="usage">
                <echo message="ant build script for profiling AspectJ compiler"/>
                <echo message="useful targets are:"/>
                <echo message="for available customisations)"/>
        </target>
 
-       <!-- handy suites -->   
+       <!-- handy suites -->
        <target name="gc.suite" depends="source.compile.gc,binary.weave.gc,loadtime.weave.gc,ajdt.compile.gc"/>
        <target name="full.profile.suite" depends="source.compile,binary.weave,loadtime.weave,ajdt.compile"/>
-       
-       <!-- 
+
+       <!--
                how to obtain the aspectj compiler - if the use.aspectjtools.jar property
-               is set to true, will use the version of aspectjtools.jar in 
+               is set to true, will use the version of aspectjtools.jar in
                aspectj.lib.dir.  If use.aspectjtools.jar property is false, will use
                the bin directories from the projects in your aspectj.workspace.root.
        -->
        <condition property="ajtools.jar">
                <istrue value="${use.aspectjtools.jar}"/>
        </condition>
-                       
+
        <condition property="iajc.local">
                <istrue value="${use.local.iajc.task.class}"/>
        </condition>
-               
+
        <path id="aspectj.compiler.path">
                <dirset dir=".">
-                       <include name="classes" if="iajc.local"/>                       
+                       <include name="classes" if="iajc.local"/>
                </dirset>
                <fileset dir="${aspectj.lib.dir}">
                        <include name="aspectjtools.jar" if="ajtools.jar"/>
@@ -83,7 +83,7 @@
                        <include name="test*/bin"/>
                </dirset>
        </path>
-               
+
        <!-- define the iajc task -->
        <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
                <classpath>
        <target name="check.iajc.ajtools" unless="iajc.local">
                <echo message="using version of iajc from aspectjtools.jar"/>
        </target>
-               
+
        <!-- init and clean... -->
-       
+
        <target name="init">
-               <mkdir dir="${results.dir}"/>   
-               <mkdir dir="${results.dir}/${target.application.name}"/>        
-               <mkdir dir="${results.dir}/ltw-app"/>   
-               <mkdir dir="${results.dir}/ltw-app/META-INF"/>  
+               <mkdir dir="${results.dir}"/>
+               <mkdir dir="${results.dir}/${target.application.name}"/>
+               <mkdir dir="${results.dir}/ltw-app"/>
+               <mkdir dir="${results.dir}/ltw-app/META-INF"/>
        </target>
-       
+
        <target name="clean" depends="init">
                <delete dir="${results.dir}"/>
        </target>
 
        <!-- classpath to use for all targets -->
-       
+
        <path id="iajc.class.path">
                <path refid="build.class.path"/>
                <pathelement location="${aspectj.lib.dir}/aspectjrt.jar"/>
                <path refid="aspectj.compiler.path"/>
-       </path>                 
-       
-                       
+       </path>
+
+
        <!-- source compilation (ajc style) with various profiling -->
-       
+
        <target name="source.compile" depends="init,config-check">
-               <iajc destdir="${results.dir}/${target.application.name}/classes" 
+               <iajc destdir="${results.dir}/${target.application.name}/classes"
                          fork="true" maxmem="${ajc.maxmem}"
                          debug="on"
                          source="${source.level}" target="${target.level}"
                        <jvmarg value="${hprof.args}"/>
                        <jvmarg value="${gc.args}"/>
                </iajc>
-               
+
                <tstamp>
                        <format property="ajc.runtime" pattern="yyyy-MM-dd'T'HHmmss"/>
                </tstamp>
                <property name="ajc.hprof.out" value="${results.dir}/${target.application.name}/ajc.java.hprof.${ajc.runtime}.txt"/>
                <property name="ajc.gc.out" value="${results.dir}/${target.application.name}/ajc.gc.${ajc.runtime}.txt"/>
-               <move file="java.hprof.txt" tofile="${ajc.hprof.out}"/>         
+               <move file="java.hprof.txt" tofile="${ajc.hprof.out}"/>
                <move file="gc.txt" tofile="${ajc.gc.out}"/>
                <echo message="hprof data written to ${ajc.hprof.out}"/>
                <echo message="gc data written to ${ajc.gc.out}"/>
-               <echo message="analyse with e.g. HATS and JTune"/>              
+               <echo message="analyse with e.g. HATS and JTune"/>
        </target>
 
        <target name="source.compile.gc" depends="init,config-check">
                        <format property="ajc.starttime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="ajc compile started at: ${ajc.starttime}"/>
-               
-               <iajc destdir="${results.dir}/${target.application.name}/classes" 
+
+               <iajc destdir="${results.dir}/${target.application.name}/classes"
                          fork="true" maxmem="${ajc.maxmem}"
                          debug="on"
                          source="${source.level}" target="${target.level}"
                          time="true">
                        <jvmarg value="${gc.args}"/>
                </iajc>
-               
+
                <tstamp>
                        <format property="ajc.endtime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="gc data written to ${ajc.gc.only.out}"/>
                <echo message="analyze with JTune"/>
        </target>
-       
+
        <!-- binary weaving with various profiling options -->
-       
-       <!-- build an aspect library to use for binary weaving, so that we 
+
+       <!-- build an aspect library to use for binary weaving, so that we
                 profile weaving only... -->
        <target name="aspectlib" depends="init">
                <iajc outjar="${results.dir}/aspectlib.jar"
                          classpathref="iajc.class.path">
                </iajc>
        </target>
-       
+
        <target name="binary.weave" depends="init,aspectlib">
                <iajc outjar="${results.dir}/woven.jar"
                          debug="on"
                        <jvmarg value="${hprof.args}"/>
                        <jvmarg value="${gc.args}"/>
                </iajc>
-               
+
                <tstamp>
                        <format property="bw.runtime" pattern="yyyy-MM-dd'T'HHmmss"/>
                </tstamp>
                <property name="bw.hprof.out" value="${results.dir}/${target.application.name}/weave.java.hprof.${bw.runtime}.txt"/>
                <property name="bw.gc.out" value="${results.dir}/${target.application.name}/weave.gc.${bw.runtime}.txt"/>
-               <move file="java.hprof.txt" tofile="${bw.hprof.out}"/>          
+               <move file="java.hprof.txt" tofile="${bw.hprof.out}"/>
                <move file="gc.txt" tofile="${bw.gc.out}"/>
                <echo message="hprof data written to ${bw.hprof.out}"/>
                <echo message="gc data written to ${bw.gc.out}"/>
-               <echo message="analyse with e.g. HATS and JTune"/>              
+               <echo message="analyse with e.g. HATS and JTune"/>
        </target>
 
        <target name="binary.weave.gc" depends="init,aspectlib">
                        <format property="bw.starttime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="weave started at: ${bw.starttime}"/>
-               
+
                <iajc outjar="${results.dir}/woven.jar"
                          debug="on"
                          source="${source.level}"
                        </aspectpath>
                        <jvmarg value="${gc.args}"/>
                </iajc>
-               
+
                <tstamp>
                        <format property="bw.endtime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="gc data written to ${bw.gc.only.out}"/>
                <echo message="analyze with JTune"/>
        </target>
-       
+
        <!-- loadtime weaving with various profiling options -->
-       
+
        <target name="ltw-app" depends="init"
                description="builds an application that we can run with ltw. The app does
                             Class.forName(..) on every type within the jar file passed to
                             it as an argument, thus forcing all those types (and types they
                             reference) to be woven)">
 
-               <javac srcdir="ltw-app/src" destdir="${results.dir}/ltw-app">                   
+               <javac srcdir="ltw-app/src" destdir="${results.dir}/ltw-app">
                </javac>
-               <copy file="${ltw.aop.xml}" todir="${results.dir}/ltw-app/META-INF"/>           
+               <copy file="${ltw.aop.xml}" todir="${results.dir}/ltw-app/META-INF"/>
        </target>
-       
+
        <target name="check-using-jars" unless="ajtools.jar">
                <echo message="WARNING: cannot run load-time weaving from workspace dirs"/>
                <echo message="use.aspectjtools.jar setting will be ignored and the jar"/>
-               <echo message="${aspectj.lib.dir}/aspectjweaver.jar will be used for LTW instead"/>             
+               <echo message="${aspectj.lib.dir}/aspectjweaver.jar will be used for LTW instead"/>
        </target>
-       
+
        <target name="loadtime.weave" depends="check-using-jars,aspectlib,ltw-app">
                <java classname="org.aspectj.profiling.LTWApp"
                          fork="true"
                        <jvmarg value="${gc.args}"/>
                        <jvmarg value="${hprof.args}"/>
                        <jvmarg value="-javaagent:${aspectj.lib.dir}/aspectjweaver.jar"/>
+                       <jvmarg value="${aj.addOpensKey}"/>
+                       <jvmarg value="${aj.addOpensValue}"/>
                        <classpath>
                                <pathelement location="${results.dir}/ltw-app"/>
                                <pathelement location="${results.dir}/aspectlib.jar"/>
                                <path refid="iajc.class.path"/>
                        </classpath>
                </java>
-               <tstamp>                
+               <tstamp>
                        <format property="ltw.runtime" pattern="yyyy-MM-dd'T'HHmmss"/>
                </tstamp>
                <property name="ltw.hprof.out" value="${results.dir}/${target.application.name}/ltw.java.hprof.${ltw.runtime}.txt"/>
                <property name="ltw.gc.out" value="${results.dir}/${target.application.name}/ltw.gc.${ltw.runtime}.txt"/>
-               <move file="java.hprof.txt" tofile="${ltw.hprof.out}"/>         
+               <move file="java.hprof.txt" tofile="${ltw.hprof.out}"/>
                <move file="gc.txt" tofile="${ltw.gc.out}"/>
                <echo message="hprof data written to ${ltw.hprof.out}"/>
                <echo message="gc data written to ${ltw.gc.out}"/>
-               <echo message="analyse with e.g. HATS and JTune"/>              
+               <echo message="analyse with e.g. HATS and JTune"/>
        </target>
-               
+
        <target name="loadtime.weave.gc" depends="check-using-jars,aspectlib,ltw-app">
                <tstamp>
                        <format property="ltw.starttime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="ltw started at: ${ltw.starttime}"/>
-               
+
                <java classname="org.aspectj.profiling.LTWApp"
                          fork="true"
                          maxmemory="${ajc.maxmem}">
                        <arg value="${weave.injar}"/>
                        <jvmarg value="${gc.args}"/>
                        <jvmarg value="-javaagent:${aspectj.lib.dir}/aspectjweaver.jar"/>
+                       <jvmarg value="${aj.addOpensKey}"/>
+                       <jvmarg value="${aj.addOpensValue}"/>
                        <classpath>
                                <pathelement location="${results.dir}/ltw-app"/>
                                <pathelement location="${results.dir}/aspectlib.jar"/>
                                <path refid="iajc.class.path"/>
                        </classpath>
                </java>
-               
+
                <tstamp>
                        <format property="ltw.endtime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="gc data written to ${ltw.gc.only.out}"/>
                <echo message="analyze with JTune"/>
        </target>
-       
+
        <!-- "AJDT-like" compiles with various profiling options -->
-       
+
        <target name="prepare-project" depends="init">
                <delete dir="${results.dir}/ajdt-workspace-root"/>
                <mkdir dir="${results.dir}/ajdt-workspace-root"/>
                        <param name="todir" value="${results.dir}/ajdt-workspace-root/${target.application.name}/base"/>
                </antcall>
        </target>
-       
+
        <target name="ajdt.compile" depends="prepare-project">
 
                <java classname="org.aspectj.systemtest.incremental.tools.AjdeInteractionTestbedLauncher"
                        </classpath>
                </java>
 
-               <tstamp>                
+               <tstamp>
                        <format property="ajdt.runtime" pattern="yyyy-MM-dd'T'HHmmss"/>
                </tstamp>
                <property name="ajdt.hprof.out" value="${results.dir}/${target.application.name}/ajdt.java.hprof.${ajdt.runtime}.txt"/>
                <property name="ajdt.gc.out" value="${results.dir}/${target.application.name}/ajdt.gc.${ajdt.runtime}.txt"/>
-               <move file="java.hprof.txt" tofile="${ajdt.hprof.out}"/>                
+               <move file="java.hprof.txt" tofile="${ajdt.hprof.out}"/>
                <move file="gc.txt" tofile="${ajdt.gc.out}"/>
                <echo message="hprof data written to ${ajdt.hprof.out}"/>
                <echo message="gc data written to ${ajdt.gc.out}"/>
-               <echo message="analyse with e.g. HATS and JTune"/>              
+               <echo message="analyse with e.g. HATS and JTune"/>
 
        </target>
 
                        <format property="ajdt.starttime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="AJDT started at: ${ajdt.starttime}"/>
-               
+
                <java classname="org.aspectj.systemtest.incremental.tools.AjdeInteractionTestbedLauncher"
                          fork="true"
                          maxmemory="${ajc.maxmem}">
                                <pathelement location="${aspectj.lib.dir}/aspectjrt.jar"/>
                        </classpath>
                </java>
-               
+
                <tstamp>
                        <format property="ajdt.endtime" pattern="HH:mm:ss"/>
                </tstamp>
                <echo message="gc data written to ${ajdt.gc.only.out}"/>
                <echo message="analyze with JTune"/>
        </target>
-       
-</project>
\ No newline at end of file
+
+</project>
index 3c8399e0c6bdcd732f1fd64bc4f1166c901a62d9..a97708e5015eecf54360950b8754fe9e715700c3 100644 (file)
@@ -10,9 +10,8 @@
  *******************************************************************************/
 package org.aspectj.systemtest.ajc167;
 
-import org.aspectj.testing.XMLBasedAjcTestCase;
-
 import junit.framework.Test;
+import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc167Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
@@ -27,14 +26,17 @@ public class Ajc167Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("optimizing string anno value binding");
        }
 
+       // FIXME: This test is flaky - can depend on machine load
        public void testOptimizingAnnotationBinding() {
                runTest("optimizing annotation binding");
        }
 
-       // bit flakey - can depend on machine load
-       // public void testOptimizingAnnotationBindingPerfTest() {
-       // runTest("optimizing annotation binding - 2");
-       // }
+       // FIXME: This test is flaky - can depend on machine load
+/*
+       public void testOptimizingAnnotationBindingPerfTest() {
+               runTest("optimizing annotation binding - 2");
+       }
+*/
 
        /*
         * public void testPerThisLTW_295092() { runTest("perthis ltw"); }
@@ -84,4 +86,4 @@ public class Ajc167Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                return getClassResource("ajc167.xml");
        }
 
-}
\ No newline at end of file
+}
index f41252dcc3c998293e6e68a65e8df3251a06dc2f..6e0ddd78e96061167be5e22de8118e19d66ecaff 100644 (file)
@@ -33,6 +33,8 @@
             <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
             <!-- use META-INF/aop.xml style -->
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
@@ -46,6 +48,8 @@
 <!--            <jvmarg value="-verbose:class"/>-->
             <!-- use META-INF/aop.xml style -->
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
@@ -59,6 +63,8 @@
             <jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
             <!-- use META-INF/aop.xml style -->
             <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg line="${jdwp}"/>-->
         </java>
     </target>
             <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
             <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
             <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
-               <sysproperty key="org.aspectj.tracing.file" path="${aj.sandbox}/tracing.txt"/>
+            <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+            <jvmarg value="${aj.addOpensKey}"/>
+            <jvmarg value="${aj.addOpensValue}"/>
 <!--            <jvmarg value="-verbose:class"/>-->
             <!-- use META-INF/aop.xml style -->
-            <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
 <!--            <jvmarg line="${jdwp}"/>-->
+               <sysproperty key="org.aspectj.tracing.file" path="${aj.sandbox}/tracing.txt"/>
         </java>
     </target>