Skip to content

Instantly share code, notes, and snippets.

@odavid
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odavid/0a0f65af012ccc86696e to your computer and use it in GitHub Desktop.
Save odavid/0a0f65af012ccc86696e to your computer and use it in GitHub Desktop.
A Simple Maven Mixin That Echo Message During initialize phase
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>mixin-example</groupId>
<artifactId>echo-mixin</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<message>Default Message of Mixin</message>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>echo-message</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>We are now in initialize phase, running mixin1 with message: ${message}</echo>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment