<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>
    <artifactId>tomahawk-assembly</artifactId>
    <packaging>pom</packaging>
    <name>Tomahawk Assembly</name>
    <description>This is the MyFaces Tomahawk Assembly [INSERT MORE STUFF HERE]</description>

    <parent>
        <groupId>org.apache.myfaces.tomahawk</groupId>
        <artifactId>tomahawk-project</artifactId>
        <version>1.1.15-SNAPSHOT</version>
    </parent>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/assembly</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/assembly</developerConnection>
        <url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/assembly</url>
    </scm>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-javadoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>javadoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/assembly-lib</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/assembly-lib</outputDirectory>
                            <excludeArtifactIds>jstl,tomahawk12,tomahawk20,tomahawk21</excludeArtifactIds>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-tlddoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>tlddoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/tlddoc</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-source</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
    
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>
    
                                <artifactItem>
                                    <groupId>org.apache.myfaces.shared</groupId>
                                    <artifactId>myfaces-shared-tomahawk</artifactId>
                                    <version>${myfaces-shared11-version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>
    
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/src</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-javadoc12</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk12</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>javadoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/javadoc12</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib12</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk12</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/assembly-lib12</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib12-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/assembly-lib12</outputDirectory>
                            <excludeArtifactIds>jstl,tomahawk,tomahawk20,tomahawk21</excludeArtifactIds>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-tlddoc12</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk12</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>tlddoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/tlddoc12</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-source12</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>

                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk12</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                                <artifactItem>
                                    <groupId>org.apache.myfaces.shared</groupId>
                                    <artifactId>myfaces-shared-tomahawk</artifactId>
                                    <version>${myfaces-shared12-version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                            </artifactItems>
                            <outputDirectory>${project.build.directory}/src12</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-javadoc20</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk20</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>javadoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/javadoc20</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib20</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk20</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/assembly-lib20</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib20-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/assembly-lib20</outputDirectory>
                            <excludeArtifactIds>jstl,tomahawk,tomahawk12,tomahawk21</excludeArtifactIds>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-tlddoc20</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk20</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>tlddoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/tlddoc20</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-source20</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>

                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk20</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                                <artifactItem>
                                    <groupId>org.apache.myfaces.shared</groupId>
                                    <artifactId>myfaces-shared-tomahawk</artifactId>
                                    <version>${myfaces-shared20-version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                            </artifactItems>
                            <outputDirectory>${project.build.directory}/src20</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-javadoc21</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk21</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>javadoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/javadoc21</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib21</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk21</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/assembly-lib21</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-lib21-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/assembly-lib21</outputDirectory>
                            <excludeArtifactIds>jstl,tomahawk,tomahawk12,tomahawk20</excludeArtifactIds>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-tlddoc21</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk21</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>tlddoc</classifier>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/tlddoc21</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-source21</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>

                                <artifactItem>
                                    <groupId>org.apache.myfaces.tomahawk</groupId>
                                    <artifactId>tomahawk21</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                                <artifactItem>
                                    <groupId>org.apache.myfaces.shared</groupId>
                                    <artifactId>myfaces-shared-tomahawk</artifactId>
                                    <version>${myfaces-shared21-version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                            </artifactItems>
                            <outputDirectory>${project.build.directory}/src21</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- EXECUTE mvn package to generate assembly files -->
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>makeassembly11</id>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/bin.xml</descriptor>
                                <descriptor>src/main/assembly/src.xml</descriptor>
                            </descriptors>
                            <finalName>tomahawk-${project.version}</finalName>
                            <outputDirectory>target/assembly/out</outputDirectory>
                            <workDirectory>target/assembly/work</workDirectory>
                        </configuration>                    
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>makeassembly12</id>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/bin12.xml</descriptor>
                                <descriptor>src/main/assembly/src12.xml</descriptor>
                            </descriptors>
                            <finalName>tomahawk12-${project.version}</finalName>
                            <outputDirectory>target/assembly/out</outputDirectory>
                            <workDirectory>target/assembly/work12</workDirectory>
                        </configuration>                    
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>makeassembly20</id>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/bin20.xml</descriptor>
                                <descriptor>src/main/assembly/src20.xml</descriptor>
                            </descriptors>
                            <finalName>tomahawk20-${project.version}</finalName>
                            <outputDirectory>target/assembly/out</outputDirectory>
                            <workDirectory>target/assembly/work20</workDirectory>
                        </configuration>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>makeassembly21</id>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/bin21.xml</descriptor>
                                <descriptor>src/main/assembly/src21.xml</descriptor>
                            </descriptors>
                            <finalName>tomahawk21-${project.version}</finalName>
                            <outputDirectory>target/assembly/out</outputDirectory>
                            <workDirectory>target/assembly/work21</workDirectory>
                        </configuration>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.myfaces.maven</groupId>
                <artifactId>wagon-maven-plugin</artifactId>
                <version>1.0.1</version>
                <configuration>
                    <id>myfaces-nightly-builds</id>
                    <url>scpexe://minotaur.apache.org/www/people.apache.org/builds/myfaces/nightly</url>
                    <inputDirectory>target/assembly/out</inputDirectory>
                </configuration>
            </plugin>
        </plugins>            
    </build>
    
    <!-- This profile attemped to add dependency libraries to tomahawk
         binaries and source packages. But it needs to uncomment
         on src/main/assembly/bin.xml dependencySets tag.
         
         But the dependency libraries can be found on the examples
         assembly, so it is better do not include it here.
         -->
    <!-- 
    <profiles>
        <profile>
            <id>tomahawk11</id>
            <activation>
                <property>
                    <name>!jsf</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>makeassembly11</id>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/assembly/bin.xml</descriptor>
                                        <descriptor>src/main/assembly/src.xml</descriptor>
                                    </descriptors>
                                    <finalName>tomahawk-${project.version}</finalName>
                                    <outputDirectory>target/assembly/out</outputDirectory>
                                    <workDirectory>target/assembly/work</workDirectory>
                                </configuration>                    
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.apache.myfaces.tomahawk</groupId>
                    <artifactId>tomahawk</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>            
        </profile>
        <profile>
            <id>tomahawk12</id>
            <activation>
                <property>
                    <name>jsf</name>
                    <value>12</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>makeassembly12</id>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/main/assembly/bin12.xml</descriptor>
                                        <descriptor>src/main/assembly/src12.xml</descriptor>
                                    </descriptors>
                                    <finalName>tomahawk12-${project.version}</finalName>
                                    <outputDirectory>target/assembly/out</outputDirectory>
                                    <workDirectory>target/assembly/work12</workDirectory>
                                </configuration>                    
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>                
                </plugins>
            </build>            
            <dependencies>
                <dependency>
                    <groupId>org.apache.myfaces.tomahawk</groupId>
                    <artifactId>tomahawk12</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    -->
    
    <dependencies>
      <dependency>
        <groupId>org.apache.myfaces.tomahawk</groupId>
        <artifactId>tomahawk</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.myfaces.tomahawk</groupId>
        <artifactId>tomahawk12</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.myfaces.tomahawk</groupId>
        <artifactId>tomahawk20</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.myfaces.tomahawk</groupId>
        <artifactId>tomahawk21</artifactId>
        <version>${project.version}</version>
      </dependency>
   </dependencies>
</project>
