<?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>de.plushnikov.lombok-intellij-plugin</groupId>
    <artifactId>parent</artifactId>
    <version>0.4</version>
  </parent>

  <artifactId>lombok-plugin</artifactId>
  <name>Lombok IntelliJ IDEA plugin modul</name>
  <description>Implementation of the Lombok Plugin for IntelliJ IDEA</description>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>intellij-facade-api</artifactId>
      <classifier>${idea.version}</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>intellij-facade-factory</artifactId>
      <classifier>${idea.version}</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>processor-api</artifactId>
      <classifier>${idea.version}</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>processor-core</artifactId>
      <classifier>${idea.version}</classifier>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>com.intellij.idea</groupId>
      <artifactId>openapi</artifactId>
    </dependency>
    <dependency>
      <groupId>com.intellij.idea</groupId>
      <artifactId>util</artifactId>
    </dependency>
    <dependency>
      <groupId>com.intellij.idea</groupId>
      <artifactId>idea</artifactId>
    </dependency>
    <dependency>
      <groupId>com.intellij.idea</groupId>
      <artifactId>annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.intellij.idea</groupId>
      <artifactId>extensions</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>jdom</artifactId>
    </dependency>
    <dependency>
      <groupId>gnu.trove</groupId>
      <artifactId>trove</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.picocontainer</groupId>
      <artifactId>picocontainer</artifactId>
    </dependency>
  </dependencies>

  <properties>
    <skipTests>true</skipTests>
  </properties>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>${idea.version}</classifier>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>unpack</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.projectlombok</groupId>
                  <artifactId>lombok</artifactId>
                  <version>${lombok.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>true</overWrite>
                  <outputDirectory>${project.build.directory}/generated-test-resources/lombok</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.github.peichhorn</groupId>
                  <artifactId>lombok-pg</artifactId>
                  <version>${lombok-pg.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>true</overWrite>
                  <outputDirectory>${project.build.directory}/generated-test-resources/lombok-pg</outputDirectory>
                </artifactItem>
              </artifactItems>
              <includes>${lombok-annotations.includes},${lombok-pg-annotations.includes}</includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${project.build.directory}/generated-test-resources/lombok</directory>
                  <targetPath>lombok-src</targetPath>
                </resource>
                <resource>
                  <directory>${project.build.directory}/generated-test-resources/lombok-pg</directory>
                  <targetPath>lombok-pg-src</targetPath>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>maven-replacer-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>replace</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <file>target/classes/META-INF/plugin.xml</file>
          <replacements>
            <replacement>
              <token>&lt;version&gt;100&lt;/version&gt;</token>
              <value>&lt;version&gt;${project.version}&lt;/version&gt;</value>
            </replacement>
            <replacement>
              <token>&lt;idea-version since-build="93.13"/&gt;</token>
              <value>&lt;idea-version since-build="${plugin.supported.build.from}" until-build="${plugin.supported.build.to}"/&gt;</value>
            </replacement>
          </replacements>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>distribution-package</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <attach>true</attach>
              <descriptors>
                <descriptor>src/main/assembly/idea-plugin-assembly.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--<plugin>-->
      <!--<groupId>org.projectlombok</groupId>-->
      <!--<artifactId>lombok-maven-plugin</artifactId>-->
      <!--<executions>-->
      <!--<execution>-->
      <!--<phase>generate-test-sources</phase>-->
      <!--<goals>-->
      <!--<goal>testDelombok</goal>-->
      <!--</goals>-->
      <!--<configuration>-->
      <!--<sourceDirectory>${project.basedir}/src/test/resources/data/lombok</sourceDirectory>-->
      <!--<outputDirectory>${project.basedir}/src/test/resources/data/delombok</outputDirectory>-->
      <!--</configuration>-->
      <!--</execution>-->
      <!--</executions>-->
      <!--<dependencies>-->
      <!--<dependency>-->
      <!--<groupId>sun.jdk</groupId>-->
      <!--<artifactId>tools</artifactId>-->
      <!--<version>1.6</version>-->
      <!--<scope>system</scope>-->
      <!--<systemPath>${java.home}/../lib/tools.jar</systemPath>-->
      <!--</dependency>-->
      <!--</dependencies>-->
      <!--</plugin>-->
    </plugins>
  </build>
</project>
