nls-oskari/oskari-server — pull request #1 by matsisak (2014-01-21 09:01:16+00:00)
Title: Tomcat build profile and parent POM

Hi,
first time pull request...correct me if I'm doing anything wrong.

This is what I've done (branched from master on GitHub)

- Added a parent POM, oskari-parent.xml, located at the root, containing dependency version properties and a dependencyManagement section with all modules dependencies and their version (including the oskari modules). Added oskari-parent as in all the modules except for IntersectionFeatureCollection2 and OskariMarkFactory. Removed all version info from dependencies in the modules, they are now controlled from the parent POM, oskari-parent. This should ease both dependency version handling and managing your own maven version for the modules.

- Introduced filtering of properties during build to filter properties and different appserver specific files and added build profiles for jetty (jetty-profile) and tomcat (tomcat-profile).
E.g. to build and start for jetty: "mvn -f servlet-map-pom.xml install -P jetty-profile".
The tomcat-profile will not start any server, i.e. there is no tomcat maven plugin configured, but it will copy and filter the context.xml and web.xml for tomcat use, e.g. within Eclipse or for deploy in external Tomcat.

- Added a file "oskari-profile-trigger" in the map-servlet module, to be used to let Maven activate your own profile defined in your local Maven settings.xml. It's optional but I found it useful to keep build properties outside the public repository.
Eg (settings.xml profile):
````xml

oskari-profile

oskari-profile-trigger

/path/to/my/private/oskari-filter-profiles/${project.artifactId}
my-local

```
This will look for a file "my-local.properties" in directory /path/to/my/private/oskari-filter-profiles/map-servlet, and use the properties in that file during filtering of properties instead of the default "template.properties" found in map-servlet/filter directory. (If building using the "tomcat-profile" the "tomcat-template.properties" is used)

Have a look and see if it could be useful.