https://github.com/xwiki/xwiki-commons
Raw File
Tip revision: c63e601989fce06a6dd2d2f7e0fbeb2f1ef286b2 authored by Vincent Massol on 24 February 2015, 11:31:30 UTC
[maven-release-plugin] prepare release xwiki-commons-6.2.6
Tip revision: c63e601
pom.xml
<?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<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.xwiki.commons</groupId>
    <artifactId>xwiki-commons</artifactId>
    <version>6.2.6</version>
  </parent>
  <artifactId>xwiki-commons-pom</artifactId>
  <name>XWiki Commons - Root POM</name>
  <packaging>pom</packaging>
  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <!-- Show compiler warnings -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgument>-Xlint:all</compilerArgument>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>

      <!-- We want to force packaging the license resources in the produced XWiki artifacts -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.xwiki.commons</groupId>
            <artifactId>xwiki-commons-tool-license-resources</artifactId>
            <version>${commons.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>xwiki-license-resources</id>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>org.xwiki.commons:xwiki-commons-tool-license-resources:${commons.version}</resourceBundle>
              </resourceBundles>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.xwiki.commons</groupId>
            <artifactId>xwiki-commons-tool-enforcer-dependencies</artifactId>
            <version>${commons.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>enforce-no-legacy-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <xwikiBannedDependencies implementation="org.xwiki.tool.enforcer.XWikiBannedDependencies">
                  <searchTransitive>true</searchTransitive>
                  <message>Don't depend on a XWiki Legacy module!</message>
                  <excludes>
                    <exclude>.*xwiki.*:.*-legacy-.*</exclude>
                  </excludes>
                </xwikiBannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!-- Apply checkstyle rules and fail the build in case of errors. The checkstyle config
             files are taken from the build-tools JAR module.-->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <dependencies>
            <dependency>
              <groupId>org.xwiki.commons</groupId>
              <artifactId>xwiki-commons-tool-verification-resources</artifactId>
              <version>${commons.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>checkstyle.xml</configLocation>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Check license headers and fail the build if they're missing or not matching the defined format -->
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <skip>${xwiki.license.skip}</skip>
            <header>license.txt</header>
            <strictCheck>true</strictCheck>
            <headerDefinitions>
              <!-- Our style for XML headers isn't standard so we need to define it in a custom manner.
                   See xwiki-commons-tool-verification-resources module -->
              <headerDefinition>license-xml-definition.xml</headerDefinition>
              <headerDefinition>license-script-definition.xml</headerDefinition>
              <headerDefinition>license-batch-definition.xml</headerDefinition>
            </headerDefinitions>
            <!-- Our Java and XML styles aren't the default so we need to change the mapping -->
            <mapping>
              <java>SLASHSTAR_STYLE</java>
              <aj>SLASHSTAR_STYLE</aj>
            </mapping>
            <!-- We're only interested in checking our sources and our POMs -->
            <includes>
              <include>src/**</include>
              <include>pom.xml</include>
            </includes>
            <excludes>
              <!-- At the moment we don't have a comment syntax for components.txt files so we need to exclude them
                   from the check -->
              <exclude>**/components.txt</exclude>
              <exclude>**/component-overrides.txt</exclude>
              <!-- Since there's no comment syntax for Maven IT tests's goal.txt file we need to exclude it -->
              <exclude>**/it/**/goals.txt</exclude>
              <exclude>**/goal.txt</exclude>
            </excludes>
          </configuration>
          <!-- Add a dependency since this is where the maven-license-plugin plugin will find the license.txt file -->
          <dependencies>
            <dependency>
              <groupId>org.xwiki.commons</groupId>
              <artifactId>xwiki-commons-tool-verification-resources</artifactId>
              <version>${commons.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.xwiki.commons</groupId>
          <artifactId>xwiki-commons-tool-xar-plugin</artifactId>
          <version>${commons.version}</version>
          <configuration>
            <!-- Add missing license headers by default -->
            <formatLicense>true</formatLicense>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
back to top