<?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">
  <parent>
    <artifactId>jon-plugins</artifactId>
    <groupId>org.jbosson.plugins.fuse</groupId>
    <version>7.3.2.redhat-445</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.jbosson.plugins.fuse</groupId>
  <artifactId>fabric-groups-plugin</artifactId>
  <packaging>jar</packaging>

  <name>JON Plugins :: Fabric Groups Server Plugin</name>
  <description>JON Fabric Groups Server Plugin</description>

  <dependencies>

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

  </dependencies>

  <build>
    <!-- filter all resources -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>

      <!-- Attach Sources -->
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>

      <!-- Attach Javadoc -->
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>

      <!-- Validate the Server plugin -->
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>integration-test</phase>
            <configuration>
              <target>
                <property name="test.classpath" refid="maven.test.classpath" />
                <echo>Validating plugins...</echo>
                <java classname="org.rhq.enterprise.server.plugin.pc.ServerPluginValidatorUtil" failonerror="true" fork="true">
                  <classpath>
                    <pathelement path="${test.classpath}" />

                    <!-- See also: https://docs.jboss.org/author/display/RHQ/Design-Server+Side+Plugins#Design-ServerSidePlugins-xmlschemas -->

                    <pathelement location="${project.build.directory}/${project.build.finalName}" />
                  </classpath>
                  <sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.SimpleLog" />
                  <!--
                  <sysproperty key="rhq.test.serverplugins" value="${rhq.test.serverplugins}" />
                  <jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,address=8797,server=y,suspend=y" />
                  -->
                </java>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Maven Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

</project>