<?xml version="1.0" encoding="UTF-8"?>
<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>
    <groupId>org.jbpm</groupId>
    <artifactId>jbpm-designer</artifactId>
    <version>7.41.0.Final</version>
  </parent>

  <artifactId>jbpm-designer-api</artifactId>
  <packaging>jar</packaging>

  <name>jBPM Designer - API</name>

  <properties>
    <java.module.name>org.jbpm.designer.api</java.module.name>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-services-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-project-api</artifactId>
    </dependency>

    <!-- Errai Core -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
    </dependency>

    <!-- Errai Common -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-common</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.workbench.services</groupId>
      <artifactId>kie-wb-common-services-api</artifactId>
    </dependency>

  </dependencies>



  <build>
    <plugins>
      <plugin>
        <groupId>com.coderplus.maven.plugins</groupId>
        <artifactId>copy-rename-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-zanata-files</id>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <fileSets>
                <fileSet>
                  <sourceFile>src/main/resources/org/jbpm/designer/resources/i18n/DesignerConstants.properties</sourceFile>
                  <destinationFile>src/main/resources/org/jbpm/designer/resources/i18n/DesignerConstants_en.properties</destinationFile>
                </fileSet>
              </fileSets>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
            <groupId>com.google.code.maven-replacer-plugin</groupId>
            <artifactId>replacer</artifactId>
            <configuration>
                <includes>
                    <include>**/DesignerConstants.properties</include>
                    <include>**/DesignerConstants_en.properties</include>
                    <include>**/DesignerConstants_de.properties</include>
                    <include>**/DesignerConstants_es.properties</include>
                    <include>**/DesignerConstants_fr.properties</include>
                    <include>**/DesignerConstants_ja.properties</include>
                    <include>**/DesignerConstants_pt_BR.properties</include>
                    <include>**/DesignerConstants_zh_CN.properties</include>
                </includes>
                <excludes>
                    <exclude>**/ErraiApp.properties</exclude>
                </excludes>
                <replacements>
                    <replacement>
                        <token>\\\\"</token>
                        <value>"</value>
                    </replacement>
                    <replacement>
                        <token>\\"</token>
                        <value>"</value>
                    </replacement>
                    <replacement>
                        <token>"</token>
                        <value>\\\\"</value>
                    </replacement>
                    <replacement>
                        <token>\\\\'</token>
                        <value>'</value>
                    </replacement>
                    <replacement>
                        <token>\\'</token>
                        <value>'</value>
                    </replacement>
                    <replacement>
                        <token>'</token>
                        <value>\\\\'</value>
                    </replacement>
                    <replacement>
                        <token>'</token>
                        <value>\\'</value>
                    </replacement>
                    <replacement>
                        <token>"</token>
                        <value>\\"</value>
                    </replacement>
                    <replacement>
                        <token>\\\\n</token>
                        <value>\\n</value>
                    </replacement>
                    <replacement>
                        <token>\\n</token>
                        <value>\\\\n</value>
                    </replacement>
                </replacements>
            </configuration>
        </plugin>

    </plugins>

  </build>

</project>
