diff --git a/codeswitcher/.cvsignore b/codeswitcher/.cvsignore deleted file mode 100644 index bca2cda9..00000000 --- a/codeswitcher/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -target -maven.log -velocity.log diff --git a/codeswitcher/plugin.jelly b/codeswitcher/plugin.jelly deleted file mode 100644 index f54bd495..00000000 --- a/codeswitcher/plugin.jelly +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/codeswitcher/plugin.properties b/codeswitcher/plugin.properties deleted file mode 100644 index dd5db1a1..00000000 --- a/codeswitcher/plugin.properties +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------------------------------------- -# Copyright 2001-2004 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. -# ------------------------------------------------------------------- - -# ------------------------------------------------------------------- -# P L U G I N P R O P E R I E S -# ------------------------------------------------------------------- -# CodeSwitcher plugin. -# ------------------------------------------------------------------- diff --git a/codeswitcher/project.properties b/codeswitcher/project.properties deleted file mode 100644 index d66f96c3..00000000 --- a/codeswitcher/project.properties +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------- -# Copyright 2001-2004 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. -# ------------------------------------------------------------------- - -# ------------------------------------------------------------------- -# P R O J E C T P R O P E R T I E S -# ------------------------------------------------------------------- diff --git a/codeswitcher/project.xml b/codeswitcher/project.xml deleted file mode 100644 index 4c6aaffa..00000000 --- a/codeswitcher/project.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - ../plugin-parent/project.xml - 3 - maven-codeswitcher-plugin - Maven CodeSwitcher Plugin - 1.2-SNAPSHOT - - - http://maven.apache.org/reference/plugins/codeswitcher/ - maven.apache.org - /www/maven.apache.org/reference/plugins/codeswitcher/ - /www/maven.apache.org/builds/ - - scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/codeswitcher/ - scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:maven-plugins/codeswitcher/ - http://cvs.apache.org/viewcvs/maven-plugins/codeswitcher/ - - - - 1.1 - 1.1 - MAVEN_CODESWITCHER_1_1 - - - 1.2 - 1.2 - HEAD - - - - - Jason van Zyl - jvanzyl - jason@zenplex.com - Zenplex - - Architect - Release Manager - - - - - - diff --git a/codeswitcher/src/main/org/apache/maven/codeswitcher/CodeSwitcher.java b/codeswitcher/src/main/org/apache/maven/codeswitcher/CodeSwitcher.java deleted file mode 100644 index d4a5d8de..00000000 --- a/codeswitcher/src/main/org/apache/maven/codeswitcher/CodeSwitcher.java +++ /dev/null @@ -1,540 +0,0 @@ -/* Copyrights and Licenses - * - * This product includes Hypersonic SQL. - * Originally developed by Thomas Mueller and the Hypersonic SQL Group. - * - * Copyright (c) 1995-2000 by the Hypersonic SQL Group. All rights reserved. - * Redistribution and use in source and binary forms, with or without modification, are permitted - * provided that the following conditions are met: - * - Redistributions of source code must retain the above copyright notice, this list of conditions - * and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - All advertising materials mentioning features or use of this software must display the - * following acknowledgment: "This product includes Hypersonic SQL." - * - Products derived from this software may not be called "Hypersonic SQL" nor may - * "Hypersonic SQL" appear in their names without prior written permission of the - * Hypersonic SQL Group. - * - Redistributions of any form whatsoever must retain the following acknowledgment: "This - * product includes Hypersonic SQL." - * This software is provided "as is" and any expressed or implied warranties, including, but - * not limited to, the implied warranties of merchantability and fitness for a particular purpose are - * disclaimed. In no event shall the Hypersonic SQL Group or its contributors be liable for any - * direct, indirect, incidental, special, exemplary, or consequential damages (including, but - * not limited to, procurement of substitute goods or services; loss of use, data, or profits; - * or business interruption). However caused any on any theory of liability, whether in contract, - * strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this - * software, even if advised of the possibility of such damage. - * This software consists of voluntary contributions made by many individuals on behalf of the - * Hypersonic SQL Group. - * - * - * For work added by the HSQL Development Group: - * - * Copyright (c) 2001-2002, The HSQL Development Group - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer, including earlier - * license statements (above) and comply with all above license conditions. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution, including earlier - * license statements (above) and comply with all above license conditions. - * - * Neither the name of the HSQL Development Group nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.apache.maven.codeswitcher; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.LineNumberReader; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang.StringUtils; - -import org.apache.tools.ant.DirectoryScanner; - -/** - * changes the source code to support different JDK or profile settings - * - * @version 1.7.0 - */ -public class CodeSwitcher -{ - private final static String ls = System.getProperty("line.separator", "\n"); - private List onSwitches; - private List offSwitches; - private List switches; - private final static int MAX_LINELENGTH = 82; - - private String[] files; - - /** - * Constructor declaration - */ - public CodeSwitcher() - { - onSwitches = new ArrayList(); - offSwitches = new ArrayList(); - switches = new ArrayList(); - } - - /** - * Method declaration - * - * @param a - */ - public void execute() - { - System.out.println("On Switches"); - System.out.println(onSwitches); - - System.out.println("Off Switches"); - System.out.println(offSwitches); - - process(); - } - - /** - * Set the on switches - */ - public void setOnSwitches(String onSwitchesCSV) - { - String[] onSwitchesArray = StringUtils.split(onSwitchesCSV, ","); - - for (int i = 0; i < onSwitchesArray.length; i++) - { - onSwitches.add(onSwitchesArray[i]); - } - } - - /** - * Set the off switches - */ - public void setOffSwitches(String offSwitchesCSV) - { - String[] offSwitchesArray = StringUtils.split(offSwitchesCSV, ","); - - for (int i = 0; i < offSwitchesArray.length; i++) - { - offSwitches.add(offSwitchesArray[i]); - } - } - - /** - * Set the directory of sources to preprocess - */ - public void setDirectory(String directory) - { - // Grab all the java source files in the listed - // directory. - files = getFiles(new File(directory), "**/*.java"); - } - - /** - * Method declaration - */ - private void process() - { - for (int i = 0; i < files.length; i++) - { - System.out.print("."); - - String file = files[i]; - - if (!processFile(file)) - { - System.out.println("in file " + file + " !"); - } - } - - System.out.println(""); - } - - /** - * Method declaration - * - * @param s - * @return - */ - private boolean isLongline(String s) - { - char c = s.charAt(s.length() - 1); - - if (",(+-&|".indexOf(c) >= 0) - { - return true; - } - - return false; - } - - /** - * Method declaration - * - * @param name - * @return - */ - private boolean processFile(String name) - { - File f = new File(name); - File fnew = new File(name + ".new"); - int state = 0;// 0=normal 1=inside_if 2=inside_else - boolean switchoff = false; - boolean working = false; - - try - { - LineNumberReader read = new LineNumberReader(new FileReader(f)); - FileWriter write = new FileWriter(fnew); - - while (true) - { - String line = read.readLine(); - - if (line == null) - { - break; - } - - if (working) - { - if (line.equals("/*") || line.equals("*/")) - { - continue; - } - } - - if (!line.startsWith("//#")) - { - write.write(line + ls); - } - else - { - if (line.startsWith("//#ifdef ")) - { - if (state != 0) - { - printError( - "'#ifdef' not allowed inside '#ifdef'"); - - return false; - } - - write.write(line + ls); - - state = 1; - - String s = line.substring(9); - - if (onSwitches.indexOf(s) != -1) - { - working = true; - switchoff = false; - } - else if (offSwitches.indexOf(s) != -1) - { - working = true; - - write.write("/*" + ls); - - switchoff = true; - } - - if (switches.indexOf(s) == -1) - { - switches.add(s); - } - } - else if (line.startsWith("//#else")) - { - if (state != 1) - { - printError("'#else' without '#ifdef'"); - - return false; - } - - state = 2; - - if (!working) - { - write.write(line + ls); - } - else if (switchoff) - { - write.write("*/" + ls); - write.write(line + ls); - - switchoff = false; - } - else - { - write.write(line + ls); - write.write("/*" + ls); - - switchoff = true; - } - } - else if (line.startsWith("//#endif")) - { - if (state == 0) - { - printError("'#endif' without '#ifdef'"); - - return false; - } - - state = 0; - - if (working && switchoff) - { - write.write("*/" + ls); - } - - write.write(line + ls); - - working = false; - } - else - { - write.write(line + ls); - } - } - } - - if (state != 0) - { - printError("'#endif' missing"); - - return false; - } - - read.close(); - write.flush(); - write.close(); - - File fbak = new File(name + ".bak"); - - fbak.delete(); - f.renameTo(fbak); - - File fcopy = new File(name); - - fnew.renameTo(fcopy); - fbak.delete(); - - return true; - } - catch (Exception e) - { - printError(e.getMessage()); - - return false; - } - } - - /** - * Method declaration - * - * @param name - * @return - */ - int testFile(String name) - { - - File f = new File(name); - - try - { - LineNumberReader read = new LineNumberReader(new FileReader(f)); - int l = 1; - int - maxline = 0; - boolean longline = false; - - while (true) - { - String line = read.readLine(); - - if (line == null) - { - break; - } - - if (line.length() > MAX_LINELENGTH - && !line.startsWith("org.hsqldb.test.Profile.")) - { - System.out.println("long line in " + name + " at line " - + l); - } - - if (line.startsWith(" ")) - { - int spaces = 0; - - for (; spaces < line.length(); spaces++) - { - if (line.charAt(spaces) != ' ') - { - break; - } - } - - if (spaces > 3 && testLine(line) && !longline) - { - maxline++; - } - else if (isLongline(line)) - { - longline = true; - } - else - { - longline = false; - } - - String s = line.substring(spaces); - - if (s.startsWith("if(")) - { - if (!s.endsWith(" {")) - { - System.out.println("if( without { in " + name - + " at line " + l); - } - } - else if (s.startsWith("} else if(")) - { - if (!s.endsWith(" {")) - { - System.out.println("} else if without { in " - + name + " at line " + l); - } - } - else if (s.startsWith("while(")) - { - if (!s.endsWith(" {")) - { - System.out.println("while( without { in " + name - + " at line " + l); - } - } - else if (s.startsWith("switch(")) - { - if (!s.endsWith(" {")) - { - System.out.println("switch( without { in " + name - + " at line " + l); - } - } - else if (s.startsWith("do ")) - { - if (!s.endsWith(" {")) - { - System.out.println("do without { in " + name - + " at line " + l); - } - } - } - - l++; - } - - read.close(); - - return maxline; - } - catch (Exception e) - { - printError(e.getMessage()); - } - - return -1; - } - - /** - * Method declaration - * - * @param line - * @return - */ - private boolean testLine(String line) - { - - if (!line.endsWith(";")) - { - return false; - } - - if (line.trim().startsWith("super(")) - { - return false; - } - - return true; - } - - /** - * Method declaration - * - * @param error - */ - private void printError(String error) - { - System.out.println(""); - System.out.println("ERROR: " + error); - } - - /** - * Get a set of files from a specifed directory with a set of includes. - * - * @param directory Directory to scan - * @param includes Comma separated list of includes - * @return files - */ - public String[] getFiles(File directory, String includes) - { - String[] includePatterns = null; - if (includes != null) - { - includePatterns = StringUtils.split(includes, ","); - } - DirectoryScanner directoryScanner = new DirectoryScanner(); - directoryScanner.setBasedir(directory); - directoryScanner.setIncludes(includePatterns); - directoryScanner.scan(); - String[] files = directoryScanner.getIncludedFiles(); - - for (int i = 0; i < files.length; i++) - { - files[i] = new File(directory, files[i]).getAbsolutePath(); - } - - return files; - } - -} diff --git a/codeswitcher/xdocs/.cvsignore b/codeswitcher/xdocs/.cvsignore deleted file mode 100644 index cb6131bb..00000000 --- a/codeswitcher/xdocs/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -stylesheets diff --git a/codeswitcher/xdocs/changes.xml b/codeswitcher/xdocs/changes.xml deleted file mode 100644 index 37cbea48..00000000 --- a/codeswitcher/xdocs/changes.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Changes - Jason van Zyl - - - - - - - - update to commons-lang 1.0.1 - - - - - Original release for Maven 1.0-beta8 - - - - - diff --git a/codeswitcher/xdocs/goals.xml b/codeswitcher/xdocs/goals.xml deleted file mode 100644 index 0976ffe8..00000000 --- a/codeswitcher/xdocs/goals.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - Maven CodeSwitcher Plug-in Goals - Jason van Zyl - - - - - - codeswitcher:init - - Set up the code switcher tag library - - - - - diff --git a/codeswitcher/xdocs/index.xml b/codeswitcher/xdocs/index.xml deleted file mode 100644 index d30814d1..00000000 --- a/codeswitcher/xdocs/index.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - Maven CodeSwitcher Plug-in - Jason van Zyl - - - -
-

- A preprocessor plug-in for Maven. -

-
- -
diff --git a/codeswitcher/xdocs/navigation.xml b/codeswitcher/xdocs/navigation.xml deleted file mode 100644 index 2e9a0176..00000000 --- a/codeswitcher/xdocs/navigation.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Maven CodeSwitcher Plugin - - - - - - - - - - - diff --git a/codeswitcher/xdocs/properties.xml b/codeswitcher/xdocs/properties.xml deleted file mode 100644 index d4478608..00000000 --- a/codeswitcher/xdocs/properties.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - Maven CodeSwitcher Plugin Properties - Jason van Zyl - - - -
- - - - - - - - - - - -
Property nameOptional?Description
-
- -
diff --git a/perforce/.cvsignore b/perforce/.cvsignore deleted file mode 100644 index e5e33942..00000000 --- a/perforce/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -target -velocity.log -maven.log diff --git a/perforce/plugin.jelly b/perforce/plugin.jelly deleted file mode 100644 index 2635ef9b..00000000 --- a/perforce/plugin.jelly +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/perforce/project.properties b/perforce/project.properties deleted file mode 100644 index d66f96c3..00000000 --- a/perforce/project.properties +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------- -# Copyright 2001-2004 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. -# ------------------------------------------------------------------- - -# ------------------------------------------------------------------- -# P R O J E C T P R O P E R T I E S -# ------------------------------------------------------------------- diff --git a/perforce/project.xml b/perforce/project.xml deleted file mode 100644 index 24d71f2a..00000000 --- a/perforce/project.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - ../plugin-parent/project.xml - 3 - maven-perforce-plugin - Maven Perforce Plugin - 1.2-SNAPSHOT - 2001 - org.apache.maven - - Allow perforce tasks to be used - http://maven.apache.org/reference/plugins/perforce/ - /www/maven.apache.org/reference/plugins/perforce/ - - scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/perforce/ - scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:maven-plugins/perforce/ - http://cvs.apache.org/viewcvs/maven-plugins/perforce/ - - - - 1.1 - 1.1 - MAVEN_PERFORCE_1_1 - - - - - Jason van Zyl - jvanzyl - jason@zenplex.com - Zenplex - - Architect - Release Manager - - - - - - ant - ant - 1.5.3-1 - - root - - - - oro - oro - 2.0.7 - - root - - - - diff --git a/perforce/xdocs/.cvsignore b/perforce/xdocs/.cvsignore deleted file mode 100644 index cb6131bb..00000000 --- a/perforce/xdocs/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -stylesheets diff --git a/perforce/xdocs/changes.xml b/perforce/xdocs/changes.xml deleted file mode 100644 index f9666940..00000000 --- a/perforce/xdocs/changes.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Changes - dIon Gillard - - - - - - Move to oro 2.0.7 - - - Fix documentation and project.xml to allow deployment - - - - - Created to enable the perforce optional tasks of ant - - - - - diff --git a/perforce/xdocs/goals.xml b/perforce/xdocs/goals.xml deleted file mode 100644 index 364724d2..00000000 --- a/perforce/xdocs/goals.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - Maven perforce Plug-in Goals - dIon Gillard - - - - - perforce:dummy - No use - - - - \ No newline at end of file diff --git a/perforce/xdocs/index.xml b/perforce/xdocs/index.xml deleted file mode 100644 index e145c905..00000000 --- a/perforce/xdocs/index.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - Maven Perforce Plug-in - dIon Gillard - - - -
-

- This plug-in allows you to use the - ant optional - tasks for perforce from within a Maven build file. -

-

- This plugin has no goals. -

-

- It provides no functionality that can be executed by a user, and - exists only to make the required jars for the perforce ant tasks - available to a user -

-
- -
diff --git a/perforce/xdocs/navigation.xml b/perforce/xdocs/navigation.xml deleted file mode 100644 index 99581c2a..00000000 --- a/perforce/xdocs/navigation.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - Maven Perforce Plugin - - - - - - - - - - - - - - - - - diff --git a/perforce/xdocs/properties.xml b/perforce/xdocs/properties.xml deleted file mode 100644 index 2b704435..00000000 --- a/perforce/xdocs/properties.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - perforce Properties - dIon Gillard - - -
-

There are no settings to customize this plugin

-
- -
\ No newline at end of file