<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>1.9.2</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>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</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/"/>
                                    <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>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>release</phase>
                        <configuration>
                            <tasks>
                               <copy file="../hazelcast/target/hazelcast-${project.version}-javadoc.jar" tofile="target/hazelcast-all-${project.version}-javadoc.jar"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
        </plugins>
    </build>

    <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>
    </dependencies>

</project>
