Wednesday, May 17, 2017

Apache Maven and SOA 11g.

I know it's time to go into the Clouds with the SOA Suite Service or at least upgrade your system to the SOA suite 12c and get all the CI perks out f the box.
Yeah, it sounds great as a sales pitch but in reality, you have good old 11g production system and upgrade project (not upgrade) in the "barely foreseeable future". It doesn't matter you can't use some of the automated techniques today (men, it would be a great improvement for your resume), it does mean you will spend some extra time for the initial application configuration.
Of course, you may google right away "soa 11g maven" and get some results with a bunch of copy-pastes "how to install Maven plugin and compile ADF application".  but I'm going to tell you the whole story in several parts:

Part I:   Preparing environment.
Part II:  Configure web applications
Part III: Configure J2EE applications
Part IV: Configure SOA Composites  

I will update this page with the URLs as soon as parts will be ready. I probably will not describe how to build and deploy ADF applications with Maven. There are documentation and some really great posts around.

Some MAVEN terms

I'm not going to complete with the Community and rephrase what it is and how it works. If you have no exposure with Maven or at least ANT. I would recommend you to stop right there and check Apache Maven Introductions 30 minutes long or the brief one because my descriptions and interpretations will be not exactly canonical. So let's go through some Maven terms:
Remote Repository - Some Service (local replica or global repository) which has descriptions for all available plugins and artifacts. From the SOA world - some service which helps you to find and download missed libraries or MAVEN plugins. In the reality, it's a way more complex set of services and processes, but we will use it as a yet another package manager.
  •  Local repository  - This one is more important, because all environment changes, downloaded libraries, and MAVEN plugins will be stashed here. Th local repository allows us to install our private artifacts and libraries without commits to the global services. Normally local repository resides under $HOME/.m2/repository folder (%USERPROFILE%\,m2\repository for the Windows platforms)
  •  Plugin - The building blocks of the Maven. Any Maven activity is a chin of the plugin(-s) executions. There are 2 types build and reporting plugins, and I will use and describe only building ones. 
  • POM (pom.xml) - Project Object Model is the most important item in the list. It describes the project, project dependencies, plugins and their execution steps.It allows you to tweak default Maven behavior (and we will do it a lot). In few words - POM describes plugins and their actions, which are required to build and install projects (archetypes in the Maven terms). 
  • Lifecycle - Formal name for the goals, targets or actions (pick your one you like). Instruction for Maven to perform some set of actions. For example, when you request clean - maven cleans all the target folders and prepares the project for the further actions. Next activity - compile will clean and compile your project. Next one build cleans, compiles and assembles your project into the package. Like I  said before, in reality, it's the heck of the simplification, but it's all we need to know to use maven with JDeveloper 11g. 

No comments: