Learning Helianto: deploy to Cloud Foundry

It is easy to deploy your application by adding a Cloud Foundry profile to any Helianto’s project pom.xml, indeed, anywhere you use maven. Here is one example:

						<!-- Add services you want to create and bind here <service> <name>mycloudant</name> 
							<label>cloudantNoSQLDB</label> <plan>Shared</plan> </service> -->
						<!-- Set any environment variables <myvar>myvalue</myvar> -->

Of course, you are required to find an appropriate place inside your existing pom.xml file and substitute YOUR_SERVER, YOUR_APP, YOUR_ORG and YOUR_SPACE accordingly, as well as the instance, memory and services parameters. The latter can be adjusted and bound using the vendor’s Cloud Foundry user interface.

You will also need some additions to your settings.xml file:


Please, remember that the settings.xml file is located outside the project root dir to protect your credentials (check ${user-dir}/.m2/settings.xml).

To deploy, from a terminal in the the project root dir, simply run:

$ mvn clean -P yourPaaS cf:push

1 thought on “Learning Helianto: deploy to Cloud Foundry”

  • I met a similar prlobem here. If my test class name is ****Tests.java it doesn’t work in Maven+Junit4 but works in eclipse+Junit4; I tested in maven2+junit4, I must use such convention:****Test.java, No s added. So I must rename all my test classes to such name convention. It took me many hours to get the point. I thought I’m so stupid.

Leave a Reply

Your email address will not be published. Required fields are marked *