<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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <groupId>org.robotframework</groupId>
  <artifactId>remoteswinglibrary</artifactId>
  <version>2.2.3</version>
  <packaging>jar</packaging>

  <name>robotframework-remoteswinglibrary</name>
  <description>A Robot Framework library + Java-agent for for Swing UI testing</description>
  <url>https://github.com/robotframework/remoteswinglibrary</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/robotframework/remoteswinglibrary</url>
    <connection>scm:git:https://github.com/robotframework/remoteswinglibrary</connection>
  </scm>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <developers>
    <developer>
      <name>Robot Framework developers</name>
      <email>robotframework@gmail.com</email>
    </developer>
  </developers>

  <dependencies>
    <dependency>
    <groupId>com.github.ombre42</groupId>
    <artifactId>jrobotremoteserver</artifactId>
    <version>3.0</version>
    </dependency>
    <dependency>
    <groupId>org.robotframework</groupId>
    <artifactId>swinglibrary</artifactId>
    <version>1.9.8</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.8</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>createJarjarDir</id>
            <phase>process-resources</phase>
            <configuration>
              <tasks>
                <delete dir="${project.build.directory}/jarjarred"/>
                <mkdir dir="${project.build.directory}/jarjarred"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>jarjar-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jarjar</goal>
            </goals>
            <configuration>
              <output>${project.build.directory}/jarjarred</output>
              <overwrite>true</overwrite>
              <includes>
                <include>com.github.ombre42:jrobotremoteserver</include>
                <include>org.apache.xmlrpc:xmlrpc-server</include>
                <include>org.apache.xmlrpc:xmlrpc-common</include>
                <include>org.apache.ws.commons.util:ws-commons-util</include>
                <include>xml-apis:xml-apis</include>
                <include>org.eclipse.jetty:jetty-servlet</include>
                <include>org.eclipse.jetty:jetty-security</include>
                <include>org.eclipse.jetty:jetty-server</include>
                <include>org.eclipse.jetty:jetty-orbit</include>
                <include>org.eclipse.jetty.orbit:javax.servlet</include>
                <include>org.eclipse.jetty:jetty-continuation</include>
                <include>org.eclipse.jetty:jetty-http</include>
                <include>org.eclipse.jetty:jetty-io</include>
                <include>org.eclipse.jetty:jetty-util</include>
                <include>commons-lang:commons-lang</include>
                <include>commons-logging:commons-logging</include>
                <include>log4j:log4j</include>
                <include>org.robotframework:javalib-core</include>
                <include>org.robotframework:swinglibrary</include>
                <include>org.netbeans:jemmy</include>
                <include>abbot:abbot</include>
                <include>gnu-regexp:gnu-regexp</include>
                <include>junit:junit</include>
                <include>org.jretrofit:jretrofit</include>
                <include>commons-collections:commons-collections</include>
                <include>com.thoughworks.parameter:parameter</include>
              </includes>
              <rules>
                <rule>
                  <pattern>com.thoughtworks.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <rule>
                  <pattern>edu.emory.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <rule>
                  <pattern>org.aopalliance.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <rule>
                  <pattern>org.laughingpanda.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <rule>
                  <pattern>org.apache.log4j.**</pattern>
                  <result>@0</result>
                </rule>
                <rule>
                  <pattern>org.apache.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <rule>
                  <pattern>org.springframework.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <rule>
                  <pattern>javax.servlet.**</pattern>
                  <result>org.robotframework.remoteswinglibrary.@0</result>
                </rule>
                <keep>
                  <pattern>org.apache.log4j.**</pattern>
                </keep>
                <keep>
                  <pattern>org.robotframework.**</pattern>
                </keep>
                <keep>
                  <pattern>JavaTools</pattern>
                </keep>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classesDirectory>${project.build.directory}/jarjarred</classesDirectory>
              <archive>
                <manifestEntries>
                  <Premain-Class>org.robotframework.remoteswinglibrary.agent.JavaAgent</Premain-Class>
                  <Main-Class>org.robotframework.remoteswinglibrary.agent.JavaAgent</Main-Class>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.3</version>
        </plugin>
        <plugin>
            <groupId>org.robotframework</groupId>
            <artifactId>robotframework-maven-plugin</artifactId>
            <version>1.4.7</version>
            <executions>
              <execution>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
                <logLevel>DEBUG</logLevel>
                <extraPathDirectories>
                    <extraPathDirectory>target/remoteswinglibrary-${project.version}.jar</extraPathDirectory>
                    <extraPathDirectory>${basedir}/src/test/robotframework/acceptance/webstart</extraPathDirectory>
                </extraPathDirectories>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
                <version>${java.version}</version>
                <scope>system</scope>
                <systemPath>${project.basedir}/pom.xml</systemPath>
              </dependency>
            </dependencies>
        </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>install</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.1.1</version>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>java</goal>
                    </goals>
                    <configuration>
                        <mainClass>org.robotframework.remoteswinglibrary.build.SwingLibraryKeywords</mainClass>
                        <arguments>
                            <argument>target/classes/swinglibrary.py</argument>
                        </arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
      <resources>
          <resource>
              <directory>src/main/python</directory>
              <includes>
                  <include> *.py</include>
              </includes>
          </resource>
      </resources>
  </build>
</project>
