<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>ru.taskurotta</artifactId>
    <groupId>ru.taskurotta</groupId>
    <version>0.8.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>assemble</artifactId>
  <name>Taskurotta :: Assemble</name>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/taskurotta/taskurotta.git</connection>
    <developerConnection>scm:git:git@github.com:taskurotta/taskurotta.git</developerConnection>
    <url>http://taskurotta.org</url>
  </scm>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer>
                  <resource>META-INF/spring.handlers</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/spring.schemas</resource>
                </transformer>
                <transformer />
                <transformer>
                  <mainClass>ru.taskurotta.dropwizard.server.application.SpringApplication</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>test-compile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${aspectj.version}</version>
          </dependency>
          <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>${aspectj.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy</id>
            <phase>process-sources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.aspectj</groupId>
                  <artifactId>aspectjweaver</artifactId>
                  <version>${aspectj.version}</version>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>oracle-env</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Dcom.sun.management.jmxremote.port=9999</argument>
                <argument>-Dcom.sun.management.jmxremote.authenticate=false</argument>
                <argument>-Dcom.sun.management.jmxremote.ssl=false</argument>
                <argument>-Dts.node.custom-name="node1"</argument>
                <argument>-DassetsMode=dev</argument>
                <argument>-Ddw.http.port=8811</argument>
                <argument>-Ddw.http.adminPort=8812</argument>
                <argument>-Ddw.logging.file.currentLogFilename=./target/logs/service1.log</argument>
                <argument>-jar</argument>
                <argument>target/${project.build.finalName}.jar</argument>
                <argument>server</argument>
                <argument>src/main/resources/hz-ora-mongo.yml</argument>
              </arguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>com.oracle</groupId>
          <artifactId>oracle-jdbc15</artifactId>
          <version>11.1.0.7.0</version>
          <scope>compile</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>memory-env</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Xms256m</argument>
                <argument>-Xmx256m</argument>
                <argument>-Dts.node.custom-name="node1"</argument>
                <argument>-DassetsMode=dev</argument>
                <argument>-Ddw.http.port=8811</argument>
                <argument>-Ddw.http.adminPort=8812</argument>
                <argument>-Ddw.logging.file.currentLogFilename=./target/logs/service1.log</argument>
                <argument>-jar</argument>
                <argument>target/${project.build.finalName}.jar</argument>
                <argument>server</argument>
                <argument>src/main/resources/hz-mongo.yml</argument>
              </arguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

