geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r691974 - in /geronimo/genesis/trunk: ./ genesis-flava/genesis-default-flava/ genesis-maven-plugin/ genesis-maven-plugin/src/ genesis-maven-plugin/src/main/ genesis-maven-plugin/src/main/groovy/ genesis-maven-plugin/src/main/groovy/org/ gen...
Date Thu, 04 Sep 2008 11:38:52 GMT
Author: jdillon
Date: Thu Sep  4 04:38:51 2008
New Revision: 691974

URL: http://svn.apache.org/viewvc?rev=691974&view=rev
Log:
Add genesis-maven-plugin, so we can better manage validation muck
Move the basic config validation to the default flava

Added:
    geronimo/genesis/trunk/genesis-maven-plugin/
    geronimo/genesis/trunk/genesis-maven-plugin/pom.xml   (with props)
    geronimo/genesis/trunk/genesis-maven-plugin/src/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
  (with props)
Modified:
    geronimo/genesis/trunk/genesis-flava/genesis-default-flava/pom.xml
    geronimo/genesis/trunk/pom.xml

Modified: geronimo/genesis/trunk/genesis-flava/genesis-default-flava/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/genesis-flava/genesis-default-flava/pom.xml?rev=691974&r1=691973&r2=691974&view=diff
==============================================================================
--- geronimo/genesis/trunk/genesis-flava/genesis-default-flava/pom.xml (original)
+++ geronimo/genesis/trunk/genesis-flava/genesis-default-flava/pom.xml Thu Sep  4 04:38:51
2008
@@ -174,6 +174,18 @@
         
         <plugins>
             <plugin>
+                <groupId>org.apache.geronimo.genesis</groupId>
+                <artifactId>genesis-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>validate-configuration</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>

Added: geronimo/genesis/trunk/genesis-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/genesis-maven-plugin/pom.xml?rev=691974&view=auto
==============================================================================
--- geronimo/genesis/trunk/genesis-maven-plugin/pom.xml (added)
+++ geronimo/genesis/trunk/genesis-maven-plugin/pom.xml Thu Sep  4 04:38:51 2008
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<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>
+    
+    <parent>
+        <groupId>org.apache.geronimo.genesis</groupId>
+        <artifactId>genesis</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>genesis-maven-plugin</artifactId>
+    <name>Genesis Maven Plugin</name>
+    <packaging>maven-plugin</packaging>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.codehaus.groovy.maven</groupId>
+            <artifactId>gmaven-mojo</artifactId>
+            <version>1.0-rc-3</version>
+        </dependency>
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generateStubs</goal>
+                            <goal>compile</goal>
+                            <goal>generateTestStubs</goal>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-plugin-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>helpmojo</goal>
+                            <goal>descriptor</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-plugin-plugin</artifactId>
+                <version>2.4.2</version>
+            </plugin>
+        </plugins>
+    </reporting>
+
+</project>
+

Propchange: geronimo/genesis/trunk/genesis-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/genesis/trunk/genesis-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/genesis/trunk/genesis-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy?rev=691974&view=auto
==============================================================================
--- geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
(added)
+++ geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
Thu Sep  4 04:38:51 2008
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.geronimo.genesis.plugin
+
+import org.codehaus.groovy.maven.mojo.GroovyMojo
+
+import org.apache.maven.project.MavenProject
+
+/**
+ * Validate the basic project configuration.
+ *
+ * @goal validate-configuration
+ * @phase validate
+ * @since 2.0
+ *
+ * @version $Id$
+ */
+class ValidateConfigurationMojo
+    extends GroovyMojo
+{
+    /**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    MavenProject project
+    
+    void execute() {
+        if (project.groupId.startsWith('org.apache.geronimo.genesis')) {
+            return
+        }
+        
+        def failIfNotConfigured = { var, value, name ->
+            if (var.startsWith(value)) {
+                fail("Genesis child project must configure element: $name")
+            }
+        }
+        
+        // TODO: project/url
+        
+        // TODO: project/distributionManagement/site
+        
+        failIfNotConfigured(
+            project.description,
+            'Genesis provides',
+            'project/description')
+        
+        failIfNotConfigured(
+            project.scm.connection,
+            'scm:svn:http://svn.apache.org/repos/asf/geronimo/genesis',
+            'project/scm/connection')
+        
+        failIfNotConfigured(
+            project.scm.developerConnection,
+            'scm:svn:https://svn.apache.org/repos/asf/geronimo/genesis',
+            'project/scm/developerConnection')
+        
+        failIfNotConfigured(
+            project.scm.url,
+            'http://svn.apache.org/viewvc/geronimo/geronimo/genesis',
+            'project/scm/url')
+    }
+}

Propchange: geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateConfigurationMojo.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/genesis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/pom.xml?rev=691974&r1=691973&r2=691974&view=diff
==============================================================================
--- geronimo/genesis/trunk/pom.xml (original)
+++ geronimo/genesis/trunk/pom.xml Thu Sep  4 04:38:51 2008
@@ -176,6 +176,7 @@
     </pluginRepositories>
     
     <modules>
+        <module>genesis-maven-plugin</module>
         <module>genesis-packaging</module>
         <module>genesis-flava</module>
         <module>genesis-skin</module>
@@ -453,58 +454,16 @@
                     <artifactId>xmlbeans-maven-plugin</artifactId>
                     <version>2.3.1</version>
                 </plugin>
+                
+                <!-- INTERNAL -->
+                
+                <plugin>
+                    <groupId>org.apache.geronimo.genesis</groupId>
+                    <artifactId>genesis-maven-plugin</artifactId>
+                    <version>2.0-SNAPSHOT</version>
+                </plugin>
             </plugins>
         </pluginManagement>
-
-        <plugins>
-            <plugin>
-                <groupId>org.codehaus.groovy.maven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>execute</goal>
-                        </goals>
-                        <configuration>
-                            <source>
-                                if (!project.groupId.startsWith('org.apache.geronimo.genesis'))
{
-                                    def failIfNotConfigured = { var, value, name ->
-                                        if (var.startsWith(value)) {
-                                            fail("Genesis child project must configure element:
$name")
-                                        }
-                                    }
-                                    
-                                    // TODO: project/url
-                                    
-                                    // TODO: project/distributionManagement/site
-                                    
-                                    failIfNotConfigured(
-                                        project.description,
-                                        'Genesis provides',
-                                        'project/description')
-                                    
-                                    failIfNotConfigured(
-                                        project.scm.connection,
-                                        'scm:svn:http://svn.apache.org/repos/asf/geronimo/genesis',
-                                        'project/scm/connection')
-                                    
-                                    failIfNotConfigured(
-                                        project.scm.developerConnection,
-                                        'scm:svn:https://svn.apache.org/repos/asf/geronimo/genesis',
-                                        'project/scm/developerConnection')
-                                    
-                                    failIfNotConfigured(
-                                        project.scm.url,
-                                        'http://svn.apache.org/viewvc/geronimo/geronimo/genesis',
-                                        'project/scm/url')
-                                }
-                            </source>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
     </build>
 
     <distributionManagement>
@@ -513,6 +472,7 @@
             <name>Apache Release Repository</name>
             <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
         </repository>
+        
         <snapshotRepository>
             <id>apache.snapshots</id>
             <name>Apache Development Repository</name>



Mime
View raw message