<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>
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <groupId>com.sencha.gxt</groupId>
  <artifactId>gxt-parent</artifactId>
  <version>3.0.1</version>
  <packaging>pom</packaging>
  <name>Sencha GXT Parent Project</name>
  <properties>
    <!-- Build settings, defined here to cover all projects -->
    <java.version>1.6</java.version>
    <gwt.version>2.4.0</gwt.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Test settings, defined here to give good defaults -->
    <gwt.test.mode>htmlunit</gwt.test.mode>
    <gwt.test.testTimeOut>480</gwt.test.testTimeOut>
    
    <!-- License to build into the release. Change to commercial with -Dlicense.type=commercial -->
    <license>gpl</license>
  </properties>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.google.code.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>1.4.0</version>
          <configuration>
            <basedir>${project.build.directory}/classes</basedir>
            <excludes>
              <exclude>**/*.json</exclude>
              <exclude>**/*.html</exclude>
            </excludes>
            <header>${project.basedir}/../src/main/etc/sencha-license.txt</header>
            <properties>
              <project.version>${project.version}</project.version>
            </properties>
            <quiet>true</quiet>
          </configuration>
          <executions>
            <execution>
              <phase>process-resources</phase>
              <goals>
                <goal>format</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
          <executions>
            <execution>
              <!-- Ensure that the license file is copied into META-INF/ -->
              <id>copy-license</id>
              <inherited>true</inherited>
              <phase>process-resources</phase>
              <goals><goal>copy-resources</goal></goals>
              <configuration>
                <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                <resources>
                  <resource>
                    <targetPath>META-INF</targetPath>
                    <directory>../src/main/docs</directory>
                    <includes><include>license_${license}.txt</include></includes>
                  </resource>
                </resources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>2.2.0</version>
          <dependencies>
            <dependency>
              <groupId>com.google.gwt</groupId>
              <artifactId>gwt-user</artifactId>
              <version>${gwt.version}</version>
            </dependency>
            <dependency>
              <groupId>com.google.gwt</groupId>
              <artifactId>gwt-dev</artifactId>
              <version>${gwt.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <!-- Build and attach javadocs -->
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <links>
              <link>http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/</link>
            </links>
            <show>public</show>
            <quiet>true</quiet>
            <excludePackageNames>*.test.*:*.rebind.*</excludePackageNames>
          </configuration>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--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.google.code.maven-license-plugin
                    </groupId>
                    <artifactId>
                      maven-license-plugin
                    </artifactId>
                    <versionRange>[1.4.0,)</versionRange>
                    <goals>
                      <goal>format</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <modules>
    <module>com.sencha.gxt.ui</module>
    <module>com.sencha.gxt.chart</module>
    <module>com.sencha.gxt.legacy</module>
    <module>com.sencha.gxt.examples</module>
    <module>build</module>
  </modules>
  <profiles>
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <pluginManagement>
          <plugins>
            <!-- Apply license formatting to the entire project to fix a source jar issue -->
            <plugin>
              <groupId>com.google.code.maven-license-plugin</groupId>
              <artifactId>maven-license-plugin</artifactId>
              <version>1.4.0</version>
              <configuration>
                <basedir>${basedir}</basedir>
              </configuration>
              <executions>
                <execution>
                  <phase>generate-resources</phase>
                  <goals>
                    <goal>format</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

  <scm>
    <connection>scm:svn:http://sencha.jira.com/svn/EXTGWT/branches/3.0</connection>
    <developerConnection>scm:svn:https://sencha.jira.com/svn/EXTGWT/branches/3.0</developerConnection>
    <url>http://sencha.jira.com/svn/EXTGWT/branches/3.0</url>
  </scm>
</project>
