- virtual7 conference 2018 - 28. Juli 2018
- Eine ADF-JSF-Selectbox so gestalten, dass sie wie ein IOS-Toggle-Button aussieht - 12. Juli 2017
- Maven in JDeveloper 12.2.1 – Teil 2 - 12. Juli 2017
JDeveloper 12C, especially the version 12.2.1, has built in Maven support. This blog article shows how you can configure Maven in JDeveloper and create a new ADF application using Maven as build tool.
The configuration in JDeveloper can be done under Tools\Preferences. You can choose between the Maven JDeveloper Embedded Version and an external version.
Maven Build Lifecycle (Phases/Goals)
In Maven a build lifecycle is made up of phases. Each lifecycles is defined by a different list of build phases, wherein a build phase represents a stage in the lifecycle. In our example we will selected some default phases from the available lifecycle phases:
clean | The files and directories created during the build will be deleted |
compile | Compile all the java source code in the src directory |
package | Take the compiled code and package it in its distributable format, such as a jar/war/ear as specified in your pom.xml |
deploy | Copies the final package to the remote repository for sharing with other developers and projects |
Maven Repositories
You can specify the repositories to use for a group of projects by defining a repositories element at the top of your inheritance chain in the “settings.xml” witch will be find in “${user.home}/.m2/settings.xml”
And the remote repository will be displayed in the maven configuration window:
Create an ADF Application with Maven as Build Tool
When you create a new ADF application you need to choose Maven as build tool in the last step of the wizard.
The root pom (or workspace pom) can be found under Application Resources in the folder “Build Files”
Run Maven phases
To run any maven phase you can right click on the root pom and then select Run Maven
In part 2 we will see how we can crate Maven build files (pom.xml) for existing ADF application in JDeveloper 12.2.1