<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>com.hazelcast</groupId>
        <artifactId>hazelcast-root</artifactId>
        <version>2.0-RC1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <name>hazelcast-all</name>
    <artifactId>hazelcast-all</artifactId>
    <packaging>jar</packaging>

    <repositories>
        <repository>
            <id>jboss</id>
            <url>http://repository.jboss.org/maven2/</url>
        </repository>
    </repositories>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>${maven.antrun.plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <tasks>
                                <property name="jar.name" value="hazelcast-all-${project.parent.version}.jar"/>
                                <delete file="target/${jar.name}" failonerror="false"/>
                                <jar jarfile="target/${jar.name}" manifest="src/main/resources/META-INF/MANIFEST.MF">
                                    <fileset dir="../hazelcast/target/classes/"/>
                                    <fileset dir="../hazelcast-client/target/classes/"/>
                                    <fileset dir="../hazelcast-hibernate/target/classes/"/>
                                    <fileset dir="../hazelcast-spring/target/classes/"/>
                                    <fileset dir="../hazelcast-cloud/target/classes/"/>
                                    <manifest>
                                        <attribute name="Built-By" value="Hazelcast.com"/>
                                        <attribute name="Main-Class" value="com.hazelcast.examples.TestApp"/>
                                    </manifest>
                                </jar>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven.source.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--<plugin>-->
                        <!--<groupId>org.apache.maven.plugins</groupId>-->
                        <!--<artifactId>maven-antrun-plugin</artifactId>-->
                        <!--<version>${maven.antrun.plugin.version}</version>-->
                        <!--<executions>-->
                            <!--<execution>-->
                                <!--<phase>verify</phase>-->
                                <!--<configuration>-->
                                    <!--<tasks>-->
                                        <!--<property name="source.jar.name"-->
                                                  <!--value="hazelcast-all-${project.parent.version}-sources.jar"/>-->
                                        <!--<delete file="target/${source.jar.name}" failonerror="false"/>-->
                                        <!--<jar jarfile="target/${source.jar.name}"-->
                                             <!--manifest="src/main/resources/META-INF/MANIFEST.MF">-->
                                            <!--<fileset dir="../hazelcast/src/main/java/"/>-->
                                            <!--<fileset dir="../hazelcast-client/src/main/java/"/>-->
                                            <!--<fileset dir="../hazelcast-hibernate/src/main/java/"/>-->
                                            <!--<fileset dir="../hazelcast-spring/src/main/java/"/>-->
                                            <!--<fileset dir="../hazelcast-cloud/src/main/java/"/>-->
                                            <!--<manifest>-->
                                                <!--<attribute name="Built-By" value="Hazelcast.com"/>-->
                                                <!--<attribute name="Main-Class" value="com.hazelcast.examples.TestApp"/>-->
                                            <!--</manifest>-->
                                        <!--</jar>-->
                                    <!--</tasks>-->
                                <!--</configuration>-->
                                <!--<goals>-->
                                    <!--<goal>run</goal>-->
                                <!--</goals>-->
                            <!--</execution>-->
                        <!--</executions>-->
                    <!--</plugin>-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>${maven.antrun.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>all-javadoc</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <javadoc destdir="target/apidocs" author="true" version="true" use="true"
                                                 windowtitle="Hazelcast API">
                                            <fileset dir="../hazelcast/src/main/java/" defaultexcludes="true">
                                                <include name="**/nio/DataSerializable*"/>
                                                <include name="**/core/**"/>
                                                <include name="**/monitor/**"/>
                                                <include name="**/merge/**"/>
                                                <include name="**/config/**"/>
                                                <include name="**/jmx/**"/>
                                                <include name="**/query/**"/>
                                                <include name="**/partition/**"/>
                                                <exclude name="**/*.html"/>
                                            </fileset>
                                            <fileset dir="../hazelcast-client/src/main/java/" defaultexcludes="true">
                                                <include name="**/HazelcastClient.java"/>
                                                <exclude name="**/*.html"/>
                                            </fileset>
                                            <fileset dir="../hazelcast-spring/src/main/java/" defaultexcludes="true">
                                                <include name="**/*.java"/>
                                                <exclude name="**/*.html"/>
                                            </fileset>
                                            <doctitle>
                                                <![CDATA[<h1>Hazelcast</h1>]]>
                                            </doctitle>
                                            <bottom>
                                                <![CDATA[<i>Copyright &#2.0-RC1; 2008-2011 Hazel Ltd. All Rights Reserved.</i>]]></bottom>
                                            <link href="http://download.oracle.com/javase/1.5.0/docs/api/"/>
                                            <link href="http://java.sun.com/products/servlet/2.3/javadoc/"/>
                                        </javadoc>
                                        <jar jarfile="target/hazelcast-all-${project.parent.version}-javadoc.jar">
                                            <fileset dir="target/apidocs"/>
                                        </jar>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>${project.parent.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-client</artifactId>
            <version>${project.parent.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-hibernate</artifactId>
            <version>${project.parent.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-spring</artifactId>
            <version>${project.parent.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-cloud</artifactId>
            <version>${project.parent.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>
