<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<!--

	This project is used only for releasing to Maven central.
	It's purpose is to include all our source directories in the folder which gets
	tagged by release:prepare and checked-out+built+delivered by release:perform.

	Using Sonatype parent as described here:
		https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7a.1.POMandsettingsconfig

	Their pom.xml file is viewable here:

	http://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
	-->
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

<!--
http://stackoverflow.com/questions/3684664/maven-property-substitution-not-done-for-project-version-tag-of-pom/3685248#3685248

hard code the version in the top project/version element.
hard code the version in the project/parent/version element of children.
children inherit the version unless they want to override it
use ${project.groupId} and ${project.version} for inter module dependencies.

Version-less parent will be allowed in Maven 3.1.
-->
	<groupId>org.cogchar</groupId>
	<artifactId>org.cogchar.project.root</artifactId>
	<version>1.1.4</version>
	<packaging>pom</packaging>
	<name>${project.artifactId} - Root pom, linked to Sonatype repo parent</name>
	<description>Project Root Folder pom.xml - includes all code + doc directories when snapped.</description>
	<url>http://www.cogchar.org</url>
	<inceptionYear>2010</inceptionYear>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.cogchar.org/license.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<modules>
		<!-- We list only "main", not "all", because we don't want to deploy "all" to Sonatype,
			 but we do need to deploy this root pom.xml file (because subprojects depend on it).
		-->
		<module>maven/org.cogchar.modules.main</module>
		<module>maven/org.cogchar.nbui.render</module>
  </modules>
	<properties>

		<encoding>UTF-8</encoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- Disable compile-on-save to launch programs using maven-plugins for OSGi and Scala, under Netbeans 8 -->
		<netbeans.compile.on.save>none</netbeans.compile.on.save>

		<!-- Glue Dependencies -->
		<appdapter.msg.version>1.2.4</appdapter.msg.version>
		<appdapter.jscience.version>1.0.9</appdapter.jscience.version>
        <appdapter.symja_java6.version>1.2.3</appdapter.symja_java6.version>

		<appdapter.version>1.2.4</appdapter.version>
		<jflux.version>0.2.5</jflux.version>
		<mechio.version>1.0.6</mechio.version>

		<!-- Non Glue Dependencies -->
		<commons.codec.version>1.6</commons.codec.version>
		<commons.fileupload.version>1.2.2</commons.fileupload.version>
		<commons.io.version>2.1</commons.io.version>

		<felix.org.osgi.core.version>1.4.0</felix.org.osgi.core.version>
		<felix.org.osgi.compendium.version>1.4.0</felix.org.osgi.compendium.version>
		<jena.fuseki.version>0.2.7</jena.fuseki.version>
		<jmonkey.version>3.0.0.20140325-SNAPSHOT</jmonkey.version>
		<joda.time.version>2.1</joda.time.version>
		<joda.convert.version>1.2</joda.convert.version>
		<jscience.version>4.3.1</jscience.version>
		<junit.version>4.8.1</junit.version>
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>
		<net.liftweb.version>2.6.3</net.liftweb.version>
        <!--    Netbeans and OSGi can fail to run projects if "compile on save"
                is enabled so we're disabling it.
        Discussed here: https://netbeans.org/bugzilla/show_bug.cgi?id=238494-->
        <netbeans.compile.on.save>none</netbeans.compile.on.save>
		<netbeans.hint.license>cogchar-apache20</netbeans.hint.license>
		<netbeans.version>RELEASE721</netbeans.version>

		<org.apache.http.version>4.3.1</org.apache.http.version>

		<org.apache.log4j.version>1.2.16</org.apache.log4j.version>
		<org.osgi.version>4.3.0</org.osgi.version>
		<org.ow2.version>1.0.33</org.ow2.version>
		<org.json.version>chargebee-1.0</org.json.version>
		<org.bushe.eventbus.version>1.3</org.bushe.eventbus.version>
		<pax.web.version>1.1.2</pax.web.version>

		<scala.test.version>1.2</scala.test.version>
		<scala.specs.version>1.6.9</scala.specs.version>
		<servicemix.bundles.javax.inject.version>1_2</servicemix.bundles.javax.inject.version>
		<servicemix.bundles.paranamer.version>2.4_1</servicemix.bundles.paranamer.version>
		<servicemix.bundles.xmlpull.version>1.1.3.1_2</servicemix.bundles.xmlpull.version>
		<servicemix.bundles.xpp3.version>1.1.4c_6</servicemix.bundles.xpp3.version>
		<servlet.api.version>2.5</servlet.api.version>

		<version.org.apache.felix.main>4.2.1</version.org.apache.felix.main>
		<wagon.webdav.version>1.0-beta-7</wagon.webdav.version>
		<xpp3.version>1.1.4c</xpp3.version>
		<xstream.version>1.4</xstream.version>

		<!-- key infrastructure versions -->
		<scala.version>2.10.2</scala.version>
		<slf4j.version>1.7.5</slf4j.version>

		<!-- plugins used during ontogen -->

		<org.semweb4j.version>5.0.1</org.semweb4j.version>

		<version.jena.maven.tools>0.8</version.jena.maven.tools>
		<version.build.helper.maven.plugin>1.7</version.build.helper.maven.plugin>

		<!-- Other plugin versions -->
		<version.lifecycle.mapping>1.0.0</version.lifecycle.mapping>
		<version.license.maven.plugin>1.7</version.license.maven.plugin>
		<version.maven.antrun.plugin>1.6</version.maven.antrun.plugin>
		<version.maven.assembly.plugin>2.2</version.maven.assembly.plugin>
		<version.maven.bundle.plugin>2.3.7</version.maven.bundle.plugin>
		<version.maven.compiler.plugin>2.3.2</version.maven.compiler.plugin>
		<version.maven.jar.plugin>2.3.2</version.maven.jar.plugin>
		<version.maven.site.plugin>3.4</version.maven.site.plugin>
		<version.maven.resources.plugin>2.4.3</version.maven.resources.plugin>
		<version.maven.surefire.plugin>2.9</version.maven.surefire.plugin>
		<version.nbm.maven.plugin>3.11</version.nbm.maven.plugin>
	</properties>
        <dependencyManagement>
            <dependencies>
				<!--
				<dependency>
					<groupId>org.semweb4j</groupId>
					<artifactId>rdfreactor.dist</artifactId>
					<version>${org.semweb4j.version}</version>
					<type>pom</type>
				</dependency>

				<dependency>
					<groupId>org.semweb4j</groupId>
					<artifactId>rdf2go.impl.jena</artifactId>
					<version>${org.semweb4j.version}</version>
				</dependency>
				-->
                <dependency>
                    <groupId>com.thoughtworks.xstream</groupId>
                    <artifactId>xstream</artifactId>
                    <version>${xstream.version}</version>
                </dependency>
                <dependency>
                    <groupId>commons-codec</groupId>
                    <artifactId>commons-codec</artifactId>
                    <version>${commons.codec.version}</version>
                </dependency>
                <dependency>
                    <groupId>commons-fileupload</groupId>
                    <artifactId>commons-fileupload</artifactId>
                    <version>${commons.fileupload.version}</version>
                </dependency>
                <dependency>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                    <version>${servlet.api.version}</version>
                </dependency>
                <dependency>
                    <groupId>joda-time</groupId>
                    <artifactId>joda-time</artifactId>
                    <version>${joda.time.version}</version>
                </dependency>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>${junit.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.directory.studio</groupId>
                    <artifactId>org.apache.commons.io</artifactId>
                    <version>${commons.io.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.apache.felix.main</artifactId>
                    <version>${version.org.apache.felix.main}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.osgi.core</artifactId>
                    <version>${felix.org.osgi.core.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.osgi.compendium</artifactId>
                    <version>${felix.org.osgi.compendium.version}</version>
                </dependency>
				<!--
                <dependency>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient-osgi</artifactId>
                    <version>${org.apache.http.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore-osgi</artifactId>
                    <version>${org.apache.http.version}</version>
                </dependency>
				-->
                <dependency>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-fuseki</artifactId>
                    <version>${jena.fuseki.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.log4j</groupId>
                    <artifactId>com.springsource.org.apache.log4j</artifactId>
                    <version>${org.apache.log4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.servicemix.bundles</groupId>
                    <artifactId>org.apache.servicemix.bundles.javax-inject</artifactId>
                    <version>${servicemix.bundles.javax.inject.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.servicemix.bundles</groupId>
                    <artifactId>org.apache.servicemix.bundles.paranamer</artifactId>
                    <version>${servicemix.bundles.paranamer.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.servicemix.bundles</groupId>
                    <artifactId>org.apache.servicemix.bundles.xmlpull</artifactId>
                    <version>${servicemix.bundles.xmlpull.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.servicemix.bundles</groupId>
                    <artifactId>org.apache.servicemix.bundles.xpp3</artifactId>
                    <version>${servicemix.bundles.xpp3.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>ext.bundle.apache_qpid_032</artifactId>
                    <version>${appdapter.msg.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
					<artifactId>ext.bundle.jena_all_2_13_0</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>ext.bundle.math.jscience_50SNAP</artifactId>
                    <version>${appdapter.jscience.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>ext.bundle.math.symja_jas</artifactId>
                    <version>${appdapter.symja_java6.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>ext.bundle.osgi.common</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>ext.bundle.xml.dom4j_161</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>org.appdapter.bundle.core</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>org.appdapter.bundle.felix.shell</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>org.appdapter.bundle.gui</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.appdapter</groupId>
                    <artifactId>org.appdapter.lib.core</artifactId>
                    <version>${appdapter.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.bushe</groupId>
                    <artifactId>eventbus</artifactId>
                    <version>${org.bushe.eventbus.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.api.common.rk</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.api.core</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.api.messaging.rk</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.api.registry</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.api.services</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.impl.encode.avro</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.impl.messaging.rk</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.impl.registry.osgi</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.jflux</groupId>
                    <artifactId>org.jflux.impl.services.rk</artifactId>
                    <version>${jflux.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.joda</groupId>
                    <artifactId>joda-convert</artifactId>
                    <version>${joda.convert.version}</version>
                </dependency>
				<dependency>
					<groupId>org.jscience</groupId>
					<artifactId>jscience</artifactId>
					<version>${jscience.version}</version>
				</dependency>
                <dependency>
                    <groupId>org.json</groupId>
                    <artifactId>org.json</artifactId>
                    <version>${org.json.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.api.animation</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.api.motion</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.api.speech</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.api.speechrec</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.api.vision</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.impl.animation</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.impl.motion</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.impl.speech</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.impl.speechrec</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.integration.animation_motion</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.mechio</groupId>
                    <artifactId>org.mechio.integration.motion_speech</artifactId>
                    <version>${mechio.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-netbeans-api-annotations-common</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-netbeans-modules-settings</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-openide-awt</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-openide-modules</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-openide-util</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-openide-util-lookup</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-openide-windows</artifactId>
                    <version>${netbeans.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.ops4j.pax.web</groupId>
                    <artifactId>pax-web-extender-war</artifactId>
                    <version>${pax.web.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.ops4j.pax.web</groupId>
                    <artifactId>pax-web-jetty-bundle</artifactId>
                    <version>${pax.web.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.ops4j.pax.web</groupId>
                    <artifactId>pax-web-jsp</artifactId>
                    <version>${pax.web.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.osgi</groupId>
                    <artifactId>org.osgi.core</artifactId>
                    <version>${org.osgi.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.ow2.bundles</groupId>
                    <artifactId>ow2-bundles-externals-commons-logging</artifactId>
                    <version>${org.ow2.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.scala-lang</groupId>
                    <artifactId>scala-actors</artifactId>
                    <version>${scala.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.scalatest</groupId>
                    <artifactId>scalatest</artifactId>
                    <version>${scala.test.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.scala-tools.testing</groupId>
                    <artifactId>specs_2.10</artifactId>
                    <version>${scala.specs.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                    <version>${slf4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                    <version>${slf4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>xpp3</groupId>
                    <artifactId>xpp3</artifactId>
                    <version>${xpp3.version}</version>
                </dependency>
            </dependencies>
        </dependencyManagement>
	<repositories>
		<repository>
			<id>maven-central</id>
			<url>http://repo.maven.apache.org/maven2/</url>
		</repository>
		<repository>
			<id>sonatype-public</id>
			<name>sonatype public</name>
			<url>https://oss.sonatype.org/content/groups/public/</url>
		</repository>

		<!-- Needed for "good" log4J bundle (for org.cogchar.bundle.bind.lift) -->
		<repository>
			<id>com.springsource.repository.bundles.external</id>
			<name>Spring EBR External Release Repository</name>
			<url>http://repository.springsource.com/maven/bundles/external</url>
		</repository>
		<!-- needed for netbeans binaries, used in org.cogchar.nbui.demo.all. -->
		<repository>
			<id>netbeans</id>
			<name>NetBeans</name>
			<url>http://bits.netbeans.org/maven2/</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<!-- 	Explicit reference to Maven central ... ensures it is always checked first (we think).	-->
		<pluginRepository>
			<id>maven-central</id>
			<url>http://repo.maven.apache.org/maven2/</url>
            </pluginRepository>
		<pluginRepository>
			<!-- Necessary to find JFlux plugins during an empty-repo build from SNAPSHOTs -->
			<id>sonatype-public</id>
			<name>sonatype public</name>
			<url>https://oss.sonatype.org/content/groups/public/</url>
		</pluginRepository>

	</pluginRepositories>
        <!--
	connection - used for read access to Maven (e.g. for svn-update)
	developerConnection - requires a write-access connection (e.g. for svn-commit)
	url - human-browsable view of SVN
        -->
	<scm>
		<connection>scm:svn:https://subversion.assembla.com/svn/cogchar/tags/org.cogchar.project.root-1.1.4</connection>
		<developerConnection>scm:svn:https://subversion.assembla.com/svn/cogchar/tags/org.cogchar.project.root-1.1.4</developerConnection>
		<url>https://www.assembla.com/code/cogchar/subversion/nodes/tags/org.cogchar.project.root-1.1.4</url>
	</scm>
        <!--  Disabling, as this makes it impossible to release the project without access to the specified server.
        <distributionManagement>
            <site>
                <id>nexus-site</id>
                <url>dav:http://localhost:8081/nexus/content/sites/site/org/cogchar</url>
            </site>
        </distributionManagement>
        -->
	<build>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-webdav-jackrabbit</artifactId>
				<version>${wagon.webdav.version}</version>
			</extension>
		</extensions>
		<pluginManagement>   <!-- Note that this is a plugin MANAGEMENT section applying to child poms -->
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<!-- New in plugin version 2.2, but does not work correctly yet.
						See:   https://jira.codehaus.org/browse/MRELEASE-695
						<tagNameFormat>v@{project.version}</tagNameFormat>
						 -->
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.scala-tools</groupId>
					<artifactId>maven-scala-plugin</artifactId>
					<configuration>
		<!-- On Frogbait this option drops Scala proj build time about 20% -->
						<jvmArgs>
							<jvmArg>-XX:+TieredCompilation</jvmArg>
						</jvmArgs>
						<displayCmd>true</displayCmd>
							<!-- Compile ONLY the Scala code.  The Java code is compiled by a previous goal.
								This works OK as long as we don't refer to Scala classes from Java (in this
								project).  Other projects can of course call our Scala classes like Java.
								"Test Packages" of Java can also see Scala within the same project.

                            This goes a little faster.  More issues are discussed in org.appdapter.lib.core pom.xml.
                        -->
                        <sendJavaToScalac>false</sendJavaToScalac>
                        <configuration>
                            <args>
                                <arg>-make:transitive</arg>
                                <arg>-dependencyfile</arg>
                                <arg>${project.build.directory}/.scala_dependencies</arg>
                            </args>
                        </configuration>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${version.maven.antrun.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${version.maven.bundle.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${version.maven.assembly.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven.compiler.plugin}</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.maven.resources.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>${version.lifecycle.mapping}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven.surefire.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>nbm-maven-plugin</artifactId>
                    <version>${version.nbm.maven.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.maven.jar.plugin}</version>
                </plugin>

                <!-- The following 3 plugins are needed to do our code generation from ontologies -->
                <plugin>
                    <groupId>org.semweb4j</groupId>
                    <artifactId>rdfreactor-maven-plugin</artifactId>
                    <version>${org.semweb4j.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-maven-tools</artifactId>
                    <version>${version.jena.maven.tools}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${version.build.helper.maven.plugin}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>build-for-felix</id>
            <dependencies>
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.apache.felix.main</artifactId>
                </dependency>
                <!-- To include a shell:
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.apache.felix.gogo.shell</artifactId>
                    <version>0.6.1</version>
                </dependency>
                -->
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>${version.maven.antrun.plugin}</version>
                        <executions>
                            <execution>
                                <id>compile</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <pathconvert property="plugins.jars" pathsep="${path.separator}">
                                            <path refid="maven.runtime.classpath" />
                                            <map from="${project.build.directory}${file.separator}classes" to="" />
                                        </pathconvert>
                                        <pathconvert pathsep=" " property="bundles">
                                            <path path="${plugins.jars}" />
                                            <mapper>
                                                <chainedmapper>
                                                    <flattenmapper />
                                                    <globmapper from="*" to="file:modules/*" casesensitive="no" />
                                                </chainedmapper>
                                            </mapper>
                                        </pathconvert>
                                        <propertyfile file="${project.build.directory}/config.properties">
                                            <entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalName}.jar" />
                                            <entry key="org.osgi.framework.bootdelegation" value="*" />
                                        </propertyfile>
                                        <copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar" />
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>${version.maven.assembly.plugin}</version>
                        <executions>
                            <execution>
                                <id>create-executable-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
                                    </descriptors>
                                    <finalName>${project.build.finalName}</finalName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>run-on-felix</id>
            <dependencies>
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.apache.felix.main</artifactId>
                </dependency>
                <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed -->
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>${version.maven.antrun.plugin}</version>
                        <configuration>
                            <target>
                                <property name="vm.args" value="" />
                                <pathconvert property="plugins.jars" pathsep="${path.separator}">
                                    <path refid="maven.runtime.classpath" />
                                    <map from="${project.build.directory}${file.separator}classes" to="" />
                                </pathconvert>
                                <makeurl property="urls" separator=" ">
                                    <path path="${plugins.jars}" />
                                    <path location="${project.build.directory}/${project.build.finalName}.jar" />
                                </makeurl>
                                <propertyfile file="${project.build.directory}/run.properties">
                                    <entry key="felix.auto.start" value="${urls}" />
                                    <entry key="felix.auto.deploy.action" value="uninstall,install,update,start" />
                                    <entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache" />
                                    <entry key="org.osgi.framework.bootdelegation" value="*" />
                                    <!-- org.w3c.dom.* are missing from default.properties in felix 4.2.1, they are present in 3.0.7 -->
                                    <entry key="org.osgi.framework.system.packages.extra" value="sun.misc, org.w3c.dom.css, org.w3c.dom.html, org.w3c.dom.stylesheets, org.w3c.dom.traversal, org.w3c.dom.ranges, org.w3c.dom.views, org.w3c.dom.xpath" />
                                </propertyfile>
                                <makeurl property="run.properties.url" file="${project.build.directory}/run.properties" />
                                <java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
                                    <sysproperty key="felix.config.properties" value="${run.properties.url}" />
                                    <jvmarg line="${vm.args}" />
                                </java>
                            </target>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>site-profile</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-site-plugin</artifactId>
                            <version>${version.maven.site.plugin}</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>${version.license.maven.plugin}</version>
                        <configuration>
                            <goal>third-party-report</goal>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.maven.javadoc.plugin}</version>
                        <reportSets>
                            <reportSet>
                                <id>aggregate</id>
                                <configuration>
                                </configuration>
                                <reports>
                                    <report>aggregate</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
    </profiles>
</project>
