<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>4</version>
  </parent>
  <groupId>org.apache.fulcrum</groupId>
  <artifactId>fulcrum-parent</artifactId>
  <packaging>pom</packaging>
  <!-- TODO: dummy version. In Maven 2.1, this will be auto-versioned being a generic parent -->
  <version>1</version>
  <name>Fulcrum Component Library</name>
  <url>http://turbine.apache.org/fulcrum</url>
  <inceptionYear>2001</inceptionYear>
  
  <issueManagement>
    <system>jira</system>    
    <url>http://issues.apache.org/jira/browse/TRB</url>
  </issueManagement>
  
  <distributionManagement>
    <!--
      This POM's parent POM (the Apache root POM) provides repositories. Unfortunately,
      this allows for accidental deployments. So we disable them here by providing
      a dummy repository. Use "mvn -Prc deploy" (Apache snapshot repository) or
      "mvn -Prelease deploy" (Apache release repository), if you really want to deploy.
    -->
    <repository>
      <id>dummy</id>
      <name>Dummy to avoid accidental deploys</name>
      <url />
    </repository>
  </distributionManagement>
  
  <!--
    This section *must* be overwritten by subprojects. It is only to allow
    a release of the fulcrum-parent POM.
  -->
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/turbine/fulcrum/tags/FULCRUM_PARENT_1</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/turbine/fulcrum/tags/FULCRUM_PARENT_1</developerConnection>
    <url>http://svn.apache.org/viewcvs/turbine/fulcrum/tags/FULCRUM_PARENT_1</url>
  </scm>

  <mailingLists>
    <mailingList>
      <name>Turbine Dev List</name>
      <subscribe>dev-subscribe@turbine.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@turbine.apache.org</unsubscribe>
      <post>dev@turbine.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/turbine-dev/</archive>
    </mailingList>
    <mailingList>
      <name>Turbine User List</name>
      <subscribe>user-subscribe@turbine.apache.org</subscribe>
      <unsubscribe>user-unsubscribe@turbine.apache.org</unsubscribe>
      <post>user@turbine.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/turbine-user/</archive>
    </mailingList>
  </mailingLists>
  
  <build>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>NOTICE.txt</include>
          <include>LICENSE.txt</include>
        </includes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.0-alpha-3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.2</version>
        </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-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>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2-beta-2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0-beta-7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <encoding>${fulcrum.encoding}</encoding>
            <docEncoding>${fulcrum.docEncoding}</docEncoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
            <source>${maven.compile.source}</source>
            <target>${maven.compile.target}</target>
            <encoding>${fulcrum.encoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- TODO: later use toolchain support to do compilation on an external JDK 1.3+ compiler -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Specification-Title>${project.name}</Specification-Title>
              <Specification-Version>${project.version}</Specification-Version>
              <Specification-Vendor>${project.organization.name}</Specification-Vendor>
              <Implementation-Title>${project.name}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
              <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
              <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>      
      <plugin>
        <!-- generate the IntelliJ project files -->
        <artifactId>maven-idea-plugin</artifactId>
        <configuration>
          <jdkLevel>${maven.compile.source}</jdkLevel>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>      
      <plugin>
        <!-- generate the Eclipse project files -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>false</downloadJavadocs>
        </configuration>
      </plugin>      
      <plugin>
        <!--
          - Copy LICENSE.txt and NOTICE.txt so that they are included
          - in the -javadoc jar file for the component.
          -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>javadoc.resources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <copy todir="${project.build.directory}/apidocs/META-INF">
                  <fileset dir="${basedir}">
                    <include name="LICENSE.txt" />
                    <include name="NOTICE.txt" />
                  </fileset>
                </copy>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- attach the source code when building a jar -->
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>create-source-jar</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>      
      <plugin>
        <!-- build the source and binary distribution packages -->
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>bin</descriptorRef>
            <descriptorRef>project</descriptorRef>            
            <descriptorRef>src</descriptorRef>
          </descriptorRefs>        
          <tarLongFileMode>gnu</tarLongFileMode>
        </configuration>
      </plugin>      
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.0.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.3</version>
        <configuration> 
          <aggregate>false</aggregate>
          <source>${maven.compile.source}</source>
          <encoding>${fulcrum.encoding}</encoding>
          <docEncoding>${fulcrum.docEncoding}</docEncoding>
          <linksource>true</linksource>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
        </configuration> 
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.1</version>
        <configuration> 
          <aggregate>false</aggregate>
        </configuration> 
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>2.0-beta-6</version>
        <configuration>
          <!-- Exclude the navigation file for Maven 1 sites
               and the changes file used by the changes-plugin,
               as they interfere with the site generation. -->
          <moduleExcludes>
            <xdoc>navigation.xml,changes.xml</xdoc>
          </moduleExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.4.3</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0-beta-1</version>
      </plugin>
      <plugin>
        <!-- check the Apache Licence in all source files -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>rat-maven-plugin</artifactId>
        <version>1.0-alpha-3</version>
      </plugin>      
      <plugin>
        <!-- get test coverage for regression tests -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.2</version>
      </plugin>      
      <plugin>
        <!-- generate the changes report from changes.xml -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.0-beta-3</version>
      	<configuration>
      		<xmlPath>${basedir}/xdocs/changes.xml</xmlPath>
      	</configuration>              	      
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>            
      <plugin>
        <!-- generate the PMD reports -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <minimumTokens>200</minimumTokens>
          <targetJdk>${maven.compile.source}</targetJdk>
          <rulesets>
            <ruleset>/rulesets/basic.xml</ruleset>
            <ruleset>/rulesets/finalizers.xml</ruleset>            
            <ruleset>/rulesets/imports.xml</ruleset>
            <ruleset>/rulesets/unusedcode.xml</ruleset>
          </rulesets>
        </configuration>
      </plugin>      
      <plugin>
        <!-- generate the tag list report -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>2.1</version>
      </plugin>    
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <distributionManagement>
        <repository>
          <id>apache.releases</id>
          <name>Apache Release Distribution Repository</name>
          <url>${fulcrum.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-install-plugin</artifactId>
            <configuration>
              <createChecksum>true</createChecksum>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <!-- Pass these arguments to the deploy plugin. -->
              <arguments>-Prelease</arguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>create-javadoc-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <source>${maven.compile.source}</source>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>rc</id>
      <distributionManagement>
        <repository>
          <id>apache.snapshots</id>
          <name>Apache Development Snapshot Repository</name>
          <url>${fulcrum.deployment.protocol}://people.apache.org/www/turbine.apache.org/builds/turbine/fulcrum/${fulcrum.componentid}/${fulcrum.release.version}/${fulcrum.rc.version}/staged</url>
        </repository>
        <snapshotRepository>
          <id>apache.snapshots</id>
          <name>Apache Development Snapshot Repository</name>
          <url>${fulcrum.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
        </snapshotRepository>

      </distributionManagement>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-install-plugin</artifactId>
            <configuration>
              <createChecksum>true</createChecksum>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>site</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <!-- Pass these arguments to the deploy plugin. -->
              <arguments>-Prc</arguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>create-javadoc-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <source>${maven.compile.source}</source>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>attached</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>    
  </profiles>
     
  <properties>
  
    <!-- Default configuration for compiler source and target JVM -->
    <maven.compile.source>1.3</maven.compile.source>
    <maven.compile.target>1.3</maven.compile.target>
    
    <!-- Default values for the download-page generation by commons-build-plugin -->
    <commons.release.name>${project.artifactId}-${fulcrum.release.version}</commons.release.name>
    <commons.binary.suffix>-bin</commons.binary.suffix>

    <!-- Fulcrum Component Id -->
    <fulcrum.componentid>${project.artifactId}</fulcrum.componentid>
    
    <!-- The RC version used in the staging repository URL. -->
    <fulcrum.rc.version>RC1</fulcrum.rc.version>

    <!--
      Make the deployment protocol pluggable. This allows to switch to
      other protocols like scpexe, which some users prefer over scp.
    -->
    <fulcrum.deployment.protocol>scp</fulcrum.deployment.protocol>
    
    <!--
      Encoding of Java source files: Make sure, that the compiler and
      the javadoc generator use the right encoding. Subprojects may
      overwrite this, if they are using another encoding.
    -->
    <fulcrum.encoding>iso-8859-1</fulcrum.encoding>
    <fulcrum.docEncoding>${fulcrum.encoding}</fulcrum.docEncoding>

    <!-- maven-surefire-plugin -->
    <test>**/*Test</test>
  </properties>

</project>
