<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>

    <parent>
        <groupId>org.kie</groupId>
        <artifactId>kie-parent-with-dependencies</artifactId>
        <version>6.0.0.Final</version>
    </parent>

    <groupId>org.jbpm</groupId>
    <artifactId>jbpm-form-modeler</artifactId>
    <packaging>pom</packaging>

    <modules>
        <module>jbpm-form-modeler-core</module>
        <module>jbpm-form-modeler-integrations</module>
        <module>jbpm-form-modeler-panels</module>
        <module>jbpm-form-modeler-sample-custom-types</module>
        <module>jbpm-form-modeler-showcase</module>
    </modules>

    <profiles>
        <profile>
            <id>fullProfile</id>
            <activation>
                <property>
                    <name>full</name>
                </property>
            </activation>
            <modules>
            </modules>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>target/generated-sources/annotations</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <!-- global configuration to achieve that web module compiled classes and resources
             will be archived in a .jar in the config.WEB-INF/lib directory insted of the config.WEB-INF/classes
             -->
                    <archiveClasses>true</archiveClasses>
                    <attachClasses>true</attachClasses>
                    <classesClassifier>classes</classesClassifier>
                    <packagingExcludes>WEB-INF/lib/*-classes.jar</packagingExcludes>

                </configuration>
            </plugin>

            <!-- We need source files generated by our Java Annotations Processor -->
            <!-- in the resulting JAR for GWT to reference in child projects. Consequentially -->
            <!-- copy the source files to the target folder before packaging -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>target/generated-sources/annotations</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>.errai/**</include>
                                <include>.niogit/**</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

            <!-- Zanata - translations -->
            <plugin>
                <groupId>org.zanata</groupId>
                <artifactId>zanata-maven-plugin</artifactId>
                <configuration>
                    <includes>**/messages.properties,**/Constants.properties,**/forms-resources.properties</includes>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
