java-tutorials/maven-modules/maven-printing-plugins/pom.xml

96 lines
4.0 KiB
XML

<?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>${maven-antrun-plugin.version}</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>${echo-maven-plugin.version}</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>${groovy-maven-plugin.version}</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>
<properties>
<maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
<echo-maven-plugin.version>1.3.2</echo-maven-plugin.version>
<groovy-maven-plugin.version>2.1.1</groovy-maven-plugin.version>
</properties>
</project>