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

    Copyright (C) 2009-2012 the original author or authors.
    See the notice.md file distributed with this work for additional
    information regarding copyright ownership.

    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>

  <parent>
    <groupId>org.fusesource</groupId>
    <artifactId>fusesource-pom</artifactId>
    <version>1.8</version>
  </parent>

  <groupId>org.fusesource.restygwt</groupId>
  <artifactId>restygwt-project</artifactId>
  <version>1.3</version>
  <packaging>pom</packaging>
  
  <name>${project.artifactId}</name>
  <description>RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects</description>

  <properties>
    <forge-project-id>restygwt</forge-project-id>
    <forge-project-id-uc>RESTYGWT</forge-project-id-uc>
    <gwt-version>2.4.0</gwt-version>
  </properties>

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

  <issueManagement>
    <system>jira</system>
    <url>http://github.com/chirino/resty-gwt/issues</url>
  </issueManagement>
  
  <mailingLists>
    <mailingList>
      <name>RestyGWT Development List</name>
      <archive>http://groups.google.com/group/restygwt</archive>
      <post>restygwt@googlegroups.com</post>
      <subscribe>restygwt+subscribe@googlegroups.com</subscribe>
      <unsubscribe>restygwt+unsubscribe@googlegroups.com</unsubscribe>
    </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://github.com/chirino/resty-gwt.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:chirino/resty-gwt.git</developerConnection>
    <url>http://github.com/chirino/resty-gwt</url>
  </scm>
  <distributionManagement>
    <site>
      <id>website.fusesource.org</id>
      <name>website</name>
      <url>dav:http://fusesource.com/forge/dav/${forge-project-id}/versions/${project.version}/maven</url>
    </site>
  </distributionManagement>
  
  <developers>
    <developer>
      <id>chirino</id>
      <name>Hiram Chirino</name>
      <email>hiram@hiramchirino.com</email>
      <url>http://hiramchirino.com</url>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <build>
    <defaultGoal>install</defaultGoal>
    <extensions>
      <extension>
        <groupId>org.fusesource.mvnplugins</groupId>
        <artifactId>fuse-jxr-skin</artifactId>
        <version>1.9</version>
      </extension>
    </extensions>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.fusesource.mvnplugins</groupId>
                  <artifactId>fuse-javadoc-skin</artifactId>
                  <version>1.9</version>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/javadoc-skin</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <!-- <gwtHome>${env.GWT_HOME}</gwtHome> -->
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <failIfNoTests>false</failIfNoTests>
          <useFile>false</useFile>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.0</version>
        <executions>
         <execution>
           <id>attach-descriptor</id>
           <goals>
             <goal>attach-descriptor</goal>
           </goals>
         </execution>
       </executions>
       <configuration>
          <reportPlugins>
            
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
              <version>2.4</version>
              <configuration>
                <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
              </configuration>
              <!-- simpler configuration without reportSets available for usual cases -->
              <reports>
                <report>index</report>
                <report>dependencies</report>
                <report>issue-tracking</report>
                <report>license</report>
                <report>mailing-list</report>
                <report>modules</report>
                <report>project-team</report>
                <report>plugin-management</report>
                <report>plugins</report>
                <report>scm</report>
              </reports>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.7</version>
              <configuration>
                <charset>UTF-8</charset>
                <docencoding>UTF-8</docencoding>
                <version>false</version>
                <author>true</author>
                <keywords>true</keywords>
          
                <stylesheetfile>${project.build.directory}/javadoc-skin/stylesheet.css</stylesheetfile>
                <!-- 
                <resourcesArtifacts>
                  <resourcesArtifact>
                    <groupId>org.fusesource.mvnplugins</groupId>
                    <artifactId>fuse-javadoc-skin</artifactId>
                    <version>1.9</version>
                  </resourcesArtifact>
                </resourcesArtifacts>
                -->
          
                <doctitle>${project.name} API Reference (${project.version})</doctitle>
                <windowtitle>${project.name} API Reference (${project.version})</windowtitle>
                <links>
                  <link>http://download.oracle.com/javase/6/docs/api</link>
                  <link>http://google-web-toolkit.googlecode.com/svn/javadoc/2.2</link>
                </links>
                <encoding>UTF-8</encoding>
                <locale>en_US</locale>
                <linksource>true</linksource>
                <excludePackageNames>*.internal</excludePackageNames>
              </configuration>

            </plugin> 
                       
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jxr-plugin</artifactId>
              <version>2.3</version>
              <configuration>
                <stylesheet>fuse-jxr-skin-stylesheet.css</stylesheet>
                <inputEncoding>UTF-8</inputEncoding>
                <outputEncoding>UTF-8</outputEncoding>
                <linkJavadoc>true</linkJavadoc>
                <docTitle>${project.name} Source Xref (${project.version})</docTitle>
                <windowTitle>${project.name} Source Xref (${project.version})</windowTitle>
              </configuration>
            </plugin>
            
          </reportPlugins>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.7</version>

        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        
        <configuration>
          <charset>UTF-8</charset>
          <docencoding>UTF-8</docencoding>
          <version>false</version>
          <author>true</author>
          <keywords>true</keywords>

          <stylesheetfile>${project.build.directory}/javadoc-skin/stylesheet.css</stylesheetfile>
          <!-- 
          <resourcesArtifacts>
            <resourcesArtifact>
              <groupId>org.fusesource.mvnplugins</groupId>
              <artifactId>fuse-javadoc-skin</artifactId>
              <version>1.9</version>
            </resourcesArtifact>
          </resourcesArtifacts>
          -->

          <doctitle>${project.name} API Reference (${project.version})</doctitle>
          <windowtitle>${project.name} API Reference (${project.version})</windowtitle>
          <links>
            <link>http://download.oracle.com/javase/6/docs/api</link>
            <link>http://google-web-toolkit.googlecode.com/svn/javadoc/2.2</link>
          </links>
          <encoding>UTF-8</encoding>
          <locale>en_US</locale>
          <linksource>true</linksource>
          <excludePackageNames>*.internal</excludePackageNames>
        </configuration>
      </plugin> 

        <plugin>
            <!--
                This plugin's configuration is used to store Eclipse
                m2e settings only. It has no influence on the Maven build itself.

                @see: http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-spring
                -->
            <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>gwt-maven-plugin</artifactId>
                                <versionRange>[${gwt-version},)</versionRange>
                                <goals>
                                    <goal>css</goal>
                                    <goal>i18n</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <execute />
                            </action>
                        </pluginExecution>

                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>gwt-maven-plugin</artifactId>
                                <versionRange>[${gwt-version},)</versionRange>
                                <goals>
                                    <goal>resources</goal>
                                    <goal>test</goal>
                                    <goal>compile</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <ignore />
                            </action>
                        </pluginExecution>

                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-dependency-plugin</artifactId>
                                <versionRange>[2.3,)</versionRange>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <ignore />
                            </action>
                        </pluginExecution>

                    </pluginExecutions>
                </lifecycleMappingMetadata>
            </configuration>
        </plugin>

    </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <!-- 
        Do a license check by running       : mvn -P license license:check  
        UPdate the license check by running : mvn -P license license:format  
      -->
    <profile>
      <id>license</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <version>1.6.0</version>
            <configuration>
              <quiet>false</quiet>
              <header>src/main/resources/license-header.txt</header>
              <aggregate>true</aggregate>
              <includes>
                  <include>src/**</include>
                  <include>**/pom.xml</include>
              </includes>
              <excludes>
                <!-- ignore files produced during a build -->
                <exclude>**/target/**</exclude>
                <exclude>**/WEB-INF/classes/**</exclude>

                <exclude>**/*.response-headers</exclude>
                <exclude>**/*.response</exclude>
            
                <!-- ignore binary files -->
                <exclude>**/*.jpg</exclude>
                <exclude>**/*.png</exclude>
                <exclude>**/*.gif</exclude>
                <exclude>**/*.ico</exclude>
                <exclude>**/*.ipr</exclude>
                <exclude>**/*.iml</exclude>
                <exclude>**/*.iws</exclude>
              </excludes>
              <useDefaultExcludes>false</useDefaultExcludes>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>        
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>download</id>
      <repositories>
        <repository>
          <id>apache.snapshots</id>
          <name>Apache Development Snapshot Repository</name>
          <url>https://repository.apache.org/content/repositories/snapshots</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>

      </repositories>

      <pluginRepositories>
        <pluginRepository>
          <id>codehaus</id>
          <url>http://scala-tools.org/repo-releases</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

  </profiles>

  <modules>
    <module>restygwt</module>
    <module>restygwt-website</module>
  </modules>

</project>
