<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>
  <groupId>org.codehaus.sonar-plugins</groupId>
  <artifactId>parent</artifactId>
  <packaging>pom</packaging>
  <version>4</version>
  <name>Sonar plugins parent</name>
  <url>http://sonar-plugins.codehaus.org</url>

  <inceptionYear>2009</inceptionYear>
  <organization>
    <name>SonarSource SA</name>
  </organization>

  <issueManagement>
    <system>jira</system>
    <url>http://jira.codehaus.org/browse/SONARPLUGINS</url>
  </issueManagement>

  <distributionManagement>
    <repository>
      <id>sonar-plugins</id>
      <name>Sonar plugins repository</name>
      <url>dav:https://dav.codehaus.org/repository/sonar-plugins</url>
    </repository>
    <snapshotRepository>
      <id>sonar-plugins</id>
      <name>Sonar plugins snapshot repository</name>
      <uniqueVersion>false</uniqueVersion>
      <url>dav:https://dav.codehaus.org/snapshots.repository/sonar-plugins</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Plugins ordered by shortname (archetype, assembly ...) -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>1.5.0</version>
          <configuration>
            <header>src/license-header.txt</header>
            <includes>
              <include>src/main/java/**</include>
              <include>src/test/java/**</include>
            </includes>
            <mapping>
              <java>SLASHSTAR_STYLE</java>
            </mapping>
            <properties>
              <year>${project.inceptionYear}</year>
              <name>${organization.name}</name>
            </properties>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0-beta-9</version>
          <configuration>
            <tagBase>https://svn.codehaus.org/sonar-plugins/tags</tagBase>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.2</version>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.0.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.4.3</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[2.0.7,)</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[1.5.0,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Version>${project.version}</Version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <executions>
          <execution>
            <id>check-license</id>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>integration-tests</id>
      <activation>
        <property>
          <name>integrationTests</name>
        </property>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.sonar</groupId>
            <artifactId>sonar-dev-mojo</artifactId>
            <version>1.12.6</version>
            <executions>
              <execution>
                <id>start-server</id>
                <phase>pre-integration-test</phase>
                <configuration>
                  <wait>false</wait>
                  <database>${database}</database>
                  <sonarVersion>${sonarVersion}</sonarVersion>
                  <environment>production</environment>
                  <analyzeProjects>true</analyzeProjects>
                </configuration>
                <goals>
                  <goal>start</goal>
                </goals>
              </execution>
              <execution>
                <id>stop-server</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>selenium-maven-plugin</artifactId>
            <version>1.0</version>
            <configuration>
              <port>4444</port>
              <browser>${selenium.browser}</browser>
              <startURL>http://localhost:9000/</startURL>
              <suite>src/it/selenium/index.html</suite>
              <slowResources>false</slowResources>
            </configuration>
            <executions>
              <execution>
                <id>selenium-suite</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>selenese</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>firefox</id>
      <properties>
        <selenium.browser>*firefox</selenium.browser>
      </properties>
    </profile>
    <profile>
      <id>ie</id>
      <properties>
        <selenium.browser>*iexplore</selenium.browser>
      </properties>
    </profile>
    <profile>
      <id>opera</id>
      <properties>
        <selenium.browser>*opera</selenium.browser>
      </properties>
    </profile>
    <profile>
      <id>safari</id>
      <properties>
        <selenium.browser>*custom /Applications/Safari.app/Contents/MacOS/Safari</selenium.browser>
      </properties>
    </profile>
  </profiles>

  <mailingLists>
    <mailingList>
      <name>Sonar dev mailing list</name>
      <subscribe>http://xircles.codehaus.org/projects/sonar/lists</subscribe>
      <unsubscribe>http://xircles.codehaus.org/projects/sonar/lists</unsubscribe>
      <post>dev@sonar.codehaus.org</post>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:svn:http://svn.codehaus.org/sonar-plugins/tags/parent-4</connection>
    <developerConnection>scm:svn:https://svn.codehaus.org/sonar-plugins/tags/parent-4</developerConnection>
    <url>scm:svn:https://svn.codehaus.org/sonar-plugins/tags/parent-4</url>
  </scm>

  <ciManagement>
    <system>bamboo</system>
    <url>http://ci.codehaus.org/browse/SONAR</url>
  </ciManagement>

</project>
