<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">
  <parent>
    <artifactId>myfaces-shared-project</artifactId>
    <groupId>org.apache.myfaces.shared</groupId>
    <version>2.0.7</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>myfaces-shared-orchestra</artifactId>
  <name>MyFaces Shared Orchestra</name>
  <description>This is the MyFaces Shared Orchestra Subproject Description [INSERT MORE STUFF HERE]</description>
  <url>http://myfaces.apache.org</url>
  <scm>
    <connection>scm:svn:https://svn.apache.org/repos/asf/myfaces/shared/branches/2_0_7</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/shared/branches/2_0_7</developerConnection>
    <url>https://svn.apache.org/repos/asf/myfaces/shared/branches/2_0_7</url>
  </scm>
  <build>
    <resources>
      <resource>
        <directory>target/refactored-shared-sources/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dependency-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.myfaces.shared</groupId>
                  <artifactId>myfaces-shared-core</artifactId>
                  <version>${version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/unpacked-shared-sources</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>refactor-shared-sources</id>
            <phase>process-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <property value="${project.build.directory}/unpacked-shared-sources" name="refactor.src.dir" />
                <property value="${project.build.directory}/refactored-shared-sources/main/java" name="refactor.output.dir" />
                <property value="shared_orchestra" name="refactor.package.new" />
                <ant inheritRefs="true" inheritAll="true" antfile="build.xml" dir="${project.basedir}">
                  <target name="refactor-java-sources" />
                </ant>
              </tasks>
              <sourceRoot>${project.build.directory}/refactored-shared-sources/main/java</sourceRoot>
            </configuration>
          </execution>
          <execution>
            <id>refactor-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <property value="${project.build.directory}/unpacked-shared-sources" name="refactor.src.dir" />
                <property value="${project.build.directory}/refactored-shared-sources/main/resources" name="refactor.output.dir" />
                <property value="shared_orchestra" name="refactor.package.new" />
                <ant inheritRefs="true" inheritAll="true" antfile="build.xml" dir="${project.basedir}">
                  <target name="refactor-resources" />
                </ant>
              </tasks>
              <resourceRoot>${project.build.directory}/refactored-shared-sources/main/resources</resourceRoot>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-source</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
