maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r519027 - in /maven/sandbox/trunk/plugins/maven-committers-plugin: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/plugin/ src/main/java/org/apache...
Date Fri, 16 Mar 2007 16:05:08 GMT
Author: jdcasey
Date: Fri Mar 16 09:05:07 2007
New Revision: 519027

URL: http://svn.apache.org/viewvc?view=rev&rev=519027
Log:
Adding plugin that displays jesse's (and maybe someday other committers') faces in ascii art.
try mvn committers:jesse.

Added:
    maven/sandbox/trunk/plugins/maven-committers-plugin/
    maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml   (with props)
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java
  (with props)
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java
  (with props)
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/
    maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt 
 (with props)

Added: maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml?view=auto&rev=519027
==============================================================================
--- maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml (added)
+++ maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml Fri Mar 16 09:05:07 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0"?><project>
+  <parent>
+    <artifactId>maven-plugins-sandbox</artifactId>
+    <groupId>org.apache.maven.plugins</groupId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-committers-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>maven-committers-plugin Maven Mojo</name>
+  <version>1.0-SNAPSHOT</version>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java?view=auto&rev=519027
==============================================================================
--- maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java
(added)
+++ maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java
Fri Mar 16 09:05:07 2007
@@ -0,0 +1,40 @@
+package org.apache.maven.plugin.committers;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.URL;
+
+public abstract class AbstractCommitterPicMojo
+    extends AbstractMojo
+{
+
+    public void printPic( String resourceLocation, String committerNick )
+        throws MojoExecutionException
+    {
+        ClassLoader cloader = Thread.currentThread().getContextClassLoader();
+        
+        URL url = cloader.getResource( resourceLocation );
+        
+        if ( url == null )
+        {
+            throw new MojoExecutionException( "Failed to load " + committerNick + "'s picture
from: " + resourceLocation );
+        }
+        
+        StringWriter stringWriter = new StringWriter();
+        try
+        {
+            IOUtil.copy( url.openStream(), stringWriter );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Failed to read " + committerNick + "'s picture
from: " + resourceLocation );
+        }
+        
+        getLog().info( "\n" + stringWriter.toString() );
+    }
+
+}

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/AbstractCommitterPicMojo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java?view=auto&rev=519027
==============================================================================
--- maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java
(added)
+++ maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java
Fri Mar 16 09:05:07 2007
@@ -0,0 +1,36 @@
+package org.apache.maven.plugin.committers;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+
+/**
+ * Goal that displays an ascii-art pic of jesse
+ *
+ * @goal jesse
+ */
+public class JesseMcconnellMojo
+    extends AbstractCommitterPicMojo
+{
+    private static final String JESSE_PIC_RESOURCE = "jesse-pic.txt";
+    
+    public void execute()
+        throws MojoExecutionException
+    {
+        printPic( JESSE_PIC_RESOURCE, "jesse" );
+    }
+}

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/java/org/apache/maven/plugin/committers/JesseMcconnellMojo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt?view=auto&rev=519027
==============================================================================
--- maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt (added)
+++ maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt Fri
Mar 16 09:05:07 2007
@@ -0,0 +1,41 @@
+ffffffffffffffffffffffLLGGGGGGDDDDKKKKDDDDDDDDDDDDDDDDDDDDDDDDDD
+ffffffffffffffffffLLLLLLGGDDDDKKWWWWWWWWKKDDDDDDDDDDDDDDDDDDDDDD
+ffffffffffffffffffGGDDKKKKWWKKWWWWWWWWWWWWKKKKDDDDDDDDDDDDDDDDDD
+ffffffffffffffLLDDWWWWWWWWWWWWWWWWWWWWWWWWWWKKKKDDDDDDDDDDDDDDDD
+ffffffffffffffGGKKKKWWWWWWWWWWWWWWWWWWWWWWWWWWKKKKDDDDDDDDDDDDDD
+ffffffffffLLDDWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKKDDDDDDDDDDDD
+ffffffffLLDDWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW######WWKKDDDDDDDDDD
+ffffffffDDKKWWWW####WWKKWWWWWWWWWWWWWWWWWWKKWWWWWWWWWWKKDDDDDDDD
+ffffffLLKKWWWW######WWWWWWKKKKKKKKKKWWWWWWWWWWWWWWWWWWKKKKDDDDDD
+LLLLGGDDKKWWWW######WWKKEEEEDDDDDDDDDDEEKKWWWWWWWWWWWWWWKKDDDDDD
+ffLLLLDDWWWWWWWWKKDDGGLLffffffffjjjjffffLLDDWWWWKKWWWWKKKKKKDDDD
+ffLLGGKKWWWWWWEEGGGGffffjjjjjjjjjjjjffffffffDDKKWWWWWWWWWWKKEEEE
+LLLLGGKKWWWWWWDDGGffffffjjjjjjjjjjjjjjjjffffffEEWWWWWWWWWWKKDDEE
+jjffGGWWWWKKKKDDffffffffffjjjjjjjjjjjjjjffffffGGEEKKWWWWWWKKDDDD
+jjffGGWWWWWWKKGGffffffffjjjjjjjjjjffffjjffffffLLDDWWWWWWWWKKDDDD
+jjjjLLWWWWWWDDGGffffffjjjjjjjjjjjjjjjjjjjjffffLLDDWWWWWWWWKKKKDD
+jjjjLL##WWKKGGGGGGDDGGGGGGjjjjttttttjjffffGGGGGGDDEEWWWWWWKKKKDD
+jjjjGG##WWEEGGGGGGGGGGGGDDGGffjjjjjjffDDEEDDGGDDDDDDWW##WWKKKKEE
+jjjjGGWWWWDDGGffGGDDLLEELLLLGGffffGGGGLLDDGGDDGGGGDDWW##WWKKKKEE
+jjjjffDDWWGGGGffLLDDGGDDLLLLGGffffDDLLffEEDDDDGGffGGKKWWWWKKKKDD
+jjjjffGGEEGGGGffLLffffffffLLGGffffGGLLffffLLLLLLffGGEEWWGGDDKKDD
+jjjjffffEEGGLLffffffffffffLLGGffffGGLLffffffffLLLLGGDDWWDDDDKKEE
+jjjjffffGGGGffffffjjjjjjjjLLffjjjjGGLLffffffffffffGGDDDDLLEEKKKK
+jjjjffLLDDGGLLffjjjjttjjffLLffjjjjLLLLjjjjjjffffffGGDDGGLLWWKKEE
+jjjjjjGGDDGGLLffjjjjjjffffLLLLLLGGLLLLjjjjjjjjffLLGGEEDDGGWWKKDD
+jjjjjjGGDDGGLLffffffGGLLDDGGLLffffLLLLffffjjffffLLGGEEEEEEKKKKDD
+jjjjffGGDDGGffjjjjGGDDDDDDDDLLjjGGEEEEDDDDGGffffffGGEEWWWWKKEEDD
+jjjjjjGGDDGGffjjjjDDDDDDGGffffjjffDDDDDDDDEEffjjffGGKKWWKKKKDDDD
+LLjjjjLLDDDDffjjjjDDLLDDGGjjttttttttffGGGGEEffjjffGGKKWWKKKKDDDD
+LLjjjjffDDEEGGjjjjffffffGGLLffjjffLLDDLLffDDjjjjffDDWWKKKKEEDDDD
+LLjjjjffGGKKDDffjjjjffffffffffjjffffffffffffjjffGGEEWWKKKKDDDDDD
+ffjjjjjjLLKKWWDDffffffffffffGGGGLLffffffffjjffGGDDWWKKKKKKDDDDDD
+jjjjjjjjjjDDWWWWDDGGGGGGLLLLGGGGGGLLLLLLffGGGGKKWWWWKKKKDDDDDDDD
+jjjjjjjjjjffKKWWWWWWKKEEDDDDDDGGGGGGDDEEEEKKKKWWWWKKKKKKDDDDDDDD
+ffffjjjjjjjjGGWWWWWWWWWWKKEEEEDDDDEEEEWWWWKKWWWWWWKKKKDDDDDDDDDD
+ttjjjjjjjjjjLLKKWWWWWWWWWWWWWWWWKKWWKKWWWWWWWWWWKKKKDDGGGGGGDDDD
+ttffLLffjjjjLLffDDWWWWWWWWWWWWWWWWWWWWWWWWWWWWEEKKDDGGGGGGffDDDD
+GGKKEELLjjjjGGffjjGGWWWWWWWWWWWWWWWWWWWWWWEEGGGGEEDDGGGGGGffDDDD
+KKKKDDffjjffGGjjjjjjffGGEEWWWWWWWWWWKKEEGGffffGGGGDDGGGGGGffDDDD
+KKGGLLffjjttjjjjttttttttttjjjjffjjjjjjjjjjjjffffGGGGGGGGGGffDDDD
+GGffffffffttttttttttttttttttjjttttjjjjjjjjjjffffGGffGGGGGGffDDDD

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/plugins/maven-committers-plugin/src/main/resources/jesse-pic.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message