<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>tools</artifactId>
    <groupId>fr.opensagres.xdocreport</groupId>
    <version>2.2.1-SNAPSHOT</version>
  </parent>
  <artifactId>fr.opensagres.xdocreport.openoffice.tools</artifactId>
  <name>Openoffice tools</name>
  <build>
    <finalName>${artifactId}</finalName>
    <directory>dist</directory>
    <outputDirectory>build</outputDirectory>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>test</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>test</directory>
      </testResource>
    </testResources>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.openoffice</groupId>
      <artifactId>unoil</artifactId>
      <version>3.2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.openoffice</groupId>
      <artifactId>juh</artifactId>
      <version>3.2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.swinglabs</groupId>
      <artifactId>swing-layout</artifactId>
      <version>1.0.3</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>fr.opensagres.xdocreport</groupId>
      <artifactId>fr.opensagres.xdocreport.remoting.javaclient</artifactId>
      <version>2.2.1-SNAPSHOT</version>

    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>generate_oxt</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>createOXT</id>
                <phase>package</phase>
                <configuration>
                  <target>
                    <!-- TODO : Customize the path where LibreOffice/OpenOffice -->
                    <property name="office.program.dir" value="/Applications" />
                    <ant antfile="${basedir}/build.xml">
                      <target name="uno-package" />
                    </ant>
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.4.0</version>
            <executions>
              <execution>
                <id>copy-dependencies</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                <includeScope>runtime</includeScope>
<!--                   <excludeScope>provided-</excludeScope> -->
                  <outputDirectory>${basedir}/lib/cxf</outputDirectory>
                  <stripVersion>true</stripVersion>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>