Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_hirsch
Active Contributor

My goal was to use maven to deploy an existing application to NetWeaver Cloud.  SAP Research recently released a maven plug-in (on github!) that allows operational tasks for SAP NetWeaver Cloud to be performed via command line / maven. This functionality was created primarily to be used in conjunction with the Spring Roo Add-On.

I was interested in deploying a stink normal war file to NetWeaver Cloud via maven.  This sort of task might be performed by individuals interested in migrating existing applications to the NetWeaver Cloud.  The application I selected was pretty basic. It wasn’t even created via maven. It was just a war file.

Steps

  • I took the pom.xml and nwcloud.properties from an existing Spring Roo project that I had previously used to create an application for NetWeaver Cloud.  I copied both files into a new folder. I know I was lazy – the pom.xml contains a bunch of Roo / Spring Source specific code.  If you want to use an existing pom.xml and haven’t set up the nwcloud.properties file, there is a good description how to do this on the github page.
  • In the pom.xml file, I changed the following fields to my application name

<artifactId>aji</artifactId>

<packaging>war</packaging>

<version>0.1.0.BUILD-SNAPSHOT</version>

<name>aji</name>

If I didn't reuse the pom.xml from the Spring Roo integration, then I wouldn’t have had to make these changes.

  • I created a new folder called target and copied the war file that I wanted to deploy to this folder
  • I changed the name of the war file to aji-0.1.0.BUILD-SNAPSHOT.war. If my pom.xml had already existed, then I wouldn’t have to make this change.
  • I called “mvn nwcloud:deploy nwcloud:start”
  • My application was deployed.

This was a relatively simple application that didn’t use a database, authentication, etc. If the application had additional functionality, the migration would have probably been more complicated.

2 Comments
Labels in this area