<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.rhq</groupId>
      <artifactId>rhq-core-parent</artifactId>
      <version>3.0.1.GA</version>
   </parent>

   <groupId>org.rhq</groupId>
   <artifactId>rhq-core-plugindoc</artifactId>
   <packaging>maven-plugin</packaging>
   <name>RHQ PluginDoc Maven 2 Plugin</name>

   <dependencies>

      <dependency>
         <groupId>${rhq.groupId}</groupId>
         <artifactId>rhq-core-domain</artifactId>
         <version>${project.version}</version>
      </dependency>

      <dependency>
         <groupId>${rhq.groupId}</groupId>
         <artifactId>rhq-core-client-api</artifactId>
         <version>${project.version}</version>
      </dependency>

      <dependency>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.1.0.jboss</version>
      </dependency>

      <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
         <version>3.2</version>
      </dependency>

      <dependency>
         <groupId>oro</groupId>
         <artifactId>oro</artifactId>
         <version>2.0.7</version>
      </dependency>

      <dependency>
         <groupId>commons-lang</groupId>
         <artifactId>commons-lang</artifactId>
         <version>2.4</version>
      </dependency>

      <dependency>
         <groupId>hibernate-annotations</groupId>
         <artifactId>hibernate-annotations</artifactId>
         <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
         <scope>provided</scope>
      </dependency>

      <dependency>
         <groupId>javax.persistence</groupId>
         <artifactId>persistence-api</artifactId>
         <version>1.0</version>
      </dependency>

      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-api</artifactId>
         <version>2.0.8</version>
      </dependency>

      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-project</artifactId>
         <version>2.0.8</version>
      </dependency>

      <dependency>
         <groupId>org.apache.velocity</groupId>
         <artifactId>velocity</artifactId>
         <version>1.6.2</version>
      </dependency>

      <dependency>
         <groupId>org.codehaus.swizzle</groupId>
         <artifactId>swizzle-confluence</artifactId>
         <version>1.2.Alpha1</version>
      </dependency>
      
   </dependencies>
   

  <build>
    <plugins>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>

          <execution>
            <id>plugindoc-distro-package</id>
            <phase>install</phase>
            <configuration>
              <tasks>
                <ant antfile="${basedir}/ant-run.xml" dir="${basedir}" target="package-dist" inheritAll="false" inheritRefs="false">
                   <property name="settings.localRepository" value="${settings.localRepository}" />
                   <property name="project.version" value="${project.version}" />
                </ant>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>install-and-deploy-zip</id>
      <activation>
        <property>
          <name>brew</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>attach-installed-file-for-deployment</id>
                <phase>install</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <type>zip</type>
                      <file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
