diff options
author | mwebster <mwebster> | 2006-09-19 15:00:21 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-09-19 15:00:21 +0000 |
commit | a06896ea1981bb66838fbb352249eb614b2f2946 (patch) | |
tree | 0e9d4da17cc0b0e28791adc90fcf2335052e17a5 /tests/ltw | |
parent | a40594edf71956e8e7b1d3229a335ce3892ba4a6 (diff) | |
download | aspectj-a06896ea1981bb66838fbb352249eb614b2f2946.tar.gz aspectj-a06896ea1981bb66838fbb352249eb614b2f2946.zip |
Bug 157474 "Handle duplicate aop.xml definitions more gracefully" (tests for duplicate aop.xml and -Dorg.aspectj.weaver.loadtime.configuration)
Diffstat (limited to 'tests/ltw')
-rw-r--r-- | tests/ltw/Tracing.aj | 6 | ||||
-rw-r--r-- | tests/ltw/ant-server.xml | 4 | ||||
-rw-r--r-- | tests/ltw/ant.xml | 22 | ||||
-rw-r--r-- | tests/ltw/aop-orgaspectjweaverloadtimeconfiguration.xml | 5 |
4 files changed, 35 insertions, 2 deletions
diff --git a/tests/ltw/Tracing.aj b/tests/ltw/Tracing.aj new file mode 100644 index 000000000..74b0e5a8e --- /dev/null +++ b/tests/ltw/Tracing.aj @@ -0,0 +1,6 @@ +public aspect Tracing { + + before () : execution(public static void main(String[])) { + System.out.println("? " + thisJoinPointStaticPart.getSignature().getName()); + } +}
\ No newline at end of file diff --git a/tests/ltw/ant-server.xml b/tests/ltw/ant-server.xml index 1bb336ab1..9960962ca 100644 --- a/tests/ltw/ant-server.xml +++ b/tests/ltw/ant-server.xml @@ -14,7 +14,7 @@ <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/> <jvmarg value="-Daj.weaving.verbose=true"/> <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/> - <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/> +<!-- <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>--> <arg path="${aj.sandbox}"/> </java> </target> @@ -27,7 +27,7 @@ <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/> <jvmarg value="-Daj.weaving.verbose=true"/> <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/> - <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/> +<!-- <jvmarg value="-Dorg.aspectj.testing.server.debug=true"/>--> <arg path="${aj.sandbox}"/> </java> </target> diff --git a/tests/ltw/ant.xml b/tests/ltw/ant.xml index dfde53635..db38cb16a 100644 --- a/tests/ltw/ant.xml +++ b/tests/ltw/ant.xml @@ -45,4 +45,26 @@ </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 + configuration search path --> + <target name="override default path using -Dorg.aspectj.weaver.loadtime.configuration"> + <copy file="${aj.root}/tests/ltw/aop-orgaspectjweaverloadtimeconfiguration.xml" + tofile="${aj.sandbox}/META-INF/aop-random.xml"/> + <java fork="yes" classname="HelloWorld" failonerror="yes"> + <classpath refid="aj.path"/> + <classpath> + <pathelement path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar:${aj.sandbox}/tracing.jar"/> + </classpath> + <jvmarg value="-Dorg.aspectj.weaver.loadtime.configuration=META-INF/aop-random.xml"/> + <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/> + <jvmarg value="-Dorg.aspectj.tracing.factory=default"/> + <jvmarg value="-Dorg.aspectj.tracing.messages=true"/> + <!-- use META-INF/aop.xml style --> + <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/> +<!-- <jvmarg line="${jdwp}"/>--> + </java> + </target> + </project> diff --git a/tests/ltw/aop-orgaspectjweaverloadtimeconfiguration.xml b/tests/ltw/aop-orgaspectjweaverloadtimeconfiguration.xml new file mode 100644 index 000000000..232c72ee6 --- /dev/null +++ b/tests/ltw/aop-orgaspectjweaverloadtimeconfiguration.xml @@ -0,0 +1,5 @@ +<aspectj> + <aspects> + <aspect name="ExceptionHandler"/> + </aspects> +</aspectj>
\ No newline at end of file |