Skip to content

Commit 8e68eec

Browse files
ctruedenclaude
andcommitted
Update to latest versions of everything
We need to get this plugin onto the newer libraries, or else it causes problems with downstream builds trying to use the enforcer plugin. Code changes to accommodate breaking API changes: * Use the new org.apache.maven.shared.transfer packages of maven-artifact-transfer 0.13.x. * Migrate PackageCycleCollector to the jgrapht 1.x API. * Remove Maven3DependencyGraphBuilder, which targeted Maven 3.0.x's Sonatype Aether, no longer present in modern Maven. And harmonize the POM with pom-scijava: * Compile against the Maven version pom-scijava manages via maven-core, plus the resolver and Sisu versions bundled with that Maven release. * Keep provided scope for artifacts supplied by the Maven runtime, so they do not leak onto downstream plugin classpaths. * Use pom-scijava's managed plexus-utils version. * Declare used dependencies; drop unused ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1004cd4 commit 8e68eec

7 files changed

Lines changed: 67 additions & 321 deletions

File tree

‎pom.xml‎

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>org.scijava</groupId>
77
<artifactId>pom-scijava</artifactId>
8-
<version>40.0.0</version>
8+
<version>45.1.0</version>
99
<relativePath />
1010
</parent>
1111

1212
<artifactId>scijava-maven-plugin</artifactId>
13-
<version>3.0.2-SNAPSHOT</version>
13+
<version>4.0.0-SNAPSHOT</version>
1414
<packaging>maven-plugin</packaging>
1515

1616
<name>SciJava plugin for Maven</name>
@@ -140,19 +140,27 @@
140140
<license.excludes>**/resources/**</license.excludes>
141141

142142
<jdepend.version>2.9.5</jdepend.version>
143-
<jgrapht.version>0.8.3</jgrapht.version>
144143

145-
<maven.version>3.0</maven.version>
146-
<maven-core.version>3.0</maven-core.version>
147-
<maven-plugin-annotations.version>3.5</maven-plugin-annotations.version>
148-
<maven-resolver-api.version>1.9.18</maven-resolver-api.version>
149-
<maven-artifact-transfer.version>0.9.1</maven-artifact-transfer.version>
150-
<maven-common-artifact-filters.version>3.0.1</maven-common-artifact-filters.version>
151-
<plexus-interpolation.version>1.24</plexus-interpolation.version>
152-
<plexus-utils.version>3.1.0</plexus-utils.version>
153-
<org.eclipse.sisu.plexus.version>0.3.0</org.eclipse.sisu.plexus.version>
154-
155-
<hamcrest.version>1.3</hamcrest.version>
144+
<!--
145+
Maven core artifacts are provided by the Maven runtime executing this
146+
plugin. Compile against the same Maven version that pom-scijava manages
147+
via maven-core, and against the versions of resolver and Sisu bundled
148+
with that Maven release, so that we do not bind to newer APIs.
149+
-->
150+
<maven.version>${maven-core.version}</maven.version>
151+
<maven-plugin-api.version>${maven.version}</maven-plugin-api.version>
152+
<maven-artifact.version>${maven.version}</maven-artifact.version>
153+
<maven-compat.version>${maven.version}</maven-compat.version>
154+
<maven-model.version>${maven.version}</maven-model.version>
155+
<maven-resolver-api.version>1.9.24</maven-resolver-api.version>
156+
<org.eclipse.sisu.plexus.version>0.9.0.M4</org.eclipse.sisu.plexus.version>
157+
<enforcer-api.version>${maven-enforcer-plugin.version}</enforcer-api.version>
158+
<maven-plugin-annotations.version>${maven-plugin-plugin.version}</maven-plugin-annotations.version>
159+
<javax.inject.version>1</javax.inject.version>
160+
<plexus-interpolation.version>1.30.0</plexus-interpolation.version>
161+
<hamcrest.version>3.0</hamcrest.version>
162+
<hamcrest-core.version>${hamcrest.version}</hamcrest-core.version>
163+
<hamcrest-library.version>${hamcrest.version}</hamcrest-library.version>
156164
</properties>
157165

158166
<dependencies>
@@ -162,27 +170,26 @@
162170
<version>${jdepend.version}</version>
163171
</dependency>
164172
<dependency>
165-
<groupId>net.sf.jgrapht</groupId>
166-
<artifactId>jgrapht</artifactId>
167-
<version>${jgrapht.version}</version>
173+
<groupId>org.jgrapht</groupId>
174+
<artifactId>jgrapht-core</artifactId>
168175
</dependency>
169176

170177
<dependency>
171178
<groupId>org.apache.maven</groupId>
172179
<artifactId>maven-plugin-api</artifactId>
173-
<version>${maven.version}</version>
180+
<version>${maven-plugin-api.version}</version>
174181
<scope>provided</scope>
175182
</dependency>
176183
<dependency>
177184
<groupId>org.apache.maven</groupId>
178185
<artifactId>maven-artifact</artifactId>
179-
<version>${maven.version}</version>
186+
<version>${maven-artifact.version}</version>
180187
<scope>provided</scope>
181188
</dependency>
182189
<dependency>
183190
<groupId>org.apache.maven</groupId>
184191
<artifactId>maven-compat</artifactId>
185-
<version>${maven.version}</version>
192+
<version>${maven-compat.version}</version>
186193
<scope>provided</scope>
187194
</dependency>
188195
<dependency>
@@ -193,26 +200,29 @@
193200
<dependency>
194201
<groupId>org.apache.maven</groupId>
195202
<artifactId>maven-model</artifactId>
196-
<version>${maven.version}</version>
203+
<version>${maven-model.version}</version>
197204
<scope>provided</scope>
198205
</dependency>
199206

200207
<dependency>
201208
<groupId>org.apache.maven.enforcer</groupId>
202209
<artifactId>enforcer-api</artifactId>
203-
<version>${maven-enforcer-plugin.version}</version>
210+
<version>${enforcer-api.version}</version>
211+
<scope>provided</scope>
204212
</dependency>
205213

206214
<dependency>
207215
<groupId>org.apache.maven.plugin-tools</groupId>
208216
<artifactId>maven-plugin-annotations</artifactId>
209217
<version>${maven-plugin-annotations.version}</version>
218+
<scope>provided</scope>
210219
</dependency>
211220

212221
<dependency>
213222
<groupId>org.apache.maven.resolver</groupId>
214223
<artifactId>maven-resolver-api</artifactId>
215224
<version>${maven-resolver-api.version}</version>
225+
<scope>provided</scope>
216226
</dependency>
217227

218228
<dependency>
@@ -232,13 +242,24 @@
232242
<dependency>
233243
<groupId>org.codehaus.plexus</groupId>
234244
<artifactId>plexus-utils</artifactId>
235-
<version>${plexus-utils.version}</version>
245+
</dependency>
246+
<dependency>
247+
<groupId>org.codehaus.plexus</groupId>
248+
<artifactId>plexus-component-annotations</artifactId>
249+
<scope>provided</scope>
236250
</dependency>
237251

238252
<dependency>
239253
<groupId>org.eclipse.sisu</groupId>
240254
<artifactId>org.eclipse.sisu.plexus</artifactId>
241255
<version>${org.eclipse.sisu.plexus.version}</version>
256+
<scope>provided</scope>
257+
</dependency>
258+
<dependency>
259+
<groupId>javax.inject</groupId>
260+
<artifactId>javax.inject</artifactId>
261+
<version>${javax.inject.version}</version>
262+
<scope>provided</scope>
242263
</dependency>
243264

244265
<dependency>
@@ -254,13 +275,13 @@
254275
<dependency>
255276
<groupId>org.hamcrest</groupId>
256277
<artifactId>hamcrest-core</artifactId>
257-
<version>${hamcrest.version}</version>
278+
<version>${hamcrest-core.version}</version>
258279
<scope>test</scope>
259280
</dependency>
260281
<dependency>
261282
<groupId>org.hamcrest</groupId>
262283
<artifactId>hamcrest-library</artifactId>
263-
<version>${hamcrest.version}</version>
284+
<version>${hamcrest-library.version}</version>
264285
<scope>test</scope>
265286
</dependency>
266287
<dependency>

‎src/main/java/org/scijava/maven/plugin/dependency/graph/internal/DefaultDependencyGraphBuilder.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
* code.
7272
*
7373
* @see Maven2DependencyGraphBuilder
74-
* @see Maven3DependencyGraphBuilder
74+
* @see Maven31DependencyGraphBuilder
7575
* @author Hervé Boutemy
7676
* @since 2.0
7777
*/
@@ -111,7 +111,7 @@ public DependencyNode buildDependencyGraph( MavenProject project, ArtifactFilter
111111
{
112112
try
113113
{
114-
String hint = isMaven31() ? "maven31" : isMaven2x() ? "maven2" : "maven3";
114+
String hint = isMaven2x() ? "maven2" : "maven31";
115115

116116
DependencyGraphBuilder effectiveGraphBuilder =
117117
(DependencyGraphBuilder) container.lookup( DependencyGraphBuilder.class.getCanonicalName(), hint );

0 commit comments

Comments
 (0)