<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2011 The Open Source Research Group,
                   University of Erlangen-Nürnberg

    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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <!-- Parent POM: Sweble Wikitext Components -->

  <parent>
    <groupId>org.sweble.wikitext</groupId>
    <artifactId>sweble-wikitext</artifactId>
    <version>2.0.0</version>
  </parent>

  <!-- This POM: Sweble Wikitext Components - Basic Example -->

  <!-- Same groupId as parent -->
  <artifactId>swc-example-basic</artifactId>
  <!-- Same version as parent -->
  <packaging>jar</packaging>

  <name>SWC - Basic Example</name>
  <url>http://sweble.org/sites/swc-devel/alpha-latest/tooling/sweble/sweble-wikitext/swc-example-basic</url>
  <inceptionYear>2010</inceptionYear>
  <description>
    An example project that contains a simple application that is able to parse
    a page written in Wikitext and render it as HTML or plain text.
  </description>

  <!-- ==[ Properties ]===================================================== -->

  <properties>
    <sweble-wikitext.basedir>${project.parent.basedir}</sweble-wikitext.basedir>
  </properties>

  <!-- ==[ Dependencies ]=================================================== -->

  <dependencies>

    <!-- Apache Commons IO -->
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

    <!-- Sweble Wikitext Components -->
    <dependency>
      <groupId>org.sweble.wikitext</groupId>
      <artifactId>swc-engine</artifactId>
    </dependency>

    <!-- JUnit -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

  </dependencies>

  <!-- ==[ Dependency Management ]========================================== -->

  <dependencyManagement>
  </dependencyManagement>

  <build>

    <!-- ==[ Resource Configuration ]======================================= -->

    <!--
      see parent: <resources>
    -->

    <!-- ==[ Plugin Configuration ]========================================= -->

    <plugins>

      <!-- Create a JAR package -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.sweble.wikitext.example.App</mainClass>
              <classpathPrefix>lib/</classpathPrefix>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <!-- Check and format license headers -->
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <!-- I assume the configuration is inherited from the parent -->
          <excludes>
            <!-- These excludes should be the same as in the parent project -->
            <exclude>**/*.log</exclude>
            <exclude>**/.gitignore</exclude>
            <exclude>LICENSE</exclude>
            <exclude>NOTICE</exclude>

            <!-- Extra excludes for this project -->
            <exclude>README</exclude>
            <exclude>src/main/resources/render-template.html</exclude>
            <exclude>src/test/resources/**</exclude>
          </excludes>
        </configuration>
      </plugin>

    </plugins>

    <!-- ==[ Plugin Management ]============================================ -->

    <pluginManagement>
    </pluginManagement>

    <!-- ==[ Build Element Set ]============================================ -->

    <!--
      see parent: <sourceDirectory>
                  <scriptSourceDirectory>
                  <testSourceDirectory>
                  <outputDirectory>
                  <testOutputDirectory>
                  <extensions>
    -->

  </build>

  <!-- ==[ Reporting ]====================================================== -->

  <!--
    see parent: <reporting>
  -->

  <!-- ==[ More Project Information ]======================================= -->

  <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>

  <!--
    see parent: <organization>
                <developers>
                <contributors>
  -->

  <!-- ==[ Environment Settings ]=========================================== -->

  <!--
    see parent: <issueManagement>
                <ciManagement>
                <mailingLists>
  -->

  <scm>
    <connection>scm:git://sweble.org/git/sweble-wikitext.git</connection>
    <developerConnection>scm:git:ssh://gitosis@sweble.org/sweble-wikitext.git</developerConnection>
    <url>http://sweble.org/gitweb/?p=sweble-wikitext.git;a=summary</url>
    <tag>sweble-wikitext-2.0.0</tag>
  </scm>

  <!--
    see parent: <distributionManagement>
                <repositories>
                <pluginRepositories>
  -->

  <!-- ==[ Profiles ]======================================================= -->

  <profiles>

    <profile>
      <id>build-aggregates</id>
      <build>
        <plugins>

          <!-- Generate Jar with dependencies -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <inherited>false</inherited>
            <configuration>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
              <archive>
                <manifest>
                  <mainClass>org.sweble.wikitext.example.App</mainClass>
                </manifest>
              </archive>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>

  </profiles>

</project>
