<?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>
    <artifactId>maven-printing-plugins</artifactId>
    <name>maven-printing-plugins</name>

    <parent>
        <groupId>com.baeldung</groupId>
        <artifactId>parent-modules</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>../..</relativePath>
    </parent>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>antrun-plugin</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="Hello, world"/>
                                <echo message="Embed a line break: ${line.separator}"/>
                                <echo message="Build dir: ${project.build.directory}"
                                    level="info"/>
                                <echo file="${basedir}/logs/log-ant-run.txt" append="true"
                                    message="Save to file!"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.ekryd.echo-maven-plugin</groupId>
                <artifactId>echo-maven-plugin</artifactId>
                <version>1.3.2</version>
                <executions>
                    <execution>
                        <id>echo-maven-plugin-1</id>
                        <phase>package</phase>
                        <goals>
                            <goal>echo</goal>
                        </goals>
                        <configuration>
                            <message>
                                Hello, world
                                Embed a line break: ${line.separator}
                                ArtifactId is
                                ${project.artifactId}
                            </message>
                            <level>INFO</level>
                            <toFile>/logs/log-echo.txt</toFile>
                            <append>true</append>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <version>2.1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>
                                log.info('Test message: {}', 'Hello, World!')
                                log.info('Embed a line break {}', System.lineSeparator())
                                log.info('ArtifactId is: ${project.artifactId}')
                                log.warn('Message only in debug mode')
                            </source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>