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/bugs153 | |
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/bugs153')
-rw-r--r-- | tests/bugs153/pr157474/AbstractTracing.aj | 8 | ||||
-rw-r--r-- | tests/bugs153/pr157474/HelloWorld.java | 7 | ||||
-rw-r--r-- | tests/bugs153/pr157474/ant-server.xml | 27 | ||||
-rw-r--r-- | tests/bugs153/pr157474/aop-application.xml | 9 | ||||
-rw-r--r-- | tests/bugs153/pr157474/aop-library.xml | 0 | ||||
-rw-r--r-- | tests/bugs153/pr157474/server-applicationandlibrary.properties | 7 |
6 files changed, 58 insertions, 0 deletions
diff --git a/tests/bugs153/pr157474/AbstractTracing.aj b/tests/bugs153/pr157474/AbstractTracing.aj new file mode 100644 index 000000000..1dfd64f57 --- /dev/null +++ b/tests/bugs153/pr157474/AbstractTracing.aj @@ -0,0 +1,8 @@ +public abstract aspect AbstractTracing { + + protected abstract pointcut scope (); + + before () : execution(public static void main(String[])) && scope() { + System.out.println("? " + thisJoinPointStaticPart.getSignature().getName()); + } +}
\ No newline at end of file diff --git a/tests/bugs153/pr157474/HelloWorld.java b/tests/bugs153/pr157474/HelloWorld.java new file mode 100644 index 000000000..8e5a1fdd7 --- /dev/null +++ b/tests/bugs153/pr157474/HelloWorld.java @@ -0,0 +1,7 @@ +public class HelloWorld { + + public static void main (String[] args) throws Exception { + System.out.println("Hello World!"); + } + +}
\ No newline at end of file diff --git a/tests/bugs153/pr157474/ant-server.xml b/tests/bugs153/pr157474/ant-server.xml new file mode 100644 index 000000000..af315984a --- /dev/null +++ b/tests/bugs153/pr157474/ant-server.xml @@ -0,0 +1,27 @@ +<!-- ajc-ant script, not to be used from Ant commant line - see AntSpec --> +<project name="ltw"> + + <!-- using this we can debug the forked VM --> + <property + name="jdwp" + value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/> + + <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="-Dorg.aspectj.testing.server.debug=true"/>--> + <arg path="${aj.sandbox}"/> + </java> + </target> + +</project> diff --git a/tests/bugs153/pr157474/aop-application.xml b/tests/bugs153/pr157474/aop-application.xml new file mode 100644 index 000000000..8654ca277 --- /dev/null +++ b/tests/bugs153/pr157474/aop-application.xml @@ -0,0 +1,9 @@ +<aspectj> + <aspects> + <concrete-aspect name="HelloWorldTracing" extends="AbstractTracing"> + <pointcut name="scope" expression="within(HelloWorld)"/> + </concrete-aspect> + </aspects> + + <weaver options="-debug"/> +</aspectj>
\ No newline at end of file diff --git a/tests/bugs153/pr157474/aop-library.xml b/tests/bugs153/pr157474/aop-library.xml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/bugs153/pr157474/aop-library.xml diff --git a/tests/bugs153/pr157474/server-applicationandlibrary.properties b/tests/bugs153/pr157474/server-applicationandlibrary.properties new file mode 100644 index 000000000..0fc39dc43 --- /dev/null +++ b/tests/bugs153/pr157474/server-applicationandlibrary.properties @@ -0,0 +1,7 @@ +# loader.XXX=Name,Classpath[,Parent] +loader.parent=Library,Application;library.jar +loader.child=Application,Application;application.jar,Library +#loader.child=Application,Application;library.jar;application.jar + +# main=Class,Loader +main=HelloWorld,Application
\ No newline at end of file |