I configured the build server to do
clean javadoc:jar deploy site-deploy
Now if site-deploy fails (because the site did not build, or somebody used the wrong parent pom), the build server shows a failed build, but the deploy was already applied.
Is there a way to "combine" deploy and site-deploy in a transactional way?
Or should I use a different chain of goals/phases (e.g. install
before site-deploy
)?
Usual Command Line Calls If you want to run the unit tests, run test . This command executes each default lifecycle phase in order ( validate , compile , package , etc.), before executing verify .
A Maven plugin is a group of goals; however, these goals aren't necessarily all bound to the same phase. As we can see, the Failsafe plugin has two main goals configured here: integration-test: run integration tests. verify: verify all integration tests passed.
As an example, a typical Maven Build Lifecycle consists of the following sequence of phases. Resource copying can be customized in this phase. Validates if the project is correct and if all necessary information is available. Source code compilation is done in this phase.
From the main menu, select Run | Edit Configurations to open the run/debug configuration for your project. In the list that opens, select Run Maven Goal. In the Select Maven Goal dialog, specify a project and a goal that you want to execute before launching the project. Click OK.
Here I am proposing a close solution with the help bash &&
operator
mvn clean javadoc:jar install site-deploy && mvn deploy:deploy-file {PARAM}
This will let you
install
phasesite-deploy
failsThe only case this will fail is when your deploy
goal fails, there will be no rollback site-deploy
. I think failure of deploy
phase will be very much rare.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With