Files

79 lines
2.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- Lifecycle demo: bind antrun echo tasks to Maven 4's new before:/after: phases. -->
<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">
<modelVersion>4.1.0</modelVersion>
<groupId>com.ankurm.m4</groupId>
<artifactId>lifecycle-demo</artifactId>
<version>1.0.0</version>
<properties>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.4</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.5.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>before-compile</id>
<phase>before:compile</phase>
<goals><goal>run</goal></goals>
<configuration><target><echo message="HOOK before:compile"/></target></configuration>
</execution>
<execution>
<id>after-compile</id>
<phase>after:compile</phase>
<goals><goal>run</goal></goals>
<configuration><target><echo message="HOOK after:compile"/></target></configuration>
</execution>
<execution>
<id>before-package-first</id>
<phase>before:package[100]</phase>
<goals><goal>run</goal></goals>
<configuration><target><echo message="HOOK before:package[100]"/></target></configuration>
</execution>
<execution>
<id>before-package-second</id>
<phase>before:package[200]</phase>
<goals><goal>run</goal></goals>
<configuration><target><echo message="HOOK before:package[200]"/></target></configuration>
</execution>
<execution>
<id>after-clean</id>
<phase>after:clean</phase>
<goals><goal>run</goal></goals>
<configuration><target><echo message="HOOK after:clean"/></target></configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>