Reputation: 7317
I have some manual tests that needs some helper classes to be included in the WAR generated by Maven. To prevent them from leaking to production, I want to find a way to guarantee they are excluded from the release artifacts.
I already have them in a profile, but there's nothing to prevent anyone from including this profile by mistake when doing a release build.
Upvotes: 2
Views: 35
Reputation: 75426
I expect you are not in a scenario where EAR files are possible. I would therefore suggest:
If you have full control of the web servers in question you may also add the test specific classes to the classes provided by the webserver to the application so that on the test web server you have the classes globally defined, and for the production web server they are not present.
Upvotes: 2