This is an automated email from the ASF dual-hosted git repository.

ascheman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jdeprscan-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 2c02c9b  Pin list-* ITs to the reactor plugin version
2c02c9b is described below

commit 2c02c9be8df6e54893d8a7cdf0831d7980532230
Author: Gerd Aschemann <[email protected]>
AuthorDate: Fri Jul 3 18:02:32 2026 +0200

    Pin list-* ITs to the reactor plugin version
    
    The list-default and list-forremoval ITs invoke the plugin's list goal
    by coordinates without a version, from a project with no pom.xml. Maven
    therefore runs the goal in standalone-pom mode and resolves the latest
    released plugin (3.0.0) instead of the reactor build, so the ITs never
    exercise the code under test.
    
    Add a minimal pom.xml to each IT declaring the plugin version as
    @project.version@ (interpolated by the invoker, as the scan ITs already
    do) and invoke the goal via the jdeprscan:list prefix, so the pinned
    version is used.
    
    Surfaced in #74 (Maven 4 enablement), where Matthias Bünger and Slawomir
    Jaranowski diagnosed the accompanying list-goal NPE as a core issue
    (fixed by apache/maven#12336); the version mis-targeting fixed here is
    orthogonal to that.
---
 src/it/projects/list-default/invoker.properties    |  2 +-
 src/it/projects/list-default/pom.xml               | 43 ++++++++++++++++++++++
 src/it/projects/list-forremoval/invoker.properties |  2 +-
 src/it/projects/list-forremoval/pom.xml            | 43 ++++++++++++++++++++++
 4 files changed, 88 insertions(+), 2 deletions(-)

diff --git a/src/it/projects/list-default/invoker.properties 
b/src/it/projects/list-default/invoker.properties
index 27b10b0..ea926f5 100644
--- a/src/it/projects/list-default/invoker.properties
+++ b/src/it/projects/list-default/invoker.properties
@@ -14,4 +14,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-invoker.goals = org.apache.maven.plugins:maven-jdeprscan-plugin:list
\ No newline at end of file
+invoker.goals = jdeprscan:list
\ No newline at end of file
diff --git a/src/it/projects/list-default/pom.xml 
b/src/it/projects/list-default/pom.xml
new file mode 100644
index 0000000..602824f
--- /dev/null
+++ b/src/it/projects/list-default/pom.xml
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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>org.apache.maven.plugins.jdeprscan.its</groupId>
+  <artifactId>list-default</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+
+  <!-- Pin the plugin to the reactor build so the IT exercises the version
+       under test instead of the latest released plugin (default resolution
+       for a version-less goal invocation). -->
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jdeprscan-plugin</artifactId>
+          <version>@project.version@</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git a/src/it/projects/list-forremoval/invoker.properties 
b/src/it/projects/list-forremoval/invoker.properties
index 27b10b0..ea926f5 100644
--- a/src/it/projects/list-forremoval/invoker.properties
+++ b/src/it/projects/list-forremoval/invoker.properties
@@ -14,4 +14,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-invoker.goals = org.apache.maven.plugins:maven-jdeprscan-plugin:list
\ No newline at end of file
+invoker.goals = jdeprscan:list
\ No newline at end of file
diff --git a/src/it/projects/list-forremoval/pom.xml 
b/src/it/projects/list-forremoval/pom.xml
new file mode 100644
index 0000000..a5516be
--- /dev/null
+++ b/src/it/projects/list-forremoval/pom.xml
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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>org.apache.maven.plugins.jdeprscan.its</groupId>
+  <artifactId>list-forremoval</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+
+  <!-- Pin the plugin to the reactor build so the IT exercises the version
+       under test instead of the latest released plugin (default resolution
+       for a version-less goal invocation). -->
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jdeprscan-plugin</artifactId>
+          <version>@project.version@</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>

Reply via email to