If you haven't installed Maven or are not comfortable with running from a command line prompt, Eclipse can be used.
- Download the relevant release of "Maven Artifact" in the ODA Demo Servlet. Extract the zip file.
- Right-click the Project Explorer and choose Import..., then select Maven > Existing Maven Projects.
- Navigate to the folder you extracted the Maven archetype to. The project will be selected. Click Finish.
- After the project has been imported and the workspace built, right click the project and select Run As > Maven Build... (ensure you select the option with the ellipsis). If you don't, it will try to perform the "mvn install" task with Java 1.6, and fail with an error
"Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class="org"/apache/maven/cli/MavenCli, offset=6"
- In the area for Goals type "install". Go to the JRE tab and choose "Alternate JRE" and select the relevant Java 1.8 version you installed. Remember, Maven needs a higher version that Java 1.6 to run successfully.
- Click "Run". The Console window will show Maven downloading relevant dependencies, then build and should display "[INFO] BUILD SUCCESS".
- Delete the project from the workspace - the above process has added this version to your local repository as a "template" for Maven to use for new projects.
- Right-click the Project Explorer and choose New > Project....
- Choose Maven > Maven Project and click Next.
- Choose a location to save the new project to and click Next.
- In the combobox of projects to select, scroll down. You should now have
2.0.0. Select this. In the Advanced area, I recommend setting the "Name template" to
groupId.artifactId. That way, the parent project and three constituent modules will be grouped together. Click Next.
- Complete the properties, referring to the "Maven Project Properties" section above. NOTE particularly the changes needed to Version and Package.
- Click Finish. You will get four projects - parent (which you build to generate everything), plugin (which is where you will do the coding), feature (the feature project, pointing to the plugin), and update (the update site project, pointing to the feature).
- You should get prompted to install various five tycho plugins. Click Finish and install them. This will address the errors initially displayed. When prompted, restart Eclipse.
- Right-click on the parent project and select Run As > Maven Build... repeating the steps to set the goal to "install" and JRE to 1.8. This will build the plugin, feature and update site, generating a full update site project will be in a zip file in
update/target/site_assembly.zip, ready to be installed on the server.