throw new Exception("invalid javaPath: " + javaPath);
}
// directly set context and run
- installer.getInstallPane().setContext(installerContext);
+ WizardPane.setContext(installerContext);
installer.run();
}
} catch (Exception e) {
}
public void moveToPane(WizardPane pane) {
- pane.setContext(this.context);
+ WizardPane.setContext(this.context);
Dimension size = frame.getContentPane().getSize();
URL url = getClass().getResource(jarName);
InputStream stream = url.openStream();
ZipInputStream zis = new ZipInputStream(stream);
- int i = 0;
+// int i = 0;
ZipEntry entry;
while ((entry = zis.getNextEntry()) != null) {
- final String name = entry.getName();
+// final String name = entry.getName();
writeEntry(zis, entry, outputDir);
//
}
// -- merge any merge jars
List mergeJars = module.getMerges();
- final boolean useManifest = false;
+// final boolean useManifest = false;
if (0 < mergeJars.size()) {
for (Iterator iter = mergeJars.iterator(); iter.hasNext();) {
File mergeJar = (File) iter.next();
private static String getProductInstallResourcesSrc(BuildSpec buildSpec) {
final String resourcesName = "installer-resources"; // XXXFileLiteral
File dir = buildSpec.productDir.getParentFile();
- String result = null;
+// String result = null;
if (null == dir) {
return "../../" + resourcesName;
}
+ "/lib/build/build.jar" ; // XXX
}
- private Module moduleForReplaceFile(File replaceFile, Modules modules) {
- String jarName = moduleAliasFor(replaceFile.getName().toLowerCase());
- if (jarName.endsWith(".jar") || jarName.endsWith(".zip")) { // XXXFileLiteral
- jarName = jarName.substring(0, jarName.length()-4);
- } else {
- throw new IllegalArgumentException("can only replace .[jar|zip]");
- }
- boolean assembleAll = jarName.endsWith("-all");
- String name = (!assembleAll ? jarName : jarName.substring(0, jarName.length()-4));
- return modules.getModule(name);
- }
-
+// private Module moduleForReplaceFile(File replaceFile, Modules modules) {
+// String jarName = moduleAliasFor(replaceFile.getName().toLowerCase());
+// if (jarName.endsWith(".jar") || jarName.endsWith(".zip")) { // XXXFileLiteral
+// jarName = jarName.substring(0, jarName.length()-4);
+// } else {
+// throw new IllegalArgumentException("can only replace .[jar|zip]");
+// }
+// boolean assembleAll = jarName.endsWith("-all");
+// String name = (!assembleAll ? jarName : jarName.substring(0, jarName.length()-4));
+// return modules.getModule(name);
+// }
+//
}
/** visit all .java files in all directories... */
private void visitAll(FileVisitor visitor) {
- List filelist = new ArrayList();
+// List filelist = new ArrayList();
String[] dirs = sourcepath.list();
for (int i = 0; i < dirs.length; i++) {
File dir = project.resolveFile(dirs[i]);
public boolean checkFile(final File file) {
clear();
- boolean result = false;
+// boolean result = false;
BufferedReader input = null;
int lineNum = 0;
try {
/** replace the header in file */
public static boolean replaceHeader(File file, HeaderInfo info) {
- ArrayList years = new ArrayList();
- int endLine = 0;
+// ArrayList years = new ArrayList();
+// int endLine = 0;
BufferedReader input = null;
PrintWriter output = null;
FileWriter outWriter = null;
}
private boolean writeBodyTo(String s, File f) throws IOException {
- int start, end;
+ int start;//, end;
try {
start = findStart(s);
- end = findEnd(s, start);
+ findEnd(s, start);
} catch (ParseException e) {
return false; // if we get confused, just don't write the file.
}
import org.aspectj.internal.tools.build.Util;
public class TestBuildModule {
- private static boolean REBUILD = false;
+// private static boolean REBUILD = false;
private static final String SYNTAX = "java {classname} <[product|module]dir>";
public static void main(String[] args) {
import java.io.File;
-import java.util.Properties;
+//import java.util.Properties;
/**
* Open struct for specifying builds for both modules and products.
public boolean assembleAll;
public boolean failonerror;
public boolean verbose;
- private Properties buildProperties;
+// private Properties buildProperties;
// building products
public File productDir;
final Modules modules = module.getModules();
final Messager handler = this.handler;
final boolean log = (verbose && (null != handler));
- final boolean verbose = this.verbose;
+// final boolean verbose = this.verbose;
if (log) {
handler.log(
"modules to build: " + Arrays.asList(buildList));
String line;
XMLEntry entry = new XMLEntry("classpathentry", ATTS);
- String lastKind = null;
+// String lastKind = null;
while (null != (line = reader.readLine())) {
// we assume no internal spaces...
entry.acceptTokens(line);
static final String AUTHOR = "@author";
static final String FLAG = "XXX";
- private static void test(String[] args){
- String[] from = new String[] { "<pre>", "</pre>" };
- String[] to = new String[] { "<pre>", "</pre>" };
- String source = "in this <pre> day and </pre> age of <pre and /pre>";
- System.err.println("from " + source);
- System.err.println(" to " + SampleUtil.replace(source, from, to));
- source = "<pre> day and </pre>";
- System.err.println("from " + source);
- System.err.println(" to " + SampleUtil.replace(source, from, to));
- source = "<pre day and </pre";
- System.err.println("from " + source);
- System.err.println(" to " + SampleUtil.replace(source, from, to));
- source = "<pre> day and </pre> age";
- System.err.println("from " + source);
- System.err.println(" to " + SampleUtil.replace(source, from, to));
- source = "in this <pre> day and </pre> age";
- System.err.println("from " + source);
- System.err.println(" to " + SampleUtil.replace(source, from, to));
-
- }
+// private static void test(String[] args){
+// String[] from = new String[] { "<pre>", "</pre>" };
+// String[] to = new String[] { "<pre>", "</pre>" };
+// String source = "in this <pre> day and </pre> age of <pre and /pre>";
+// System.err.println("from " + source);
+// System.err.println(" to " + SampleUtil.replace(source, from, to));
+// source = "<pre> day and </pre>";
+// System.err.println("from " + source);
+// System.err.println(" to " + SampleUtil.replace(source, from, to));
+// source = "<pre day and </pre";
+// System.err.println("from " + source);
+// System.err.println(" to " + SampleUtil.replace(source, from, to));
+// source = "<pre> day and </pre> age";
+// System.err.println("from " + source);
+// System.err.println(" to " + SampleUtil.replace(source, from, to));
+// source = "in this <pre> day and </pre> age";
+// System.err.println("from " + source);
+// System.err.println(" to " + SampleUtil.replace(source, from, to));
+//
+// }
/**
* Emit samples gathered from any input args.
* @param args the String[] of paths to files or directories to search
throws Abort {
throw new Abort(why + " at " + file + ":" + lineNumber + ": " + line);
}
- private static void delay(Object toDelay) {
- synchronized (toDelay) { // XXX sleep instead?
- toDelay.notifyAll();
- }
- }
+// private static void delay(Object toDelay) {
+// synchronized (toDelay) { // XXX sleep instead?
+// toDelay.notifyAll();
+// }
+// }
static class Abort extends IOException {
Abort(String s) {
super(s);
this.startLine = startLine;
this.endLine = endLine;
this.kind = Kind.getKind(sourcePath);
- List theFlags;
+// List theFlags;
if ((null == flags) || (0 == flags.length)) {
this.flags = Collections.EMPTY_LIST;
} else {
import java.util.ArrayList;
import java.util.Iterator;
-import junit.framework.*;
+//import junit.framework.*;
import junit.framework.TestCase;
/**
package org.aspectj.internal.build;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.Path;
-import org.apache.tools.ant.types.Commandline.Argument;
import org.aspectj.internal.tools.ant.taskdefs.AntBuilder;
-import org.aspectj.internal.tools.ant.taskdefs.BuildModule;
import org.aspectj.internal.tools.build.Messager;
import org.aspectj.internal.tools.build.Module;
import org.aspectj.internal.tools.build.Modules;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import junit.framework.TestCase;
/**
*
*/