geronimo-scm mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=691979&view=rev
Log:
Move release and stage validation to mojos

Added:
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseConfigurationMojo.groovy
  (with props)
    geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseStageConfigurationMojo.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=691979&r1=691978&r2=691979&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:49:55
2008
@@ -342,5 +342,56 @@
         </plugins>
     </reporting>
     
+    <profiles>
+        <profile>
+            <id>release</id>
+            <activation>
+                <property>
+                    <name>release</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.geronimo.genesis</groupId>
+                        <artifactId>genesis-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>validate-release-configuration</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>release-stage</id>
+            <activation>
+                <property>
+                    <name>release</name>
+                    <value>stage</value>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.geronimo.genesis</groupId>
+                        <artifactId>genesis-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>validate-release-stage-configuration</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
 

Added: geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseConfigurationMojo.groovy
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseConfigurationMojo.groovy?rev=691979&view=auto
==============================================================================
--- geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseConfigurationMojo.groovy
(added)
+++ geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseConfigurationMojo.groovy
Thu Sep  4 04:49:55 2008
@@ -0,0 +1,59 @@
+/*
+ * 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 relese configuration.
+ *
+ * @goal validate-release-configuration
+ * @phase validate
+ * @since 2.0
+ *
+ * @version $Id$
+ */
+class ValidateReleaseConfigurationMojo
+    extends GroovyMojo
+{
+    /**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    MavenProject project
+    
+    void execute() {
+        // Optionally prevent non-staged releases for projects
+        if (project.properties['release.stageRequired']) {
+            if (project.properties['release'] != 'stage') {
+                fail('Release requires staging; use -Drelease=stage')
+            }
+        }
+        
+        // Make sure that we have a configured GPG passphrase
+        def phrase = project.properties['release.gpgPassphrase']
+        if (phrase == null || phrase.trim() == '') {
+            fail('Missing required property: release.gpgPassphrase')
+        }
+    }
+}

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

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

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

Added: geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseStageConfigurationMojo.groovy
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseStageConfigurationMojo.groovy?rev=691979&view=auto
==============================================================================
--- geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseStageConfigurationMojo.groovy
(added)
+++ geronimo/genesis/trunk/genesis-maven-plugin/src/main/groovy/org/apache/geronimo/genesis/plugin/ValidateReleaseStageConfigurationMojo.groovy
Thu Sep  4 04:49:55 2008
@@ -0,0 +1,59 @@
+/*
+ * 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 relese=stage configuration.
+ *
+ * @goal validate-release-stage-configuration
+ * @phase validate
+ * @since 2.0
+ *
+ * @version $Id$
+ */
+class ValidateReleaseStageConfigurationMojo
+    extends GroovyMojo
+{
+    /**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    MavenProject project
+    
+    void execute() {
+        // Make sure that we have a valid stage deployment URL configured,
+        // and that the URL is parsable (ie. not a file reference, which won't work
+        def url = project.properties['release.stageDeployUrl']
+        if (url == null || url.trim() == '') {
+            fail('Missing required property: release.stageDeployUrl')
+        }
+        try {
+            new URL(url)
+        }
+        catch (Exception e) {
+            fail("Invalid URL: $url")
+        }
+    }
+}

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

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

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

Modified: geronimo/genesis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/pom.xml?rev=691979&r1=691978&r2=691979&view=diff
==============================================================================
--- geronimo/genesis/trunk/pom.xml (original)
+++ geronimo/genesis/trunk/pom.xml Thu Sep  4 04:49:55 2008
@@ -94,7 +94,7 @@
             <subscribe>announce-subscribe@apache.org</subscribe>
             <unsubscribe>announce-unsubscribe@apache.org</unsubscribe>
             <post>announce@apache.org</post>
-            <archive>http://mail-archives.apache.org/mod_mbox/www-announce/</archive>
+            <archive>http://mail-archives.apache.org/mod_mbox/www-announce</archive>
         </mailingList>
     </mailingLists>
     
@@ -117,7 +117,7 @@
         <repository>
             <id>apache.incubator</id>
             <name>Apache Incubator Repository</name>
-            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+            <url>http://people.apache.org/repo/m2-incubating-repository</url>
             <layout>default</layout>
             <snapshots>
                 <enabled>false</enabled>
@@ -492,35 +492,6 @@
             <build>
                 <plugins>
                     <plugin>
-                        <groupId>org.codehaus.groovy.maven</groupId>
-                        <artifactId>gmaven-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <phase>validate</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <source>
-                                        // Optionally prevent non-staged releases for projects
-                                        if (project.properties['release.stageRequired'])
{
-                                            if (project.properties['release'] != 'stage')
{
-                                                fail('Release requires staging; use -Drelease=stage')
-                                            }
-                                        }
-                                        
-                                        // Make sure that we have a configured GPG passphrase
-                                        def phrase = project.properties['release.gpgPassphrase']
-                                        if (phrase == null || phrase.trim() == '') {
-                                            fail('Missing required property: release.gpgPassphrase')
-                                        }
-                                    </source>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                    <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-release-plugin</artifactId>
                         <configuration>
@@ -570,35 +541,6 @@
             <build>
                 <plugins>
                     <plugin>
-                        <groupId>org.codehaus.groovy.maven</groupId>
-                        <artifactId>gmaven-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <phase>validate</phase>
-                                <goals>
-                                    <goal>execute</goal>
-                                </goals>
-                                <configuration>
-                                    <source>
-                                        // Make sure that we have a valid stage deployment
URL configured,
-                                        // and that the URL is parsable (ie. not a file reference,
which won't work
-                                        def url = project.properties['release.stageDeployUrl']
-                                        if (url == null || url.trim() == '') {
-                                            fail('Missing required property: release.stageDeployUrl')
-                                        }
-                                        try {
-                                            new URL(url)
-                                        }
-                                        catch (Exception e) {
-                                            fail("Invalid URL: $url")
-                                        }
-                                    </source>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                    <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-release-plugin</artifactId>
                         <configuration>
@@ -686,42 +628,6 @@
                 </property>
             </activation>
             
-            <!--
-            <repositories>
-                <repository>
-                    <id>apache-snapshots</id>
-                    <name>Apache Snapshots Repository</name>
-                    <url>http://people.apache.org/repo/m2-snapshot-repository</url>
-                    <layout>default</layout>
-                    <snapshots>
-                        <enabled>true</enabled>
-                        <updatePolicy>daily</updatePolicy>
-                        <checksumPolicy>ignore</checksumPolicy>
-                    </snapshots>
-                    <releases>
-                        <enabled>false</enabled>
-                    </releases>
-                </repository>
-            </repositories>
-
-            <pluginRepositories>
-                <pluginRepository>
-                    <id>apache-snapshots</id>
-                    <name>Apache Snapshots Repository</name>
-                    <url>http://people.apache.org/repo/m2-snapshot-repository</url>
-                    <layout>default</layout>
-                    <snapshots>
-                        <enabled>true</enabled>
-                        <updatePolicy>daily</updatePolicy>
-                        <checksumPolicy>ignore</checksumPolicy>
-                    </snapshots>
-                    <releases>
-                        <enabled>false</enabled>
-                    </releases>
-                </pluginRepository>
-            </pluginRepositories>
-            -->
-            
             <build>
                 <pluginManagement>
                     <plugins>



Mime
View raw message