aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr328099
diff options
context:
space:
mode:
authoraclement <aclement>2011-05-02 18:41:04 +0000
committeraclement <aclement>2011-05-02 18:41:04 +0000
commit1d1d8ca788aaf2764c0f07c32ea3fc0e3f1a9485 (patch)
tree4a9a0108e67c43cca77a6100d9380de2f89a1a7b /tests/bugs1612/pr328099
parentdc9f97563b3dbf45ad22091cb80bad30858cbcdd (diff)
downloadaspectj-1d1d8ca788aaf2764c0f07c32ea3fc0e3f1a9485.tar.gz
aspectj-1d1d8ca788aaf2764c0f07c32ea3fc0e3f1a9485.zip
328099
Diffstat (limited to 'tests/bugs1612/pr328099')
-rw-r--r--tests/bugs1612/pr328099/X.java1
-rwxr-xr-xtests/bugs1612/pr328099/aop.xml10
-rwxr-xr-xtests/bugs1612/pr328099/cert/key.storebin0 -> 1206 bytes
-rw-r--r--tests/bugs1612/pr328099/code.jarbin0 -> 4044 bytes
-rwxr-xr-xtests/bugs1612/pr328099/pom.xml95
-rw-r--r--tests/bugs1612/pr328099/readme9
-rwxr-xr-xtests/bugs1612/pr328099/src/META-INF/aop.xml10
-rwxr-xr-xtests/bugs1612/pr328099/src/foo/bar/BarAspect.java23
-rwxr-xr-xtests/bugs1612/pr328099/src/foo/bar/Foo.java18
-rw-r--r--tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java7
10 files changed, 173 insertions, 0 deletions
diff --git a/tests/bugs1612/pr328099/X.java b/tests/bugs1612/pr328099/X.java
new file mode 100644
index 000000000..a4f7a143a
--- /dev/null
+++ b/tests/bugs1612/pr328099/X.java
@@ -0,0 +1 @@
+public class X{}
diff --git a/tests/bugs1612/pr328099/aop.xml b/tests/bugs1612/pr328099/aop.xml
new file mode 100755
index 000000000..b65c5ef91
--- /dev/null
+++ b/tests/bugs1612/pr328099/aop.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE aspectj PUBLIC
+ "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
+<aspectj>
+ <weaver options="-debug">
+ <include within="foo.bar..*" />
+ </weaver>
+ <aspects>
+ <aspect name="foo.bar.BarAspect"/>
+ </aspects>
+</aspectj>
diff --git a/tests/bugs1612/pr328099/cert/key.store b/tests/bugs1612/pr328099/cert/key.store
new file mode 100755
index 000000000..41288f682
--- /dev/null
+++ b/tests/bugs1612/pr328099/cert/key.store
Binary files differ
diff --git a/tests/bugs1612/pr328099/code.jar b/tests/bugs1612/pr328099/code.jar
new file mode 100644
index 000000000..252589620
--- /dev/null
+++ b/tests/bugs1612/pr328099/code.jar
Binary files differ
diff --git a/tests/bugs1612/pr328099/pom.xml b/tests/bugs1612/pr328099/pom.xml
new file mode 100755
index 000000000..7cfbfaf5f
--- /dev/null
+++ b/tests/bugs1612/pr328099/pom.xml
@@ -0,0 +1,95 @@
+<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>
+
+ <groupId>foo.bar</groupId>
+ <artifactId>aspectj-certificate-problem</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerVersion>1.6</compilerVersion>
+ <fork>true</fork>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showWarnings>true</showWarnings>
+ <showDeprecation>true</showDeprecation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <archive>
+ <manifest>
+ <mainClass>foo.bar.Foo</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jarsigner-plugin</artifactId>
+ <configuration>
+ <keystore>cert/key.store</keystore>
+ <alias>foo</alias>
+ <storepass>foobar</storepass>
+ <archiveDirectory>target</archiveDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>java</executable>
+ <!-- optional -->
+ <arguments>
+ <argument>-javaagent:/Users/aclement/installs/aspectj1611/lib/aspectjweaver.jar</argument>
+ <argument>-jar</argument>
+ <argument>target/aspectj-certificate-problem-1.0-SNAPSHOT-jar-with-dependencies.jar</argument>
+ </arguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.6.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.6.10</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/tests/bugs1612/pr328099/readme b/tests/bugs1612/pr328099/readme
new file mode 100644
index 000000000..035feb471
--- /dev/null
+++ b/tests/bugs1612/pr328099/readme
@@ -0,0 +1,9 @@
+Build the src contents into a jar which will then contain class files and our manifest. Jar typically code.jar
+
+Then sign the jar with
+ jarsigner -keystore ../cert/key.store -storepass foobar code.jar foo
+
+as per: http://introcs.cs.princeton.edu/85application/jar/sign.html
+
+then you can run it:
+java -javaagent:XXX -classpath code.jar foo.bar.Foo
diff --git a/tests/bugs1612/pr328099/src/META-INF/aop.xml b/tests/bugs1612/pr328099/src/META-INF/aop.xml
new file mode 100755
index 000000000..d08ae4126
--- /dev/null
+++ b/tests/bugs1612/pr328099/src/META-INF/aop.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE aspectj PUBLIC
+ "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
+<aspectj>
+ <weaver>
+ <include within="foo.bar..*" />
+ </weaver>
+ <aspects>
+ <aspect name="foo.bar.BarAspect"/>
+ </aspects>
+</aspectj> \ No newline at end of file
diff --git a/tests/bugs1612/pr328099/src/foo/bar/BarAspect.java b/tests/bugs1612/pr328099/src/foo/bar/BarAspect.java
new file mode 100755
index 000000000..901978daa
--- /dev/null
+++ b/tests/bugs1612/pr328099/src/foo/bar/BarAspect.java
@@ -0,0 +1,23 @@
+package foo.bar;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public class BarAspect {
+ @SuppressWarnings("unused")
+ @Pointcut("execution(* foo.bar.Foo.bar())")
+ private void pointcut() {
+ }
+
+ @Around("pointcut()")
+ public Object applyAdvice(ProceedingJoinPoint pjp) throws Throwable {
+ System.out.print("pre...");
+ Object retVal = pjp.proceed();
+ System.out.println("...post");
+ return retVal;
+ }
+
+}
diff --git a/tests/bugs1612/pr328099/src/foo/bar/Foo.java b/tests/bugs1612/pr328099/src/foo/bar/Foo.java
new file mode 100755
index 000000000..2a35392a2
--- /dev/null
+++ b/tests/bugs1612/pr328099/src/foo/bar/Foo.java
@@ -0,0 +1,18 @@
+package foo.bar;
+
+/**
+ * Hello world!
+ *
+ */
+public class Foo
+{
+ public void bar() {
+ System.out.print(this.getClass().getSimpleName() + ".bar()");
+ }
+
+ public static void main( String[] args )
+ {
+ Foo foo = new Foo();
+ foo.bar();
+ }
+}
diff --git a/tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java b/tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java
new file mode 100644
index 000000000..ed7452f30
--- /dev/null
+++ b/tests/bugs1612/pr328099/src/foo/bar/FooLaunch.java
@@ -0,0 +1,7 @@
+package foo.bar;
+
+public class FooLaunch {
+ public static void main(String[]argv) {
+ Foo.main(argv);
+ }
+}