While attending Steve Muench session on OOW'09 I learned about Oracle Fusion Applications Teams' Best Practices. One of the things I was very interested - ojdeploy utility usage in automatic builds. In our project, we are building and maintaining custom Ant scripts to generate EAR file and to deploy it to WLS. However, it creates a lot of extra work, especially while migrating from one Oracle ADF release to another. Some customers are considering to use Maven Integration in JDeveloper 11g R1 PS1 (see article) for integration builds. But, while designing your integration build architecture, you should not forget about powerful ojdeploy utility offered by Oracle and shipped together with JDeveloper 11g. From my point of view, main strengths of ojdeploy are the following:
- You can build deployment package directly from command line, same as it would be build using JDeveloper 11g wizards
- Oracle ADF library references are resolved automatically, this means you dont need to maintain complex Ant scripts
For today post I have decided to use application from my previous post - Integration in Oracle ADF with ADF Task Flows and Shared Java Classes. I have created ojdeploy script for this application, you can download complete sample - ADFIntegration5.zip. More info about ojdeploy utility you can find from Steve Muench blog post.
Sample application is based on 3 applications, one of them is main application. First are build two dependent applications and then EAR file is produced based on main application. In the script you need to point to appropriate deployment profiles to be invoked for each application:
Invoke ojdeploy utility from command line (ojdeploy -buildfile ojdeploy-build.xml) and all three applications will be compiled and packaged automatically:
EAR and WAR files are generated for main application, along with ADF Library JAR files for dependent applications:
In order to build and integrate my application, I have defined following deployment profiles:
ADF Library JAR deployment for first dependent application.
ADF Library JAR deployment for second dependent application.
WAR deployment profile for main application.
EAR deployment profile for main application.
11 comments:
Seems ojdeploy does not (yet) support packaging of SOA composites out of the box. Running ojdeploy for SOA composite results in an error. Not really a problem since deployment can already be performed using a variety of ways such as Ant, WLST, JDeveloper (including bundles), and EM Fusion Middleware Console. Still, I'm curious to see if it works. Probably more people :-)
Yes, I tested myself with SOA project - and it gives invocation errors.
Regards,
Andrejus
Any tool that makes it easier for development teams to run automated builds is good news!
One problem I have with ojdeploy though: I now need to run a full 1GB IDE installation just to run a build. One of the central goals of an automated build is independence (a build-anywhere mentality). Prerequisites should be kept to a minimum, so requiring a full JDeveloper install is a big downside to ojdeploy.
Are there any plans to produce a much smaller 'ojdeploy only' type installation that can be used on a build server?
Automated building option in ADF! That's a great news. This will facilitate the introduction of continuous building procedures on Fusion projects.
Thanks Andrejus!
I am using Jdev11g R2 when i deploy ear from jdev wizard, its creating MANIFEST.MF file with default entry WeblogicApplication Version 2.0, I don't want this entry to be there in the ear. Can you please suggest where do i need to do some settings in Jdev?
thanks
Andrejus,
Does the ojdeploy tool create task-flow-registry? In my case it doesn't seem to. Without that, ofcourse, any task flow packaged into an ADF Lib is useless
Hi,
Yes it creates it, you can see in my sample app - task flows are packaged with ojdepoy and it works...
Andrejus
hi andrejus,
I am testing your sample app. please let me know the user name & password
Regards !
Sameera
You can set your own user in jazn-data.xml
Andrejus
Hi Andrejus,
I was able to write a build script for our project using this article's help. My next step is to introduce a continuous integration process to the project. Do you have any suggestions? How about Hudson. Can you recommend any articles to get some help from?
Regards !
Sameera
May be Oracle tutorial will help: http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_98/jdtut_11r2_98_1.html
Andrejus
Post a Comment