<?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.appdapter</groupId>
	<artifactId>org.appdapter.project.root</artifactId>
	<version>1.1.3</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.appdapter.org</url>
	<inceptionYear>2010</inceptionYear>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.appdapter.org/license.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>	
	<modules>
		<module>maven/org.appdapter.modules.all</module>	
	</modules>
	<properties>
            <!-- Override this property in a profile to use different targets
            See pattern suggested at:  
            http://stackoverflow.com/questions/1005407/can-i-move-maven2-target-folder-to-another-device
            -->
		<my.build.directory>target</my.build.directory>
	</properties>	
	
<!--
	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/appdapter/tags/org.appdapter.project.root-1.1.3</connection>
		<developerConnection>scm:svn:https://subversion.assembla.com/svn/appdapter/tags/org.appdapter.project.root-1.1.3</developerConnection>
		<url>https://www.assembla.com/code/appdapter/subversion/nodes/tags/org.appdapter.project.root-1.1.3</url>
	</scm>
	<build>
		<directory>${my.build.directory}</directory>
		<pluginManagement>
			<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.
								
								Without this instruction, the Scala compiler is unable to handle our
								Tao/Zen coreferent types.   Don't know why these types are OK if
								Java is compiled before Scala but not if everything is compiled together.
								Will return to this issue later.
							-->
													
						<sendJavaToScalac>false</sendJavaToScalac>		
						<configuration>
							<args>			
								<arg>-make:transitive</arg>
								<arg>-dependencyfile</arg>
								<arg>${project.build.directory}/.scala_dependencies</arg>
							</args>
						</configuration>						
					</configuration>
				</plugin>
		
			</plugins>
		</pluginManagement>
		<plugins>

		</plugins>
	</build>
</project>