<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 Red Hat, Inc.
  ~
  ~  Red Hat 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>
  <groupId>org.jbosson.plugins.fuse</groupId>
  <artifactId>jon-plugins</artifactId>
  <version>7.3.0.redhat-401</version>
  <packaging>pom</packaging>
  <name>JON Plugins :: Fuse Plugins Root</name>
  <description>JON Plugins for monitoring Fuse Products</description>
  <url>http://fusesource.com/forge/projects/jon-plugins/</url>
  <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>
      <comments>Plugin Source is licensed under ASLv2, for development use only</comments>
    </license>
    <license>
      <name>Red Hat Inc. License</name>
      <url>http://www.redhat.com/licenses/</url>
      <distribution>manual</distribution>
      <comments>Plugin Pack binaries in a Production Environment are subject to Red Hat License and require a Support Subscription</comments>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>dbokde</id>
      <name>Dhiraj Bokde</name>
      <organization>Red Hat Inc.</organization>
      <roles>
        <role>Technical Lead</role>
      </roles>
      <email>dbokde@redhat.com</email>
      <timezone>-8</timezone>
    </developer>
  </developers>

  <properties>
    <rhq.version>4.4.0</rhq.version>
    <!--<validator.version>4.6.0-SNAPSHOT</validator.version>-->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <JBOSS_FUSE_BUILD>379</JBOSS_FUSE_BUILD>
    <activemq.version>5.9.0.redhat-610401</activemq.version>
    <!-- moved here for perfectus to modify -->
    <fabric.version>1.0.0.redhat-401</fabric.version>
    <slf4j.version>1.4.2</slf4j.version>
    <validateWithPlugins>rhq-jmx-plugin</validateWithPlugins>
  </properties>

  <modules>
    <module>core</module>
    <module>activemq</module>
    <module>camel</module>
    <module>cxf</module>
    <module>servicemix3</module>
    <module>servicemix4</module>
    <module>fabric</module>
    <module>fabric-groups-plugin</module>
    <module>jboss-fuse</module>
    <module>distribution</module>
  </modules>

  <scm>
    <url>http://fusesource.com/forge/git/jon-plugins.git/</url>
    <connection>scm:git:http://fusesource.com/forge/git/jon-plugins.git/</connection>
    <developerConnection>scm:git:ssh://git@forge.fusesource.com/jon-plugins.git</developerConnection>
  </scm>

  <distributionManagement>
    <repository>
      <id>fusesource-nexus-staging</id>
      <name>Fusesource Release Repository</name>
      <url>http://repo.fusesource.com/nexus/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>fusesource-nexus-snapshots</id>
      <name>Fusesource Nexus Snapshots</name>
      <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
<!--
    <site>
      <id>website.fusesource.org</id>
      <name>website</name>
      <url>dav:http://fusesource.com/forge/dav/fabric/maven/${project.version}</url>
    </site>
-->
  </distributionManagement>

  <repositories>
    <repository>
      <id>repo1.maven</id>
      <name>Maven Central Repo</name>
      <url>http://repo1.maven.org/maven2/</url>
    </repository>
    <repository>
      <id>jboss</id>
      <name>JBoss Repository</name>
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>jboss-brew</id>
      <name>JBoss Brew Repository</name>
      <url>http://download.lab.bos.redhat.com/brewroot/repos/jboss-on-3-build/latest/maven/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>jboss-brew-nightly</id>
      <name>JBoss Brew Nightly Repository</name>
      <url>http://download.lab.bos.redhat.com/brewroot/repos/jboss-on-3-nightly-build/latest/maven/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <!-- FuseSource repositories -->
    <repository>
      <id>fusesource.m2</id>
      <name>FuseSource Community Release Repository</name>
      <url>http://repo.fusesource.com/nexus/content/repositories/public</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <repository>
      <id>fusesource.ea</id>
      <name>FuseSource Community Early Access Release Repository</name>
      <url>http://repo.fusesource.com/nexus/content/groups/ea</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <repository>
      <id>fusesource-nexus-staging</id>
      <name>FuseSource Release Proxy</name>
      <url>http://repo.fusesource.com/nexus/content/groups/m2-release-proxy</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <repository>
      <id>fusesource.m2-snapshot</id>
      <name>FuseSource Community Snapshot Repository</name>
      <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
    <repository>
      <id>fusesource.nexus.m2-snapshot</id>
      <name>FuseSource Community Snapshot Repository</name>
      <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>jboss</id>
      <name>JBoss Plugin Repository</name>
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>jboss-brew</id>
      <name>JBoss Brew Plugin Repository</name>
      <url>http://download.lab.bos.redhat.com/brewroot/repos/jboss-on-3-build/latest/maven/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>jboss-brew-nightly</id>
      <name>JBoss Brew Plugin Repository</name>
      <url>http://download.lab.bos.redhat.com/brewroot/repos/jboss-on-3-nightly-build/latest/maven/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <!-- FuseSource repositories -->
    <pluginRepository>
      <id>fusesource.nexus.m2-snapshot</id>
      <name>FuseSource Community Snapshot Repository</name>
      <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>

    <pluginRepository>
      <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>
    </pluginRepository>

    <pluginRepository>
      <id>fusesource.m2</id>
      <name>FuseSource Community Release Repository</name>
      <url>http://repo.fusesource.com/nexus/content/repositories/public</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </pluginRepository>

    <pluginRepository>
      <id>fusesource.ea</id>
      <name>FuseSource Community Early Access Release Repository</name>
      <url>http://repo.fusesource.com/nexus/content/groups/ea</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </pluginRepository>
    <pluginRepository>
      <id>fusesource-nexus-staging</id>
      <name>FuseSource Release Proxy</name>
      <url>http://repo.fusesource.com/nexus/content/groups/m2-release-proxy</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>

    <!-- Below are the core modules that are required dependencies of all plugins -->
    <dependency>
      <groupId>org.rhq</groupId>
      <artifactId>rhq-core-domain</artifactId>
      <version>${rhq.version}</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
      <exclusions>
        <exclusion>
          <groupId>hibernate</groupId>
          <artifactId>hibernate3</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.rhq</groupId>
      <artifactId>rhq-core-plugin-api</artifactId>
      <version>${rhq.version}</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
    </dependency>

    <dependency>
      <groupId>org.rhq</groupId>
      <artifactId>rhq-core-native-system</artifactId>
      <version>${rhq.version}</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
    </dependency>

    <dependency>
      <groupId>org.rhq</groupId>
      <artifactId>rhq-jmx-plugin</artifactId>
      <version>${rhq.version}</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
    </dependency>


    <!-- This is a fix for the Javac bug requiring annotations to be
         available when compiling dependent classes. It is fixed in JDK 6. -->
    <dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
      <version>1.0</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
    </dependency>

    <!-- This is a fix for the Javac bug requiring annotations to be
         available when compiling dependent classes; it is fixed in JDK 6. -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
      <version>3.4.0.GA</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
    </dependency>

    <!-- This is a fix for the Javac bug requiring annotations to be
         available when compiling dependent classes; it is fixed in JDK 6. -->
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.1</version>
      <scope>provided</scope> <!-- provided by the agent/plugin-container -->
    </dependency>

    <!-- Uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog
         all three are provided to your plugin by the agent/plugin-container -->

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1</version>
      <scope>provided</scope>
    </dependency>

    <!--
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>i18nlog</groupId>
      <artifactId>i18nlog</artifactId>
      <version>1.0.9</version>
    </dependency>
    -->

    <!-- PluginValidator -->
    <dependency>
      <groupId>org.rhq</groupId>
      <artifactId>rhq-core-plugin-container</artifactId>
      <version>${rhq.version}</version>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>

        <!-- compile source to use Java 1.5 -->
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
          </configuration>
        </plugin>

        <!-- Attach Sources -->
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- Attach Javadoc -->
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <executions>
            <execution>
              <id>attach-javadoc</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- copy plugin dependencies -->
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.4</version>
          <executions>
            <!-- copy dependency jars to include in plugin -->
            <execution>
              <id>copy-plugin-dependencies</id>
              <phase>process-resources</phase>
              <goals>
                <goal>copy</goal>
              </goals>
              <configuration>
                <artifactItems>
                  <artifactItem>
                    <groupId>org.jbosson.plugins.fuse</groupId>
                    <artifactId>core</artifactId>
                    <version>${project.version}</version>
                  </artifactItem>
                </artifactItems>
                <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <!-- validate plugin using antrun PluginValidator -->
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.7</version>
          <executions>
            <execution>
              <phase>integration-test</phase>
              <goals>
                <goal>run</goal>
              </goals>
              <configuration>
                <target>
                  <property name="test.classpath" refid="maven.test.classpath" />
                  <echo>Validating plugin ${project.artifactId}</echo>
                  <java classname="org.rhq.core.pc.plugin.PluginValidator" failonerror="true" fork="true">
                    <classpath>
                      <pathelement path="${test.classpath}" />
                      <fileset dir="${project.build.directory}">
                          <include name="${project.build.finalName}.jar" />
                      </fileset>
                    </classpath>
                    <sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.SimpleLog" />
                  </java>
                </target>
              </configuration>
            </execution>
          </executions>
        </plugin>

<!-- Replaced with antrun PluginValidator, since the validator below needs patch in BZ 883814
        <plugin>
          <groupId>org.rhq</groupId>
          <artifactId>rhq-plugin-validator</artifactId>
          <version>${validator.version}</version>
          <executions>
            <execution>
              <id>validate-plugin</id>
              <phase>verify</phase>
              <goals>
                <goal>rhq-plugin-validate</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
-->

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

</project>
