In the first part of this series we looked at how to prepare your Maven repository by importing all of the JDeveloper libraries into it. Now that we have all of the required libraries in our Maven repository, we can work to build our ADF application into a WAR file.
Creating the pom.xml
First, we need to create a pom.xml file within our ADF project. Below is a basic start to the pom.
The important items in this section are:
- packaging is set to war
- jdev.version is defined and matches the version used when importing the libraries in the previous post
- jdev.group.id matches the base group id used when importing the libraries in the previous post
The next piece of the pom we need to set are the dependencies. We have three types of dependencies we will declare in our pom:
- Test - These are only used during compilation and execution of our junit tests
- Runtime - These are used during compilation and are packaged into our war for use at runtime
- Compile - These are only used during compile time and not packaged into the war