  <!--
    ~ JBoss, Home of Professional Open Source
    ~ Copyright 2011, Red Hat and individual contributors as identified
    ~ by the @authors tag. See the copyright.txt in the distribution for a
    ~ full listing of individual contributors.
    ~
    ~ 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.
    ~
    ~ @authors Andrew Dinn
    -->
  <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>
      <groupId>org.jboss.byteman</groupId>
      <artifactId>byteman-root</artifactId>
      <packaging>pom</packaging>
      <description>
          Byteman is a java agent-based bytecode injection tool. It can be used to inject Event Condition Action rules
          into Java application and JVM runtime methods. Its primary purpose is to support execution tracing and fault
          injection testing.
      </description>
      <version>4.0.26</version>
      <name>byteman-root</name>
      <url>http://www.jboss.org/byteman</url>

      <issueManagement>
          <system>JIRA</system>
          <url>https://jira.jboss.org/jira/browse/BYTEMAN/</url>
      </issueManagement>
      <licenses>
          <license>
              <name>LGPL 2.1</name>
              <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
          </license>
      </licenses>

      <scm>
          <connection>scm:git:git://github.com/adinn/byteman.git</connection>
          <developerConnection>scm:git:git://github.com/adinn/byteman.git</developerConnection>
          <url>http://fisheye.jboss.org/browse/byteman/</url>
      </scm>

      <developers>
          <developer>
              <id>adinn</id>
              <name>Andrew Dinn</name>
              <email>adinn@redhat.com</email>
              <organization>JBoss</organization>
              <organizationUrl>http://www.jboss.org/</organizationUrl>
              <roles>
                  <role>project lead</role>
              </roles>
              <timezone>0</timezone>
          </developer>
          <developer>
              <id>kabir.khan@jboss.com</id>
              <name>Kabir Khan</name>
              <email>kabir.khan@jboss.com</email>
              <organization>JBoss</organization>
              <organizationUrl>http://www.jboss.org/</organizationUrl>
              <roles>
                  <role>contributing developer</role>
              </roles>
              <timezone>0</timezone>
          </developer>
      </developers>
      <!--
      <distributionManagement>
        <repository>
          <id>central</id>
          <name>Central Releases Repository</name>
          <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2</url>
        </repository>
      </distributionManagement>
      -->

      <properties>
        <!-- actual path to tools.jar is defined in the profiles below -->
        <tools.jar>/file-not-found/tools.jar</tools.jar>

        <!-- Decouple file encoding of the platform encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

         <!-- Maven Central properties -->
        <repo.sonatype.url>https://central.sonatype.com</repo.sonatype.url>
        <autoPublish>true</autoPublish>

        <autoVersionSubmodules>true</autoVersionSubmodules>
        <!-- for testing: command line args to enable debugger and verbose trace -->
        <debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -Dorg.jboss.byteman.verbose</debug.args>
        <!-- asm release version to use -->
        <asm.version>9.9</asm.version>
        <!-- maven-verification-plugin -->
        <tests.verification.file>access-verification.xml</tests.verification.file>
        <agent.verification.file>verification.xml</agent.verification.file>
    </properties>

    <dependencyManagement>
        <dependencies>

             <!-- Internal dependencies -->
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman</artifactId>
                 <version>${project.version}</version>
                 <classifier>sources</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman</artifactId>
                 <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-agent</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-agent</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-agent</artifactId>
                <version>${project.version}</version>
                <classifier>javadoc</classifier>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-jigsaw</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-jigsaw</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-layer</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-layer</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-submit</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-submit</artifactId>
                 <version>${project.version}</version>
                 <classifier>sources</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-submit</artifactId>
                 <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-install</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-install</artifactId>
                 <version>${project.version}</version>
                 <classifier>sources</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-install</artifactId>
                 <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-sample</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-sample</artifactId>
                 <version>${project.version}</version>
                 <classifier>sources</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-sample</artifactId>
                 <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-bmunit</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-bmunit</artifactId>
                 <version>${project.version}</version>
                 <classifier>sources</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-bmunit</artifactId>
                 <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-dtest</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-dtest</artifactId>
                 <version>${project.version}</version>
                 <classifier>sources</classifier>
             </dependency>
             <dependency>
                 <groupId>org.jboss.byteman</groupId>
                 <artifactId>byteman-dtest</artifactId>
                 <version>${project.version}</version>
                 <classifier>javadoc</classifier>
             </dependency>

             <!-- External dependencies -->
            <dependency>
                 <groupId>org.ow2.asm</groupId>
                 <artifactId>asm</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-analysis</artifactId>
                 <version>${asm.version}</version>
            </dependency>
            <dependency>
                 <groupId>org.ow2.asm</groupId>
                 <artifactId>asm-commons</artifactId>
                 <version>${asm.version}</version>
            </dependency>
             <dependency>
                 <groupId>net.sf.squirrel-sql.thirdparty-non-maven</groupId>
                 <artifactId>java-cup</artifactId>
                 <version>0.11a</version>
             </dependency>
            <dependency>
                 <groupId>de.jflex</groupId>
                 <artifactId>jflex</artifactId>
                 <version>1.4.3</version>
            </dependency>
             <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
                 <version>4.8.2</version>
             </dependency>
             <dependency>
                 <groupId>org.testng</groupId>
                 <artifactId>testng</artifactId>
                 <version>6.8.5</version>
             </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-verifier-plugin</artifactId>
                    <version>1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                  <groupId>org.sonatype.central</groupId>
                  <artifactId>central-publishing-maven-plugin</artifactId>
                  <version>0.9.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                  <attach>true</attach>
                  <detectJavaApiLink>false</detectJavaApiLink>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc-jar</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
              <groupId>org.sonatype.central</groupId>
              <artifactId>central-publishing-maven-plugin</artifactId>
              <extensions>true</extensions>
              <configuration>
                <publishingServerId>central</publishingServerId>
                <autoPublish>${autoPublish}</autoPublish>
                <deploymentName>${project.name} ${project.version}</deploymentName>
                <waitUntil>published</waitUntil>
                <centralBaseUrl>https://central.sonatype.com</centralBaseUrl>
                <centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
              </configuration>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>submit</module>
        <module>agent</module>
        <module>byteman</module>
        <module>tests</module>
        <module>layer</module>
        <module>jigsaw</module>
        <module>install</module>
        <module>contrib/bmunit</module>
        <module>contrib/bmunit5</module>
        <module>contrib/dtest</module>
        <module>contrib/rulecheck-maven-plugin</module>
        <module>sample</module>
        <module>download</module>
        <!-- docs module is activated in profile 'default-with-docs' -->
    </modules>

    <profiles>
      <profile>
        <id>skip-integration-test-skips-verification</id>
        <activation>
          <property>
            <name>skipITs</name>
          </property>
        </activation>
        <properties>
          <tests.verification.file>noverification.xml</tests.verification.file>
          <agent.verification.file>noverification.xml</agent.verification.file>
        </properties>
      </profile>
      <!--
	  profile for releasing to maven central. should normally be
	  enabled by default from settings
          
	    mvn -P centralRelease deploy

	  you will need to have permission to upload the jars to
	  the sonatype repo and to have configured the relevant gpg
	  key settings in ~/.m2/settings.xml

            <profile>
              <id>centralRelease</id>
              <properties>
                  <gpg.passphrase>XXXXXXXXXX</gpg.passphrase>
              </properties>
            </profile>

       you will also need to include a user name and password entry
       for the central release server - note that the ids must match
       the ones used in the repositories section of this pom

            <servers>
              <server>
                <id>centralrelease</id>
                <username>NNNNNNNN</username>
                <password>PPPPPPPP</password>
              </server>
           </servers>
      -->
      <profile>
          <id>centralRelease</id>
          <!-- we need to be able to sign the jars we install -->
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <version>1.5</version>
                      <configuration>
                          <passphrase>${gpg.passphrase}</passphrase>
                          <useAgent>${gpg.useAgent}</useAgent>
                      </configuration>
                      <executions>
                          <execution>
                              <id>sign-artifacts</id>
                              <phase>verify</phase>
                              <goals>
                                  <goal>sign</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      </profile>
      <!--
          This profile enables consuming snapshot artifacts from the snapshots repository.
      -->
      <profile>
        <id>snapshots</id>
        <activation>
          <activeByDefault>false</activeByDefault>
        </activation>
        <repositories>
          <repository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
              <enabled>false</enabled>
            </releases>
                    <snapshots>
                      <enabled>true</enabled>
                    </snapshots>
          </repository>
        </repositories>
      </profile>
    </profiles>
  </project>
