You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by bi...@apache.org on 2012/02/12 23:23:56 UTC

svn commit: r1243344 - in /maven/sandbox/trunk/plugins: ./ asf-svnpubsub-plugin/ asf-svnpubsub-plugin/src/ asf-svnpubsub-plugin/src/main/ asf-svnpubsub-plugin/src/main/java/ asf-svnpubsub-plugin/src/main/java/org/ asf-svnpubsub-plugin/src/main/java/org...

Author: bimargulies
Date: Sun Feb 12 22:23:56 2012
New Revision: 1243344

URL: http://svn.apache.org/viewvc?rev=1243344&view=rev
Log:
Bones of a new plugin to help with svnpubsub.

Added:
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/pom.xml   (with props)
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/
    maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/MyMojo.java   (with props)
Modified:
    maven/sandbox/trunk/plugins/pom.xml

Added: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/pom.xml?rev=1243344&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/pom.xml (added)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/pom.xml Sun Feb 12 22:23:56 2012
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>maven-plugins-sandbox</artifactId>
+    <groupId>org.apache.maven.plugins</groupId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>asf-svnpubsub-plugin</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <name>asf-svnpubsub-plugin Maven Plugin</name>
+  <url>http://maven.apache.org</url>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>2.5.1</version>
+        <executions>
+          <execution>
+            <id>generated-helpmojo</id>
+            <goals>
+              <goal>helpmojo</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <goalPrefix>asf-svnpubsub-plugin</goalPrefix>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

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

Propchange: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/MyMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/MyMojo.java?rev=1243344&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/MyMojo.java (added)
+++ maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/MyMojo.java Sun Feb 12 22:23:56 2012
@@ -0,0 +1,81 @@
+package org.apache.maven.plugins.svnpubsub;
+
+/*
+ * 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.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Goal which touches a timestamp file.
+ *
+ * @goal touch
+ * 
+ * @phase process-sources
+ */
+public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * Location of the file.
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private File outputDirectory;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        File f = outputDirectory;
+
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
+
+        File touch = new File( f, "touch.txt" );
+
+        FileWriter w = null;
+        try
+        {
+            w = new FileWriter( touch );
+
+            w.write( "touch.txt" );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error creating file " + touch, e );
+        }
+        finally
+        {
+            if ( w != null )
+            {
+                try
+                {
+                    w.close();
+                }
+                catch ( IOException e )
+                {
+                    // ignore
+                }
+            }
+        }
+    }
+}

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

Propchange: maven/sandbox/trunk/plugins/asf-svnpubsub-plugin/src/main/java/org/apache/maven/plugins/svnpubsub/MyMojo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: maven/sandbox/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/pom.xml?rev=1243344&r1=1243343&r2=1243344&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/pom.xml (original)
+++ maven/sandbox/trunk/plugins/pom.xml Sun Feb 12 22:23:56 2012
@@ -16,8 +16,7 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
--->
-<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">
+--><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>org.apache.maven.plugins</groupId>
@@ -46,5 +45,6 @@ under the License.
     <module>maven-downloader-plugin</module>
     <module>maven-zip-plugin</module>
     <module>maven-patch-tracker-plugin</module>
+    <module>asf-svnpubsub-plugin</module>
   </modules>
-</project>
+</project>
\ No newline at end of file