<?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>

    <name>lombok</name>

    <groupId>com.baeldung</groupId>
    <artifactId>lombok</artifactId>
    <version>0.1-SNAPSHOT</version>

    <dependencies>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <!-- Check for the most recent available version:
                 https://projectlombok.org/changelog.html -->
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>${hibernate-jpa-2.1-api.version}</version>
        </dependency>

        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${logback.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!-- test scoped -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <finalName>lombok</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>${delombok-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>delombok</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>delombok</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                            <addOutputDirectory>false</addOutputDirectory>
                            <formatPreferences>
                                <javaLangAsFQN>skip</javaLangAsFQN>
                            </formatPreferences>
                            <verbose>false</verbose>
                        </configuration>
                    </execution>
<!-- This is for delomboking also your tests sources.
                    <execution>
                        <id>test-delombok</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>testDelombok</goal>
                        </goals>
                        <configuration>
                            <verbose>false</verbose>
                        </configuration>
                    </execution>
-->
                </executions>
            </plugin>

        </plugins>

    </build>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <!-- lombok: https://projectlombok.org/changelog.html -->
        <lombok.version>1.16.8</lombok.version>

        <!-- various -->
        <hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>

        <!-- logging -->
        <org.slf4j.version>1.7.13</org.slf4j.version>
        <logback.version>1.1.3</logback.version>

        <!-- testing -->
        <junit.version>4.12</junit.version>

        <!-- maven plugins -->
        <maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>

        <!-- delombok maven plugin -->
        <delombok-maven-plugin.version>${lombok.version}.0</delombok-maven-plugin.version>
    </properties>

</project>
