<project xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd' xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  <modelVersion>4.0.0</modelVersion>
  <groupId>dk.apaq.webkit</groupId>
  <artifactId>AFWebkit-module</artifactId>
  <packaging>jar</packaging>
  <version>0.0.2</version>
  <name>AFWebkit-module</name>
  <url>http://apaq.dk</url>
  
  <distributionManagement>
    <repository>
      <id>java.net-m2-repository</id>
    <url>java-net:/maven2-repository/trunk/www/repository/</url>
    </repository>

  </distributionManagement>
  
  !--  include pluginRepository and repository for GWT-Maven -->
	<pluginRepositories>
		<pluginRepository>
			<id>gwt-maven-plugins</id>
			<url>
                http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
            </url>
		</pluginRepository>
	</pluginRepositories>
	
	<repositories>
		<repository>
			<id>gwt-maven</id>
			<url>
                http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
            </url>
		</repository>
		
  </repositories>
	
	
	<!--  convenience to define GWT version in one place -->
	<properties>
		<gwtVersion>1.5.3</gwtVersion>
	</properties>

	
  
	<dependencies>
		<!--  GWT deps (from central repo) -->
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-servlet</artifactId>
			<version>${gwtVersion}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<version>${gwtVersion}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-dev</artifactId>
			<version>${gwtVersion}</version>
			<classifier>${platform}-libs</classifier>
			<type>zip</type>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-dev</artifactId>
			<version>${gwtVersion}</version>
			<classifier>${platform}</classifier>
			<scope>provided</scope>
		</dependency>
		
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>
		
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	
	<build>
		<plugins>
			
			<!--  Use the dependency plugin to unpack gwt-dev-PLATFORM-libs.zip -->
			<!--
				(this is a replacement for the old "automatic" mode - useful if you
				don't have GWT installed already, or you just want a maven way to
				handle gwt deps)
			-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack</id>
						<phase>compile</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>com.google.gwt</groupId>
									<artifactId>gwt-dev</artifactId>
									<version>${gwtVersion}</version>
									<classifier>${platform}-libs</classifier>
									<type>zip</type>
									<overWrite>false</overWrite>
									<outputDirectory>${settings.localRepository}/com/google/gwt/gwt-dev/${gwtVersion}</outputDirectory>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!--  tell the compiler we can use 1.5 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
		
		<extensions>
      		<extension>
       		 <groupId>org.jvnet.wagon-svn</groupId>
       		 <artifactId>wagon-svn</artifactId>
       		 <version>RELEASE</version>
      		</extension>
    	</extensions>
	</build>
	
	<!--  profiles (with activation per platform) -->
	<profiles>
		<profile>
			<id>gwt-dev-windows</id>
			<properties>
				<platform>windows</platform>
			</properties>
			<activation>
				<activeByDefault>true</activeByDefault>
				<os>
					<family>windows</family>
				</os>
			</activation>
		</profile>
		<profile>
			<id>gwt-dev-mac</id>
			<properties>
				<platform>mac</platform>
			</properties>
			<activation>
				<activeByDefault>false</activeByDefault>
				<os>
					<family>mac</family>
				</os>
			</activation>
		</profile>
		<profile>
			<id>gwt-dev-linux</id>
			<properties>
				<platform>linux</platform>
			</properties>
			<activation>
				<activeByDefault>false</activeByDefault>
				<os>
					<name>linux</name>
				</os>
			</activation>
		</profile>
	</profiles>
</project>

