<?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>oss-parent</artifactId>
    <groupId>org.sonatype.oss</groupId>
    <version>7</version>
    <relativePath>../pom.xml/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.igor-suhorukov</groupId>
  <artifactId>aspectj-scripting</artifactId>
  <name>AspectJ scripting agent</name>
  <version>1.3</version>
  <description>Scripting extension for AspectJ agent. Allow java bytecode instrumentation at jvm startup
        by using MVEL expression and execute code from maven artifacts</description>
  <url>https://github.com/igor-suhorukov/aspectj-scripting</url>
  <developers>
    <developer>
      <name>Igor Sukhorukov</name>
      <email>igor.suhorukov[skip this] at gmail.com</email>
      <url>http://suhorukov.blogspot.ru</url>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/igor-suhorukov/aspectj-scripting.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/igor-suhorukov/aspectj-scripting.git</developerConnection>
    <url>https://github.com/igor-suhorukov/aspectj-scripting.git</url>
  </scm>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <artifactSet>
            <includes>
              <include>org.aspectj.agent:aspectj-scripting</include>
              <include>com.github.igor-suhorukov:mvn-classloader</include>
              <include>commons-io:commons-io</include>
              <include>org.mvel:mvel2</include>
              <include>com.google.code.gson:gson</include>
            </includes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>org.mvel2</pattern>
              <shadedPattern>org.aspectj.mvel2</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.google</pattern>
              <shadedPattern>org.aspectj.google</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons</pattern>
              <shadedPattern>org.aspectj.apache.commons</shadedPattern>
            </relocation>
          </relocations>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>build.properties</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
          </archive>
          <descriptors>
            <descriptor>assembly.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</version>
        <executions>
          <execution>
            <id>agent</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <reuseForks>false</reuseForks>
              <forkCount>1</forkCount>
              <argLine>-Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m</argLine>
              <systemPropertyVariables />
              <excludes>
                <exclude>**/ArtifactConfigurationTest.java</exclude>
              </excludes>
              <argLine>-XX:+UseParallelGC -XX:-UseParallelOldGC -XX:MaxPermSize=512m -Xmx512m -Xms512m
                                -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                                -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1088 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
                                -Dorg.aspectj.weaver.loadtime.configuration=config:file:src/test/resources/instrumentation.json</argLine>
            </configuration>
          </execution>
          <execution>
            <id>unit</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/ArtifactConfigurationTest.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>1.8.7</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>1.8.7</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-math</groupId>
      <artifactId>commons-math</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <aspectj.version>1.8.7</aspectj.version>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>
</project>

