lukaszlenart opened a new pull request, #1809:
URL: https://github.com/apache/struts/pull/1809

   Fixes [WW-5462](https://issues.apache.org/jira/browse/WW-5462)
   
   Removes the test-only `org.apache.struts2.mock` package from the published 
`struts2-core` jar.
   
   ## Changes
   
   - **`core/pom.xml`**: attaches a filtered `test-jar` containing only 
`org/apache/struts2/mock/**` (with `<archive combine.self="override"/>` so it 
gets a default manifest instead of the main jar's OSGi manifest)
   - **Six plugin poms** (json, rest, spring, xslt, jasperreports, 
jasperreports7): consume the test-jar as a `<type>test-jar</type>` test-scope 
dependency
   - **`MockContainer`**: deleted — zero references anywhere in the codebase
   - **5 mock classes** (`MockActionInvocation`, `MockActionProxy`, 
`MockInterceptor`, `MockObjectTypeDeterminer`, `MockResult`): moved as pure 
renames from `core/src/main/java` to `core/src/test/java` — package unchanged, 
so no import edits anywhere
   - **spring plugin**: dropped its byte-identical local copy of 
`DummyTextProvider`
   
   ## Notes
   
   - **Breaking change (7.3.0)**: downstream projects using these mocks in 
their own tests must switch to `struts2-junit-plugin`, Mockito, or copy the 
needed class. Release notes need a migration note. The attached `-tests.jar` is 
internal build plumbing, not supported API (deliberately not in the bom).
   - Dev-build caveat: in unpackaged reactor runs (`mvn test`), Maven resolves 
the test-jar dep to core's `target/test-classes` directory (filter applies only 
at packaging); verified green in both modes. CI's `mvn verify` exercises the 
packaged/filtered path.
   - Design/plan docs included under `docs/superpowers/`.
   
   ## Verification
   
   - Full reactor `mvn test -DskipAssembly`: core 2997 + plugins (spring 61, 
junit 12, jasperreports 9, jasperreports7 12, json 163, rest 118, xslt 17) — 
all green
   - `mvn clean install -Pjakartaee11 -DskipAssembly`: green
   - `struts2-core-*-tests.jar` contains only the 8 mock classes, default 
manifest; main jar no longer contains the package
   
   🤖 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