You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2026/03/28 11:52:32 UTC
(maven-compiler-plugin) 01/01: Enable a test which was commented-out while waiting for https://github.com/apache/maven/pull/11380. The required Maven core fix is available in Maven 4.1.0, but not (at the time of writting) in 4.0.0.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch maven-4.1
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
commit 532ec15b9065ec62c2c5ba660797bcb61ded9ea3
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Mon Nov 10 00:05:34 2025 +0100
Enable a test which was commented-out while waiting for https://github.com/apache/maven/pull/11380.
The required Maven core fix is available in Maven 4.1.0, but not (at the time of writting) in 4.0.0.
---
.../main/java/processor/SimpleAnnotationProcessor.java | 3 +--
src/it/processor-type/annotation-user/pom.xml | 7 ++++++-
.../src/test/java/user/SimpleTestObject.java | 15 ++++++++++++++-
src/it/processor-type/invoker.properties | 2 +-
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/it/processor-type/annotation-processor/src/main/java/processor/SimpleAnnotationProcessor.java b/src/it/processor-type/annotation-processor/src/main/java/processor/SimpleAnnotationProcessor.java
index fe34ef8..878b02e 100644
--- a/src/it/processor-type/annotation-processor/src/main/java/processor/SimpleAnnotationProcessor.java
+++ b/src/it/processor-type/annotation-processor/src/main/java/processor/SimpleAnnotationProcessor.java
@@ -42,8 +42,7 @@ public class SimpleAnnotationProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
// Verifies that transitive dependencies worked.
- // TODO: pending https://github.com/apache/maven/pull/11373
- // dependency.AnnotationProcessorDependency.foo();
+ dependency.AnnotationProcessorDependency.foo();
boolean claimed = false;
for (TypeElement annotation : annotations) {
diff --git a/src/it/processor-type/annotation-user/pom.xml b/src/it/processor-type/annotation-user/pom.xml
index a8721b3..0f22a21 100644
--- a/src/it/processor-type/annotation-user/pom.xml
+++ b/src/it/processor-type/annotation-user/pom.xml
@@ -35,8 +35,13 @@
<version>1.0-SNAPSHOT</version>
<type>processor</type>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <version>5.14.0</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
-
<build>
<plugins>
<plugin>
diff --git a/src/it/processor-type/annotation-user/src/test/java/user/SimpleTestObject.java b/src/it/processor-type/annotation-user/src/test/java/user/SimpleTestObject.java
index a6e1bca..59d8143 100644
--- a/src/it/processor-type/annotation-user/src/test/java/user/SimpleTestObject.java
+++ b/src/it/processor-type/annotation-user/src/test/java/user/SimpleTestObject.java
@@ -18,5 +18,18 @@
*/
package user;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
@SimpleAnnotation
-public class SimpleTestObject {}
+public class SimpleTestObject {
+ /**
+ * Verifies that the {@code annotation-processor-dep} dependency is not on the class-path.
+ * That dependency should be on the annotation processor path instead.
+ */
+ @Test
+ public void ensureProcessorDependencyNotInClasspath() {
+ assertThrows(ClassNotFoundException.class, () -> Class.forName("dependency.AnnotationProcessorDependency"));
+ }
+}
diff --git a/src/it/processor-type/invoker.properties b/src/it/processor-type/invoker.properties
index a0a3964..b2489ac 100644
--- a/src/it/processor-type/invoker.properties
+++ b/src/it/processor-type/invoker.properties
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals=process-test-classes
+invoker.goals=clean test