gnodet opened a new pull request, #635:
URL: https://github.com/apache/maven-war-plugin/pull/635

   ## Summary
   
   Migrate maven-war-plugin from Maven 3.x API to Maven 4.x native plugin API, 
following the same pattern used by maven-jar-plugin, maven-resources-plugin, 
and maven-compiler-plugin.
   
   ### Key changes
   
   - **pom.xml**: Switched to Maven 4 API dependencies, maven-archiver 
4.0.0-beta-5, maven-filtering 4.0.0-beta-1, plugin tools 4.0.0-beta-1. Removed 
maven-mapping 3.0.0 (replaced with local implementation). Java baseline raised 
to 17.
   - **Mojo classes**: `extends AbstractMojo` → `implements Mojo`, `@Inject` 
field injection, simplified `@Mojo` annotations, unified `MojoException`
   - **DI annotations**: `org.apache.maven.plugins.annotations.*` → 
`org.apache.maven.api.di.Inject` + `org.apache.maven.api.plugin.annotations.*`
   - **Project/Session API**: `MavenProject` → `Project`, `MavenSession` → 
`Session`, `MavenProjectHelper` → `ProjectManager`
   - **Artifact API**: `o.a.m.artifact.Artifact` → 
`o.a.m.api.Artifact`/`DownloadedArtifact`, `getFile()` → `getPath()`
   - **Archive/Filtering**: `o.a.m.archiver` → `o.a.m.shared.archiver`, 
`Resource` from maven-filtering
   - **Dependency resolution**: `project.getCompileClasspathElements()` → 
`session.resolveDependencies(project, PathScope.MAIN_COMPILE)`
   - **Test infrastructure**: All test stubs migrated from Maven 3 types to 
Maven 4 API types
   
   ### Reference plugins
   
   - [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) (master, 
4.0.0-beta-2-SNAPSHOT)
   - [maven-resources-plugin](https://github.com/apache/maven-resources-plugin) 
(master, 4.0.0-beta-2-SNAPSHOT)
   - [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) 
(master)
   
   ### Build verification
   
   `mvn clean install -B` passes with **64 unit tests, 0 failures**. 
Integration tests (src/it/) were **not modified**.
   
   ## Test plan
   
   - [x] `mvn clean install -B` passes (compilation + 64 unit tests)
   - [ ] Integration tests pass via `mvn verify -Prun-its` (requires Maven 4 
runtime)
   - [ ] Manual verification of WAR packaging with a sample project
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to