<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">

	<parent>
		<groupId>com.atlassian</groupId>
		<artifactId>jira-portfolio-main</artifactId>
		<version>2.0.2-OD-002-D20160616T112917</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<artifactId>portfolio-1</artifactId>
	<modelVersion>4.0.0</modelVersion>
	<packaging>pom</packaging>

	<name>Portfolio for JIRA [Parent]</name>

	<properties>

		<postgres.jdbc.version>9.3-1101-jdbc4</postgres.jdbc.version> <!-- is overridden by build plans! -->

		<!-- relevant to all child modules - not correct for "this" module itself -->
		<path.to.node.folder>../../target/node</path.to.node.folder>
		<path.to.node.executable>${path.to.node.folder}/${node.executable}</path.to.node.executable>

	</properties>

	<modules>
		
		<module>roadmap-common</module>
		<module>roadmap-jira-common</module>
		<module>roadmap-jira-plugin</module>
		<module>roadmap-testserver</module>
		<module>roadmap-api</module>

		<module>geppetto</module>
		<module>jasmine-env</module>

		<module>portfolio-2-bridge</module>

	</modules>

	<profiles>

		<profile>

			<id>client-build</id>
			<activation>
				<property>
					<name>!skipClient</name>
				</property>
			</activation>

			<build>

				<plugins>

					<plugin>

						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>

						<inherited>false</inherited>

						<executions>

							<execution>
								<id>npm-install</id>
								<phase>initialize</phase>
								<goals>
									<goal>exec</goal>
								</goals>
								<configuration>

									<executable>${basedir}/../target/node/${npm.executable}</executable>

									<arguments>
										<argument>install</argument>
									</arguments>

									<environmentVariables>
										<PATH>${basedir}/../target/node/${path.separator}${env.PATH}</PATH>
									</environmentVariables>

								</configuration>
							</execution>

						</executions>

					</plugin>

				</plugins>

			</build>

		</profile>

		<profile>

			<id>portfolio-2-api-in-1</id>

			<activation>
				<property>
					<name>skipPortfolio2</name>
				</property>
			</activation>

			<modules>

				<!-- else, 'skipPortfolio2' builds would fail -->
				<module>../portfolio-2/portfolio/portfolio-api</module>

			</modules>

		</profile>

		<profile>

			<id>portfolio-1-ats</id>

			<activation>
				<property>
					<name>!skipPortfolio1</name>
				</property>
			</activation>

			<modules>

				<module>portfolio-od-acceptance-tests</module>

			</modules>

		</profile>

		<profile>

			<id>portfolio-1-micros</id>

			<activation>
				<property>
					<name>!skipPortfolio1</name>
				</property>
			</activation>

			<modules>

				<module>portfolio-micros-calculation-service</module>
				<module>portfolio-micros-resource-testing-service</module>

			</modules>

		</profile>

	</profiles>

</project>