[REQ] [JAVA] maven plugin generates test in generated-test-sources
Created by: feech
Is your feature request related to a problem? Please describe.
Maven uses two different folders generated-sources and generated-test-sources. Test related files supose to get into generated-test-source folder. In current implementation all generated files in a single forlder - ${project.build.directory}/generated-sources/openapi by default.
there are problems with the approach:
- test files go to production artifact
- production artifact becomes dependencies (it increses dangerous in the light of recent vulnerability in logging library - the more non essential libraries in prod the likely to catch new vulnerability)
I suspect that majority of java developers just disable generating the test files
I wonder if it it possible to make mvn plugin alligned with conventional folder-structure
Describe the solution you'd like
The solution is to introduce additional parameter testOutput which is ${project.build.directory}/generated-test-sources/openapi by default.
Describe alternatives you've considered
there are several workarounds:
- copy test files after generation with another maven plugin
- use org.codehouse.mojo:build-helper-maven-plugin to mark the folder with test files as mvn-test-source
both of these ways have different flaws