<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>swingx-project</artifactId>
    <groupId>at.swimmesberger</groupId>
    <version>1.6.8</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>swingx-all</artifactId>
  <packaging>bundle</packaging>
  <name>SwingX Complete</name>
  <description>A Maven project to aggregate all modules into a single artifact.</description>
  <properties>
    <project.generatedDependencies>${project.generatedSourcesDirectory}/dependencies</project.generatedDependencies>
  </properties>
  <!-- make the dependent swingx modules optional, since we're aggregating -->
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>swingx-graphics</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>swingx-core</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>swingx-mavensupport</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <id>src-dependencies</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
              <includeGroupIds>${project.groupId}</includeGroupIds>
              <excludeArtifactIds>swingx-mavensupport</excludeArtifactIds>
              <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
              <outputDirectory>${project.generatedDependencies}</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.12</version>
        <executions>
          <execution>
            <id>add-dependencies-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.generatedDependencies}</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-dependencies-resource</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${project.generatedDependencies}</directory>
                  <excludes>
                    <exclude>**/*.java</exclude>
                  </excludes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
