diff --git a/license/plugin.jelly b/license/plugin.jelly index c2922fcb..a776868a 100644 --- a/license/plugin.jelly +++ b/license/plugin.jelly @@ -9,12 +9,6 @@ - - @@ -95,16 +89,10 @@ - - + + + + diff --git a/license/src/main/org/apache/maven/license/LicenseTask.java b/license/src/main/org/apache/maven/license/LicenseTask.java deleted file mode 100644 index d379afbf..00000000 --- a/license/src/main/org/apache/maven/license/LicenseTask.java +++ /dev/null @@ -1,233 +0,0 @@ -package org.apache.maven.license; - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. 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. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache Maven" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache Maven", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * 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 APACHE SOFTWARE FOUNDATION 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 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. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * ==================================================================== - */ - -// java imports -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.io.UnsupportedEncodingException; - -/** - * This task generates an xdoc formatted file from an input text file - * provided. - * - * @author Markus M. May - * @author dIon Gillard - * @version $Id: LicenseTask.java,v 1.2 2003/02/07 11:47:14 evenisse Exp $ - */ -public class LicenseTask -{ - /** The input file */ - private File input; - /** Output file for xml document */ - private File output; - /** title of the resulting document */ - private String title = ""; - /** description of the resulting document */ - private String description = ""; - /** output encoding for the xml document */ - private String outputEncoding = "ISO-8859-1"; - - /** - * Output file for xml document - */ - public File getOutput() - { - return output; - } - - /** - * Set the output file for the log. - * @param output the output file - */ - public void setOutput(File aFile) - { - output = aFile; - } - - public File getInput() - { - return input; - } - - public void setInput(File aFile) - { - input = aFile; - } - - /** - * Execute task. - * @throws FileNotFoundException if {@link #getInput()} doesn't exist - * @throws UnsupportedEncodingException if the underlying platform doesn't - * support ISO-8859-1 encoding - */ - public void doExecute() throws FileNotFoundException, IOException, - UnsupportedEncodingException - { - if (output == null) - { - throw new NullPointerException("output must be set"); - } - - if (input == null) - { - throw new NullPointerException("input must be set"); - } - - if (!input.exists() || !input.canRead()) - { - throw new IOException("cannot read license file"); - } - - File dir = output.getParentFile(); - if (dir != null) { - dir.mkdirs(); - } - PrintWriter out = new PrintWriter(new OutputStreamWriter( - new FileOutputStream(output), getOutputEncoding())); - out.print(""); - out.println(""); - out.print(""); - out.print(getTitle()); - out.println(""); - out.println(""); - out.print("
"); - out.println(""); - out.println("
"); - out.println(""); - out.println("
"); - out.flush(); - out.close(); - } - - /** - * Returns the description. - * @return String - */ - public String getDescription() - { - return description; - } - - /** - * Returns the title. - * @return String - */ - public String getTitle() - { - return title; - } - - /** - * Sets the description. - * @param description The new description - */ - public void setDescription(String description) - { - this.description = description; - } - - /** - * Sets the title. - * @param title The new title - */ - public void setTitle(String title) - { - this.title = title; - } - - /** - * Returns the outputEncoding. - * @return String - */ - public String getOutputEncoding() - { - return outputEncoding; - } - - /** - * Sets the outputEncoding. - * @param outputEncoding The outputEncoding to set - */ - public void setOutputEncoding(String outputEncoding) - { - this.outputEncoding = outputEncoding; - } - -} \ No newline at end of file diff --git a/license/src/plugin-resources/license.xml b/license/src/plugin-resources/license.xml index cd7b39e0..e5cee392 100644 --- a/license/src/plugin-resources/license.xml +++ b/license/src/plugin-resources/license.xml @@ -2,12 +2,11 @@ - ${author} - ${title} + License -
+