How to fix Maven build problems in Oracle Service Bus 12c by Dalibor Blazevic

clip_image002

Introduction

To many old fashion JDeveloper developers using Maven is a new and obscure thing as JDeveloper has his own build system and does not require ANT or Maven as a build or deployment tool. However if it goes to continuous integration with many small integration automatic builds done daily than using ANT or Maven is inevitable, of which Maven is newer and more popular. Unfortunately for SOA/OSB 12c developers, other popular IDEs, like NetBeans, Eclipse or IntelliJ have much better Maven support than JDeveloper. Still relaying on his old build and deploy system, and using somewhat hybrid approach on integrating Maven, JDeveloper has a lot of issues when it comes to creating new Maven based projects and build them. Moreover Maven problem does not ends with JDeveloper when it comes to proper working of Maven with OSB architecture but it spans whole Middleware architecture.

Typical continuous integration lifecycle is composed of several phases like: 1. Merging source code files from different source control branches (typically one or more branch for each developer) into one integration branch, 2. Deploying merged and consolidated integration branch back to the source control system, 3. Executing Hudson/Jenkins build job that has been triggered by post to version control system in integration branch 4. Jenkins plugin executes Maven command line to do: compiling, testing, packaging, and deploying of different projects belonging to the same application.

Therefore we can see that for continuous integration lifecycle to work properly it is not enough to be sure that Maven works from JDeveloper but also from the command line to be able to port our build environment to dedicated integration machine.

In this article I will try to explain Maven setup and necessary workarounds in order to enable proper functionality of Maven in both JDeveloper and command line environment within our SOA/OSB 12c Middleware installation.

Fixing JDeveloper Maven integration problems

When wi install our OSB 12c development environment JDeveloper is included in installation. When we open JDeveloper upon installation and we create our first OSB Application/Project we will see that maven build file (pom.xml) is already included in project. We can get wrong impression that Maven support is here and is working correctly. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Create a SOA Application in JDeveloper 12c Using Maven SOA Plug-In by Daniel Rodriguez

 

clip_image002Maven is a commonly used build system for java projects. It provide benefits ranging from standardizing project layouts, to automated dependency fetching, to automated builds and Maven.  Oracle provides a pretty comprehensive document outlining how to build and create Oracle SOA and BPM projects using Maven. See this article that documents some simple steps to get up and running using Maven. However, when running my first Maven project I encountered some unexpected errors. Maven could not find any SOA archetypes and was also unable to load every dependency. As I found, being able to create, build, and deploy SOA and BPM projects using Maven requires some initial pre-work. Once the set-up is done, the Oracle doc mentioned above will make more sense and will execute successfully.

Why Maven in SOA Applications?

Unlike Ant, Maven does not require developers to specify every command to achieve a goal. Moreover, Maven’s structure in the form of a POM file allows dependencies to be managed easily. However, the biggest benefit is that Maven in JDeveloper provides complete a life-cycle process. Each goal incorporates the previous one and adds functionality. For example, if we run the mvn test command, it will execute the compile, package and deploy commands before running each test on the composite. The idea is to provide a foundation for continuous development and integration. A single command can compile, package, deploy and run all test cases: saving you time.

Gradle provides much of the same functionality of Maven but on a different format. It is implemented using Groovy and, as a result, some of its scripts are much shorter than Maven’s. Unfortunately, Gradle is not native to JDeveloper at this moment.

Maven Goals

Documentation lists five goals for the SOA Maven Plug-in. However, The plug-in itself lists six goals.

  1. compile: Compiles the Application
  2. package: Creates a SAR file of the composite
  3. deploy: Deploys the SOA composite
  4. test: Runs all test created for the SOA composite
  5. undeploy: Removes the composite
  6. help: Provides a list of goals and their corresponding commands.

The help goal is the only goal not listed in the actual Oracle document but displayed on the plug-in itself. While the “help” command may not be a “Goal”, It provides useful information regarding goals, commands, and what each command tries to achieve. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

SOA 12c – Using Maven for SOA Projects deployment by Silva

 

clip_image002In this post, we will see creation of SOA application/projects using the maven archetypes. And we will use local Maven Repository for the demonstration.

Navigate to %MW_HOME%\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3 and use following commands to sync your local repository:

mvn install:install-file -Dfile=oracle-maven-sync-12.1.3.jar -DpomFile=oracle-maven-sync-12.1.3.pom

mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=%MW_HOME%

Update your archetype catalog using:

mvn archetype:crawl -Dcatalog=C:\Users\<<uname>>\.m2\archetype-catalog.xml

Generate SOA Application and project as shown below. This generates SOA application test-soa-application with  project test-soa-project.

mvn archetype:generate -DarchetypeGroupId=com.oracle.soa.archetype -DarchetypeArtifactId=oracle-soa-application -DarchetypeVersion=12.1.3-0-0 -DgroupId=org.my.test -DartifactId=test-soa-application -DprojectName=test-soa-project -Dversion=1.0-SNAPSHOT

Import this maven project in JDeveloper using File –> Import and select the Maven Project option as shown below. Click OK.

Give your application directory as Root Directory which brings up all POMs and select other options as shown below. Click OK. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Maven Repository – Index now available – more to come by Mark Nelson

 

clip_image002I am happy to announce that we now have an index available for the Oracle Maven Repository.  This is a standard Maven index, built with the Maven Core Indexer code (donated by Sonatype to Maven – thanks!) and is available at https://maven.oracle.com/.index/nexus-maven-repository-index.properties and https://maven.oracle.com/.index/nexus-maven-repository-index.gz.

The easiest way to view it is to use an IDE like NetBeans, as shown below:

We are actively working with Maven Repository Manager and IDE teams to make this work for you across a variety of common tools you may use. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Fusion Middleware 12c – Embracing the power of Maven by Roger Goossens

 

clip_image002I recently started to build a small project in JDeveloper 12c to learn how to make use of Custom Activities in an Adaptive Case Management project. The results of this  project will be posted in my next blog. When I started the project, I wanted to do it the Maven way (since JDeveloper 12c has built-in Maven support).

Being able to deploy a case as a Maven artefact requires a little initial setup. The bulk of the initial setup can also be found in a blogpost referenced in this Whiteblog from colleague Dirk Janssen. I decided that the complete setup justified a blogpost on its own. So in this post I’ll demonstrate how to deploy the (skeleton of the) case application via Maven. In the next blogpost I’ll enhance the case application with custom case activities.

Creating the application

First things first, let’s create a new BPM application CustomActivitiesDemo and add a project called CaseWithCustomActivities to the application. Choose Composite With Case Management as the project type. After you’ve created the project, you get 2 POM files for free. One aggregate POM file for the application and the POM file for the case project. Per default the groupId equals the application name (CustomActivitiesDemo). I don’t like that, so let’s change the groupId into something more structural, like nl.whitehorses.acm.

If you take a look at the generated project POM file you’ll see that it has a reference to a parent pom com.oracle.soa:sar-common. As you can see in the picture below, the curly lines indicate that the parent POM can’t be found right now. So let’s fix that, by adding the necessary artefacts to our Maven repository. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Demonstration of SOA 12c Maven support by Mark Nelson

 

Mark Nelson’s video covers the Oracle Maven Syncronization Plug-in, the SOA 12.1.3 Maven Archetype, the Maven Import Wizard, Oracle SOA Maven Plug-in, and more. Watch the video here.

clip_image002

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

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

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.
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. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Getting to know Maven by Mark Nelson

I have a number of posts that talk about using Maven to automate builds for Fusion Middleware projects.  I know that there are some people who have not used Maven before, or maybe only a little.  So I wanted to post a few short videos that explain the basic concepts and give a real example.

Here is the first installment – Basic Maven – you might want to watch fullscreen.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki Mix Forum