Author: vkumar
Date: Fri Dec 5 06:36:22 2008
New Revision: 723741
URL: http://svn.apache.org/viewvc?rev=723741&view=rev
Log:
Adding new Jetspeed Maven Plugin for file systems
Added:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
(with props)
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
(with props)
Added:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml?rev=723741&view=auto
==============================================================================
---
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
(added)
+++
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
Fri Dec 5 06:36:22 2008
@@ -0,0 +1,64 @@
+<?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.
+
+ $Id: pom.xml
+-->
+<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>
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <artifactId>jetspeed-fileutils-maven-plugin</artifactId>
+ <name>Jetspeed 2 File-Utils Maven Plugin</name>
+ <description>Jetspeed 2 File-Utils Maven Plugin</description>
+ <parent>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>maven</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </parent>
+ <packaging>maven-plugin</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>jetspeed-maven-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0.7</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <configuration>
+ <goalPrefix>jetspeed-fileutils</goalPrefix>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Propchange:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java?rev=723741&view=auto
==============================================================================
---
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
(added)
+++
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
Fri Dec 5 06:36:22 2008
@@ -0,0 +1,68 @@
+/*
+ * 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.jetspeed.maven.fileutils;
+
+
+import org.apache.jetspeed.maven.utils.FileSystemUtils;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * @author vkumar <a href="[EMAIL PROTECTED]">Vivek Kumar</a>
+ * @goal event
+ */
+public class FileUtilsMojo extends AbstractMojo
+{
+ /**
+ * The Source directory on which event need to happen
+ *
+ * @parameter expression="${srcDirectoryPath}"
+ * @required
+ */
+ private String srcDirectoryPath;
+ /**
+ * The destination directory on which event need to happen
+ *
+ * @parameter expression="${destDirectoryPath}"
+ */
+ private String destDirectoryPath;
+ /**
+ * The Event need to occur
+ *
+ * @parameter expression="${event}"
+ * @required
+ */
+ private String event;
+
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ if (event.equals("copy"))
+ {
+ FileSystemUtils.copy(srcDirectoryPath, destDirectoryPath);
+ }
+ if (event.equals("move"))
+ {
+ FileSystemUtils.copy(srcDirectoryPath, destDirectoryPath);
+ FileSystemUtils.delete(srcDirectoryPath);
+ }
+ else if (event.equals("delete"))
+ {
+ FileSystemUtils.delete(srcDirectoryPath);
+ }
+ }
+}
Propchange:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-fileutils-maven-plugin/src/main/java/org/apache/jetspeed/maven/fileutils/FileUtilsMojo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]