From 49cb924f5402c9d24379ae1af62def6fa5892649 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Fri, 4 Jun 2021 07:58:52 +0700 Subject: Upgrade license from CPLv1/EPLv1 to EPLv2 This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch --- .../main/java/$installer$/org/aspectj/Main.java | 4 +- .../internal/tools/ant/taskdefs/AJInstaller.java | 4 +- .../internal/tools/ant/taskdefs/AJPush.java | 4 +- .../internal/tools/ant/taskdefs/AntBuilder.java | 4 +- .../internal/tools/ant/taskdefs/BuildModule.java | 79 ++++++++------- .../internal/tools/ant/taskdefs/Checklics.java | 28 ++---- .../tools/ant/taskdefs/ConditionalTask.java | 4 +- .../ant/taskdefs/CopyAndInlineStylesheet.java | 28 +++--- .../tools/ant/taskdefs/StripNonBodyHtml.java | 26 ++--- .../tools/ant/taskdefs/TestBuildModule.java | 32 +++---- .../tools/ant/taskdefs/VersionUptodate.java | 42 ++++---- .../aspectj/internal/tools/build/BuildSpec.java | 30 +++--- .../org/aspectj/internal/tools/build/Builder.java | 4 +- .../org/aspectj/internal/tools/build/Messager.java | 24 ++--- .../org/aspectj/internal/tools/build/Module.java | 4 +- .../org/aspectj/internal/tools/build/Modules.java | 38 ++++---- .../internal/tools/build/ProductModule.java | 34 +++---- .../org/aspectj/internal/tools/build/Result.java | 4 +- .../internal/tools/build/SampleGatherer.java | 14 +-- .../org/aspectj/internal/tools/build/Util.java | 4 +- .../$installer$/org/aspectj/resources/intro.html | 4 +- .../java/org/aspectj/build/BuildModuleTests.java | 106 ++++++++++----------- .../aspectj/internal/build/BuildClasspathTest.java | 4 +- .../aspectj/internal/build/BuildModuleTest.java | 90 ++++++++--------- .../org/aspectj/internal/build/ModulesTest.java | 72 +++++++------- .../aspectj/internal/tools/build/UtilsTest.java | 16 ++-- 26 files changed, 347 insertions(+), 356 deletions(-) (limited to 'build/src') diff --git a/build/src/main/java/$installer$/org/aspectj/Main.java b/build/src/main/java/$installer$/org/aspectj/Main.java index a307be930..745c9d715 100644 --- a/build/src/main/java/$installer$/org/aspectj/Main.java +++ b/build/src/main/java/$installer$/org/aspectj/Main.java @@ -3,9 +3,9 @@ * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJInstaller.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJInstaller.java index a67872e8c..f432af159 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJInstaller.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJInstaller.java @@ -3,9 +3,9 @@ * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJPush.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJPush.java index 81e592553..3d4c0caa3 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJPush.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AJPush.java @@ -3,9 +3,9 @@ * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java index 82edad5ea..1bfdf8a63 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java @@ -2,9 +2,9 @@ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/BuildModule.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/BuildModule.java index 6ac6b5ba6..5fc4b3943 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/BuildModule.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/BuildModule.java @@ -1,17 +1,17 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ - + package org.aspectj.internal.tools.ant.taskdefs; import java.io.File; @@ -31,7 +31,7 @@ public class BuildModule extends Task { // quickie hack... public static void main(String[] args) { TestBuildModule.main(args); - } + } private static File pathToFile(Path path) { if (null != path) { @@ -49,47 +49,47 @@ public class BuildModule extends Task { // quickie hack... buildSpec = new BuildSpec(); setTaskName("ajbuild"); } - + public void setModuledir(Path moduleDir) { buildSpec.moduleDir = pathToFile(moduleDir); } - + public void setModule(String module) { // XXX handle multiple modules, same builder buildSpec.module = module; } - + public void setVersion(String version) { buildSpec.version = version; } public void setBasedir(Path baseDir) { buildSpec.baseDir = pathToFile(baseDir); } - + public void setJardir(Path jarDir) { buildSpec.jarDir = pathToFile(jarDir); } - + public void setTrimtesting(boolean trimTesting) { buildSpec.trimTesting = trimTesting; } - + public void setAssembleall(boolean assembleAll) { buildSpec.assembleAll = assembleAll; } - - public void setRebuild(boolean rebuild) { + + public void setRebuild(boolean rebuild) { buildSpec.rebuild = rebuild; } - - public void setFailonerror(boolean failonerror) { + + public void setFailonerror(boolean failonerror) { buildSpec.failonerror = failonerror; } - - public void setCreateinstaller(boolean create) { + + public void setCreateinstaller(boolean create) { buildSpec.createInstaller = create; } - - public void setVerbose(boolean verbose) { + + public void setVerbose(boolean verbose) { buildSpec.verbose = verbose; } @@ -98,47 +98,47 @@ public class BuildModule extends Task { // quickie hack... } // --------------------------------------------------------- product build - + public void setProductdir(Path productDir) { buildSpec.productDir = pathToFile(productDir); } - + public void setTempdir(Path tempDir) { buildSpec.tempDir = pathToFile(tempDir); } - + public void setDistdir(Path distdir) { buildSpec.distDir = pathToFile(distdir); } - + public void execute() throws BuildException { final BuildSpec buildSpec = this.buildSpec; this.buildSpec = new BuildSpec(); - build(buildSpec); + build(buildSpec); } - + private void build(BuildSpec buildSpec) throws BuildException { final boolean failonerror = buildSpec.failonerror; Builder builder = null; try { // try using script first if not a product boolean built = false; - if ((null == buildSpec.productDir) && (null != buildSpec.moduleDir)) { + if ((null == buildSpec.productDir) && (null != buildSpec.moduleDir)) { File buildScript = new File(buildSpec.moduleDir, "build.xml"); // XXXFileLiteral if (buildScript.canRead()) { built = buildByScript(buildSpec, buildScript); if (!built) { - log("unable to build " - + buildSpec - + " using script: " + log("unable to build " + + buildSpec + + " using script: " + buildScript.getAbsolutePath()); } - } + } } if (!built) { builder = AntBuilder.getBuilder( - buildSpec.buildConfig, - getProject(), + buildSpec.buildConfig, + getProject(), buildSpec.tempDir); if (!builder.build(buildSpec) && failonerror) { Location loc = getLocation(); @@ -157,9 +157,8 @@ public class BuildModule extends Task { // quickie hack... } } - boolean buildByScript(BuildSpec buildSpec, File buildScript) + boolean buildByScript(BuildSpec buildSpec, File buildScript) throws BuildException { return false; } } - \ No newline at end of file diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java index 1f9b132ec..20b4b8353 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java @@ -2,9 +2,9 @@ * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation @@ -524,14 +524,14 @@ class HeaderInfo { } void writeRest(PrintWriter writer) { - writer.println(" * All rights reserved. "); - writer.println(" * This program and the accompanying materials are made available "); - writer.println(" * under the terms of the Eclipse Public License v1.0 "); - writer.println(" * which accompanies this distribution and is available at "); - writer.println(" * http://www.eclipse.org/legal/epl-v10.html "); - writer.println(" * "); - writer.println(" * Contributors: "); - writer.println(" * Xerox/PARC initial implementation "); + writer.println(" * All rights reserved."); + writer.println(" * This program and the accompanying materials are made available"); + writer.println(" * under the terms of the Eclipse Public License v 2.0"); + writer.println(" * which accompanies this distribution and is available at"); + writer.println(" * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt"); + writer.println(" * "); + writer.println(" * Contributors:"); + writer.println(" * Xerox/PARC initial implementation"); writer.println(" * ******************************************************************/"); writer.println(""); } @@ -541,14 +541,6 @@ class HeaderInfo { public static final String PARC_ONLY = " * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC)."; public static final String XEROX_PREFIX = " * Copyright (c) "; public static final String XEROX_SUFFIX = " Xerox Corporation"; - /* - * /* ******************************************************************* Copyright (c) 1998-2001 Xerox Corporation, 2002 Palo - * Alto Research Center, Incorporated (PARC). All rights reserved. This program and the accompanying materials are made - * available under the terms of the Eclipse Public License v1.0 which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: Xerox/PARC initial implementation ****************************************************************** - */ } /** diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java index 431f9b25b..fd46c8adc 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/ConditionalTask.java @@ -3,9 +3,9 @@ * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 + * under the terms of the Eclipse Public License v 2.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Xerox/PARC initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/CopyAndInlineStylesheet.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/CopyAndInlineStylesheet.java index 664616c07..f76eb2b0d 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/CopyAndInlineStylesheet.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/CopyAndInlineStylesheet.java @@ -1,14 +1,14 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.internal.tools.ant.taskdefs; @@ -35,7 +35,7 @@ public class CopyAndInlineStylesheet extends Task { public void setTodir(String todir) { this.todir = project.resolveFile(todir); } - + public void execute() throws BuildException { try { @@ -46,7 +46,7 @@ public class CopyAndInlineStylesheet extends Task { throw new BuildException("must set 'file' attribute"); } log("copying html from" + file + " to " + todir.getAbsolutePath()); - + File toFile = new File(todir, file.getName()); Mkdir mkdir = (Mkdir) project.createTask("mkdir"); @@ -71,7 +71,7 @@ public class CopyAndInlineStylesheet extends Task { out.println(line); } } - + in.close(); out.close(); } catch (IOException e) { @@ -90,7 +90,7 @@ public class CopyAndInlineStylesheet extends Task { out.println("