aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml7
-rw-r--r--docs/developer/IDE.md1
-rw-r--r--docs/developer/RELEASE.md20
-rw-r--r--docs/dist/doc/README-198.html5
-rw-r--r--pom.xml40
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java6
-rw-r--r--tests/bugs198/github_105/Application.java18
-rw-r--r--tests/bugs198/github_105/BarAnnotation.java11
-rw-r--r--tests/bugs198/github_105/FooAnnotation.java8
-rw-r--r--tests/bugs198/github_105/FooAspect.aj4
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java1
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java31
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml6
13 files changed, 107 insertions, 51 deletions
diff --git a/build/build.xml b/build/build.xml
index 1ea2f5aa7..f5a6eef8f 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -806,11 +806,11 @@ ant -propertyfile XXX publishtomaven
<property name="maven.central.repository" value="https://repo.spring.io/libs-snapshot-local/org/aspectj/aspectjweaver"/>
-->
-<!-- aspectjtools/target/aspectjtools-1.9.7-SNAPSHOT.jar -->
+<!-- aspectjtools/target/aspectjtools-1.9.8-SNAPSHOT.jar -->
<property name="bin.jars.folder" value="${build.root}/dist/tools/lib"/>
<property name="src.jars.folder" value="${build.root}/src"/>
- <property name="suffix" value="1.9.7-SNAPSHOT"/>
+ <property name="suffix" value="1.9.8-SNAPSHOT"/>
<!-- ASPECTJRT -->
<maven:deploy file="${build.root}/aspectjrt/target/aspectjrt-${suffix}.jar">
@@ -856,7 +856,7 @@ ant -propertyfile XXX publishtomaven
<target name="publishtomaven_milestone" depends="maven.init">
<property name="build.root" value="/Users/aclement/gits/org.aspectj"/>
- <property name="suffix" value="1.9.7.M1"/>
+ <property name="suffix" value="1.9.8.M1"/>
<property name="adjusted.release.type" value="milestone"/>
<property name="maven.central.repository" value="s3://maven.springframework.org/${adjusted.release.type}"/>
@@ -985,4 +985,3 @@ ant -propertyfile XXX publishtomaven
</project>
-
diff --git a/docs/developer/IDE.md b/docs/developer/IDE.md
index 3dfb38eef..14621ecee 100644
--- a/docs/developer/IDE.md
+++ b/docs/developer/IDE.md
@@ -32,6 +32,7 @@ projects using AspectJ Maven Plugin.
#### AspectJ Development Tools (AJDT)
Use an update sites corresponding to your Eclipse version (minimal version listed):
+* Eclipse 2021-09 (4.21): https://aspectj.dev/eclipse/ajdt/421
* Eclipse 2021-03 (4.19): https://aspectj.dev/eclipse/ajdt/419
* Eclipse 2018-12 (4.10): https://download.eclipse.org/tools/ajdt/410/dev/update
* For older versions, please refer to https://www.eclipse.org/ajdt/downloads (page was not updated in a long time,
diff --git a/docs/developer/RELEASE.md b/docs/developer/RELEASE.md
index 7c8b04d9f..3d0db25be 100644
--- a/docs/developer/RELEASE.md
+++ b/docs/developer/RELEASE.md
@@ -27,7 +27,7 @@ To publish a snapshot, set up your credentials in `~/.m2/settings.xml` something
</settings>
```
-Assuming that you are currently working on version 1.9.7-SNAPSHOT, you simply call:
+Assuming that you are currently working on version 1.9.8-SNAPSHOT, you simply call:
```shell
mvn clean deploy
@@ -86,7 +86,7 @@ java -version
git status
# Set release version in all POMs
-mvn versions:set -DnewVersion=1.9.7.M2
+mvn versions:set -DnewVersion=1.9.8.M2
# Verify if the POM changes are OK, then remove the POM backup files
mvn versions:commit
@@ -118,25 +118,25 @@ Before we release the staging repository though, we want to commit and tag the r
```shell
# Commit the release POMs to Git (better do this from your IDE, verifying the
# changes before staging them for Git commit)
-git commit -am "Set version to 1.9.7.M2"
+git commit -am "Set version to 1.9.8.M2"
# Tag release
-git tag V1_9_7_M2
+git tag V1_9_8_M2
# Set new snapshot version, increasing the version number after a final release
-mvn versions:set -DnewVersion=1.9.7-SNAPSHOT
+mvn versions:set -DnewVersion=1.9.8-SNAPSHOT
# Verify if the POM changes are OK, then remove the POM backup files
mvn versions:commit
# Commit the snapshot POMs to Git
-git commit -am "Set version to 1.9.7-SNAPSHOT"
+git commit -am "Set version to 1.9.8-SNAPSHOT"
# Push the previous commits to GitHub
git push origin
# Push the release tag to GitHub
-git push origin V1_9_7_M2
+git push origin V1_9_8_M2
```
OK, the Git house-keeping is done. Now finally, let us enjoy the fruits of our work and release the staging repository
@@ -156,7 +156,7 @@ to Maven Central:
# repositories there are.
mvn nexus-staging:rc-list
# [INFO] ID State Description
-# [INFO] orgaspectj-1106 CLOSED org.aspectj:aspectjrt:1.9.7.M2
+# [INFO] orgaspectj-1106 CLOSED org.aspectj:aspectjrt:1.9.8.M2
# Use the ID of the corresponding CLOSED staging repository for releasing to
# Maven Central
@@ -164,8 +164,8 @@ mvn nexus-staging:rc-release -DstagingRepositoryId=orgaspectj-1106
```
Tadaa! We have performed an AspectJ release. In a few minutes, the artifacts should appear on Maven Central somewhere
-under https://repo1.maven.org/maven2/org/aspectj/, e.g. AspectJ Tools 1.9.7.M2 would appear under
-https://repo1.maven.org/maven2/org/aspectj/aspectjtools/1.9.7.M2/. As soon as you see the artifacts there instead of
+under https://repo1.maven.org/maven2/org/aspectj/, e.g. AspectJ Tools 1.9.8.M2 would appear under
+https://repo1.maven.org/maven2/org/aspectj/aspectjtools/1.9.8.M2/. As soon as you see the artifacts there instead of
"404 not found", you can announce release availability on the AspectJ mailing list and wherever else appropriate.
Finally, you probably want to publish the AspectJ installer (`installer/target/aspectj-[VERSION].jar`), e.g. by creating a
diff --git a/docs/dist/doc/README-198.html b/docs/dist/doc/README-198.html
index 24abfdb95..57165e5c0 100644
--- a/docs/dist/doc/README-198.html
+++ b/docs/dist/doc/README-198.html
@@ -99,6 +99,11 @@
<li>Document build profiles and properties in <i>docs/developer/BUILD.md</i></li>
<li>Add a guide for setting up an AspectJ development environment in <i>docs/developer/IDE.md</i></li>
<li>Allow JAR saving if <tt>-proceedOnError</tt> is specified</li>
+ <li>
+ Fix <a href="https://github.com/eclipse/org.aspectj/issues/105">issue #105</a>: Compilation fails when using an
+ aspect library via <tt>-aspectpath</tt> in combination with introducing an annotation via ITD. This was broken since
+ version 1.9.5 and fixed in 1.9.8.RC3.
+ </li>
</ul>
<p>
diff --git a/pom.xml b/pom.xml
index 66b40d96c..2a816afb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<maven.javadoc.skip>true</maven.javadoc.skip>
<!-- Dependency versions -->
- <jdt.core.version>1.9.8.RC2</jdt.core.version>
+ <jdt.core.version>1.9.8.RC3</jdt.core.version>
<asm.version>9.2</asm.version>
<lib.ant.version>1.6.3</lib.ant.version>
<lib.ant.xerces.version>2.6.2</lib.ant.xerces.version>
@@ -68,22 +68,8 @@
</releases>
</repository>
<repository>
- <id>aspectj-dev</id>
- <name>AspectJ artifacts on aspectj.dev</name>
- <url>https://aspectj.dev/maven</url>
- <layout>default</layout>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- </repository>
- <repository>
- <id>ossrh-snapshots-classic</id>
- <name>Sonatype OSSRH snapshots classic</name>
+ <id>ossrh-snapshots</id>
+ <name>Sonatype OSSRH snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<layout>default</layout>
<snapshots>
@@ -96,23 +82,9 @@
</releases>
</repository>
<repository>
- <id>ossrh-snapshots-new</id>
- <name>Sonatype OSSRH snapshots new</name>
- <url> https://s01.oss.sonatype.org/content/repositories/snapshots</url>
- <layout>default</layout>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- </repository>
- <repository>
- <id>ossrh-snapshots</id>
- <name>Sonatype OSSRH snapshots</name>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+ <id>aspectj-dev</id>
+ <name>AspectJ artifacts on aspectj.dev</name>
+ <url>https://aspectj.dev/maven</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
index 218fc56d5..a515f8e78 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -250,9 +250,9 @@ public class AjcTask extends MatchingTask {
public static final String COMMAND_EDITOR_NAME = AjcTask.class.getName() + ".COMMAND_EDITOR";
- static final String[] TARGET_INPUTS = new String[] { "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "9", "10", "11", "12", "13", "14", "15" };
- static final String[] SOURCE_INPUTS = new String[] { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "9", "10", "11", "12", "13", "14", "15" };
- static final String[] COMPLIANCE_INPUTS = new String[] { "-1.3", "-1.4", "-1.5", "-1.6", "-1.7", "-1.8", "-1.9", "-9", "-10", "-11", "-12", "-13", "-14", "15" };
+ static final String[] TARGET_INPUTS = new String[] { "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "9", "10", "11", "12", "13", "14", "15", "16", "17" };
+ static final String[] SOURCE_INPUTS = new String[] { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "9", "10", "11", "12", "13", "14", "15", "16", "17" };
+ static final String[] COMPLIANCE_INPUTS = new String[] { "-1.3", "-1.4", "-1.5", "-1.6", "-1.7", "-1.8", "-1.9", "-9", "-10", "-11", "-12", "-13", "-14", "-15", "-16", "-17" };
private static final ICommandEditor COMMAND_EDITOR;
diff --git a/tests/bugs198/github_105/Application.java b/tests/bugs198/github_105/Application.java
new file mode 100644
index 000000000..bcf4f5624
--- /dev/null
+++ b/tests/bugs198/github_105/Application.java
@@ -0,0 +1,18 @@
+import java.lang.annotation.Annotation;
+
+/**
+ * {@code FooAspect} should add {@code @BarAnnotation(name = "from FooAspect")}.
+ * <p>
+ * This fails in AspectJ 1.9.5 to 1.9.8.RC2 due to a removed safeguard in JDT Core,
+ * if the aspect is in a separate library on the aspectpath.
+ * <p>
+ * See https://github.com/eclipse/org.aspectj/issues/105
+ */
+@FooAnnotation
+public class Application {
+ public static void main(String[] args) {
+ for (Annotation annotation : Application.class.getDeclaredAnnotations()) {
+ System.out.println(annotation);
+ }
+ }
+}
diff --git a/tests/bugs198/github_105/BarAnnotation.java b/tests/bugs198/github_105/BarAnnotation.java
new file mode 100644
index 000000000..eaee4af2a
--- /dev/null
+++ b/tests/bugs198/github_105/BarAnnotation.java
@@ -0,0 +1,11 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface BarAnnotation {
+ // Note: no default value
+ String name();
+}
diff --git a/tests/bugs198/github_105/FooAnnotation.java b/tests/bugs198/github_105/FooAnnotation.java
new file mode 100644
index 000000000..17e79deb4
--- /dev/null
+++ b/tests/bugs198/github_105/FooAnnotation.java
@@ -0,0 +1,8 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FooAnnotation {}
diff --git a/tests/bugs198/github_105/FooAspect.aj b/tests/bugs198/github_105/FooAspect.aj
new file mode 100644
index 000000000..0d8e10d9b
--- /dev/null
+++ b/tests/bugs198/github_105/FooAspect.aj
@@ -0,0 +1,4 @@
+public aspect FooAspect {
+ declare @type:(@FooAnnotation *) :
+ @BarAnnotation(name = "from FooAspect");
+}
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java b/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java
index 69ed09593..4aac84810 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java
@@ -18,6 +18,7 @@ public class AllTestsAspectJ198 {
public static Test suite() {
TestSuite suite = new TestSuite("AspectJ 1.9.8 tests");
+ suite.addTest(Bugs198Tests.suite());
if (LangUtil.is9VMOrGreater()) {
suite.addTest(CompileWithReleaseTests.suite());
}
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java
new file mode 100644
index 000000000..d8e57b534
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc198;
+
+import junit.framework.Test;
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+/**
+ * @author Alexander Kriegisch
+ */
+public class Bugs198Tests extends XMLBasedAjcTestCase {
+
+ public void testGitHub_105() {
+ runTest("ITD annotation with mandatory parameter via aspectpath");
+ }
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Bugs198Tests.class);
+ }
+
+ @Override
+ protected java.net.URL getSpecFile() {
+ return getClassResource("ajc198.xml");
+ }
+
+}
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml
index c182b58b9..dfe86e2a9 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml
@@ -3,6 +3,12 @@
<suite>
+ <!-- https://github.com/eclipse/org.aspectj/issues/105 -->
+ <ajc-test dir="bugs198/github_105" vm="8" title="ITD annotation with mandatory parameter via aspectpath">
+ <compile files="FooAnnotation.java BarAnnotation.java FooAspect.aj" options="-8" outjar="aspect.jar"/>
+ <compile files="Application.java" options="-8" aspectpath="aspect.jar"/>
+ </ajc-test>
+
<!-- Java 17 final, Java 16, 15 preview -->
<ajc-test dir="features197/java15" vm="17" title="sealed class with legal subclasses">
<compile files="Person.java Employee.java Manager.java" options="-17" />