Adding an ADF Human Task User Interface to our SOA Maven build

With the new Maven support in 12c, it is much simpler now to include our ADF projects in our SOA Application build.  Continuing on from this earlier post, we will now add the ADF project.

You can do this by opening the Human Task (from the composite view) and clicking on Form and Auto-Generate Task Form.

image

Then in the popup Create Project dialog box, give the project a name, I used HTUI1, and click on OK.  It will take a few minutes to generate the project.  When it is done, do a Save All for good measure.

Now if you want to take a look, you will see that you have three POM files – one for the SOA Project (composite), one for the ADF project, and also your application level POM.  If you open the application level POM (that’s the one under Application Resources/Build Files, you will see that is is a multi-modules project that lists the other two, as you can see in the image below.  It also has some configuration to tell Maven where to find ojdeploy.  In this release, we still need to run ojdeploy to build and package the ADF projects, so you do need to have JDeveloper available to your build server if you want to build ADF projects there.

image

ojdeploy also expects the have oracleHome set, but to a different value, so let’s go update our SOA project POM to set the oracleHome it expects there:

<oracleHome>c:/bpm1213/soa</oracleHome>

Now we can run our build from the command line or JDeveloper, for example to compile and package the composite and the ADF application, we can say something like this:

mvn package -DoracleHome=c:\bpm1213

Now let’s take that one step further and deploy the ADF application too.  You may recall that each ADF HT UI project is built into a WAR and these are then assembled into an EAR file, so it is this EAR file we want to deploy.  We can tell Maven to use the WebLogic Maven Plugin to deploy the EAR by adding a plugin entry to the build section of the SOA Application POM.  Make sure you put it in the Application level POM!   Here is what you need to add:


<plugin>
  <groupId>com.oracle.weblogic</groupId>
  <artifactId>weblogic-maven-plugin</artifactId>
  <version>12.1.3-0-0</version>
  <executions>
    <execution>
      <goals>
        <goal>deploy</goal>
      </goals>
      <phase>pre-integration-test</phase>
      <configuration>
        <adminurl>t3://my.server:7001</adminurl>
        <user>weblogic</user>
        <password>welcome1</password>
        <source>${project.basedir}/deploy/HTUI1.ear</source>
        <verbose>true</verbose>
        <name>${project.build.finalName}</name>
        <targets>soa_server1</targets>
      </configuration>
    </execution>
  </executions>
</plugin> 

Now we can use a command like this to deploy everything to our servers:

mvn pre-integration-test -DoracleHome=c:\bpm1213

Enjoy!

About Mark Nelson

Mark Nelson is a Developer Evangelist at Oracle, focusing on microservices and messaging. Before this role, Mark was an Architect in the Enterprise Cloud-Native Java Team, the Verrazzano Enterprise Container Platform project, worked on Wercker, WebLogic and was a senior member of the A-Team since 2010, and worked in Sales Consulting at Oracle since 2006 and various roles at IBM since 1994.
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s