combining Maven en ADF Libraries

362 views
Skip to first unread message

Jan Vervecken

unread,
Jul 14, 2014, 2:34:52 PM7/14/14
to adf-met...@googlegroups.com
hi

Maven is (also) about dependency management.
An ADF Library is a typical dependency in ADF applications (and other ADF Libraries).

So the combination could be interesting (maybe), with ADF Library artifacts in a Maven repository and trying to add those to an ADF project.

Can anyone point to good resources specifically about combining Maven en ADF Libraries?

many thanks
Jan Vervecken

Jan Vervecken

unread,
Jul 14, 2014, 3:07:52 PM7/14/14
to adf-met...@googlegroups.com
Oeps ... "en" is Dutch for "and", so (to avoid any confusion) the question is about "combining Maven and ADF Libraries".

thanks
Jan Vervecken

Mark Robinson

unread,
Jul 14, 2014, 4:36:47 PM7/14/14
to ADF Methodology
I've done work with ADF and Maven, albeit it was quite a while ago.

The biggest challenge is getting the ADF libraries into Maven.  JDev 12 (should?) have something to do it, but last time I tried it would only install to a local repo not a Artifact server.  There's an open source tool which can sort of do it, but it only kinda works and it misses some dependencies.

There's also the challenge of properly building a WAR file.  JDeveloper can perform the magic needed but Maven needs help.  It was very finicky and a huge effort to get set-up, but it usually worked.

That said, maybe it's better now.

Mark


--
--
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/d/optout.

Vinay Agarwal

unread,
Jul 15, 2014, 8:04:15 AM7/15/14
to adf-met...@googlegroups.com
A new Oracle Maven Sync plugin was introduced in 121200 that helps build the maven repository with Oracle libraries. Following links will be useful read.


Regards,
Vinay Agarwal

Jan Vervecken

unread,
Jul 15, 2014, 1:34:09 PM7/15/14
to adf-met...@googlegroups.com
Thanks for your replies Mark and Vinay.

Yes, Maven support in JDeveloper 12c has improved.

But, I noticed that my question may be more an how-to question, not allowed in this group, so I moved it to the OTN forum and made it more specific,
see forum thread "12c : how to add an ADF Library JAR as Maven artifact in a project"
at https://community.oracle.com/thread/3584425

Don't let that stop anyone from discussing the topic more in general here.

regards
Jan Vervecken

Dave van der Wende

unread,
Jul 15, 2014, 5:32:22 PM7/15/14
to adf-met...@googlegroups.com
Timely topic for me. I've just started a project with 12c and maven.

I agree 12c maven support is much better. But I would really like to see Oracle create a public maven repository, or at least a subscription/otn based one so we can just get the adf/database/any other libs easily.

The biggest the bonus of a build tool like maven is having dependencies just resolve and download correctly. Still having to setup the libraries on a build server manually is annoying!

Thanks Dave

jwglista

unread,
Jul 21, 2014, 8:41:37 AM7/21/14
to adf-met...@googlegroups.com
We've recently used Maven with a large project here at my company.  The application design features several independent ADF library deployments which are all used by a main view application.  We are currently on 11g (11.1.2.3.0).

The biggest challenge was being forced to use ojdeploy for our ADF library deployments.  I attempted to set up the build for these ADF libraries using the Maven assembly plugin, mimicking the structure of the ADF library jars generated by ojdeploy.  However, there are proprietary files generated by ojdeploy at build time that do not exist in the project (such as the task flow registry).  This means that if you want to do a true Maven-only build in this scenario, you have to manually run a deployment with JDeveloper to get those proprietary files, then check them into your code base and have the Maven assembly plugin place them in the appropriate locations in your final ADF library jar.  The main drawback to this was that the content of these files changes based on your project, making this an unacceptable solution.

The alternative is to use ojdeploy (in 11g), which is kicked off by an ant task in your Maven pom.  This solves the problem of handing the proprietary files generated at build time, but it introduces other issues.  When you create a build.xml using JDeveloper and set it to use ojdeploy, a build.properties is generated, containing hard-coded, absolute path references to things such as your JDeveloper home folder and the project home folder.  Ojdeploy needs these properties to perform the build.  We had to make these properties contain property placeholders, and pass the properties from the command line at build time.  Also, our build is currently compiling all projects twice, because Maven does its own class compilation, and ojdeploy does its own compilation as well.

Another issue that we are facing, which we have not yet solved, is running these builds on our Hudson CI server.  About 50% of the time, the build will lock up during the ojdeploy run of any particular module, and will stay hung until you cancel the build.  I've attempted to do some stack dumps of the JVM that's running ojdeploy, but the JVM becomes completely unresponsive, and I can only use jstack -F, which doesn't give good enough dumps to use in a tool like Samurai. 

All in all, I will say that I look forward to seeing the improvements in 12c once we begin using it, because there are many pitfalls in 11g regarding builds using Maven.

John

Vishal Sanganaboina

unread,
Jul 22, 2014, 7:54:50 AM7/22/14
to adf-met...@googlegroups.com
We used 11.1.2.3.0(Used only UI no BC4J), zipped all jar files and kept on a remote repository for maven, so we did not use the ojdeploy.

Offcourse there was an effort we carried out to find all the jar files required for our project.


--
--
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/d/optout.



--
cheers,
Vishal

John Glista

unread,
Jul 22, 2014, 9:32:09 AM7/22/14
to adf-met...@googlegroups.com
The easiest way I found to get all the JDeveloper 11.1.2.3.0 libraries into a Maven repository is to create a new Maven project in JDeveloper and activate every feature for that project.  This will cause JDeveloper to install all of these dependencies into your local repo.  After that, you can do as you said, put all the jars into a zip and deploy to your internally hosted Maven repository.  We are using Artifactory for that.


You received this message because you are subscribed to a topic in the Google Groups "ADF Enterprise Methodology Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adf-methodology/0bqjkJAJoDc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adf-methodolo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages