12c Maven support

377 views
Skip to first unread message

Chris Muir

unread,
Jul 12, 2013, 3:13:29 AM7/12/13
to adf-met...@googlegroups.com
I'm guessing most ADF EMG members are off playing with 12c as we speak, probably reading EMG posts is not high on the agenda at the moment.

However I just wanted to forward on a link that's relevant to a lot of discussions on the ADF EMG in the past.  Within the FMW 12c space Apache Maven is now a first class citizen, considerable effort has been put in place to make it a key tool across the stack.  Personally I'm not a Maven expert or advocate (a tool is a tool is a tool), but I am interested in it from an academic point in conveying the pros and cons of its use.  What I am particularly interested in is how far customers such as yourself take the new Maven integration in context of ADF applications, and, what limitations or workarounds you need to put in place. For the bloggers amongst you, this would be a very productive area to post about imho.

It's obviously early days and there's lots of new features to explore, but for the senior EMG community members who are interested in application build & deploy mechanisms, I suggest you check out the ATeam's Mark Nelson's (yep, yet another Aussie) overall FMW arching post on Maven support in 12c: 

...and then work your way into the in's and out's for ADF.  Ignoring bugs which are best posted on the OTN forums or via Oracle Support, any limitations, questions on best practices, things you like or don't like (preferably like - hint hint) would be good to share with the wider ADF community to benefit everyone.

This is why the EMG was setup after all. 

Enjoy your weekend, and regards,

Chris Muir
Oracle ADF Product Management

Edwin Biemond

unread,
Jul 21, 2013, 5:13:02 AM7/21/13
to adf-met...@googlegroups.com
Hi Chris,

Here are the results of my first 12.1.2 maven project, The first test is without ADF ( that is the next step ). 
It is an EJB/JPA model project based on the HR schema and exposed as a Restful service ( WebProject) and everything is packaged in an ear and deployed to the internal wls server of jdeveloper. 

Here you can find my code to test it yourself 

I really like the part how you fill the local or shared repository
pushing it to a remote repos is really a great feature. 

With a shared repos , I had some issue when deploying to weblogic. I used artifactory as repos and got issues with this strange openjpa snaphot jar (the rest is working perfectly and the jar is there in the repos ) 
Failed to collect dependencies for com.oracle.weblogic:weblogic-maven-plugin:jar:12.1.2-0-0 (): 
No versions available for com.oracle.weblogic:org.apache.openjpa_1.4.0.0_1-1-1-SNAPSHOT:jar:[12.1.2,12.1.3)
To fix it , I also had to publish to the local repos.

also liked you can select a test project in the pom, this works great. but I noticed some issues.
when you use the default generated pom you need to use the junit 3.8.1 library and junit 4.0 test classes won't be invoked. I had to add a junit4 dependency to the pom. 
When you have a ModelTest project and select the option test resources are inside project then it adds the src path of the modeltest projects to all the workspace projects ( Very strange )

There are also some strange issues with pom to jdeveloper project synchronization, this does not work so great when you add your own things, it can reset all project and pom libraries. plus somehow it removes the entity classes from the persistence units. ( maybe an option to do this one-way )

plus would be great if it generates the default maven project structure and an ear pom + project just like the application deployment.  also maybe add the workspace pom as parent in the projects pom and not as dependencies in the workspace pom ( as module reference is enough)

Next step, let's see if maven works with ADF, especially the ADF libraries and ADF EAR generation part.

Thanks

Edwin Biemond

unread,
Jul 26, 2013, 8:48:13 AM7/26/13
to adf-met...@googlegroups.com
Hi 

I also tested the adf part and also got some issues. It probably works in most standard situations but not in all.

I have for example a model EJB project with 2 deployment profiles an EJB ( 1 for the ear ) and an ADF Library ( for the webapp, this contains the datacontrol stuff ) 
Somehow with an EJB project jdeveloper chooses for packaging jar instead of ejb.  Also with ejb you also want the ejb client plugin , the ejb-client type should be used then as dependency in the viewcontroller application ( else you get persistence unit errors). 

I can make both profiles ( adflib and ejb  ) but always the ejb gets archived by maven ( I can't change this ) 
so when I set in the webapp jdev project options the adf lib as dependency, I get the ejb model jar as dependency in the webapp pom, even when I selected the adf library. changing this in the pom removes the dependencies on the jdev project level

When I deploy and make it manually in jdev it works perfectly and jdev puts the adf lib in the web-inf/lib. With Maven I can't make this happen, maybe I need to make a dummy folder with a ojdeploy adf lib pom and add this adf lib dependency manually to the webapp pom.

last point is maybe take a look at the projects pom and default add the nocompile option to the ojdeploy plugin when you also have ojmake, You only want to compile once .
Same with the application pom , this should only put everything together ( never re-generate or compile ) so ojdeploy with the no compile option plus remove ojmake from the application pom.  

We are almost there :-)

Thanks Edwin

Here is my testcase 

Chris Muir

unread,
Jul 29, 2013, 6:56:30 PM7/29/13
to adf-met...@googlegroups.com
Thanks for the detailed response here Edwin.  Just so other EMG members know this sort of detailed feedback (not just a 1 line response) is the sort of analysis Oracle loves to work with, Edwin's clear and well articulated thoughts are stirring activity behind the Oracle lines to improve the product.

If other customers want to push the tool to improve in their area of interest, I highly recommend taking Edwin's approach here, deliberating on both the good and not so good parts, and an eye to what we could do to make your life easier.  It can make a difference.

Thanks again Edwin, I look forward to seeing you at OOW.

Regards,

CM.


--
--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com
 
All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).
 
---
You received this message because you are subscribed to the Google Groups "ADF Enterprise Methodology Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adf-methodolo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages