<target name="JDK14 LTW with XML">
<java fork="yes" classname="HelloWorld" failonerror="yes">
<classpath refid="aj.path"/>
-<!--
- <classpath>
- <pathelement path="${aj.sandbox}/hello.jar"/>
- </classpath>
--->
<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="-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"/>-->
<target name="JDK14 LTW with ASPECTPATH">
<java fork="yes" classname="HelloWorld" failonerror="yes">
<classpath refid="aj.path"/>
- <!--
- <classpath>
- <pathelement path="${aj.sandbox}/hello.jar"/>
- </classpath>
--->
<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="-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"/>-->
</java>
</target>
+ <target name="simple LTW">
+ <copy file="${aj.root}/tests/ltw/aop-simple.xml"
+ tofile="${aj.sandbox}/META-INF/aop.xml"/>
+ <java fork="yes" classname="HelloWorld" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <!-- use META-INF/aop.xml style -->
+ <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+<!-- <jvmarg line="${jdwp}"/>-->
+ </java>
+ </target>
+
</project>
--- /dev/null
+<aspectj>
+ <weaver options="-verbose">
+ </weaver>
+</aspectj>
runTest("override default path using -Dorg.aspectj.weaver.loadtime.configuration");
}
+
+ public void testSimpleLTW_pr159854 () {
+ runTest("simple LTW");
+
+ }
/*
* Allow system properties to be set and restored
<compile files="ExceptionHandler.aj" options="-outxml -outjar handler.jar"/>
<ant file="ant.xml" target="JDK14 LTW with XML" verbose="true">
<stdout>
- <line text="TraceFactory.instance="/>
<line text="Hello World!"/>
</stdout>
+ <stderr>
+ <line text="TraceFactory.instance="/>
+ </stderr>
</ant>
</ajc-test>
<compile files="ExceptionHandler.aj" options="-outjar handler.jar"/>
<ant file="ant.xml" target="JDK14 LTW with ASPECTPATH" verbose="true">
<stdout>
- <line text="TraceFactory.instance="/>
<line text="Hello World!"/>
</stdout>
+ <stderr>
+ <line text="TraceFactory.instance="/>
+ </stderr>
</ant>
</ajc-test>
</stderr>
</run>
</ajc-test>
+
+ <ajc-test dir="ltw" title="simple LTW" keywords="ltw">
+ <compile files="HelloWorld.java"/>
+ <compile files="ExceptionHandler.aj" options="-outxml"/>
+ <ant file="ant.xml" target="simple LTW" verbose="true">
+ <stdout>
+ <line text="Hello World!"/>
+ </stdout>
+ </ant>
+ </ajc-test>
\ No newline at end of file
public void testTraceEverything () {
runTest("Trace everything");
}
+
+ public void testJDK14Tracing_pr159854 () {
+ runTest("JDK 1.4 tracing");
+ }
}
</stdout>
</ant>
</ajc-test>
+
+ <ajc-test dir="tracing" title="JDK 1.4 tracing" keywords="tracing">
+ <compile
+ files="HelloWorld.java"
+ />
+ <compile files="Aspect.aj" options="-outxml"/>
+ <ant file="ant.xml" target="JDK 1.4 tracing" verbose="true">
+ <stdout>
+ <line text="Hello World!"/>
+ </stdout>
+ </ant>
+ </ajc-test>
</suite>
</java>
</target>
+ <target name="JDK 1.4 tracing">
+ <copy file="${aj.root}/tests/tracing//logging.properties"
+ tofile="${aj.sandbox}/META-INF/logging.properties"/>
+ <java fork="yes" classname="HelloWorld" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <jvmarg value="-Dorg.aspectj.tracing.debug=true"/>
+ <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 line="${jdwp}"/>-->
+ </java>
+ </target>
+
</project>
-
\ No newline at end of file
+############################################################
+# Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+# Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes. These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the INFO and above levels.
+#handlers= java.util.logging.ConsoleHandler
+
+# To also add the FileHandler, use the following line instead.
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+handlers= java.util.logging.FileHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers. For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = %h/java%u.log
+#java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+#java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+java.util.logging.FileHandler.level = FINER
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = FINER
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#com.xyz.foo.level = SEVERE
+org.aspectj.weaver.loadtime.level = FINER
instance = new DefaultTraceFactory();
}
- if (debug) System.out.println("TraceFactory.instance=" + instance);
+ if (debug) System.err.println("TraceFactory.instance=" + instance);
}
}