# Creating ADF Applications with Maven Integration

You can create an ADF application with Maven integration in the following ways:

- From a command-line using the OEPE provided ADF Application Archetype

- From OEPE using the New Maven Project and using the ADF application Archetype

- From OEPE using the New ADF Application Wizard

## How to Create an ADF Application with Maven Integration from the Command Line

You can create an ADF application using the command line.

To Create an ADF application from the command line:

1. Open a command prompt and navigate to your project location.

2. Run the following command:

   `mvn archetype:generate -DarchetypeGroupId=com.oracle.adf.archetype -DarchetypeArtifactId=adf-basic-application -DarchetypeVersion=12.1.3-0-0`

3. Enter the appropriate required values for `groupId`, `artifactId`, `version`, and `package`, as shown in Figure: Running the Generate Basic Maven Application Command.

4. Change directory to newly-created top-level Maven project folder.

5. Execute the following command:

   `mvn clean install`

   Running the Generate Basic Maven Application Command

## How to Create an Maven Project with Maven integration from the Wizard

You can create a Maven application using the Maven Project wizard.

To create a Maven application from the application wizard:

1. In your OEPE Eclipse application go to File > New > Project. In the New Project dialog expand the Maven directory and select Maven Project and click Next.

2. In the New Maven Project dialog, select your project name and location, as shown in Figure: Creating a New Maven Project - Filename and Location.

3. Click Next. The Select an Archetype dialog appears. Select the ADF archetype called `com.oracle.adf.archetypes`, as shown in Figure: Creating a New Maven Project - Selecting the ADF Archetype. Type "adf" as a filter to filter out the many other options.

4. Select the ADF archetype and click Next.

5. Enter your values in the dialog fields, as shown in Figure: Creating a New Maven Project - Specifying the Archetype Parameters.

6. Click Finish. The new Maven application appears in your Project Explorer window.

   Creating a New Maven Project - Filename and Location

   Creating a New Maven Project - Selecting the ADF Archetype

   Creating a New Maven Project - Specifying the Archetype Parameters

## How to Add Maven Integration to New ADF Application Projects

OEPE provides the option to add Maven capabilities to projects in your new ADF application.

To add Maven integration to new ADF application projects:

1. Go to File > New > ADF Application. You are creating an ADF application in which you will add Maven capabilities to the application projects.

2. Add the information required for you new ADF application on the first two wizard pages.

3. The third wizard page is the Maven Integration Page, as shown in Figure: Add Maven Integration Page in New ADF Application Wizard.

4. Check the Add Maven (m2e) capabilities to projects box. This adds Maven capabilities.

5. Click Finish.

   Add Maven Integration Page in New ADF Application Wizard