You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/08/04 11:59:12 UTC
[PR] Build against Maven 4.0.0-rc-6 [maven-source-plugin]
slachiewicz opened a new pull request, #315:
URL: https://github.com/apache/maven-source-plugin/pull/315
This plugin was still on `4.0.0-beta-3`, the furthest behind of the 4-native plugins, and it is a migration rather than a version bump.
**Dependencies.** `maven-api-meta` and `maven-api-impl` no longer exist; they become `maven-api-annotations` and `org.apache.maven:maven-testing` respectively, matching what maven-jar-plugin already does. `maven-archiver` moved to `org.apache.maven.shared`.
**Source roots.** `ProjectManager.getCompileSourceRoots(project, scope)` and `getResources(project, scope)` are gone; resources and source roots are unified into `SourceRoot`:
| before | after |
|---|---|
| `getCompileSourceRoots(p, MAIN)` | `getEnabledSourceRoots(p, MAIN, Language.JAVA_FAMILY).map(SourceRoot::directory)` |
| `getResources(p, MAIN)` | `getEnabledSourceRoots(p, MAIN, Language.RESOURCES)` |
| `Resource.getDirectory()` | `SourceRoot.directory()` |
| `Resource.getIncludes()` / `getExcludes()` | `SourceRoot.includes()` / `excludes()` |
| `Resource.getTargetPath()` | `SourceRoot.targetPath()` |
| `session.createArtifact(...)` | `session.createProducedArtifact(...)` |
`attachArtifact` now takes a `ProducedArtifact`. The `maven-shared-archive-resources` special case moves onto the same `SourceRoot` stream. Include/exclude and target-path handling are preserved, so which files land in the sources jar should not change.
**site.xml.** The `<skin>` workaround is removed — its own comment said it was only needed on beta-3 and is redundant from rc-5 onwards.
**Verification.** `mvn test`: 10 tests, 0 failures. `mvn verify -Prun-its`: 16 ITs pass, `MSOURCES-140` fails.
That one failure is **not** introduced here — checking out unmodified `master` and running the same IT under the same Maven fails identically. Two separate things are wrong with it:
1. Its assertion cannot ever match. `verify.groovy:22` is a Groovy slashy-string regex containing the literal text `" + File.separator + "` — Java string concatenation written inside a regex literal.
2. Even with that corrected, it still fails: the expected `already attached ... ignoring same re-attach` line is absent from the build log entirely, so the re-attach path is not being reached.
I have the regex correction ready but have not opened it, since on its own it does not turn the IT green and the second point wants a maintainer's eye. Happy to send it if useful.
Part of apache/maven#12676.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Build against Maven 4.0.0-rc-6 [maven-source-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick commented on PR #315:
URL: https://github.com/apache/maven-source-plugin/pull/315#issuecomment-5180007362
@slachiewicz for this case a PR is already opened (see #268 )
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Build against Maven 4.0.0-rc-6 [maven-source-plugin]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on PR #315:
URL: https://github.com/apache/maven-source-plugin/pull/315#issuecomment-5181025215
Closing in favour of #268, which I had not spotted — it is the same upgrade, opened in January and refreshed today, and it should have precedence.
For the record, the two overlap almost entirely: `mavenVersion` to rc-6, `maven-api-meta` → `maven-api-annotations`, `maven-archiver` moving to `org.apache.maven.shared`, the `ProjectManager`/`SourceRoot` migration, the workflow pin, and the `MSOURCES-140` assertion. #268 also bumps the parent POM 47 → 49 and the plugin-plugin / plugin-testing versions, which mine did not.
Two small things here are not in #268, if they are wanted:
1. `src/site/site.xml` still carries a `<skin>` workaround whose own comment says it is only needed on beta-3 and is redundant from rc-5 onwards. Removing it is a clean follow-up now that the build is on rc-6.
2. `AbstractSourcePluginTestCase` still imports `org.apache.maven.api.plugin.testing.MojoExtension.getBasedir`. That compiles, because the deprecated shims are still there, but `MojoExtension` in rc-6 only honours the relocated annotations — see apache/maven#12678, where the same thing silently broke maven-jar-plugin. Worth moving to `org.apache.maven.testing.plugin` while touching these files.
Happy to send either as a separate PR against master once #268 lands.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Build against Maven 4.0.0-rc-6 [maven-source-plugin]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz closed pull request #315: Build against Maven 4.0.0-rc-6
URL: https://github.com/apache/maven-source-plugin/pull/315
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org