You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2006/07/07 09:55:38 UTC
svn commit: r419834 - in /geronimo/sandbox/svkmerge/m2migration/m2-plugins:
./ plugin-support/ plugin-support/src/ plugin-support/src/main/
plugin-support/src/main/java/ plugin-support/src/main/java/org/
plugin-support/src/main/java/org/apache/ plugin-...
Author: jdillon
Date: Fri Jul 7 00:55:37 2006
New Revision: 419834
URL: http://svn.apache.org/viewvc?rev=419834&view=rev
Log:
Adding a module to hold common plugin support bits
Added:
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml (with props)
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java (with props)
geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/resources/
Modified:
geronimo/sandbox/svkmerge/m2migration/m2-plugins/pom.xml
Added: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml?rev=419834&view=auto
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml (added)
+++ geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml Fri Jul 7 00:55:37 2006
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2006 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.
+-->
+
+<!-- $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.plugins</groupId>
+ <artifactId>plugins-parent</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>plugin-support</artifactId>
+ <name>Geronimo Plugins :: Plugin Support</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <!-- FIXME: Remove when default config conforms the M2 standards -->
+
+ <sourceDirectory>${pom.basedir}/src/main/java</sourceDirectory>
+ <testSourceDirectory>${pom.basedir}/src/test/java</testSourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>${pom.basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
+
+</project>
+
Propchange: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java?rev=419834&view=auto
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java (added)
+++ geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java Fri Jul 7 00:55:37 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006 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.
+ */
+
+package org.apache.geronimo.plugin;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.logging.Log;
+
+/**
+ * Support for Mojo implementations.
+ *
+ * @version $Id$
+ */
+public abstract class MojoSupport
+ extends AbstractMojo
+{
+ protected Log log;
+
+ protected void init() {
+ log = getLog();
+ }
+
+ /**
+ * @throws MojoExecutionException
+ */
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ init();
+
+ try {
+ doExecute();
+ }
+ catch (Exception e) {
+ if (e instanceof MojoExecutionException) {
+ throw (MojoExecutionException)e;
+ }
+ else if (e instanceof MojoFailureException) {
+ throw (MojoFailureException)e;
+ }
+ else {
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+ }
+ }
+
+ protected void doExecute() throws Exception {
+ // Sub-class should override
+ }
+}
Propchange: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/sandbox/svkmerge/m2migration/m2-plugins/plugin-support/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/sandbox/svkmerge/m2migration/m2-plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/m2-plugins/pom.xml?rev=419834&r1=419833&r2=419834&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/m2-plugins/pom.xml (original)
+++ geronimo/sandbox/svkmerge/m2migration/m2-plugins/pom.xml Fri Jul 7 00:55:37 2006
@@ -38,7 +38,7 @@
<packaging>pom</packaging>
<properties>
- <maven.version>2.0</maven.version>
+ <maven.version>2.0.4</maven.version>
</properties>
<dependencies>
@@ -62,6 +62,7 @@
</dependencies>
<modules>
+ <module>plugin-support</module>
<module>geronimo-packaging-plugin</module>
</modules>