When creating a new project from the Maven archetype, you will be prompted for various properties. Setting these correctly will give you a fully-functioning plugin ready to be compiled by Maven into an Update Site ready for release, without any additional changes. The properties are:
- groupId: a Maven groupId for the parent, plugin, feature and update site projects.
- artifactId: the artifactId for the parent pom. I strongly suggest using "parent" (I haven't tested with anything else).
- version: this will default to 1.0-SNAPSHOT. The version gets used in the various pom.xml and also the plugin, feature and update site. "SNAPSHOT" in the version will break the plugin and feature generation. Remove -SNAPSHOT. A recommended version number for initial development is "0.5.0".
- package: in Eclipse this defaults to "groupId.artifactId", in command line it defaults to "groupId". Only the plugin project contains any Java code, so I would recommend using the same as the groupId.
- contextRoot: this is what will follow the server name (or database filepath) in the URL and needs to be unique for your REST plugin on the server. It should be meaningful for your REST application. This is written to the
contextRootproperty in the
plugin.xmlof the plugin project, if you wish to change it at a later date.
- odaVersion: this defaults to 3.2.1, the latest release for FP7 and below. Change if required. 4.0.0 is the first release for FP8.
- url-pattern: this is the URL pattern that will be used for all REST resources contributed by your JAX-RS application (i.e. REST service), appended to the URL after the
contextRootproperty. It must end in "/*" to match all resources provided by the plugin. This is written to the
url-patternproperty of the
servlet-mappingelement in the
WebContent\WEB-INF\web.xmlfile of the plugin project, if you wish to change it at a later date.