<?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>xyz.cofe</groupId>
        <artifactId>cxconsole-parent</artifactId>
        <version>0.2.2</version>
    </parent>
    <artifactId>cxgroovy</artifactId>
    <packaging>jar</packaging>
    <properties>
        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
        <cxgroovy.engine.name>CxGroovy</cxgroovy.engine.name>
        <cxgroovy.engine.version>${project.version}</cxgroovy.engine.version>
        <cxgroovy.engine.language.name>Groovy</cxgroovy.engine.language.name>
        <cxgroovy.engine.language.version>${dep.groovy.version}</cxgroovy.engine.language.version>
        <cxgroovy.engine.mime>text/groovy</cxgroovy.engine.mime>
        <cxgroovy.engine.extensions>groovy</cxgroovy.engine.extensions>
    </properties>
    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>cxbootstrap-cp</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>cxconsole-base</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>cxscript</artifactId>
            <version>${project.version}</version>
        </dependency>
<!--        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>${dep.groovy.artid}</artifactId>
            <version>${dep.groovy.version}</version>
            <classifier>indy</classifier>
            <type>pom</type>            
            <type>${dep.groovy.type}</type>
        </dependency>-->


<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.5.6</version>
    <type>pom</type>
</dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sql-localds</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
            <version>1.3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xyz.cofe</groupId>
            <artifactId>winrun4j</artifactId>
            <version>0.4.5</version>
        </dependency>
        <!--<dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>logs</artifactId>
            <version>0.3-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>-->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.version</include>
                    <include>**/*.help.txt</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/main/resources</directory>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <executions>
                  <execution>
                    <id>default-test</id>
                    <phase>test</phase>
                    <goals>
                      <goal>test</goal>
                    </goals>
                  </execution>
                </executions>
              </plugin>
            <!-- Поддержка junit/compile -->
            <!--<plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>-->
            
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                   <includes>
                       <include>**/*Test.java</include>
                   </includes>
                   <systemPropertyVariables>
                       <java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file>
                   </systemPropertyVariables>
                </configuration>
            </plugin>
            -->
            
            <!-- Поддержка Service Provider Interfaces -->
            <plugin>
                <groupId>eu.somatik.serviceloader-maven-plugin</groupId>
                <artifactId>serviceloader-maven-plugin</artifactId>
                <version>1.1.0</version>
                <configuration>
                  <services>
                    <param>xyz.cofe.cxconsole.ConsoleService</param>
                    <param>xyz.cofe.cxconsole.appdata.Xml2Object</param>
                    <!--<param>xyz.cofe.cxconsole.ob.ObjectBrowserPlugin</param>-->
                    <param>xyz.cofe.gui.swing.tree.ob.ObjectBrowserPlugin</param>
                  </services>
                </configuration>
                <executions>
                  <execution>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>

            <!-- 
            Генерация shell скриптов
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <version>1.10</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <repositoryLayout>flat</repositoryLayout>
                    <useWildcardClassPath>true</useWildcardClassPath>
                    <repositoryName>lib</repositoryName>
                    <programs>
                        <program>
                            <mainClass>xyz.cofe.cxconsole.groovy.CXGroovyCLI</mainClass>
                            <id>cxgroovy</id>
                        </program>
                    </programs>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>