Maven: How to clean integration-test configurations
In our maven project, we have integration test that sets all sorts of things on the integration test server.
I want to be be able to easily clean this things in a command. I want to be able to run:
And this will clean all the things on the server, by running some cleaning mojos from my maven plugin.
How should this be done?
These are the commands in order to perform a complete integration test:
Step 1: mvn deploy
Step 2: mvn integration-test
Finally do a complete clean install in order to update the changes.
Step 3: mvn clean install
You could refer this for the exact life cycle of the build.
You must be having the integration profile defined in settings.xml.
<settings> ... <activeProfiles> <activeProfile>integrationProfile</activeProfile> </activeProfiles> ... </settings>
Assuming the integration profile is active ,
mvn clean install -P integrationProfile
should work for you.