<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>
	<artifactId>com.ibm.sbt.web</artifactId>
	<packaging>eclipse-plugin</packaging>

	<parent>
		<groupId>com.ibm.sbt</groupId>
		<artifactId>com.ibm.sbt.sdk</artifactId>
		<version>1.1.7.20150908-1400</version>
	</parent>

	<build>
		<plugins>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-packaging-plugin</artifactId>
				<version>${tycho-version}</version>
				<extensions>false</extensions>
				<executions>
					<execution>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>war</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptor>assembly-war.xml</descriptor>
							<finalName>sbt-${project.version}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<outputDirectory>${project.build.directory}</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>jar</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptor>assembly-jar.xml</descriptor>
							<finalName>${project.artifactId}-${project.version}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<outputDirectory>${project.build.directory}</outputDirectory>
							<archive>
								<manifestFile>META-INF\MANIFEST.MF</manifestFile>
							</archive>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>com.googlecode.maven-download-plugin</groupId>
				<artifactId>maven-download-plugin</artifactId>
				<version>1.1.0</version>
				<executions>
					<execution>
						<id>download-tools</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<url>http://download.dojotoolkit.org/release-1.8.10/dojo-release-1.8.10-src.zip</url>
							<unpack>true</unpack>
							<outputDirectory>${project.build.directory}/tools</outputDirectory>
							<md5>9dc3002637ea3b4763e9f93adaab0f0d</md5>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.plexus</groupId>
						<artifactId>plexus-archiver</artifactId>
						<version>2.4.4</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>aggregate</id>
						<phase>process-classes</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<copy
									todir="${project.build.directory}/tools/dojo-release-1.8.10-src/util"
									overwrite="true">
									<fileset dir="${project.build.scriptSourceDirectory}" />
								</copy>

								<ant antfile="build.xml" target="build" />
							</target>
						</configuration>
					</execution>
					<execution>
						<id>overwrite</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<copy todir="${project.build.directory}/classes/js/sdk/_layers"
									overwrite="true">
									<fileset dir="${project.build.directory}/release/">
										<include name="*.js" />
									</fileset>
								</copy>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>


		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											com.googlecode.maven-download-plugin
										</groupId>
										<artifactId>
											maven-download-plugin
										</artifactId>
										<versionRange>
											[1.1.0,)
										</versionRange>
										<goals>
											<goal>wget</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>