WW-5462 Move org.apache.struts2.mock package out of the published struts2-core jar#1809
Closed
lukaszlenart wants to merge 6 commits into
Closed
WW-5462 Move org.apache.struts2.mock package out of the published struts2-core jar#1809lukaszlenart wants to merge 6 commits into
lukaszlenart wants to merge 6 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d MockContainer BREAKING CHANGE: org.apache.struts2.mock is no longer part of the published struts2-core jar. Downstream tests should use struts2-junit-plugin, Mockito, or a local copy of the needed mock.
|
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes WW-5462
Removes the test-only
org.apache.struts2.mockpackage from the publishedstruts2-corejar.Changes
core/pom.xml: attaches a filteredtest-jarcontaining onlyorg/apache/struts2/mock/**(with<archive combine.self="override"/>so it gets a default manifest instead of the main jar's OSGi manifest)<type>test-jar</type>test-scope dependencyMockContainer: deleted — zero references anywhere in the codebaseMockActionInvocation,MockActionProxy,MockInterceptor,MockObjectTypeDeterminer,MockResult): moved as pure renames fromcore/src/main/javatocore/src/test/java— package unchanged, so no import edits anywhereDummyTextProviderNotes
struts2-junit-plugin, Mockito, or copy the needed class. Release notes need a migration note. The attached-tests.jaris internal build plumbing, not supported API (deliberately not in the bom).mvn test), Maven resolves the test-jar dep to core'starget/test-classesdirectory (filter applies only at packaging); verified green in both modes. CI'smvn verifyexercises the packaged/filtered path.docs/superpowers/.Verification
mvn test -DskipAssembly: core 2997 + plugins (spring 61, junit 12, jasperreports 9, jasperreports7 12, json 163, rest 118, xslt 17) — all greenmvn clean install -Pjakartaee11 -DskipAssembly: greenstruts2-core-*-tests.jarcontains only the 8 mock classes, default manifest; main jar no longer contains the package🤖 Generated with Claude Code