diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-06-04 07:58:52 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-06-04 07:58:52 +0700 |
commit | 49cb924f5402c9d24379ae1af62def6fa5892649 (patch) | |
tree | 69844405209043e2e18aa9eef0f01f287bc1ae52 /build/src | |
parent | 82df3f0fc9842758f15f12299c9113e48f1ccb5c (diff) | |
download | aspectj-49cb924f5402c9d24379ae1af62def6fa5892649.tar.gz aspectj-49cb924f5402c9d24379ae1af62def6fa5892649.zip |
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 <Alexander@Kriegisch.name>
Diffstat (limited to 'build/src')
26 files changed, 347 insertions, 356 deletions
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("<style type=\"text/css\">"); out.println("<!--"); - + BufferedReader inStyle = new BufferedReader(new FileReader(styleSheetFile)); while (true) { @@ -108,7 +108,7 @@ public class CopyAndInlineStylesheet extends Task { private static boolean isStyleSheet(String line) throws IOException { line = line.toLowerCase(); int len = line.length(); - int i = 0; + int i = 0; while (true) { if (i == len) return false; diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/StripNonBodyHtml.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/StripNonBodyHtml.java index 61e29f3b3..dd63ee7e8 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/StripNonBodyHtml.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/StripNonBodyHtml.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; @@ -173,7 +173,7 @@ public class StripNonBodyHtml extends MatchingTask { * @param start the starting tag (case sensitive) * @param end the ending tag (case sensitive) */ - String stripTags(String input, final String SOURCE, + String stripTags(String input, final String SOURCE, final String START, final String END) { if (null == input) return input; StringBuffer buffer = new StringBuffer(input.length()); @@ -190,8 +190,8 @@ public class StripNonBodyHtml extends MatchingTask { if (-1 == endLoc) { log(SOURCE + " stripTags - no end tag - startLoc=" + startLoc); break; // <------------ invalid exit - } else if (endLoc < startLoc) { - log(SOURCE + " stripTags - impossible: startLoc=" + } else if (endLoc < startLoc) { + log(SOURCE + " stripTags - impossible: startLoc=" + startLoc + " > endLoc=" + endLoc); break; // <------------ invalid exit } else { @@ -235,7 +235,7 @@ public class StripNonBodyHtml extends MatchingTask { } private static class ParseException extends Exception { - private static final long serialVersionUID = -1l; + private static final long serialVersionUID = -1l; } private static ParseException barf() { diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/TestBuildModule.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/TestBuildModule.java index bd3b99609..89f02784a 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/TestBuildModule.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/TestBuildModule.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; @@ -26,7 +26,7 @@ public class TestBuildModule { // private static boolean REBUILD = false; private static final String SYNTAX = "java {classname} <[product|module]dir>"; public static void main(String[] args) { - + if ((null == args) || (1 > args.length) || !Util.canReadDir(new File(args[0]))) { System.err.println(SYNTAX); @@ -42,7 +42,7 @@ public class TestBuildModule { System.err.println(SYNTAX); } } - + static void createModule(String[] args) { File moduleDir = new File(args[0]); File baseDir = moduleDir.getParentFile(); @@ -51,10 +51,10 @@ public class TestBuildModule { } File jarDir = new File(baseDir, "aj-build-jars"); if (!(Util.canReadDir(jarDir) || jarDir.mkdirs())) { - System.err.println("createModule unable to create " + jarDir); + System.err.println("createModule unable to create " + jarDir); return; } - + // set module dir or basedir plus module name BuildSpec buildSpec = new BuildSpec(); buildSpec.moduleDir = moduleDir; @@ -71,9 +71,9 @@ public class TestBuildModule { Builder builder = AntBuilder.getBuilder("", project, tempDir); builder.build(buildSpec); } - + static void createProduct(String[] args) { throw new Error("unimplemented"); } -} +} diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/VersionUptodate.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/VersionUptodate.java index 92b271c69..070adf772 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/VersionUptodate.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/VersionUptodate.java @@ -1,13 +1,13 @@ /* ******************************************************************* * 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 - * 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; @@ -21,7 +21,7 @@ import java.io.IOException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; -/** +/** * Check if version source file has the specified build version, * and ensure a tag file reflects whether it does or not. */ @@ -31,30 +31,30 @@ public class VersionUptodate extends Task { private String buildVersion; private File versionSource; private File versionTagFile; - - /** + + /** * @param buildVersion String expected as Version.text - required */ public void setVersion(String buildVersion) { this.buildVersion = buildVersion; } - /** - * @param versionSource the File Version.java containing text constant + /** + * @param versionSource the File Version.java containing text constant * - required */ public void setVersionSourceFile(File versionSource) { this.versionSource = versionSource; } - - /** + + /** * @param versionTagFile the File whose existence signals that the version * is uptodate after this task executes - required. */ public void setVersionTagFile(File versionTagFile) { this.versionTagFile = versionTagFile; } - + /** * If the Version.java source file contains the correct * build version, then create the output tag file, @@ -84,7 +84,7 @@ public class VersionUptodate extends Task { } } } - + /** * Detect whether version is correct in Java sources. * @param versionSource @@ -114,9 +114,9 @@ public class VersionUptodate extends Task { } catch (IOException e) { } } - } + } } - + /** * Create file with contents */ @@ -139,6 +139,6 @@ public class VersionUptodate extends Task { } } } - -} + +} diff --git a/build/src/main/java/org/aspectj/internal/tools/build/BuildSpec.java b/build/src/main/java/org/aspectj/internal/tools/build/BuildSpec.java index ed0a453e1..9d6968f72 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/BuildSpec.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/BuildSpec.java @@ -1,24 +1,24 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC), * 2005 Contributors. - * 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.build; import java.io.File; -/** +/** * Open struct for specifying builds for both modules and products. * Separated from bulder to permit this to build many modules * concurrently. @@ -31,7 +31,7 @@ public class BuildSpec { public File jarDir; public File tempDir; public File stagingDir; - public String buildConfig; + public String buildConfig; public String version; public boolean rebuild; public boolean trimTesting; @@ -43,13 +43,13 @@ public class BuildSpec { public File productDir; public boolean createInstaller; public File distDir; - + // building modules public String module; public BuildSpec() { version = DEFAULT_VERSION; } - + public boolean isProduct() { return (Util.canReadDir(productDir)); } @@ -61,7 +61,7 @@ public class BuildSpec { public boolean isValid() { return (isProduct() || isModule()); } - + public String toString() { if (null != productDir) { return "product " + productDir.getName(); diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Builder.java b/build/src/main/java/org/aspectj/internal/tools/build/Builder.java index b43578dd3..94e8c7997 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Builder.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Builder.java @@ -3,9 +3,9 @@ * 2003 Contributors. * 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: * PARC initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Messager.java b/build/src/main/java/org/aspectj/internal/tools/build/Messager.java index 4752fd645..80b8ce5f4 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Messager.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Messager.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.build; /** logging stub XXX replace */ @@ -22,12 +22,12 @@ public class Messager { System.out.println(s); return true; } - + public boolean error(String s) { System.out.println(s); return true; } - + public boolean logException(String context, Throwable thrown) { System.err.println(context); thrown.printStackTrace(System.err); diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Module.java b/build/src/main/java/org/aspectj/internal/tools/build/Module.java index 9d10e4743..07743a5db 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Module.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Module.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/build/Modules.java b/build/src/main/java/org/aspectj/internal/tools/build/Modules.java index ca2b50aac..9f14db899 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Modules.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Modules.java @@ -1,34 +1,34 @@ /* ******************************************************************* - * 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.build; import java.io.File; import java.util.Hashtable; -/** - * Registration and factory for modules +/** + * Registration and factory for modules * @see Module * @see Builder */ public class Modules { - + private final Hashtable<String,Module> modules = new Hashtable<>(); public final File baseDir; public final File jarDir; private final Messager handler; - + public Modules(File baseDir, File jarDir, Messager handler) { this.baseDir = baseDir; this.jarDir = jarDir; @@ -37,9 +37,9 @@ public class Modules { Util.iaxIfNotCanReadDir(jarDir, "jarDir"); Util.iaxIfNull(handler, "handler"); } - - - /** + + + /** * Get module associated with name. * @return fail if unable to find or create module {name}. */ @@ -59,8 +59,8 @@ public class Modules { } else { handler.error("invalid module: " + result.toLongString()); } - } + } } return result; } -}
\ No newline at end of file +} diff --git a/build/src/main/java/org/aspectj/internal/tools/build/ProductModule.java b/build/src/main/java/org/aspectj/internal/tools/build/ProductModule.java index c695a4f8e..2ed25d419 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/ProductModule.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/ProductModule.java @@ -1,13 +1,13 @@ /* ******************************************************************* * 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 - * 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.build; @@ -16,29 +16,29 @@ import java.io.File; /** * Struct associating module with target product distribution jar * and assembly instructions. - * When building product distributions, a zero-length jar file - * in the dist directory may signify a module to be built, + * When building product distributions, a zero-length jar file + * in the dist directory may signify a module to be built, * renamed, and included in the distribution. */ public class ProductModule { /** name of distribution directory in product directory */ private static final String DIST = "dist"; - + /** top-level product directory being produced */ public final File productDir; - + /** path to file in distribution template dir for this module jar */ public final File replaceFile; - + /** relative path within distribution of this product module jar */ public final String relativePath; - + /** the module jar is the file to replace */ public final Module module; /** if true, assemble all when building module */ public final boolean assembleAll; - + public ProductModule(File productDir, File replaceFile, Module module, boolean assembleAll) { this.replaceFile = replaceFile; this.module = module; @@ -50,7 +50,7 @@ public class ProductModule { String productDirPath = productDir.getAbsolutePath(); String replaceFilePath = replaceFile.getAbsolutePath(); if (!replaceFilePath.startsWith(productDirPath)) { - String m = "\"" + replaceFilePath + String m = "\"" + replaceFilePath + "\" does not start with \"" + productDirPath + "\""; @@ -58,7 +58,7 @@ public class ProductModule { } replaceFilePath = replaceFilePath.substring(1+productDirPath.length()); if (!replaceFilePath.startsWith(DIST)) { - String m = "\"" + replaceFilePath + String m = "\"" + replaceFilePath + "\" does not start with \"" + DIST + "\""; throw new IllegalArgumentException(m); } diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Result.java b/build/src/main/java/org/aspectj/internal/tools/build/Result.java index 22b92c8af..ef14c8617 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Result.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Result.java @@ -2,9 +2,9 @@ * Copyright (c) 2005 Contributors. * 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://eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Wes Isberg initial implementation diff --git a/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java b/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java index 2864bb92f..6ac1f45eb 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java @@ -2,9 +2,9 @@ * Copyright (c) 2003 Contributors. * 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: * Wes Isberg initial implementation @@ -448,16 +448,16 @@ class SamplesRenderer { public static final String COPYRIGHT = "<p><small>Copyright 2003 Contributors. All Rights Reserved. " - + "This sample code is made available under the Common Public " - + "License version 1.0 available at " - + "<a href=\"http://www.eclipse.org/legal/epl-v10.html\">" - + "http://www.eclipse.org/legal/epl-v10.html</a>." + + "This sample code is made available under the Eclipse Public " + + "License v 2.0 available at " + + "<a href=\"https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt\">" + + "https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt</a>. " + "Contributors are listed in this document as authors. " + "Permission to republish portions of this sample code " + "is hereby granted if the publication acknowledges " + "the author by name and " + "the source by reference to the AspectJ project home page " - + " at http://eclipse.org/aspectj.</small></p>" + + "at http://eclipse.org/aspectj.</small></p>" + EOL; /** template algorithm to render */ diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Util.java b/build/src/main/java/org/aspectj/internal/tools/build/Util.java index cd7d6623f..071826b47 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Util.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Util.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/resources/$installer$/org/aspectj/resources/intro.html b/build/src/main/resources/$installer$/org/aspectj/resources/intro.html index b29bb9484..d5b543705 100644 --- a/build/src/main/resources/$installer$/org/aspectj/resources/intro.html +++ b/build/src/main/resources/$installer$/org/aspectj/resources/intro.html @@ -7,8 +7,8 @@ <p>This installs the complete AspectJ 9 Development Kit (AJDK) distribution, with the compiler, aspect libraries, structure browser, ant tasks, documentation, and examples. -This distribution is covered by the Eclipse Public License (see - http://www.eclipse.org/legal/epl-v10.html). +This distribution is covered by the Eclipse Public License v 2.0 (see +https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt). <p> For IDE integrations or source code, see the project home page at http://eclipse.org/aspectj</p> diff --git a/build/src/test/java/org/aspectj/build/BuildModuleTests.java b/build/src/test/java/org/aspectj/build/BuildModuleTests.java index 46f5b15a0..64f8b1016 100644 --- a/build/src/test/java/org/aspectj/build/BuildModuleTests.java +++ b/build/src/test/java/org/aspectj/build/BuildModuleTests.java @@ -1,15 +1,15 @@ package org.aspectj.build; /* ******************************************************************* - * 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 * ******************************************************************/ @@ -40,19 +40,19 @@ public class BuildModuleTests extends TestCase { /** if true, then replace old headers with new first */ private static final boolean replacing = false; // XXX never to enable again... - + /** replace commented out below - if any replace failed, halt all */ private static boolean replaceFailed = false; - + private static final String BASE_DIR = ".." + File.separator; private static final String[] JDT_SOURCE_DIRS = new String[] {}; - public static Test suite() { + public static Test suite() { TestSuite suite = new TestSuite("Build module tests"); - suite.addTestSuite(BuildModuleTests.class); - suite.addTestSuite(BuildModuleTest.class); - suite.addTestSuite(ModulesTest.class); - suite.addTestSuite(UtilsTest.class); + suite.addTestSuite(BuildModuleTests.class); + suite.addTestSuite(BuildModuleTest.class); + suite.addTestSuite(ModulesTest.class); + suite.addTestSuite(UtilsTest.class); return suite; } @@ -87,29 +87,29 @@ public class BuildModuleTests extends TestCase { } } public void testLicense_ajbrowser() { - checkLicense("ajbrowser"); + checkLicense("ajbrowser"); } public void testLicense_ajde() { - checkLicense("ajde"); + checkLicense("ajde"); } public void testLicense_aspectj5rt() { - checkLicense("aspectj5rt"); + checkLicense("aspectj5rt"); } public void testLicense_asm() { - checkLicense("asm"); + checkLicense("asm"); } public void testLicense_bridge() { - checkLicense("bridge"); + checkLicense("bridge"); } public void testLicense_build() { - checkLicense("build"); + checkLicense("build"); } public void testLicense_org_aspectj_ajdt_core() { - checkLicense("org.aspectj.ajdt.core"); + checkLicense("org.aspectj.ajdt.core"); } public void testLicense_org_aspectj_lib() { - checkLicense("org.aspectj.lib"); + checkLicense("org.aspectj.lib"); } public void testLicense_org_eclipse_jdt_core() { final String mod = "org.eclipse.jdt.core"; @@ -118,48 +118,48 @@ public class BuildModuleTests extends TestCase { checkSourceDirectory(new File(pre + jdtSourceDir), mod); } } - + public void testLicense_runtime() { - checkLicense("runtime"); + checkLicense("runtime"); } public void testLicense_taskdefs() { - checkLicense("taskdefs"); + checkLicense("taskdefs"); } public void testLicense_testing() { - checkLicense("testing"); + checkLicense("testing"); } public void testLicense_testing_client() { - checkLicense("testing-client"); + checkLicense("testing-client"); } public void testLicense_testing_drivers() { - checkLicense("testing-drivers"); + checkLicense("testing-drivers"); } public void testLicense_testing_util() { - checkLicense("testing-util"); + checkLicense("testing-util"); } public void testLicense_util() { - checkLicense("util"); + checkLicense("util"); } - + public void testLicense_weaver() { String module = "weaver"; // skip (testdata) packages fluffy, reflect checkSourceDirectory(new File(Util.path(new String[] {"..", module, "src","main","java"})), module); checkSourceDirectory(new File(Util.path(new String[] {"..", module, "src","test","java", "org"})), module); } - + public void testLicense_ajdoc() { checkLicense("ajdoc"); } - + public void testLicense_loadtime() { checkLicense("loadtime"); } - + public void testLicense_loadtime5() { checkLicense("loadtime5"); } - + public void testLicense_weaver5() { checkLicense("weaver5"); } @@ -172,7 +172,7 @@ public class BuildModuleTests extends TestCase { checkSourceDirectory(srcDir, module); } } - + void checkSourceDirectory(File srcDir, String module) { final String label = "source dir " + srcDir + " (module " + module + ")"; assertTrue(label, (srcDir.exists() && srcDir.isDirectory())); @@ -195,7 +195,7 @@ public class BuildModuleTests extends TestCase { } assertTrue(label + " fails", !BuildModuleTests.replaceFailed); } - + // separate check to verify all file types (suffixes) are known if (!isTestFolder(srcDir)) { ArrayList<File> unknownFiles = new ArrayList<>(); @@ -208,18 +208,18 @@ public class BuildModuleTests extends TestCase { } } } - + private boolean isTestFolder(File dir) { return dir.toString().contains("src"+File.separator+"test"+File.separator+"java"); } - + /** * Check tree for files not managed by the build system - * (either source files or managed as resources). + * (either source files or managed as resources). * This should pick up situations where new kinds of resources are added * to the tree without updating the build script patterns to pick them * up. - * @see Builder#BINARY_SOURCE_PATTERN + * @see Builder#BINARY_SOURCE_PATTERN * @see Builder#RESOURCE_PATTERN * @see org.aspectj.util.FileUtil#SOURCE_SUFFIXES */ @@ -234,12 +234,12 @@ public class BuildModuleTests extends TestCase { // sources from org.aspectj.util.FileUtil.SOURCE_SUFFIXES suffixes.add(".aj"); suffixes.add(".java"); - + // just because we know... suffixes.add(".html"); // others from Builder - final String input = Builder.BINARY_SOURCE_PATTERN + final String input = Builder.BINARY_SOURCE_PATTERN + "," + Builder.RESOURCE_PATTERN; StringTokenizer st = new StringTokenizer(input, ","); while (st.hasMoreTokens()) { @@ -256,15 +256,15 @@ public class BuildModuleTests extends TestCase { STATIC_ERRORS.add("unable to read pattern: " + s); } suffixes.add(token); - } + } KNOWN_SUFFIXES = Collections.unmodifiableList(suffixes); } - + private UnknownFileCheck() { - + } /** - * Return true if input File file is a valid path to a directory + * Return true if input File file is a valid path to a directory * or to a file * which is not hidden (starts with .) * and does not have a known suffix. @@ -274,7 +274,7 @@ public class BuildModuleTests extends TestCase { public boolean accept(File file) { if (null == file) { return false; - } + } if (file.isDirectory()) { return file.canRead(); } @@ -290,7 +290,7 @@ public class BuildModuleTests extends TestCase { } } return true; - + } void unknownFiles(File dir, ArrayList<File> results) { File[] files = dir.listFiles(this); @@ -305,7 +305,7 @@ public class BuildModuleTests extends TestCase { } } } - + } -} +} diff --git a/build/src/test/java/org/aspectj/internal/build/BuildClasspathTest.java b/build/src/test/java/org/aspectj/internal/build/BuildClasspathTest.java index c359e648c..813c58e30 100644 --- a/build/src/test/java/org/aspectj/internal/build/BuildClasspathTest.java +++ b/build/src/test/java/org/aspectj/internal/build/BuildClasspathTest.java @@ -2,9 +2,9 @@ * Copyright (c) 2005 Contributors. * 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://eclipse.org/legal/epl-v10.html + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt * * Contributors: * Wes Isberg initial implementation diff --git a/build/src/test/java/org/aspectj/internal/build/BuildModuleTest.java b/build/src/test/java/org/aspectj/internal/build/BuildModuleTest.java index 33dac2a0a..f8f0b4bde 100644 --- a/build/src/test/java/org/aspectj/internal/build/BuildModuleTest.java +++ b/build/src/test/java/org/aspectj/internal/build/BuildModuleTest.java @@ -1,15 +1,15 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC), * 2005-2006 Contributors. - * 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.build; @@ -40,7 +40,7 @@ import org.aspectj.internal.tools.build.Util; * will run; * (2) build.config takes the same form as it does for the * builder task, e.g., "useEclipseCompiles" will avoid - * recompiling with Javac and adopt classes in the + * recompiling with Javac and adopt classes in the * {module}/bin directories. */ public class BuildModuleTest extends TestCase { @@ -49,18 +49,18 @@ public class BuildModuleTest extends TestCase { private static boolean printedMessage; private static final boolean REMOVE_JARS_AFTER_DEBUGGING = true; // to just build one module verbosely - private static final String[] DEBUGS + private static final String[] DEBUGS = {}; // skip those requiring ajdoc, which requires tools.jar // also skip those requiring java5 unless manually set up // also skip big ones to avoid slowing the build too much - private static final String[] SKIPS + private static final String[] SKIPS //= {}; = {"aspectjtools", "ajdoc", "aspectj5rt", "run-all-junit-tests", "ajbrowser", "testing", "testing-drivers", "org.aspectj.ajdt.core", "weaver"}; - private static final String SKIP_MESSAGE = + private static final String SKIP_MESSAGE = "BuildModuleTest: Define \"run.build.tests\" as a system " + "property to run tests to build "; private static final String BUILD_CONFIG; @@ -76,12 +76,12 @@ public class BuildModuleTest extends TestCase { System.out.println("BuildModuleTest build.config: " + config); } } - + List<File> tempFiles = new ArrayList<>(); private File jarDir; private boolean deleteJars; boolean building; // must be enabled for tests to run - + public BuildModuleTest(String name) { super(name); building = Boolean.getBoolean("run.build.tests"); @@ -101,7 +101,7 @@ public class BuildModuleTest extends TestCase { } deleteTempFiles(); } - + protected void deleteTempFiles() { for (File file : tempFiles) { if (!Util.delete(file)) { @@ -127,12 +127,12 @@ public class BuildModuleTest extends TestCase { } public void testBuild() { - checkBuild("build", - Checklics.class.getName(), + checkBuild("build", + Checklics.class.getName(), new String[0], // help message true); // ant needed } - + public void testUtil() { checkBuild("util"); } @@ -140,16 +140,16 @@ public class BuildModuleTest extends TestCase { public void testAsm() { checkBuild("asm"); } - + public void testRuntime() { checkBuild("runtime"); } public void testAspectj5rt() { - checkBuild("aspectj5rt"); + checkBuild("aspectj5rt"); } - -// public void testLocalOutOfDate() { + +// public void testLocalOutOfDate() { // Messager handler = new Messager(); // File jarDir = new File("c:/home/ws/head/aj-build/jars"); // File baseDir = new File("c:/home/ws/head"); @@ -159,7 +159,7 @@ public class BuildModuleTest extends TestCase { // r.outOfDate(); // } // public void testAspectj5rtRequired() { -// File baseDir = new File(".."); +// File baseDir = new File(".."); // Modules modules = new Modules(baseDir, getJarDir(), new Messager()); // Module module = modules.getModule("aspectj5rt"); // Result result = module.getResult(Result.kind(true, true)); @@ -185,33 +185,33 @@ public class BuildModuleTest extends TestCase { } } public void testAjbrowser() { - checkBuild("ajbrowser", + checkBuild("ajbrowser", "org.aspectj.tools.ajbrowser.Main", new String[] {"-noExit", "-version"}); // compiler version } public void testTestingUtils() { - checkBuild("testing-util"); + checkBuild("testing-util"); } public void testAjdt() { - checkBuild("org.aspectj.ajdt.core", + checkBuild("org.aspectj.ajdt.core", "org.aspectj.tools.ajc.Main", new String[] { "-noExit", "-version" }); }// public void testTesting() { - checkBuild("testing", - "org.aspectj.testing.util.LangUtilTest", + checkBuild("testing", + "org.aspectj.testing.util.LangUtilTest", new String[] {"ignored"}); } public void testTestingDrivers() { - checkBuild("testing-drivers", - "org.aspectj.testing.drivers.Harness", + checkBuild("testing-drivers", + "org.aspectj.testing.drivers.Harness", new String[] {"-help"}); } public void testWeaver() { - checkBuild("weaver"); + checkBuild("weaver"); } - + // ajdoc relies on tools.jar public void testAspectjtools() { if (!shouldBuild("aspectjtools")) { @@ -261,7 +261,7 @@ public class BuildModuleTest extends TestCase { File getJUnitJar() { return new File("../lib/junit/junit.jar"); } - + File getJarDir() { if (null == jarDir) { File baseDir = new File("../aj-build/"); @@ -276,7 +276,7 @@ public class BuildModuleTest extends TestCase { } return jarDir; } - + BuildModule getTask(String module) { BuildModule task = new BuildModule(); Project project = new Project(); @@ -294,13 +294,13 @@ public class BuildModuleTest extends TestCase { } return task; } - - void checkBuild(String module) { + + void checkBuild(String module) { checkBuild(module, null, null, false); } - - void checkBuild(String module, - String classname, + + void checkBuild(String module, + String classname, String[] args) { checkBuild(module, classname, args, true); } @@ -364,7 +364,7 @@ public class BuildModuleTest extends TestCase { } return null; } - + private static String name(String module, boolean trimTesting, boolean assemble) { return module + (trimTesting?"":"-test") + (assemble?"-all":""); } @@ -378,15 +378,15 @@ public class BuildModuleTest extends TestCase { if (jar.exists()) { try { Thread.sleep(5000); - } catch (Throwable t) { + } catch (Throwable t) { } } if (jar.exists()) { assertTrue("cannot delete " + jar, jar.delete()); } } - void checkBuild(String module, - String classname, + void checkBuild(String module, + String classname, String[] args, boolean addAnt) { if (!shouldBuild(module)) { @@ -427,7 +427,7 @@ public class BuildModuleTest extends TestCase { assertTrue("BuildException running " + classname, false); } } - deleteJar(jar); + deleteJar(jar); } void doTask(String module, boolean trimTesting, boolean assembleAll) { doTask(module, trimTesting, assembleAll, false); diff --git a/build/src/test/java/org/aspectj/internal/build/ModulesTest.java b/build/src/test/java/org/aspectj/internal/build/ModulesTest.java index ce6d77d78..52f6f48dc 100644 --- a/build/src/test/java/org/aspectj/internal/build/ModulesTest.java +++ b/build/src/test/java/org/aspectj/internal/build/ModulesTest.java @@ -1,15 +1,15 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC), * 2005-2006 Contributors. - * 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 * Wes Isberg build tests * ******************************************************************/ package org.aspectj.internal.build; @@ -37,11 +37,11 @@ import org.aspectj.internal.tools.build.Util; import org.aspectj.internal.tools.build.Result.Kind; public class ModulesTest extends TestCase { - + public static final List<String> MODULE_NAMES; - + private static final File BASE_DIR = new File(".."); - + static { String[] names = { "ajbrowser", "ajde", "ajdoc", "asm", @@ -72,7 +72,7 @@ public class ModulesTest extends TestCase { } List<File> tempFiles = new ArrayList<>(); - + public ModulesTest(String name) { super(name); } @@ -85,7 +85,7 @@ public class ModulesTest extends TestCase { } } } - + Modules getModules(Messager handler) { File jarDir = new File("../aj-build-test-jars"); if (!jarDir.exists()) { @@ -98,7 +98,7 @@ public class ModulesTest extends TestCase { } return new Modules(baseDir, jarDir, handler); } - + public void testAllModulesCreation() { List<Module> badModules = new ArrayList<>(); for (String name: MODULE_NAMES) { @@ -124,7 +124,7 @@ public class ModulesTest extends TestCase { fail(sb.toString()); } } - + void checkModule(String s) { if ("docs".equals(s) || "lib".equals(s)) { return; @@ -135,13 +135,13 @@ public class ModulesTest extends TestCase { assertTrue(module.toLongString(), false); } } - + public void xtestClasspathCreation() { Modules modules = getModules(null); - + Module ajdt = modules.getModule("org.aspectj.ajdt.core"); assertTrue(ajdt.valid); - + Project project = new Project(); AntBuilder builder = getBuilder(project); Path classpath = new Path(project); @@ -153,7 +153,7 @@ public class ModulesTest extends TestCase { assertTrue(classpath.toString(), false); } } - + /** * This test requires two OSGI modules: * org.aspectj.util, which optionally depends on tempaspectjrt. @@ -163,11 +163,11 @@ public class ModulesTest extends TestCase { public void skip_testOSGIModuleCreation() { final String MODULE = "org.aspectj.util"; final String USES_MODULE = "tempaspectjrt"; - + Modules modules = getModules(null); Module newutil = modules.getModule(MODULE); assertTrue(newutil.valid); - + Project project = new Project(); AntBuilder builder = getBuilder(project); Path classpath = new Path(project); @@ -188,10 +188,10 @@ public class ModulesTest extends TestCase { project.setBaseDir(new File(".")); project.setName("testOSGIModuleCreation"); File tempDir = new File("."); - return (AntBuilder) AntBuilder.getBuilder("", project, tempDir); + return (AntBuilder) AntBuilder.getBuilder("", project, tempDir); } - - + + /********************************************************************* * The following tests/code enable you to run the entire build in JUnit * to debug directly from Eclipse. To compile using Javac, you will @@ -199,7 +199,7 @@ public class ModulesTest extends TestCase { */ public void skip_testBuildingAspectJModule() { final String moduleName = "org.aspectj.lib"; - + File modulesDir = new File("..").getAbsoluteFile(); File buildDir = new File(modulesDir, "aj-build"); File distDir = new File(buildDir, "dist"); @@ -214,7 +214,7 @@ public class ModulesTest extends TestCase { Project project = new Project(); project.setBaseDir(modulesDir); project.setName("testAspectjbuild"); - + BuildModule bm = new BuildModule(); bm.setProject(project); bm.setAssembleall(true); @@ -229,19 +229,19 @@ public class ModulesTest extends TestCase { bm.setVersion("1.2"); bm.setVerbose(true); bm.setFailonerror(true); - + bm.execute(); - + assertTrue(jar.canRead()); } - + public void skip_testBuildingProduct() { final String productName = "tools"; File modulesDir = new File("..").getAbsoluteFile(); File buildDir = new File(modulesDir, "aj-build"); File distDir = new File(buildDir, "dist"); File jarDir = new File(buildDir, "jars"); - File productDir = new File(modulesDir, + File productDir = new File(modulesDir, Util.path(new String[] {"build", "products", productName})); jarDir.mkdirs(); @@ -251,7 +251,7 @@ public class ModulesTest extends TestCase { project.setBaseDir(modulesDir); project.setName("testAspectjToolsbuild"); project.addBuildListener(new EventBuildListener(Project.MSG_WARN)); - + BuildModule bm = new BuildModule(); bm.setProject(project); bm.setAssembleall(true); @@ -265,7 +265,7 @@ public class ModulesTest extends TestCase { bm.setVersion("1.2"); bm.setFailonerror(true); bm.execute(); - + File libDir = new File(distDir, "tools/lib"); String[] jars = { "tools", "rt", "weaver", "lib"}; for (String s : jars) { @@ -287,7 +287,7 @@ public class ModulesTest extends TestCase { } public void buildFinished(BuildEvent event) {} public void buildStarted(BuildEvent event) { } - public void messageLogged(BuildEvent event) { + public void messageLogged(BuildEvent event) { if (min <= event.getPriority()) { Task t = event.getTask(); String src = (null == t ? "project" : t.getTaskName()); @@ -298,7 +298,7 @@ public class ModulesTest extends TestCase { public void targetStarted(BuildEvent event) { } public void taskFinished(BuildEvent event) { } public void taskStarted(BuildEvent event) { } - - } + + } } diff --git a/build/src/test/java/org/aspectj/internal/tools/build/UtilsTest.java b/build/src/test/java/org/aspectj/internal/tools/build/UtilsTest.java index e044afc01..5de8fc725 100644 --- a/build/src/test/java/org/aspectj/internal/tools/build/UtilsTest.java +++ b/build/src/test/java/org/aspectj/internal/tools/build/UtilsTest.java @@ -1,13 +1,13 @@ /* ******************************************************************* * Copyright (c) 2006 Contributors. - * 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://eclipse.org/legal/epl-v10.html - * - * Contributors: - * Wes Isberg 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: + * Wes Isberg initial implementation * ******************************************************************/ package org.aspectj.internal.tools.build; |