<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>

   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-parent</artifactId>
      <version>4.0.0.ALPHA4</version>
      <relativePath>parent/pom.xml</relativePath>
   </parent>

   <groupId>org.infinispan</groupId>
   <artifactId>infinispan</artifactId>
   <version>4.0.0.ALPHA4</version>

   <name>Infinispan Distribution</name>
   <description>Builds the complete Infinispan distribution bundles</description>
   <packaging>pom</packaging>

   <modules>
      <module>parent</module>
      <module>core</module>
      <module>tree</module>
      <module>cachestore/bdbje</module>
      <module>cachestore/s3</module>
      <module>cachestore/jdbc</module>
      <module>cachestore/jdbm</module>
      <module>jopr-plugin</module>
      <module>gui-demo</module>
   </modules>

   <profiles>
      <profile>
         <id>distribution</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <configuration>
                     <quiet>true</quiet>
                     <links>
                        <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
                        <link>http://java.sun.com/javaee/5/docs/api/</link>
                     </links>
                     <footer>
                     &lt;!-- Google Analytics --&gt;
&lt;script type='text/javascript'&gt;
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
&lt;/script&gt;
&lt;script type='text/javascript'&gt;
try {
var pageTracker = _gat._getTracker("UA-8601422-4");
pageTracker._trackPageview();
} catch(err) {}&lt;/script&gt;
                     </footer>
                  </configuration>
                  <executions>
                     <execution>
                        <id>javadoc</id>
                        <phase>package</phase>
                        <goals>
                           <goal>aggregate</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.3</version>
                  <executions>
                     <execution>
                        <id>create-consolidated-jar</id>
                        <phase>prepare-package</phase>
                        <goals>
                           <goal>run</goal>
                        </goals>
                        <configuration>
                           <tasks>
                              
                              <mkdir dir="target" />
                              <jar destfile="target/infinispan-all.jar">
                                 <fileset dir="cachestore/bdbje/target/classes" />
                                 <fileset dir="cachestore/jdbc/target/classes" />
                                 <fileset dir="cachestore/s3/target/classes" />
                                 <fileset dir="cachestore/jdbm/target/classes" />
                                 <fileset dir="core/target/classes" />
                                 <fileset dir="tree/target/classes" />
                                 <manifest>
                                    <attribute name="Main-Class" value="org.infinispan.Version" />
                                 </manifest>
                              </jar>
                           </tasks>
                        </configuration>
                     </execution>
                     <execution>
                        <id>remove-dot-ignore</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                           <goal>run</goal>
                        </goals>
                        <configuration>
                           <tasks>
                              <property name="file" value="${project.build.directory}/distribution/${artifactId}-${project-version}-single_jar.zip" />
                              <zip destfile="${file}.new">
                                 <zipfileset src="${file}">
                                    <exclude name="**/.ignore/**" />
                                 </zipfileset>
                              </zip>
                              <move file="${file}.new" tofile="${file}" />
                           </tasks>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jar-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>build-test-jar</id>
                        <phase>none</phase>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-assembly-plugin</artifactId>
                  <version>2.2-beta-3</version>
                  <executions>
                     <execution>
                        <id>assemble</id>
                        <phase>package</phase>
                        <goals>
                           <goal>single</goal>
                        </goals>
                     </execution>
                  </executions>
                  <configuration>
                     <descriptors>
                        <descriptor>src/main/resources/assemblies/single_jar.xml</descriptor>
                        <descriptor>src/main/resources/assemblies/bin.xml</descriptor>
                        <descriptor>src/main/resources/assemblies/all.xml</descriptor>
                        <descriptor>src/main/resources/assemblies/src.xml</descriptor>
                     </descriptors>
                     <finalName>${artifactId}-${project-version}</finalName>
                     <outputDirectory>target/distribution</outputDirectory>
                     <workDirectory>target/assembly/work</workDirectory>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>