O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overriding the default Maven build command

OpenShift, by default, will execute the mvn -e clean package -Popenshift -DskipTests command to build the project. If you don't want to use the OpenShift Maven profile or want to run tests, then you have to tell OpenShift to run a different command. In this recipe, you will learn how you can tell OpenShift to use a different command.

Getting ready

To complete this recipe, you will need the jobstore application created in the Creating and deploying Java EE 6 applications using the JBoss EAP and PostgreSQL 9.2 cartridges recipe. Please refer to this recipe if you don't have a running OpenShift application.

How to do it…

Perform the following steps to override the default Maven build command:

  1. Open a new command-line ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required