<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you 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>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-parent</artifactId>
    <version>34</version>
  </parent>

  <artifactId>commons-weaver-parent</artifactId>
  <version>1.1</version>
  <packaging>pom</packaging>

  <name>Apache Commons Weaver</name>

  <description>
    Apache Commons Weaver provides an easy way to enhance compiled Java
    classes by generating ("weaving") bytecode into those classes.
  </description>

  <url>http://commons.apache.org/proper/commons-weaver</url>

  <issueManagement>
    <system>jira</system>
    <url>http://issues.apache.org/jira/browse/WEAVER</url>
  </issueManagement>

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

    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>

    <commons.componentid>weaver</commons.componentid>
    <commons.release.version>1.1</commons.release.version>
    <commons.release.name>commons-weaver-${commons.release.version}</commons.release.name>
    <commons.rc.version>RC3</commons.rc.version>
    <commons.jira.id>WEAVER</commons.jira.id>
    <commons.jira.pid>12315320</commons.jira.pid>
    <commons.site.path>commons-weaver</commons.site.path>
    <asm.version>5.0.3</asm.version>
    <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${commons.site.path}</commons.scmPubUrl>

    <ant.version>1.9.3</ant.version>
    <checkstyle.version>2.11</checkstyle.version>
  </properties>

  <developers>
    <developer>
      <id>mbenson</id>
      <name>Matt Benson</name>
      <email>mbenson AT apache DOT org</email>
      <organization>Apache</organization>
    </developer>
    <developer>
      <id>struberg</id>
      <name>Mark Struberg</name>
      <email>struberg AT apache DOT org</email>
      <organization>Apache</organization>
    </developer>
  </developers>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/weaver/tags/1.1_RC3</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/weaver/tags/1.1_RC3</developerConnection>
    <url>http://svn.apache.org/viewvc/commons/proper/weaver/tags/1.1_RC3</url>
  </scm>

  <distributionManagement>
    <site>
      <id>commons.site</id>
      <name>Apache Commons Site SVN</name>
      <url>scm:svn:${commons.scmPubUrl}</url>
    </site>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-processor</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-processor</artifactId>
        <classifier>sources</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-processor</artifactId>
        <classifier>javadoc</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-privilizer-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-privilizer-api</artifactId>
        <classifier>sources</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-privilizer-api</artifactId>
        <classifier>javadoc</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-privilizer</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-privilizer</artifactId>
        <classifier>sources</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-privilizer</artifactId>
        <classifier>javadoc</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-normalizer</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-normalizer</artifactId>
        <classifier>sources</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-normalizer</artifactId>
        <classifier>javadoc</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-maven-plugin</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-maven-plugin</artifactId>
        <classifier>sources</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-maven-plugin</artifactId>
        <classifier>javadoc</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-antlib</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-antlib</artifactId>
        <classifier>sources</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-weaver-antlib</artifactId>
        <classifier>javadoc</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.xbean</groupId>
        <artifactId>xbean-finder-shaded</artifactId>
        <version>3.18</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.2.1</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
      </dependency>
      <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.17.1-GA</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-commons</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-tree</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-util</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-analysis</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-debug-all</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-notices</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target xmlns:if="ant:if" xmlns:unless="ant:unless">
                <presetdef name="truth">
                  <condition value="true" else="false" />
                </presetdef>

                <macrodef name="seek">
                  <attribute name="name" />
                  <attribute name="addto" />
                  <sequential>
                    <union id="@{name}-ws" />
                    <step dir="${user.dir}" name="@{name}" addto="@{addto}" ws="@{name}-ws" />
                  </sequential>
                </macrodef>

                <macrodef name="step">
                  <attribute name="name" />
                  <attribute name="dir" />
                  <attribute name="addto" />
                  <attribute name="ws" />
                  <sequential>
                    <local name="seenDir" />
                    <truth property="seenDir">
                      <resourcecount when="gt" count="0">
                        <intersect id="intersection">
                          <resources refid="@{ws}" />
                          <file name="@{dir}" />
                        </intersect>
                      </resourcecount>
                    </truth>
                    <sequential unless:true="${seenDir}">
                      <augment id="@{ws}">
                        <file file="@{dir}" />
                      </augment>
                      <local name="exists" />
                      <truth property="exists">
                        <available file="@{dir}/@{name}" />
                      </truth>

                      <sequential if:true="${exists}">
                        <augment id="@{addto}">
                          <file file="@{dir}/@{name}" />
                        </augment>
                      </sequential>
                      <sequential unless:true="${exists}">
                        <local name="parent.dir" />
                        <dirname property="parent.dir" file="@{dir}" />
                        <step dir="${parent.dir}" name="@{name}" addto="@{addto}" ws="@{ws}" />
                      </sequential>
                    </sequential>
                  </sequential>
                </macrodef>

                <truth property="pom-only">
                  <equals arg1="${project.packaging}" arg2="pom" />
                </truth>
                <sequential unless:true="${pom-only}">
                  <union id="notices" />
                  <seek name="LICENSE.txt" addto="notices" />
                  <seek name="NOTICE.txt" addto="notices" />

                  <mkdir dir="${project.build.directory}/generated-resources/notices/META-INF" />
                  <copy verbose="true" todir="${project.build.directory}/generated-resources/notices/META-INF">
                    <resources refid="notices" />
                  </copy>

                  <mkdir dir="${project.build.directory}/generated-test-resources/notices/META-INF" />
                  <copy verbose="true" todir="${project.build.directory}/generated-test-resources/notices/META-INF">
                    <resources refid="notices" />
                  </copy>

                  <mkdir dir="${project.build.directory}/apidocs/META-INF" />
                  <copy verbose="true" todir="${project.build.directory}/apidocs/META-INF">
                    <resources refid="notices" />
                  </copy>
                </sequential>
              </target>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>${ant.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-test-jar</id>
            <phase>package</phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipIfEmpty>true</skipIfEmpty>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>create-javadoc-jar</id>
            <goals>
              <goal>javadoc</goal>
              <goal>jar</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
        <configuration>
          <source>${maven.compiler.source}</source>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tag>${commons.release.version}_${commons.rc.version}</tag>
          <preparationGoals>changes:changes-check</preparationGoals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <configuration>
          <content>${project.build.directory}/staging</content>
          <ignorePathsToDelete>
            <ignorePathToDelete>javadocs</ignorePathToDelete>
          </ignorePathsToDelete>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.3</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-markdown</artifactId>
            <version>1.3</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-test-sources</id>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <excludeSubProjects>false</excludeSubProjects>
          <excludes>
            <exclude>**/target/**</exclude>
            <exclude>**/dependency-reduced-pom.xml</exclude>
            <exclude>**/.*</exclude>
            <exclude>**/.*/**</exclude>
            <exclude>**/*.svg</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source-notices</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${project.build.directory}/generated-resources/notices</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>add-test-notices</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${project.build.directory}/generated-test-resources/notices</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <configuration>
          <aggregate>true</aggregate>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <excludeSubProjects>false</excludeSubProjects>
          <excludes>
            <exclude>**/target/**</exclude>
            <exclude>**/dependency-reduced-pom.xml</exclude>
            <exclude>**/.*</exclude>
            <exclude>**/.*/**</exclude>
            <exclude>**/*.svg</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <goals>
                  <goal>single</goal>
                </goals>
                <!-- disable assembly:single from commons-parent
                     release profile; multimodule assembly handled
                     by dist module -->
                <phase />
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>create-source-jar</id>
                <!-- suppress execution specified by parent profile -->
                <phase />
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>site</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <aggregate>true</aggregate>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>quality</id>
      <activation>
        <property>
          <name>!quality.skip</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${checkstyle.version}</version>
            <dependencies>
              <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>commons-weaver-build-tools</artifactId>
                <version>${project.version}</version>
              </dependency>
            </dependencies>
            <configuration>
              <configLocation>org/apache/commons/weaver/checkstyle.xml</configLocation>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>commons-weaver-build-tools</artifactId>
                <version>${project.version}</version>
              </dependency>
            </dependencies>
            <configuration>
              <rulesets>
                <ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
              </rulesets>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>commons-weaver-build-tools</artifactId>
                <version>${project.version}</version>
              </dependency>
            </dependencies>
            <configuration>
              <excludeFilterFile>/org/apache/commons/weaver/findbugs-exclude-filter.xml</excludeFilterFile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <modules>
    <module>build-tools</module>
    <module>processor</module>
    <module>modules</module>
    <module>maven-plugin</module>
    <module>example</module>
    <module>ant</module>
    <module>dist</module>
  </modules>

</project>
