This pagepage'sis for collecting best practices when using Maven in combination with JDeveloper ADF projects.Maven Support in JDeveloper 11gSee OTN Forum thread Maven Support in JDeveloper 11.1.1contents.Folder StructureA typical ADF project has a Model project and a ViewController project. So, for example, you would have a folder structure similar to below:appnameModelViewController Since the deliverable from an ADF project is an ear file, in the maven way of working, it is recommended to have another artifact (module) called "ear" alongside the Model and ViewController projects like below:appnameearModelViewController This "ear" folder need not be a part of the JDeveloper projects. It is a maven specific folder. You will have to create the Maven script file pom.xml in all of the above folders.To avoid mixing design time files with files needed for building the application, you can keep all files that are only needed for JDeveloper design time in a separate jdeveloper folder outside of the Model and ViewController projects:appnameearjdeveloperModelViewController You don't need a pom.xml file in the jdeveloper folder.Now, you will have to create the folder structure that suits maven. Remember, you have no need to go into JDeveloper as yet.beenFollowingmovedis the maven suited folder structure you need to have in both the Model and the ViewController folder before starting to use JDeveloper to develop ADF components.Model/ViewControllersrcmainjavacommycompany (etc)resourceswebapp (only in ViewController)WEB-INFtestjavacommycompany (etc)Project setupThere is a maven plug-in that will generate a JDeveloper project file for aEnterprisemavenMethodologystructured project.See info here:http://www.oracle.com/technology/products/jdev/howtos/1013/maven/maven.htmlGroup'shttp://kingsfleet.blogspot.com/2008/12/jdeveloper-and-maven-2x.htmlIf you want to use Maven with a JDeveloper ADF Fusion application using the above mentioned folder structure, you can also follow the approach below:Let's assume you have a new empty folder for your new JDeveloper application called [ApplicationHome]. Create new empty JDeveloper projects (create all jpr's in [ApplicationHome]\jdeveloper, not in Model or ViewController subfolder) with properties as follows: Model project:Project Source Paths - Java Source Paths: remove existing and add path to [ApplicationHome]\Model\src\main\javaProject Source Paths - Output Directory: [ApplicationHome]\Model\target\classes Project Source Paths - Default Package: com.mycompany.appname.modelProject Source Paths/Modelers - Model Path: [ApplicationHome]\jdeveloper\diagramMetaDataProject Source Paths/Offline Database - Database Path: [ApplicationHome]\database\diagramsTechnology Scope: ADF Business Components (and Java) ModelTest project:Project Source Paths - Java Source Paths: remove existing and add path to [ApplicationHome]\Model\src\test\javaProject Source Paths - Output Directory: [ApplicationHome]\Model\target\test-classes Project Source Paths - Default Package: com.mycompany.appname.modelDependencies: Model.jprTechnology Scope: Java ViewController project:Project Source Paths - Java Source Paths: remove existing and add path to [ApplicationHome]\ViewController\src\main\java Project Source Paths - Output Directory: [ApplicationHome]\ViewController\target\classes Project Source Paths - Default Package: com.mycompany.appname.view(not in 10g) Project Source Paths/ADFm Sources - ADFmSource directory: remove existing and add path to [ApplicationHome]\ViewController\src\main\java Project Source Paths/Modelers - Model Path: [ApplicationHome]\jdeveloper\diagramMetaDataProject Content/Web Application - HTML Root Folder: [ApplicationHome]\ViewController\src\main\webapp Dependencies: Model.jpr10g Technology Scope: JSF (and Java, and JSP and Servlets), XML, HTML, Web Services11g Technology Scope: ADF Faces, ADF Page Flow, Java, JSP and Servlets, XML, HTML, Web Services ViewControllerTest project:Project Source Paths - Java Source Paths: remove existing and add path to [ApplicationHome]\ViewController\src\test\java Project Source Paths- Output Directory: [ApplicationHome]\ViewController\target\test-classes Project Source Paths - Default Package: com.mycompany.appname.viewDependencies: ViewController.jprTechnology Scope: JavaRunning Maven commands from JDeveloperUsing AntTo run maven goals from JDeveloper you can use ant build files as wrappers for maven goals. Who can provide a more detailed explanation how to do this?Using External ToolsUsing JDeveloper's feature of External Tools, you can run Maven commands on pom.xml files from JDeveloper. You can get it to work by defining an external tool for each specific maven command you may want to execute (like mvn clean install) for all XML files. It will only make sense to run it on pom.xml files of course.Prerequisite: (for Windows) create a file callBat.bat with the following contents:cd %1 call %2 %3 %4 %5 %6Steps to use define the Include the pom.xml file in your JDeveloper projectIn JDeveloper, choose Tools | External Tools | NewTool Type = External ProgramProgram Executable = callBat.batArguments = ${file.dir} mvn installCaption for Menu Items = mvn installAdd Items to Menus: also check Navigator Context MenuEnabled = When Specific File Types are Selected => XML DocumentTest by right-clicking the pom.xml file and running mvn install. The log window should show the results.Repeat this for every mvn command you wish, replacing mvn install in the above steps by for example mvn clean -Dmaven.test.skip=trueinstallGoogle-ogroup.