<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.freehep</groupId>
  <artifactId>freehep-psviewer</artifactId>
  <version>2.0</version>

  <name>FreeHEP PostScript Viewer</name>
  <description>Stand-alone, Embeddable and Applet PostScript Viewer
  </description>
  <url>http://freehep.github.com/freehep-psviewer</url>

  <organization>
    <name>FreeHEP</name>
    <url>http://java.freehep.org</url>
  </organization>
  <inceptionYear>2001</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
    <license>
      <name>LGPL 2</name>
      <url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
      <distribution>repo</distribution>
      <comments>GNU Lesser General Public License</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>duns</id>
      <name>Mark Donszelmann</name>
      <email>Mark.Donszelmann@gmail.com</email>
      <url>http://duns.github.com</url>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/freehep/freehep-psviewer.git
    </connection>
    <developerConnection>scm:git:git@github.com:freehep/freehep-psviewer.git
    </developerConnection>
    <url>http://github.com/freehep/freehep-psviewer</url>
  </scm>

  <issueManagement>
    <system>jira</system>
    <url>http://bugs.freehep.org/browse/PSVIEWER</url>
  </issueManagement>

  <properties>
    <mavenVersion>2.0.9</mavenVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <distributionManagement>
    <repository>
      <id>freehep-releases</id>
      <name>FreeHEP Release Repository</name>
      <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/
      </url>
    </repository>
    <snapshotRepository>
      <id>freehep-snapshots</id>
      <name>FreeHEP Snapshot Repository</name>
      <url>http://oss.sonatype.org/content/repositories/freehep-snapshots/
      </url>
    </snapshotRepository>
    <!-- temporarily until we have a fixed site -->
    <site>
      <id>local</id>
      <url>file:///Users/duns/freehep/git/freehep-psviewer-site</url>
    </site>
  </distributionManagement>

  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <optimize>true</optimize>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-9</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.2.2</version>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <shadedArtifactAttached>true</shadedArtifactAttached>
          <shadedClassifierName>standalone</shadedClassifierName>
          <transformers>
            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
              <manifestEntries>
                <Main-Class>org.freehep.postscript.PSViewer</Main-Class>
              </manifestEntries>
            </transformer>
          </transformers>
          <artifactSet>
            <excludes>
              <exclude>junit:junit</exclude>
            </excludes>
          </artifactSet>
          <filters>
            <filter>
              <artifact>org.freehep:freehep-graphics-base</artifact>
              <excludes>
                <exclude>org/freehep/util/**</exclude>
                <exclude>org/freehep/swing/**</exclude>
                <exclude>org/freehep/xml/**</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.freehep:freehep-graphics2d</artifact>
              <includes>
                <include>org/freehep/graphics2d/font/**</include>
              </includes>
            </filter>
          </filters>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <inherited>true</inherited>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>
    <dependency>
      <groupId>org.freehep</groupId>
      <artifactId>freehep-argv</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>org.freehep</groupId>
      <artifactId>freehep-io</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>org.freehep</groupId>
      <artifactId>freehep-graphics2d</artifactId>
      <version>2.1.3</version>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.0-alpha-4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <inherited>true</inherited>
            <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>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <updateReleaseInfo>true</updateReleaseInfo>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
