TestSourceJarMojo forks to generate-sources instead of generate-test-sources
@elharo is already working on this.
Since Aug 5, 2026.
Assessment
This issue has not been assessed yet.
Description
TestSourceJarMojo.java:28 has @Execute(phase = "generate-sources"):
@Mojo(name = "test-jar", defaultPhase = "package")
@Execute(phase = "generate-sources")
public class TestSourceJarMojo extends TestSourceJarNoForkMojo {
This is a test-jar goal but forks only to generate-sources, not generate-test-sources. If test sources are generated by another plugin in the generate-test-sources phase, they will not be available when the mojo runs, leading to an empty or incomplete test sources JAR.
Compare with TestSourceGeneratedJarMojo.java:28 which correctly uses generate-test-sources:
@Mojo(name = "generated-test-jar", defaultPhase = "package")
@Execute(phase = "generate-test-sources")
public class TestSourceGeneratedJarMojo extends TestSourceJarNoForkMojo {
Fix: Change the phase to generate-test-sources.
- Dominant language
- Java
- Stars
- 37
- Forks
- 38
- Avg merge
- 12h 11m
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-source-plugin
-
bug priority:minor
Difficulty 1/5 Under an hour Newbie friendliness 85/100
apache/maven-source-plugin#306 · 3 comments ·
-
Fix Jenkins build Openbug priority:critical
Difficulty 3/5 1-2 days Newbie friendliness 48/100
apache/maven-source-plugin#311 · 1 comment ·
-
bug priority:blocker
Difficulty 4/5 3-5 days Newbie friendliness 25/100
apache/maven-source-plugin#261 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
apache/maven-source-plugin#244 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/maven-source-plugin#239 ·
All issues in apache/maven-source-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·