<?xml version="1.0" encoding="UTF-8"?>
<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>net.sf.m-m-m</groupId>
  <artifactId>mmm</artifactId>
  <version>2.0.2</version>
  <packaging>pom</packaging>
  <name>${project.artifactId}</name>
  <description>Mature Modular Meta-Framework (MMM) is a generic and modular meta-framework to build applications.</description>
  <url>http://m-m-m.sourceforge.net/</url>
  <inceptionYear>2001</inceptionYear>

  <properties>
    <java.version>1.7</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <com.google.gwt.version>2.7.0</com.google.gwt.version>
    <jacoco.version>0.7.4.201502262128</jacoco.version>
    <mmm.flatten.mode>oss</mmm.flatten.mode>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <version>${com.google.gwt.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-codeserver</artifactId>
        <version>${com.google.gwt.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>${com.google.gwt.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>${com.google.gwt.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.6.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.9.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changes-plugin</artifactId>
          <!-- http://jira.codehaus.org/browse/MCHANGES-190 -->
          <version>2.7.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changelog-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <configuration>
            <!-- http://jira.codehaus.org/browse/MJAVADOC-308 -->
            <!--<maxmemory>5048m</maxmemory>-->
            <notree>true</notree>
            <show>private</show>
            <encoding>${project.reporting.outputEncoding}</encoding>
            <charset>${project.build.sourceEncoding}</charset>
            <docfilessubdirs>true</docfilessubdirs>
            <stylesheetfile>${user.dir}/src/main/javadoc/stylesheet.css</stylesheetfile>
            <additionalparam>-Xdoclint:none</additionalparam>
            <links>
              <link>http://docs.oracle.com/javase/8/docs/api/</link>
              <link>http://m-m-m.sourceforge.net/apidocs/</link>
            </links>
            <doctitle>JavaDocs for ${project.name} ${project.version}</doctitle>
            <windowtitle>JavaDocs for ${project.name} ${project.version}</windowtitle>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.18.1</version>
          <configuration>
            <!-- Surefire changed the default to the project.build.directory causing trouble with file paths to test resources -->
            <workingDirectory>${basedir}</workingDirectory>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.18.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.4</version>
          <configuration>
            <targetJdk>${java.version}</targetJdk>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>taglist-maven-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>2.7.0</version>
          <!--
          <dependencies>
            <dependency>
              <groupId>com.google.gwt</groupId>
              <artifactId>gwt-dev</artifactId>
              <version>${com.google.gwt.version}</version>
            </dependency>
            <dependency>
              <groupId>com.google.gwt</groupId>
              <artifactId>gwt-user</artifactId>
              <version>${com.google.gwt.version}</version>
            </dependency>
            <dependency>
              <groupId>com.google.gwt</groupId>
              <artifactId>gwt-servlet</artifactId>
              <version>${com.google.gwt.version}</version>
            </dependency>
          </dependencies>
          -->
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>1.0.0-beta-5</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>flatten-maven-plugin</artifactId>
                    <versionRange>[0.1,)</versionRange>
                    <goals>
                      <goal>flatten</goal>
                      <goal>clean</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <includeEmptyDirs>true</includeEmptyDirs>
        </configuration>
      </plugin>

      <!-- configure java compiler -->
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <encoding>${project.build.sourceEncoding}</encoding>
           <source>${java.version}</source>
           <target>${java.version}</target>
           <!-- we need to extend a class from "com.sun.internal" -->
           <compilerArgument>-XDignore.symbol.file=true</compilerArgument>
           <fork>true</fork>
         </configuration>
      </plugin>

      <!-- advanced manifests -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <!-- generate and use flattened pom instead of pom.xml -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <configuration>
          <flattenMode>${mmm.flatten.mode}</flattenMode>
        </configuration>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- also generate source JARs -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- avoid version in local war files, exclude sources JARs from WARs -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
        	<packagingExcludes>WEB-INF/lib/*-sources.jar</packagingExcludes>
          <warName>${project.artifactId}</warName>
        </configuration>
      </plugin>

      <!-- JaCoCo for test coverage -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <phase>pre-site</phase>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <!--
          <execution>
            <id>default-report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          -->
        </executions>
      </plugin>
      <!-- site generation settings-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
      <!-- genercate jacoco coverage report-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
          <phase>post-site</phase>
          <goals>
            <goal>run</goal>
          </goals>
          <configuration>
            <target>
              <!-- Execute an ant task within maven -->
              <echo message="Generating JaCoCo Reports" />
              <taskdef name="report" classname="org.jacoco.ant.ReportTask">
                <classpath path="${settings.localRepository}/org/jacoco/org.jacoco.ant/${jacoco.version}/org.jacoco.ant-${jacoco.version}.jar" />
              </taskdef>
              <mkdir dir="${basedir}/target/site/coverage-report" />
              <report>
                <executiondata>
                  <fileset dir="${basedir}">
                    <include name="**/target/**/jacoco.exec" />
                  </fileset>
                </executiondata>
                <structure name="m-m-m project coverage">
                  <group name="m-m-m">
                    <classfiles>
                      <fileset dir="${basedir}">
                        <include name="**/target/classes/**/*.class" />
                      </fileset>
                    </classfiles>
                    <sourcefiles encoding="${project.build.sourceEncoding}">
                      <fileset dir="${basedir}">
                        <include name="**/src/main/java/**/*.java" />
                      </fileset>
                    </sourcefiles>
                  </group>
                </structure>
                <html destdir="${basedir}/target/site/coverage-report/html" />
                <xml destfile="${basedir}/target/site/coverage-report/coverage-report.xml" />
                <csv destfile="${basedir}/target/site/coverage-report/coverage-report.csv" />
              </report>
            </target>
          </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.jacoco</groupId>
            <artifactId>org.jacoco.ant</artifactId>
            <version>${jacoco.version}</version>
          </dependency>
        </dependencies>
      </plugin>

    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <notree>true</notree>
          <show>private</show>
          <encoding>${project.reporting.outputEncoding}</encoding>
          <charset>${project.build.sourceEncoding}</charset>
          <docfilessubdirs>true</docfilessubdirs>
          <stylesheetfile>${user.dir}/src/main/javadoc/stylesheet.css</stylesheetfile>
          <additionalparam>-Xdoclint:none -source ${java.version}</additionalparam>
          <links>
            <link>http://docs.oracle.com/javase/8/docs/api/</link>
            <link>http://m-m-m.sourceforge.net/apidocs/</link>
          </links>
          <doctitle>JavaDocs for ${project.name} ${project.version}</doctitle>
          <windowtitle>JavaDocs for ${project.name} ${project.version}</windowtitle>
        </configuration>
        <reportSets>
          <reportSet>
            <id>mmm.javadoc</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>mmm.javadoc.aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <configuration>
          <tags>
            <tag>TODO</tag>
            <tag>@todo</tag>
            <tag>FIXME</tag>
            <tag>@deprecated</tag>
          </tags>
        </configuration>
      </plugin>
     </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>mmm.deploy</id>
      <build>
        <plugins>
          <!-- also generate javadoc JARs -->
          <plugin>
            <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>
          <!-- Sign artifacts with PGP -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
            	<keyname>joerg@j-hohwiller.de</keyname>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- separate eclipse build from command-line... -->
      <id>mmm.eclipse</id>
      <activation>
        <property>
          <name>eclipse.application</name>
        </property>
      </activation>
      <build>
        <directory>eclipse-target</directory>
      </build>
    </profile>
  </profiles>
  <issueManagement>
    <system>GitHub</system>
    <url>http://github.com/m-m-m/mmm/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git@github.com:m-m-m/mmm.git</connection>
    <developerConnection>scm:git:git@github.com:m-m-m/mmm.git</developerConnection>
    <url>https://github.com/m-m-m/mmm/tree/master</url>
    <tag/>
  </scm>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>MMM Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>MMM Snapshot Repository</name>
      <!--<url>https://oss.sonatype.org/content/repositories/snapshots/</url>-->
      <url>file://${user.dir}/target/snapshots/</url>
    </snapshotRepository>
    <site>
      <id>m-m-m.sf.net</id>
      <url>file://${user.dir}/target/mmm-site</url>
    </site>
  </distributionManagement>
  <mailingLists>
    <mailingList>
      <name>mmm-devel</name>
      <subscribe>http://lists.sourceforge.net/lists/listinfo/m-m-m-devel</subscribe>
      <unsubscribe>http://lists.sourceforge.net/lists/listinfo/m-m-m-devel</unsubscribe>
      <post>m-m-m-devel@lists.sourceforge.net</post>
      <archive>http://sourceforge.net/mailarchive/forum.php?forum=m-m-m-devel</archive>
      <otherArchives/>
    </mailingList>
  </mailingLists>
  <organization>
    <name>mmm-Team</name>
    <url>http://m-m-m.sourceforge.net/team-list.html</url>
  </organization>
  <developers>
    <developer>
      <id>hohwille</id>
      <name>J&#246;rg Hohwiller</name>
      <email>hohwille@users.sourceforge.net</email>
      <url>http://www.j-hohwiller.de/joerg</url>
      <organization></organization>
      <organizationUrl/>
      <roles>
        <role>admin</role>
        <role>designer</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
      <properties/>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Malte Brunnlieb</name>
      <email>m_brunnl@cs.uni-kl.de</email>
      <url>https://github.com/may-bee/</url>
      <organization/>
      <organizationUrl/>
      <roles>
      </roles>
      <timezone>+1</timezone>
      <properties/>
    </contributor>
    <contributor>
      <name>Christoph Bauer</name>
      <email>fridolin@users.sourceforge.net</email>
      <url>http://www.christoph-bauer.net/</url>
      <organization/>
      <organizationUrl/>
      <roles>
      </roles>
      <timezone>+1</timezone>
      <properties/>
    </contributor>
  </contributors>
  <licenses>
    <license>
      <name>Apache Software Licenese</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repro</distribution>
      <comments/>
    </license>
  </licenses>
</project>
