<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) 2009, Progress Software Corporation and/or its 
  subsidiaries or affiliates.  All rights reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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>

  <groupId>org.fusesource.mop</groupId>
  <artifactId>mop-project</artifactId>
  <packaging>pom</packaging>
  <version>1.0-m1</version>
  <name>MOP :: Project</name>
  <description>A tool for running Java executables from artifacts within maven repositories</description>

  <properties>
    <forge-project-id>mop</forge-project-id>
    <forge-project-id-uc>MOP</forge-project-id-uc>

    <junit-version>3.8.1</junit-version>
    <maven-version>3.0-alpha-5</maven-version>
  </properties>

  <url>http://${forge-project-id}.fusesource.org</url>
  <inceptionYear>2009</inceptionYear>

  <organization>
    <name>Progress Software Inc.</name>
    <url>http://fusesource.com/</url>
  </organization> 

  <issueManagement>
    <system>jira</system>
    <url>http://fusesource.com/issues/browse/${forge-project-id-uc}</url>
  </issueManagement>
  
  <mailingLists>
    <mailingList>
      <name>${forge-project-id} dev</name>
      <post>${forge-project-id}-dev@fusesource.org</post>
      <subscribe>${forge-project-id}-dev-subscribe@fusesource.org</subscribe>
    </mailingList>
    <mailingList>
      <name>${forge-project-id} commits</name>
      <post>${forge-project-id}-commits@fusesource.org</post>
      <subscribe>${forge-project-id}-commits-subscribe@fusesource.org</subscribe>
    </mailingList>
  </mailingLists>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <scm>
    <connection>scm:git:git://forge.fusesource.com/${forge-project-id}.git</connection>
    <developerConnection>scm:git:ssh://git@forge.fusesource.com/${forge-project-id}.git</developerConnection>
    <url>http://fusesource.com/forge/gitweb?p=${forge-project-id}.git</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>release.fusesource.org</id>
      <name>Release Repository</name>
      <url>dav:http://fusesource.com/forge/dav/${forge-project-id}/repo/release</url>
    </repository>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>snapshot.fusesource.org</id>
      <name>Snapshot Repository</name>
      <url>dav:http://fusesource.com/forge/dav/${forge-project-id}/repo/snapshot</url>
    </snapshotRepository>
    <site>
      <id>website.fusesource.org</id>
      <name>website</name>
      <url>dav:http://fusesource.com/forge/dav/${forge-project-id}/maven/${project.version}</url>
    </site>
  </distributionManagement> 

  <repositories>
    <!--
      <repository> <id>apache.snapshots2</id> <name>Apache Development
      Snapshot Repository</name>
      <url>http://repository.apache.org/snapshots</url> <releases>
      <enabled>false</enabled> </releases> <snapshots>
      <enabled>true</enabled> </snapshots> </repository>
    -->
    <repository>
      <id>public.sonatype</id>
      <name>Sonatype Public Repository</name>
      <url>http://repository.sonatype.org/content/groups/public</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>

    <repository>
      <id>mvneclipse.sonatype</id>
      <name>Sonatype maven-eclipse Repository</name>
      <url>http://repository.sonatype.org/content/groups/maven-eclipse</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>

    <repository>
      <id>open.iona.m2</id>
      <name>Fusesource Open Source Community Release Repository</name>
      <url>http://repo.fusesource.com/maven2</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <repository>
      <id>open.iona.m2-snapshot</id>
      <name>Fusesource Open Source Community Snapshot Repository</name>
      <url>http://repo.fusesource.com/maven2-snapshot</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>

  </repositories>

  <modules>
    <module>mop-apt</module>
    <module>mop-core</module>
    <module>mop-guice</module>
    <module>mop-spring</module>
    <module>mop</module>
  </modules>


  <build>
    <defaultGoal>install</defaultGoal>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>1.0-beta-5</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>com.google.code.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.4.0</version>
        <configuration>
          <!--
            <basedir>${basedir}</basedir>
            <header>${basedir}/etc/header.txt</header>
          -->
          <header>etc/header.txt</header>
          <quiet>false</quiet>
          <failIfMissing>true</failIfMissing>
          <aggregate>false</aggregate>
          <includes>
            <include>pom.xml</include>
            <include>*/pom.xml</include>
            <include>**/pom.xml</include>
            <include>**/src/**</include>
            <include>*/src/**</include>
          </includes>
          <excludes>
            <exclude>target/**</exclude>
            <exclude>etc/**</exclude>
            <exclude>website/**</exclude>
          </excludes>
          <useDefaultExcludes>true</useDefaultExcludes>
          <useDefaultMapping>true</useDefaultMapping>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
        
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-idea-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>true</downloadJavadocs>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>true</downloadJavadocs>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <failIfNoTests>false</failIfNoTests>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.2</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.2</version>
          </dependency>
        </dependencies>
      </plugin>          

    </plugins>
  </build>
  
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jxr-maven-plugin</artifactId>
        <configuration>
          <aggregate>true</aggregate>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <excludePackageNames>*.internal</excludePackageNames>
          <aggregate>true</aggregate>
          <linksource>true</linksource>
          <links>
            <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
            <link>https://jna.dev.java.net/nonav/javadoc</link>
          </links>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>sumary</report>
              <report>plugins</report>
              <report>dependencies</report>
              <report>mailing-list</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>surefire-report-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
  

  <profiles>
    <profile>
      <id>gshell</id>
      <modules>
        <module>mop-gshell</module>
      </modules>
    </profile>

    <!--
      To generate a graph of the project dependencies, run: mvn -P graph
      graph:project
    -->
    <profile>
      <id>graph</id>
      <pluginRepositories>
        <pluginRepository>
          <id>mvnplugins.fusesource.org</id>
          <url>http://mvnplugins.fusesource.org/repo/release</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </pluginRepository>
      </pluginRepositories>
      <build>
        <plugins>
          <plugin>
            <groupId>org.fusesource.mvnplugins</groupId>
            <artifactId>maven-graph-plugin</artifactId>
            <version>1.2</version>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
  </profiles>
</project>
