187 total views, 2 views today

Create ADF application with Maven

In this section, we walk through on how to create ADF application with maven. 

JDeveloper 12C has built in Maven support, it creates Maven build file for most of the project types like ADF, Java, J2EE, BPM etc. with little or no manual configuration needed.

In this page, we walk through the below three steps that JDeveloper supports

  1. Create an ADF application with Maven archetype
  2. Create MAVEN build files for an existing project
  3. Run Maven phases
This tutorial uses JDeveloper Version: 12.2.1

Let’s go by One by one

1.Create an ADF application with Maven archetype

We are going to create an ADF application in this example using Maven. It creates an ADF application with three projects.

  • Open your JDeveloper
  • Go to File >> New >> Application as shown below

 

  • 012816_0436_CreateanADF1 Create ADF application with Maven

  • In the New gallery Wizard, Select Maven in the categories >> Select Generate from Archetype >> Click Ok
    as shown below

 

    • 012816_0436_CreateanADF2 Create ADF application with Maven

 

  • Click the search icon as shown below

    012816_0436_CreateanADF3 Create ADF application with Maven

  • Type ADF in the search box and hit enter on your keyboard. It will find the ADF artifact from your local or remote maven repository and display it under Matching Archetype. Now select the ADF archetype as shown below and click Ok.  
  • 012816_0436_CreateanADF4 Create ADF application with Maven

 

  • Click Finish 

    • 012816_0436_CreateanADF5 Create ADF application with Maven

 

  • Click Ok to complete the application creation

 

    • 012816_0436_CreateanADF6 Create ADF application with Maven

 

  • This will create ADF application and projects in your workspace. Here below is the example screenshot, the maven build file (POM ) is created at project and application level

 

  • 012816_0436_CreateanADF7 Create ADF application with Maven

In the next steps, we walk through the steps to create MAVEN pom file for an existing project

2.Create MAVEN build file for existing project

  • Assume we have an ADF project or we can use the application just we created above
  • Right click on the ‘ViewController’ and select Maven POM for Project as shown below

 

    • 012816_0436_CreateanADF8 Create ADF application with Maven

 

  • Choose ‘Use this POM as the default for the project‘ to generate Maven POM files for all the projects then choose OJDEPLOY or OJMAKE to include the plugin in POM file to package the ADF projects.
  • Click Ok.

 

012816_0436_CreateanADF9 Create ADF application with Maven

 

  • The MAVEN POM file is generated for all the existing projects and application as shown below

 

012816_0436_CreateanADF10 Create ADF application with Maven

3. Run Maven phases

We have created Maven POM file for all the projects and application, Let’s go through some of the Maven phases JDeveloper supports. Right click the generated POM file and select Run Maven as shown below

012816_0436_CreateanADF11 Create ADF application with Maven

By default, the Maven displays six maven phases

Click clean
>> to delete the existing package file (usually present under the project deploy or target directory)

Click compile
>> to compile all the java source file present src directory

Click test >> to run test cases

Click Package >> to package the project into jar / war / ear / war file as specified in your POM.XML

Click install >> to install the package file in local repository (c:\users\.m2\repository)

Click Site >> to generate project report

Click Goal Profiles >> to add more maven phase

 

 

Note: Once the POM file is generated, Edit the file and change the ORACLE_HOME and OJDEPLOY file path points to your location.

govindan Create ADF application with Maven
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan Create ADF application with Maven
Connect me
Like us on Facebook.
Connect!