Skip to content

Instantly share code, notes, and snippets.

@brianm
Created July 13, 2009 21:43
Show Gist options
  • Save brianm/146476 to your computer and use it in GitHub Desktop.
Save brianm/146476 to your computer and use it in GitHub Desktop.
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
/**
* @goal art
* @phase package
*/
public class App extends AbstractMojo
{
public void execute() throws MojoExecutionException, MojoFailureException {
String s = ".\n" +
" XX XX NN NN _ _\n" +
" XX XX NNN NN |\\__/| .~ ~.\n" +
" XX XX NNNN NN / o `./ .'\n" +
" XXXX NN NN NN {o__, \\ {\n" +
" XXXX NN NN NN / . . ) \\\n" +
" XX XX NN NN NN `-` '-' \\ } \n" +
" XX XX NN NNNN .( _( )_.'\n" +
" XX XX NN NNN '---.~_ _ _|\n" +
".\n" +
"\n";
String[] lines = s.split("\\n");
for (int i = 0; i < lines.length; i++){
this.getLog().info(lines[i]);
}
}
}
<plugin>
<description></description>
<groupId>ning.maven</groupId>
<artifactId>xn</artifactId>
<version>1.0-SNAPSHOT</version>
<goalPrefix>xn</goalPrefix>
<isolatedRealm>false</isolatedRealm>
<inheritedByDefault>true</inheritedByDefault>
<mojos>
<mojo>
<goal>art</goal>
<description></description>
<requiresDirectInvocation>false</requiresDirectInvocation>
<requiresProject>true</requiresProject>
<requiresReports>false</requiresReports>
<aggregator>false</aggregator>
<requiresOnline>false</requiresOnline>
<inheritedByDefault>true</inheritedByDefault>
<phase>package</phase>
<implementation>ning.maven.App</implementation>
<language>java</language>
<instantiationStrategy>per-lookup</instantiationStrategy>
<executionStrategy>once-per-session</executionStrategy>
<parameters/>
</mojo>
</mojos>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<type>jar</type>
<version>2.0</version>
</dependency>
</dependencies>
</plugin>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ning.maven</groupId>
<artifactId>xn</artifactId>
<packaging>maven-plugin</packaging>
<version>1.0-SNAPSHOT</version>
<name>xn</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>ning.maven</groupId>
<artifactId>xn</artifactId>
<version>1.0-SNAPSHOT</version>
<!--<executions>-->
<!--<execution>-->
<!--<phase>compile</phase>-->
<!--<goals>-->
<!--<goal>art</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment