<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.hornetq</groupId>
      <artifactId>hornetq-pom</artifactId>
      <version>2.4.7.Final</version>
   </parent>

   <artifactId>hornetq-core-client</artifactId>
   <packaging>jar</packaging>
   <name>HornetQ Core Client</name>

   <properties>
      <hornetq.basedir>${project.parent.basedir}</hornetq.basedir>
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging-processor</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jgroups</groupId>
         <artifactId>jgroups</artifactId>
      </dependency>
      <dependency>
         <groupId>org.hornetq</groupId>
         <artifactId>hornetq-commons</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.hornetq</groupId>
         <artifactId>hornetq-journal</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>io.netty</groupId>
         <artifactId>netty-all</artifactId>
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <profiles>
      <profile>
         <id>release</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.9</version>
                  <configuration>
                     <doclet>org.jboss.apiviz.APIviz</doclet>
                     <docletArtifact>
                        <groupId>org.jboss.apiviz</groupId>
                        <artifactId>apiviz</artifactId>
                        <version>1.3.2.GA</version>
                     </docletArtifact>
                     <useStandardDocletOptions>true</useStandardDocletOptions>
                     <minmemory>128m</minmemory>
                     <maxmemory>512m</maxmemory>
                     <quiet>false</quiet>
                     <aggregate>true</aggregate>
                     <excludePackageNames>org.hornetq.core:org.hornetq.utils</excludePackageNames>
                  </configuration>
                  <executions>
                     <execution>
                        <id>javadocs</id>
                        <goals>
                           <goal>jar</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <build>
      <resources>
         <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
               <!-- Adds a directory to the list of source folders to be used in this project. This is
                    here to let Maven know about:
                    target/generated-sources/xslt/org/hornetq/api/config/HornetQDefaultConfiguration.java
                    which is generated by ./src/main/resources/hqDefaults.xsl using the HornetQ
                    configuration schema. -->
               <execution>
                  <id>add-source</id>
                  <phase>generate-sources</phase>
                  <goals>
                     <goal>add-source</goal>
                  </goals>
                  <configuration>
                     <sources>
                        <source>./target/generated-sources/xslt</source>
                     </sources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>xml-maven-plugin</artifactId>
            <executions>
               <execution>
                  <goals>
                     <goal>transform</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <transformerFactory>net.sf.saxon.TransformerFactoryImpl</transformerFactory>
               <transformationSets>
                  <transformationSet>
                     <!-- Generates target/generated-sources/xslt/.../HornetQDefaultConfiguration.java
                          using this XSLT `./src/main/resources/hqDefaults.xsl`. -->
                     <dir>../hornetq-server/src/main/resources/schema</dir>
                     <outputDir>${project.build.directory}/generated-sources/xslt</outputDir>
                     <stylesheet>./src/main/resources/hqDefaults.xsl</stylesheet>
                     <includes>
                        <include>hornetq-configuration.xsd</include>
                     </includes>
                     <fileMappers>
                        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                           <targetName>./org/hornetq/api/config/HornetQDefaultConfiguration.java</targetName>
                        </fileMapper>
                     </fileMappers>
                  </transformationSet>
               </transformationSets>
            </configuration>
            <dependencies>
               <dependency>
                  <groupId>net.sf.saxon</groupId>
                  <artifactId>saxon</artifactId>
                  <version>8.7</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>javacc-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>javacc</id>
                  <goals>
                     <goal>javacc</goal>
                  </goals>
                  <configuration>
                     <isStatic>false</isStatic>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
               <execution>
                  <phase>test</phase>
                  <goals>
                     <goal>test-jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

</project>
