Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [ae6db1] Maximize Restore History

- Great rewrite of build.xml with many additions like automated building of various distribution files

- moved build-support to core
- made the standard plugins use build-support

Björn Kautler Björn Kautler 2006-07-03

<< < 1 2 3 4 5 6 > >> (Page 3 of 6)
added build-support
added build-support/build.properties.sample
added build-support/plugin-build.xml
added build-support/users-guide.xsl
added de
added de/masters_of_disaster
added de/masters_of_disaster/ant
added de/masters_of_disaster/ant/tasks
added de/masters_of_disaster/ant/tasks/ar
added de/masters_of_disaster/ant/tasks/ar/Ar.java
added de/masters_of_disaster/ant/tasks/ar/ArConstants.java
added de/masters_of_disaster/ant/tasks/ar/ArEntry.java
added de/masters_of_disaster/ant/tasks/ar/ArOutputStream.java
added de/masters_of_disaster/ant/tasks/ar/ArUtils.java
added de/masters_of_disaster/ant/tasks/deb
added de/masters_of_disaster/ant/tasks/deb/CalculateInstalledSizeForDeb.java
added de/masters_of_disaster/ant/tasks/deb/Deb.java
added icons/WindowsInstallerImage.bmp
added icons/WindowsInstallerSmallImage.bmp
added icons/jedit-file48.png
added icons/jedit-icon48.png
added jars/MacOS/com
added jars/MacOS/com/apple
added jars/MacOS/com/apple/cocoa
added jars/MacOS/com/apple/cocoa/application
added jars/MacOS/com/apple/cocoa/application/NSApplication.java
added jars/MacOS/com/apple/cocoa/application/NSMenu.java
added jars/MacOS/com/apple/cocoa/application/NSPasteboard.java
added jars/MacOS/com/apple/cocoa/application/NSResponder.java
added jars/MacOS/com/apple/cocoa/application/NSValidatedUserInterfaceItem.java
added jars/MacOS/com/apple/cocoa/application/NSWorkspace.java
added jars/MacOS/com/apple/cocoa/application/_NSObsoleteMenuItemProtocol.java
added jars/MacOS/com/apple/cocoa/foundation
added jars/MacOS/com/apple/cocoa/foundation/NSAppleEventDescriptor.java
added jars/MacOS/com/apple/cocoa/foundation/NSAppleScript.java
added jars/MacOS/com/apple/cocoa/foundation/NSArray.java
added jars/MacOS/com/apple/cocoa/foundation/NSCoding.java
added jars/MacOS/com/apple/cocoa/foundation/NSData.java
added jars/MacOS/com/apple/cocoa/foundation/NSDictionary.java
added jars/MacOS/com/apple/cocoa/foundation/NSKeyValueCoding.java
added jars/MacOS/com/apple/cocoa/foundation/NSMutableDictionary.java
added jars/MacOS/com/apple/cocoa/foundation/NSObject.java
added jars/MacOS/com/apple/cocoa/foundation/NSPropertyListSerialization.java
added jars/MacOS/com/apple/cocoa/foundation/NSSelector.java
added jars/MacOS/com/apple/eawt
added jars/MacOS/com/apple/eawt/Application.java
added jars/MacOS/com/apple/eawt/ApplicationAdapter.java
added jars/MacOS/com/apple/eawt/ApplicationEvent.java
added jars/MacOS/com/apple/eawt/ApplicationListener.java
added jars/MacOS/com/apple/eio
added net
added net/sourceforge
added net/sourceforge/jarbundler
added net/sourceforge/jarbundler/DocumentType.java
added net/sourceforge/jarbundler/HelpBook.java
added net/sourceforge/jarbundler/JavaProperty.java
added net/sourceforge/jarbundler/PropertyListWriter.java
added package-files
added package-files/linux
added package-files/linux/deb
added package-files/linux/deb/control
added package-files/linux/deb/jedit
added package-files/linux/deb/jedit.desktop
added package-files/linux/deb/postinst
added package-files/linux/deb/postrm
added package-files/linux/rpm
added package-files/linux/slackware
added package-files/linux/slackware/doinst.sh
added package-files/linux/slackware/jEdit.desktop
added package-files/linux/slackware/slack-required
added package-files/os2
added package-files/windows
added package-files/windows/jedit.bat
added package-files/windows/launchstub.exe
added package-files/windows/win32installer.iss
removed com/loomcom
removed com/loomcom/ant
removed com/loomcom/ant/tasks
removed com/loomcom/ant/tasks/jarbundler
removed doc/FAQ/.cvsignore
removed doc/news42/.cvsignore
removed doc/users-guide/.cvsignore
removed icons/jedit.ico
removed org/gjt/sp/jedit/.cvsignore
changed .cvsignore
changed README.SRC.txt
changed build.properties
changed build.xml
changed com
changed doc
changed doc/.cvsignore
changed doc/CHANGES.txt
changed doc/FAQ
changed doc/jeditfo.xsl
changed doc/jedithtml.xsl
changed doc/news42
changed doc/users-guide
changed doclet
changed doclet/GenerateTocXML.java
changed icons
changed installer
changed installer/install.props
changed jars
changed jars/LatestVersion
changed jars/LatestVersion/build.xml
changed jars/MacOS
changed jars/MacOS/build.xml
changed jars/QuickNotepad
changed jars/QuickNotepad/QuickNotepad.java
changed jars/QuickNotepad/QuickNotepad.props
changed jars/QuickNotepad/README.txt
changed jars/QuickNotepad/build.xml
changed org
changed org/gjt
changed org/gjt/sp
changed org/gjt/sp/jedit
changed org/gjt/sp/jedit/jedit_gui.props
copied com/loomcom/ant/tasks/jarbundler/AppBundleProperties.java -> net/sourceforge/jarbundler/AppBundleProperties.java
copied com/loomcom/ant/tasks/jarbundler/JarBundler.java -> net/sourceforge/jarbundler/JarBundler.java
copied doclet/Clean_Up_Javadoc.bsh -> jars/MacOS/com/apple/cocoa/application/NSMenuItem.java
copied installer/mk_filelist.sh -> jars/build.properties
copied installer/mk_installer.sh -> jars/MacOS/com/apple/eio/FileManager.java
copied installer/mk_source.sh -> package-files/linux/jedit
copied jEdit_IE.reg.txt -> package-files/linux/slackware/slack-desc
copied jedit.1 -> package-files/linux/jedit.1
copied jedit.cmd -> package-files/os2/jedit.cmd
copied jedit.spec -> package-files/linux/rpm/jedit.spec
copied win32installer.iss -> net/sourceforge/jarbundler/Service.java
build-support
Directory.
build-support/build.properties.sample Diff Switch to side-by-side view
Loading...
build-support/plugin-build.xml Diff Switch to side-by-side view
Loading...
build-support/users-guide.xsl Diff Switch to side-by-side view
Loading...
de
Directory.
de/masters_of_disaster/ant/tasks/ar/Ar.java Diff Switch to side-by-side view
Loading...
de/masters_of_disaster/ant/tasks/ar/ArConstants.java Diff Switch to side-by-side view
Loading...
de/masters_of_disaster/ant/tasks/ar/ArEntry.java Diff Switch to side-by-side view
Loading...
de/masters_of_disaster/ant/tasks/ar/ArOutputStream.java Diff Switch to side-by-side view
Loading...
de/masters_of_disaster/ant/tasks/ar/ArUtils.java Diff Switch to side-by-side view
Loading...
de/masters_of_disaster/ant/tasks/deb/CalculateInstalledSizeForDeb.java Diff Switch to side-by-side view
Loading...
de/masters_of_disaster/ant/tasks/deb/Deb.java Diff Switch to side-by-side view
Loading...
icons/WindowsInstallerImage.bmp Diff Switch to side-by-side view
Loading...
icons/WindowsInstallerSmallImage.bmp Diff Switch to side-by-side view
Loading...
icons/jedit-file48.png Diff Switch to side-by-side view
Loading...
icons/jedit-icon48.png Diff Switch to side-by-side view
Loading...
jars/MacOS/com
Directory.
jars/MacOS/com/apple/cocoa/application/NSApplication.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/application/NSMenu.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/application/NSPasteboard.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/application/NSResponder.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/application/NSValidatedUserInterfaceItem.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/application/NSWorkspace.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/application/_NSObsoleteMenuItemProtocol.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSAppleEventDescriptor.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSAppleScript.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSArray.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSCoding.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSData.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSDictionary.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSKeyValueCoding.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSMutableDictionary.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSObject.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSPropertyListSerialization.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/cocoa/foundation/NSSelector.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/eawt/Application.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/eawt/ApplicationAdapter.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/eawt/ApplicationEvent.java Diff Switch to side-by-side view
Loading...
jars/MacOS/com/apple/eawt/ApplicationListener.java Diff Switch to side-by-side view
Loading...
net
Directory.
net/sourceforge
Directory.
net/sourceforge/jarbundler/DocumentType.java Diff Switch to side-by-side view
Loading...
net/sourceforge/jarbundler/HelpBook.java Diff Switch to side-by-side view
Loading...
net/sourceforge/jarbundler/JavaProperty.java Diff Switch to side-by-side view
Loading...
net/sourceforge/jarbundler/PropertyListWriter.java Diff Switch to side-by-side view
Loading...
package-files
Directory.
package-files/linux
Directory.
package-files/linux/deb/control Diff Switch to side-by-side view
Loading...
package-files/linux/deb/jedit Diff Switch to side-by-side view
Loading...
package-files/linux/deb/jedit.desktop Diff Switch to side-by-side view
Loading...
package-files/linux/deb/postinst Diff Switch to side-by-side view
Loading...
package-files/linux/deb/postrm Diff Switch to side-by-side view
Loading...
package-files/linux/slackware/doinst.sh Diff Switch to side-by-side view
Loading...
package-files/linux/slackware/jEdit.desktop Diff Switch to side-by-side view
Loading...
package-files/linux/slackware/slack-required Diff Switch to side-by-side view
Loading...
package-files/os2
Directory.
package-files/windows/jedit.bat Diff Switch to side-by-side view
Loading...
package-files/windows/launchstub.exe Diff Switch to side-by-side view
Loading...
package-files/windows/win32installer.iss Diff Switch to side-by-side view
Loading...
com/loomcom
File was removed.
com/loomcom/ant
File was removed.
com/loomcom/ant/tasks
File was removed.
doc/FAQ/.cvsignore
File was removed.
doc/news42/.cvsignore
File was removed.
doc/users-guide/.cvsignore
File was removed.
icons/jedit.ico
File was removed.
org/gjt/sp/jedit/.cvsignore
File was removed.
.cvsignore Diff Switch to side-by-side view
Loading...
README.SRC.txt Diff Switch to side-by-side view
Loading...
build.properties Diff Switch to side-by-side view
Loading...
build.xml Diff Switch to side-by-side view
Loading...
com
Directory.
doc
Directory.
doc/.cvsignore Diff Switch to side-by-side view
Loading...
doc/CHANGES.txt Diff Switch to side-by-side view
Loading...
doc/FAQ
Directory.
doc/jeditfo.xsl Diff Switch to side-by-side view
Loading...
doc/jedithtml.xsl Diff Switch to side-by-side view
Loading...
doc/news42
Directory.
doc/users-guide
Directory.
doclet
Directory.
doclet/GenerateTocXML.java Diff Switch to side-by-side view
Loading...
icons
Directory.
installer
Directory.
installer/install.props Diff Switch to side-by-side view
Loading...
jars
Directory.
jars/LatestVersion
Directory.
jars/LatestVersion/build.xml Diff Switch to side-by-side view
Loading...
jars/MacOS
Directory.
jars/MacOS/build.xml Diff Switch to side-by-side view
Loading...
jars/QuickNotepad
Directory.
jars/QuickNotepad/QuickNotepad.java Diff Switch to side-by-side view
Loading...
jars/QuickNotepad/QuickNotepad.props Diff Switch to side-by-side view
Loading...
jars/QuickNotepad/README.txt Diff Switch to side-by-side view
Loading...
jars/QuickNotepad/build.xml Diff Switch to side-by-side view
Loading...
org
Directory.
org/gjt
Directory.
org/gjt/sp
Directory.
org/gjt/sp/jedit
Directory.
org/gjt/sp/jedit/jedit_gui.props Diff Switch to side-by-side view
Loading...
com/loomcom/ant/tasks/jarbundler/AppBundleProperties.java to net/sourceforge/jarbundler/AppBundleProperties.java
--- a/com/loomcom/ant/tasks/jarbundler/AppBundleProperties.java
+++ b/net/sourceforge/jarbundler/AppBundleProperties.java
@@ -18,305 +18,320 @@
  * Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-package com.loomcom.ant.tasks.jarbundler;
-
+
+package net.sourceforge.jarbundler;
+
+// Java Utility
+import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.List;
 import java.util.LinkedList;
-import java.util.List;
-import java.io.File;
+
+// Java language imports
+import java.lang.String;
 
 public class AppBundleProperties {
 
-  // Required
-  private String mCFBundleName;
-  private String mMainClass;
-
-  // Required keys, with defaults
-  private String mCFBundleVersion = "1.0";
-  // Explicit default: false
-  private boolean mCFBundleAllowMixedLocalizations = false;
-  // Explicit default: JavaApplicationStub
-  private String mCFBundleExecutable = "JavaApplicationStub";
-  // Explicit default: English
-  private String mCFBundleDevelopmentRegion = "English";
-  // Explicit default: APPL
-  private String mCFBundlePackageType = "APPL";
-  // Explicit default: ????
-  private String mCFBundleSignature = "????";
-  // Explicit default: 1.3+
-  private String mJVMVersion = "1.3+";
-  // Explicit default: 6.0
-  private String mCFBundleInfoDictionaryVersion = "6.0";
-
-  // Optional keys, with no defaults.
-  private String mCFBundleIconFile;
-  private String mCFBundleGetInfoString;
-  private String mCFBundleIdentifier;
-  private String mCFBundleShortVersionString;
-  private String mClassPath;
-  private String mVMOptions; // Java VM options
-  private String mWorkingDirectory; // Java Working Dir
-  private String mArguments; // Java command line arguments
-
-  // User-defined Java properties
-  private Hashtable mJavaProperties;
-
-  // Document types
-  private List mDocumentTypes;
-
-  // Services
-  private List mServices;
-
-  // Property Getters and Setters
-  public void setCFBundleName(String s) {
-    mCFBundleName = s;
-  }
-
-  public String getCFBundleName() {
-    return mCFBundleName;
-  }
-
-  public void setCFBundleVersion(String s) {
-    mCFBundleVersion = s;
-  }
-
-  public String getCFBundleVersion() {
-    return mCFBundleVersion;
-  }
-
-  public void setCFBundleShortVersionString(String s) {
-    mCFBundleShortVersionString = s;
-  }
-
-  public String getCFBundleShortVersionString() {
-    return mCFBundleShortVersionString;
-  }
-
-  public void setCFBundleInfoDictionaryVersion(String s) {
-    mCFBundleInfoDictionaryVersion = s;
-  }
-
-  public String getCFBundleInfoDictionaryVersion() {
-    return mCFBundleInfoDictionaryVersion;
-  }
-
-  public void setCFBundleIdentifier(String s) {
-    mCFBundleIdentifier = s;
-  }
-
-  public String getCFBundleIdentifier() {
-    return mCFBundleIdentifier;
-  }
-
-  public void setCFBundleGetInfoString(String s) {
-    mCFBundleGetInfoString = s;
-  }
-
-  public String getCFBundleGetInfoString() {
-    return mCFBundleGetInfoString;
-  }
-
-  public void setCFBundleIconFile(String s) {
-    mCFBundleIconFile = s;
-  }
-
-  public String getCFBundleIconFile() {
-    return mCFBundleIconFile;
-  }
-
-  public void setCFBundleAllowMixedLocalizations(boolean b) {
-    mCFBundleAllowMixedLocalizations = b;
-  }
-
-  public boolean getCFBundleAllowMixedLocalizations() {
-    return mCFBundleAllowMixedLocalizations;
-  }
-
-  public void setCFBundleExecutable(String s) {
-    mCFBundleExecutable = s;
-  }
-
-  public String getCFBundleExecutable() {
-    return mCFBundleExecutable;
-  }
-
-  public void setCFBundleDevelopmentRegion(String s) {
-    mCFBundleDevelopmentRegion = s;
-  }
-
-  public String getCFBundleDevelopmentRegion() {
-    return mCFBundleDevelopmentRegion;
-  }
-
-  public void setCFBundlePackageType(String s) {
-    mCFBundlePackageType = s;
-  }
-
-  public String getCFBundlePackageType() {
-    return mCFBundlePackageType;
-  }
-
-  public void setCFBundleSignature(String s) {
-    mCFBundleSignature = s;
-  }
-
-  public String getCFBundleSignature() {
-    return mCFBundleSignature;
-  }
-
-  public void setMainClass(String s) {
-    mMainClass = s;
-  }
-
-  public String getMainClass() {
-    return mMainClass;
-  }
-
-  public void setJVMVersion(String s) {
-    mJVMVersion = s;
-  }
-
-  public String getJVMVersion() {
-    return mJVMVersion;
-  }
-
-  public Hashtable getJavaProperties() {
-    return mJavaProperties;
-  }
-
-  /**
-   * Add a Java runtime property to the properties hashtable.
-   */
-  public void addJavaProperty(String prop, String val) {
-    if (mJavaProperties == null) {
-      mJavaProperties = new Hashtable();
-    }
-    mJavaProperties.put(prop, val);
-  }
-
-  public DocumentType createDocumentType()
-  {
-    return new DocumentType();
-  }
-
-  public List getDocumentTypes() {
-    return mDocumentTypes;
-  }
-
-  /**
-   * Add a document type to the document type list.
-   */
-  public void addDocumentType(DocumentType documentType) {
-    if (mDocumentTypes == null) {
-      mDocumentTypes = new LinkedList();
-    }
-    mDocumentTypes.add(documentType);
-  }
-
-  public Service createService()
-  {
-    return new Service();
-  }
-
-  public List getServices() {
-    return mServices;
-  }
-
-  /**
-   * Add a service to the service list.
-   */
-  public void addService(Service service) {
-    if (mServices == null) {
-      mServices = new LinkedList();
-    }
-    mServices.add(service);
-  }
-
-  public void setVMOptions(String s) {
-    mVMOptions = s;
-  }
-
-  public String getVMOptions() {
-    return mVMOptions;
-  }
-
-  public void setWorkingDirectory(String s) {
-    mWorkingDirectory = s;
-  }
-
-  public String getWorkingDirectory() {
-    return mWorkingDirectory;
-  }
-
-  public void setArguments(String s) {
-    mArguments = s;
-  }
-
-  public String getArguments() {
-    return mArguments;
-  }
-
-  public void setClassPath(String s) {
-    mClassPath = s;
-  }
-
-  public String getClassPath() {
-    return mClassPath;
-  }
-
-  public class DocumentType {
-    public String name;
-    public String[] extensions;
-    public String[] osTypes;
-    public File iconFile;
-    public String role;
-
-    public void setName(String name) {
-      this.name = name;
-    }
-
-    public void setExtensions(String extensions) {
-      this.extensions = extensions.split("[\\s,]");
-    }
-
-    public void setOSTypes(String osTypes) {
-      this.osTypes = osTypes.split("[\\s,]");
-    }
-
-    public void setIconFile(File iconFile) {
-      this.iconFile = iconFile;
-    }
-
-    public void setRole(String role) {
-      this.role = role;
-    }
-  }
-  
-  public class Service {
-    public String portName;
-	public String message;
-	public String menuItem;
-	public String[] sendTypes;
-	public String[] returnTypes;
-
-    public void setPortName(String portName) {
-      this.portName = portName;
-    }
-
-    public void setMessage(String message) {
-      this.message = message;
-    }
-
-    public void setMenuItem(String menuItem) {
-      this.menuItem = menuItem;
-    }
-
-    public void setSendTypes(String sendTypes) {
-      this.sendTypes = sendTypes.split("[\\s,]");
-    }
-
-    public void setReturnTypes(String returnTypes) {
-      this.returnTypes = returnTypes.split("[\\s,]");
-    }
-  }
+	// Required
+	private String mApplicationName;
+	private String mMainClass;
+
+	// Application short name
+	private String mCFBundleName = null;
+
+	// Finder version, with default
+	private String mCFBundleShortVersionString = "1.0";
+
+	// Get Info string, optional
+	private String mCFBundleGetInfoString = null;
+
+	// Build number, optional
+	private String mCFBundleVersion = null;
+
+	// Help Book folder, optional
+	private String mCFHelpBookFolder = null;
+
+	// Help Book name, optional
+	private String mCFHelpBookName = null;
+
+	// Explicit default: false
+	private boolean mCFBundleAllowMixedLocalizations = false;
+
+	// Explicit default: JavaApplicationStub
+	private String mCFBundleExecutable = "JavaApplicationStub";
+
+	// Explicit default: English
+	private String mCFBundleDevelopmentRegion = "English";
+
+	// Explicit default: APPL
+	private final String mCFBundlePackageType = "APPL";
+
+	// Explicit default: ????
+	private String mCFBundleSignature = "????";
+
+	// Explicit default: 1.3+
+	private String mJVMVersion = "1.3+";
+
+	// Explicit default: 6.0
+	private final String mCFBundleInfoDictionaryVersion = "6.0";
+
+	// Optional keys, with no defaults.
+
+	private String mCFBundleIconFile = null;
+	private String mCFBundleIdentifier = null;
+	private String mVMOptions = null; // Java VM options
+	private String mWorkingDirectory = null; // Java Working Dir
+	private String mArguments = null; // Java command line arguments
+
+	// Class path and extra class path elements
+	private List mClassPath = new ArrayList();
+	private List mExtraClassPath = new ArrayList();
+
+	// Java properties
+	private Hashtable mJavaProperties = new Hashtable();
+
+	// Document types
+	private List mDocumentTypes = new LinkedList();
+
+	// Services
+	private List mServices = new LinkedList();
+	
+	// ================================================================================
+
+	/**
+	 * Add a Java runtime property to the properties hashtable.
+	 */
+
+	public void addJavaProperty(String prop, String val) {
+		mJavaProperties.put(prop, val);
+	}
+
+	public Hashtable getJavaProperties() {
+		return mJavaProperties;
+	}
+
+	public void addToClassPath(String s) {
+		mClassPath.add("$JAVAROOT/" + s);
+	}
+
+	public void addToExtraClassPath(String s) {
+		mExtraClassPath.add(s);
+	}
+
+	public List getExtraClassPath() {
+		return mExtraClassPath;
+	}
+
+	public DocumentType createDocumentType() {
+		return new DocumentType();
+	}
+
+	public List getDocumentTypes() {
+		return mDocumentTypes;
+	}
+
+	/**
+	 * Add a document type to the document type list.
+	 */
+	public void addDocumentType(DocumentType documentType) {
+		mDocumentTypes.add(documentType);
+	}
+
+	public Service createService() {
+		return new Service();
+	}
+	
+	public List getServices() {
+		return mServices;
+	}
+	
+	/**
+	 * Add a service to the services list.
+	 */
+	public void addService(Service service) {
+		mServices.add(service);
+	}
+	
+	// ================================================================================
+
+	public void setApplicationName(String s) {
+		mApplicationName = s;
+	}
+
+	public String getApplicationName() {
+		return mApplicationName;
+	}
+
+	// ================================================================================
+	//
+	// Bundle setters and getters
+	//
+
+	public void setCFBundleName(String s) {
+
+		if (s.length() > 16)
+			System.err
+					.println("WARNING: 'shortname' is recommeded to be no more than 16 "
+							+ "charaters long. See usage notes.");
+		mCFBundleName = s;
+	}
+
+	public String getCFBundleName() {
+		if (mCFBundleName == null)
+			return getApplicationName();
+
+		return mCFBundleName;
+	}
+
+	public void setCFBundleVersion(String s) {
+		mCFBundleVersion = s;
+	}
+
+	public String getCFBundleVersion() {
+		return mCFBundleVersion;
+	}
+
+	public void setCFBundleInfoDictionaryVersion(String s) {
+		// mCFBundleInfoDictionaryVersion = s;
+	}
+
+	public String getCFBundleInfoDictionaryVersion() {
+		return mCFBundleInfoDictionaryVersion;
+	}
+
+	public void setCFBundleIdentifier(String s) {
+		mCFBundleIdentifier = s;
+	}
+
+	public String getCFBundleIdentifier() {
+		return mCFBundleIdentifier;
+	}
+
+	public void setCFBundleGetInfoString(String s) {
+		mCFBundleGetInfoString = s;
+	}
+
+	public String getCFBundleGetInfoString() {
+		if (mCFBundleGetInfoString == null)
+			return getCFBundleShortVersionString();
+
+		return mCFBundleGetInfoString;
+	}
+
+	public void setCFBundleShortVersionString(String s) {
+		mCFBundleShortVersionString = s;
+	}
+
+	public String getCFBundleShortVersionString() {
+		return mCFBundleShortVersionString;
+	}
+
+	public void setCFBundleIconFile(String s) {
+		mCFBundleIconFile = s;
+	}
+
+	public String getCFBundleIconFile() {
+		return mCFBundleIconFile;
+	}
+
+	public void setCFBundleAllowMixedLocalizations(boolean b) {
+		mCFBundleAllowMixedLocalizations = b;
+	}
+
+	public boolean getCFBundleAllowMixedLocalizations() {
+		return mCFBundleAllowMixedLocalizations;
+	}
+
+	public void setCFBundleExecutable(String s) {
+		mCFBundleExecutable = s;
+	}
+
+	public String getCFBundleExecutable() {
+		return mCFBundleExecutable;
+	}
+
+	public void setCFBundleDevelopmentRegion(String s) {
+		mCFBundleDevelopmentRegion = s;
+	}
+
+	public String getCFBundleDevelopmentRegion() {
+		return mCFBundleDevelopmentRegion;
+	}
+
+	public void setCFBundlePackageType(String s) {
+		// mCFBundlePackageType = s;
+	}
+
+	public String getCFBundlePackageType() {
+		return mCFBundlePackageType;
+	}
+
+	public void setCFBundleSignature(String s) {
+		mCFBundleSignature = s;
+	}
+
+	public String getCFBundleSignature() {
+		return mCFBundleSignature;
+	}
+
+	public void setCFBundleHelpBookFolder(String s) {
+		mCFHelpBookFolder = s;
+	}
+
+	public String getCFBundleHelpBookFolder() {
+		return mCFHelpBookFolder;
+	}
+
+	public void setCFBundleHelpBookName(String s) {
+		mCFHelpBookName = s;
+	}
+
+	public String getCFBundleHelpBookName() {
+		return mCFHelpBookName;
+	}
+
+	public void setMainClass(String s) {
+		mMainClass = s;
+	}
+
+	public String getMainClass() {
+		return mMainClass;
+	}
+
+	public void setJVMVersion(String s) {
+		mJVMVersion = s;
+	}
+
+	public String getJVMVersion() {
+		return mJVMVersion;
+	}
+
+	public void setVMOptions(String s) {
+		mVMOptions = s;
+	}
+
+	public String getVMOptions() {
+		return mVMOptions;
+	}
+
+	public void setWorkingDirectory(String s) {
+		mWorkingDirectory = s;
+	}
+
+	public String getWorkingDirectory() {
+		return mWorkingDirectory;
+	}
+
+	public void setArguments(String s) {
+		mArguments = s;
+	}
+
+	public String getArguments() {
+		return mArguments;
+	}
+
+	public List getClassPath() {
+		return mClassPath;
+	}
+
 }
com/loomcom/ant/tasks/jarbundler/JarBundler.java to net/sourceforge/jarbundler/JarBundler.java
--- a/com/loomcom/ant/tasks/jarbundler/JarBundler.java
+++ b/net/sourceforge/jarbundler/JarBundler.java
@@ -18,899 +18,1463 @@
  * Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-package com.loomcom.ant.tasks.jarbundler;
-
+package net.sourceforge.jarbundler;
+
+// This package's imports
+import net.sourceforge.jarbundler.AppBundleProperties;
+import net.sourceforge.jarbundler.DocumentType;
+import net.sourceforge.jarbundler.JavaProperty;
+import net.sourceforge.jarbundler.PropertyListWriter;
+
+// Java I/O
 import java.io.BufferedWriter;
+import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileWriter;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintWriter;
+
+// Java Utility
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-
+import java.util.Set;
+
+// Apache Jakarta
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.FileScanner;
 import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.Task;
+
 import org.apache.tools.ant.types.FileList;
 import org.apache.tools.ant.types.FileSet;
 import org.apache.tools.ant.types.PatternSet;
+
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.taskdefs.Chmod;
+import org.apache.tools.ant.taskdefs.Delete;
+
 import org.apache.tools.ant.util.FileUtils;
 
+
+// Java language imports
+import java.lang.Boolean;
+import java.lang.Process;
+import java.lang.Runtime;
+import java.lang.String;
+import java.lang.System;
+
 /**
- * <p>An ant task which creates a Mac OS X Application Bundle for a
- * Java application.</p>
- *
+ * <p>
+ * An ant task which creates a Mac OS X Application Bundle for a Java
+ * application.
+ * </p>
+ * 
+ * <dl>
+ * <dt>dir</dt>
+ * <dd>The directory into which to put the new application bundle.</dd>
+ * <dt>name</dt>
+ * <dd>The name of the application bundle. Note that the maximum length of this
+ * name is 16 characters, and it will be silently cropped if it is longer than
+ * this.</dd>
+ * <dt>mainclass</dt>
+ * <dd>The main Java class to call when running the application.</dd>
+ * </dl>
+ * 
+ * <p>
+ * One of the following three MUST be used:
+ * 
+ * <ol>
+ * <li>jars Space or comma-separated list of JAR files to include.; OR</li>
+ * <li>One or more nested &lt;jarfileset&gt;s. These are normal ANT FileSets;
+ * OR </li>
+ * <li>One or more nested &lt;jarfilelist&gt;s. These are standard ANT
+ * FileLists. </li>
+ * </ol>
+ * 
+ * <p>
+ * Optional attributes:
+ * 
+ * <p>
+ * The following attributes are not required, but you can use them to override
+ * default behavior.
+ * 
+ * <dl>
+ * <dt>verbose
+ * <dd>If true, show more verbose output while running the task
+ * 
+ * <dt>version
+ * <dd>Version information about your application (e.g., "1.0")
+ * 
+ * <dt>infostring
+ * <dd>String to show in the "Get Info" dialog
+ * </dl>
+ * 
+ * These attributes control the fine-tuning of the "Mac OS X" look and feel.
+ * 
+ * <dl>
+ * <dt>arguments
+ * <dd>Command line arguments. (no default)
+ * 
+ * <dt>smalltabs
+ * <dd>Use small tabs. (default "false") Deprecated under JVM 1.4.1
+ * 
+ * <dt>antialiasedgraphics
+ * <dd>Use anti-aliased graphics (default "false")
+ * 
+ * <dt>antialiasedtext
+ * <dd>Use anti-aliased text (default "false")
+ * 
+ * <dt>bundleid
+ * <dd>Unique identifier for this bundle, in the form of a Java package. No
+ * default.
+ * 
+ * <dt>buildnumber
+ * <dd>Unique identifier for this build
+ * 
+ * <dt>developmentregion
+ * <dd>Development Region. Default "English".
+ * 
+ * <dt>execs
+ * <dd>Files to be copied into "Resources/MacOS" and made executable
+ * 
+ * <dt>liveresize
+ * <dd>Use "Live resizing" (default "false") Deprecated under JVM 1.4.1
+ * 
+ * 
+ * <dt>growbox
+ * <dd>Show growbox (default "true")
+ * 
+ * <dt>growboxintrudes
+ * <dd>Intruding growbox (default "false") Deprecated under JVM 1.4.1
+ * 
+ * <dt>screenmenu
+ * <dd>Put swing menu into Mac OS X menu bar.
+ * 
+ * <dt>type
+ * <dd>Bundle type (default "APPL")
+ * 
+ * <dt>signature
+ * <dd>Bundle Signature (default "????")
+ * 
+ * <dt>stubfile
+ * <dd>The Java Application Stub file to copy for your application (default
+ * MacOS system stub file)
+ * </dl>
+ * 
+ * <p>
+ * Rarely used optional attributes.
+ * <dl>
+ * <dt>chmod
+ * <dd>Full path to the chmod command. This almost certainly does NOT need to
+ * be set.
+ * </dl>
+ * 
+ * <p>
+ * The task also supports nested &lt;execfileset&gt; and/or &lt;execfilelist&gt;
+ * elements, and &lt;resourcefileset&gt; and/or &lt;resourcefilelist&gt;
+ * elements, which are standard Ant FileSet and FileList elements. In the first
+ * case, the referenced files are copied to the <code>Contents/MacOS</code>
+ * directory and made executable, and in the second they are copied to the
+ * <code>Contents/Resources</code> directory and not made executable. If you
+ * winrces, note that in fact the files are installed in locations which have
+ * the same relation to the <code>Contents/Resources</code> directory as the
+ * files in the FileSet or FileList have to the 'dir' attribute. Thus in the
+ * case:
+ * 
  * <pre>
- * Required attributes:
- *
- *  dir         The directory into which to put the new application bundle.
- *  name        The name of the application bundle.
- *  mainclass   The main Java class to call when running the application.
- *
- * One of the following three MUST be used:
- *  jars        Space or comma-separated list of JAR files to include.
- * OR
- *  One or more nested  &lt;jarfileset&gt;s. These are normal ANT FileSets.
- * OR
- *  One or more nested &lt;jarfilelist&gt;s. These are standard ANT FileLists.
- *
- * Optional attributes:
- *
- * The following attributes are not required, but you can use them to
- * override default behavior.
- *
- *   verbose       If true, show more verbose output while running the task
- *   version       Version information about your application (e.g., "1.0")
- *   infostring    String to show in the "Get Info" dialog
- *   jvmversion    (e.g. "1.3", "1.3+", "1.4+", "1.4.1")
- *
- * These attributes control the fine-tuning of the "Mac OS X" look and
- * feel.
- *
- *   arguments               Command line arguments. (no default)
- *   smalltabs               Use small tabs. (default "false")
- *                             Deprecated under JVM 1.4.1
- *   antialiasedgraphics     Use anti-aliased graphics (default "false")
- *   antialiasedtext         Use anti-aliased text (default "false")
- *   bundleid                Unique identifier for this bundle, in the
- *                           form of a Java package.  No default.
- *   developmentregion       Development Region.  Default "English".
- *   execs                   Files to be copied into "Resources/MacOS" and
- *                           made executable
- *   liveresize              Use "Live resizing" (default "false")
- *                             Deprecated under JVM 1.4.1
- *   growbox                 Show growbox (default "true")
- *   growboxintrudes         Intruding growbox (default "false")
- *                             Deprecated under JVM 1.4.1
- *   screenmenu              Put swing menu into Mac OS X menu bar.
- *   type                    Bundle type (default "APPL")
- *   signature               Bundle Signature (default "????")
- *   stubfile                The Java Application Stub file to copy for
- *                           your application (default MacOS system stub file)
- *
- * Rarely used optional attributes.
- *
- *   chmod                   Full path to the chmod command.  This almost
- *                           certainly does NOT need to be set.
- *
- * The task also supports nested &lt;execfileset&gt; and/or &lt;execfilelist&gt;
- * elements, which are standard Ant FileSet and FileList elements.
- *
- * eg:
+ *   &lt;resourcefileset dir=&quot;builddir/architectures&quot;
+ *                       includes=&quot;ppc/*.jnilib&quot;/&gt;
+ * </pre>
+ * 
+ * <p>
+ * the <code>*.jnilib</code> files will be installed in
+ * <code>Contents/Resources/ppc</code>.
+ * 
+ * <p>
+ * The task supports a nested &lt;javaproperty&gt; element, which allows you to
+ * specify further properties which are set for the JVM when the application is
+ * launched. This takes a required <code>key</code> attribute, giving the
+ * property key, plus an attribute giving the property value, which may be one
+ * of <code>value</code>, giving the string value of the property,
+ * <code>file</code>, setting the value of the property to be the absolute
+ * path of the given file, or <code>path</code>, which sets the value to the
+ * given path. If you are setting paths here, recall that, within the bundle,
+ * <code>$APP_PACKAGE</code> is set to the root directory of the bundle (ie,
+ * the path to the <code>foo.app</code> directory), and <code>$JAVAROOT</code>
+ * to the directory <code>Contents/Resources/Java</code>.
+ * 
+ * <p>
  * Minimum example:
- *
- *  &lt;jarbundler dir="release" name="Bar Project" mainclass="org.bar.Main"
- *      jars="bin/Bar.jar" /&gt;
- *
+ * 
+ * <pre>
+ *  
+ *    &lt;jarbundler dir=&quot;release&quot; name=&quot;Bar Project&quot; mainclass=&quot;org.bar.Main&quot;
+ *        jars=&quot;bin/Bar.jar&quot; /&gt;
+ * </pre>
+ * 
+ * <p>
  * Using Filesets
- *  &lt;jarbundler dir="release" name="Bar Project" mainclass="org.bar.Main"&gt;
- *    &lt;jarfileset dir="bin"&gt;
- *      &lt;include name="*.jar" /&gt;
- *      &lt;exclude name="test.jar" /&gt;
- *    &lt;/jarfileset&gt;
- *    &lt;execfileset dir="execs"&gt;
- *      &lt;include name="**" /&gt;
- *    &lt;/execfileset&gt;
- *  &lt;/jarbundler&gt;
- *
+ * 
+ * <pre>
+ *    &lt;jarbundler dir=&quot;release&quot; name=&quot;Bar Project&quot; mainclass=&quot;org.bar.Main&quot;&gt;
+ *      &lt;jarfileset dir=&quot;bin&quot;&gt;
+ *        &lt;include name=&quot;*.jar&quot; /&gt;
+ *        &lt;exclude name=&quot;test.jar&quot; /&gt;
+ *      &lt;/jarfileset&gt;
+ *      &lt;execfileset dir=&quot;execs&quot;&gt;
+ *        &lt;include name=&quot;**&quot; /&gt;
+ *      &lt;/execfileset&gt;
+ *    &lt;/jarbundler&gt;
+ * </pre>
+ * 
+ * <p>
  * Much Longer example:
- *
- *  &lt;jarbundler dir="release" name="Foo Project" mainclass="org.bar.Main"
- *      version="1.0 b 1" infostring="Foo Project (c) 2002" type="APPL"
- *      jars="bin/foo.jar bin/bar.jar" execs="exec/foobar"
- *      signature="????" aboutmenuname="Foo Project"
- *      workingdirectory="temp" icon="resources/foo.icns"
- *      jvmversion="1.4.1+" vmoptions="-Xmx256m" smalltabs="false"
- *      antialiasedgraphics="false" antialiasedtext="false"
- *      liveresize="false" growbox="false" screenmenu="true"/&gt;
+ * </p>
+ * 
+ * <pre>
+ *    &lt;jarbundler dir=&quot;release&quot;
+ *                name=&quot;Foo Project&quot;
+ *                mainclass=&quot;org.bar.Main&quot;
+ *                version=&quot;1.0 b 1&quot;
+ *                infostring=&quot;Foo Project (c) 2002&quot; 
+ *                type=&quot;APPL&quot;
+ *                jars=&quot;bin/foo.jar bin/bar.jar&quot;
+ *                execs=&quot;exec/foobar&quot;
+ *                signature=&quot;????&quot;
+ *                workingdirectory=&quot;temp&quot;
+ *                icon=&quot;resources/foo.icns&quot;
+ *                jvmversion=&quot;1.4.1+&quot;
+ *                vmoptions=&quot;-Xmx256m&quot;/&gt;
  * </pre>
+ * 
+ * http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/
  */
-
 public class JarBundler extends MatchingTask {
-  private static final String DEFAULT_STUB =
-    "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
-  private static final String DEFAULT_CHMOD =
-    "/bin/chmod";
-
-  private File mAppIcon;
-  private File mRootDir;
-
-  private List mJarFileSets = new ArrayList();
-  private List mExecFileSets = new ArrayList();
-  private List mJarFileLists = new ArrayList();
-  private List mExecFileLists = new ArrayList();
-  private List mJarAttrs = new ArrayList();
-  private List mExecAttrs = new ArrayList();
-
-  private StringBuffer mClassPath = new StringBuffer();
-  private boolean mFirstElement = true;
-  private boolean mVerbose = false;
-
-  // Java properties used by Mac OS X Java applications
-  private File mStubFile = new File(DEFAULT_STUB);
-  private String mAboutMenuName;
-  private boolean mSmallTabs = false;
-  private boolean mAntiAliasedGraphics = false;
-  private boolean mAntiAliasedText = false;
-  private boolean mLiveResize = false;
-  private boolean mScreenMenuBar = false;
-  private boolean mGrowbox = true;
-  private boolean mGrowboxIntrudes = false;
-
-  // "Contents" directory in the application bundle.
-  private File mContentsDir;
-
-  // "Contents/MacOS" directory in the application bundle.
-  private File mMacOsDir;
-
-  // "Contents/Resources" directory in the application bundle.
-  private File mResourceDir;
-
-  // "Contents/Resources/Java" directory in the application bundle.
-  private File mJavaDir;
-
-  // Full path to the 'chmod' command.  Can be overridden
-  // with the 'chmod' attribute.  Won't cause any harm if
-  // not set, or if this executable doesn't exist.
-  private String mChmodCommand = DEFAULT_CHMOD;
-
-  private AppBundleProperties mProps = new AppBundleProperties();
-
-  // Ant file utilities
-  private FileUtils mFileUtils = FileUtils.newFileUtils();
-
-  /**
-   * The method executing the task
-   */
-  public void execute() throws BuildException {
-
-    // Validate
-    if (mRootDir == null) {
-      throw new BuildException("Required attribute \"dir\" is not set.");
-    }
-
-    if (mJarAttrs.isEmpty() && mJarFileSets.isEmpty() && mJarFileLists.isEmpty()) {
-      throw new BuildException("Either the attribute \"jars\" must " +
-			       "be set, or one or more jarfilelists or " +
-			       "jarfilesets must be added.");
-    }
-
-    if (!mJarAttrs.isEmpty() && (!mJarFileSets.isEmpty() || !mJarFileLists.isEmpty())) {
-      throw new BuildException("Cannot set both the attribute " +
-			       "\"jars\" and use jar " +
-			       "filesets/filelists.  Use " +
-			       "only one or the other.");
-    }
-
-    for (Iterator i = mProps.getDocumentTypes().iterator(); i.hasNext(); ) {
-	  AppBundleProperties.DocumentType documentType = (AppBundleProperties.DocumentType) i.next();
-      if (documentType.role == null || documentType.name == null) {
-	    throw new BuildException("Document types must specify both a name and a role.");
-	  }
-	  if (documentType.osTypes == null && documentType.extensions == null) {
-	    throw new BuildException("Document types must specify OS types and/or extensions.");
-	  }
-    }
-
-    if (mProps.getCFBundleName() == null) {
-      throw new BuildException("Required attribute \"name\" is not set.");
-    }
-
-    if (mProps.getMainClass() == null) {
-      throw new BuildException("Required attribute \"mainclass\" is " +
-			       "not set.");
-    }
-
-    // Set up some Java properties
-    if (mAboutMenuName == null) {
-      mAboutMenuName = mProps.getCFBundleName();
-    }
-
-    // About Menu
-    mProps.addJavaProperty("com.apple.mrj.application.apple.menu.about.name",
-			   mAboutMenuName);
-
-    // Small Tabs
-    mProps.addJavaProperty("com.apple.smallTabs",
-			   Boolean.toString(mSmallTabs));
-
-    // Anti Aliased Graphics
-    String antiAliasedProperty = useOldPropertyNames() ?
-      "com.apple.macosx.AntiAliasedGraphicsOn" :
-      "apple.awt.antialiasing";
-
-    mProps.addJavaProperty(antiAliasedProperty,
-			   Boolean.toString(mAntiAliasedGraphics));
-
-    // Anti Aliased Text
-    String antiAliasedTextProperty = useOldPropertyNames() ?
-      "com.apple.macosx.AntiAliasedTextOn" :
-      "apple.awt.textantialiasing";
-
-    mProps.addJavaProperty(antiAliasedTextProperty,
-			   Boolean.toString(mAntiAliasedText));
-
-    // Live Resize
-    mProps.addJavaProperty("com.apple.mrj.application.live-resize",
-			   Boolean.toString(mLiveResize));
-
-    // Screen Menu Bar
-    String screenMenuBarProperty = useOldPropertyNames() ?
-      "com.apple.macos.useScreenMenuBar" :
-      "apple.laf.useScreenMenuBar";
-
-    mProps.addJavaProperty(screenMenuBarProperty,
-			   Boolean.toString(mScreenMenuBar));
-
-    // Growbox (only used if the Java VM is 1.4 or higher)
-    if (!useOldPropertyNames()) {
-      mProps.addJavaProperty("apple.awt.showGrowBox",
-			     Boolean.toString(mGrowbox));
-    }
-
-    // Growbox Intrudes (only used if the Java VM is 1.3 or lower)
-    if (useOldPropertyNames()) {
-      mProps.addJavaProperty("com.apple.mrj.application.growbox.intrudes",
-			     Boolean.toString(mGrowboxIntrudes));
-    }
-
-    if (!mRootDir.exists() || (mRootDir.exists() && !mRootDir.isDirectory())) {
-      throw new BuildException("Destination directory specified by \"dir\" " +
-			       "attribute must already exist.");
-    }
-
-    File bundleDir = new File(mRootDir, mProps.getCFBundleName() + ".app");
-
-    if (bundleDir.exists()) {
-      throw new BuildException("The App Bundle " + bundleDir.getName() +
-			       " already exists, cannot continue.");
-    }
-
-    // Status
-    System.out.println("Creating application bundle " + bundleDir);
-
-    if (!bundleDir.mkdir()) {
-      throw new BuildException("Unable to create bundle: "
-			       + bundleDir);
-    }
-
-    // Make the Contents directory
-    mContentsDir = new File(bundleDir, "Contents");
-    if (!mContentsDir.mkdir()) {
-      throw new BuildException("Unable to create directory "
-			       + mContentsDir);
-    }
-
-    // Make the "MacOS" directory
-    mMacOsDir = new File(mContentsDir, "MacOS");
-    if (!mMacOsDir.mkdir()) {
-      throw new BuildException("Unable to create directory "
-			       + mMacOsDir);
-    }
-
-    // Make the Resources directory
-    mResourceDir = new File(mContentsDir, "Resources");
-    if (!mResourceDir.mkdir()) {
-      throw new BuildException("Unable to create directory "
-			       + mResourceDir);
-    }
-
-    // Make the Resources/Java directory
-    mJavaDir = new File(mResourceDir, "Java");
-    if (!mJavaDir.mkdir()) {
-      throw new BuildException("Unable to create directory "
-			       + mJavaDir);
-    }
-
-    try {
-      // Copy icon file to resource dir.  If no icon parameter
-      // is supplied, the default icon will be used.
-      if (mAppIcon != null) {
-	    mFileUtils.copyFile(mAppIcon, new File(mResourceDir,
-		                      mAppIcon.getName()));
-      }
-
-	  // Copy document type icons, if any, to the resource dir.
-      for (Iterator i = mProps.getDocumentTypes().iterator(); i.hasNext(); ) {
-	    AppBundleProperties.DocumentType documentType = (AppBundleProperties.DocumentType) i.next();
-        if (documentType.iconFile != null) {
-          mFileUtils.copyFile(documentType.iconFile, new File(mResourceDir,
-		                      documentType.iconFile.getName()));
-        }
-      }
-    } catch (IOException ex) {
-      throw new BuildException("Cannot copy icon file: " + ex);
-    }
-
-    // Copy application jar(s) from the "jars" attribute (if any)
-    processJarAttrs();
-
-    // Copy application jar(s) from the nested jarfileset element(s)
-    processJarFileSets();
-
-    // Copy application jar(s) from the nested jarfilelist element(s)
-    processJarFileLists();
-
-    // Copy executable(s) from the "execs" attribute (if any)
-    processExecAttrs();
-
-    // Copy executable(s) from the nested execfileset element(s)
-    processExecFileSets();
-
-    // Copy executable(s) from the nested execfilelist element(s)
-    processExecFileLists();
-
-    // Set the classpath
-    if (mVerbose) {
-      System.out.println("Setting CLASSPATH: " + mClassPath.toString());
-    }
-    mProps.setClassPath(mClassPath.toString());
-
-    // Copy the JavaApplicationStub file from the Java
-    // system directory to the MacOS directory
-    copyApplicationStub();
-
-    // Create the Info.plist file
-    writeInfoPlist();
-
-    // Create the PkgInfo file
-    writePkgInfo();
-
-    // Done!
-  }
-
-  public JarFileSet createJarfileset() {
-    JarFileSet jarfileset = new JarFileSet();
-    mJarFileSets.add(jarfileset);
-    return jarfileset;
-  }
-
-  public JarFileList createJarfilelist() {
-    JarFileList jarfilelist = new JarFileList();
-    mJarFileLists.add(jarfilelist);
-    return jarfilelist;
-  }
-
-  public AppBundleProperties.DocumentType createDocumentType() {
-    AppBundleProperties.DocumentType documentType = mProps.createDocumentType();
-    mProps.addDocumentType(documentType);
-    return documentType;
-  }
-
-  public AppBundleProperties.Service createService() {
-    AppBundleProperties.Service service = mProps.createService();
-    mProps.addService(service);
-    return service;
-  }
-
-  public void addExecfileset(FileSet fs) {
-    mExecFileSets.add(fs);
-  }
-
-  public void addExecfilelist(FileList fl) {
-    mExecFileLists.add(fl);
-  }
-
-  /**
-   *
-   */
-  public void setArguments(String s) {
-    mProps.setArguments(s);
-  }
-
-  /**
-   * Override the stub file path to build on non-MacOS platforms
-   * @param s the path to the stub file
-   */
-  public void setStubFile(File f) {
-    mStubFile = f;
-  }
-
-  /**
-   * Setter for the "dir" attribute
-   */
-  public void setDir(File f) {
-    mRootDir = f;
-  }
-
-  /**
-   * Setter for the "name" attribute (required)
-   */
-  public void setName(String s) {
-    mProps.setCFBundleName(s);
-  }
-
-  /**
-   * Setter for the "mainclass" attribute (required)
-   */
-  public void setMainClass(String s) {
-    mProps.setMainClass(s);
-  }
-
-  /**
-   * Setter for the "WorkingDirectory" attribute (optional)
-   */
-  public void setWorkingDirectory(String s) {
-    mProps.setWorkingDirectory(s);
-  }
-
-  /**
-   * Setter for the "icon" attribute (optional)
-   */
-  public void setIcon(File f) {
-    mAppIcon = f;
-    mProps.setCFBundleIconFile(f.getName());
-  }
-
-  /**
-   * Setter for the "bundleid" attribute (optional)
-   * No default.
-   */
-  public void setBundleid(String s) {
-    mProps.setCFBundleIdentifier(s);
-  }
-
-  /**
-   * Setter for the "developmentregion" attribute(optional)
-   * Default "English".
-   */
-  public void setDevelopmentregion(String s) {
-    mProps.setCFBundleDevelopmentRegion(s);
-  }
-
-  /**
-   * Setter for the "aboutmenuname" attribute (optional)
-   */
-  public void setAboutmenuname(String s) {
-    mAboutMenuName = s;
-  }
-
-  /**
-   * Setter for the "smalltabs" attribute (optional)
-   */
-  public void setSmallTabs(boolean b) {
-    mSmallTabs = b;
-  }
-
-  /**
-   * Setter for the "vmoptions" attribute (optional)
-   */
-  public void setVmoptions(String s) {
-    mProps.setVMOptions(s);
-  }
-
-  /**
-   * Setter for the "antialiasedgraphics" attribute (optional)
-   */
-  public void setAntialiasedgraphics(boolean b) {
-    mAntiAliasedGraphics = b;
-  }
-
-  /**
-   * Setter for the "antialiasedtext" attribute (optional)
-   */
-  public void setAntialiasedtext(boolean b) {
-    mAntiAliasedText = b;
-  }
-
-  /**
-   * Setter for the "screenmenu" attribute (optional)
-   */
-  public void setScreenmenu(boolean b) {
-    mScreenMenuBar = b;
-  }
-
-  /**
-   * Setter for the "growbox" attribute (optional)
-   */
-  public void setGrowbox(boolean b) {
-    mGrowbox = b;
-  }
-
-  /**
-   * Setter for the "growboxintrudes" attribute (optional)
-   */
-  public void setGrowboxintrudes(boolean b) {
-    mGrowboxIntrudes = b;
-  }
-
-  /**
-   * Setter for the "liveresize" attribute (optional)
-   */
-  public void setLiveresize(boolean b) {
-    mLiveResize = b;
-  }
-
-  /**
-   * Setter for the "type" attribute (optional)
-   */
-  public void setType(String s) {
-    mProps.setCFBundlePackageType(s);
-  }
-
-  /**
-   * Setter for the "signature" attribute (optional)
-   */
-  public void setSignature(String s) {
-    mProps.setCFBundleSignature(s);
-  }
-
-  /**
-   * Setter for the "jvmversion" attribute (optional)
-   */
-  public void setJvmversion(String s) {
-    mProps.setJVMVersion(s);
-  }
-
-  /**
-   * Setter for the "infostring" attribute (optional)
-   */
-  public void setInfostring(String s) {
-    mProps.setCFBundleGetInfoString(s);
-  }
-
-  /**
-   * Setter for the "verbose" attribute (optional)
-   */
-  public void setVerbose(boolean b) {
-    mVerbose = b;
-  }
-
-  /**
-   * Setter for the "version" attribute (optional)
-   */
-  public void setVersion(String s) {
-    mProps.setCFBundleVersion(s);
-  }
-
-  /**
-   * Setter for the "short version" attribute (optional)
-   */
-  public void setShortVersion(String s) {
-    mProps.setCFBundleShortVersionString(s);
-  }
-
-  /**
-   * Setter for the "extra classpath" attribute (optional)
-   */
-  public void setExtraClasspath(String s) {
-    mClassPath.append(s + ":");
-  }
-
-  /**
-   * Setter for the "jars" attribute (required if no "jarfileset" is present)
-   */
-  public void setJars(String s) {
-    PatternSet patset = new PatternSet();
-    patset.setIncludes(s);
-    String[] jarNames = patset.getIncludePatterns(null);
-
-    for (int i = 0; i < jarNames.length; i++) {
-      File f = new File(jarNames[i]);
-      mJarAttrs.add(f);
-    }
-  }
-
-  /**
-   * Setter for the "execs" attribute (optional)
-   */
-  public void setExecs(String s) {
-    PatternSet patset = new PatternSet();
-    patset.setIncludes(s);
-    String[] execNames = patset.getIncludePatterns(null);
-
-    for (int i = 0; i < execNames.length; i++) {
-      File f = new File(execNames[i]);
-      mExecAttrs.add(f);
-    }
-  }
-
-  /**
-   * Set the 'chmod' executable.
-   */
-  public void setChmod(String s) {
-    this.mChmodCommand = s;
-  }
-
-  /* ******************************************************************
-   * Private utility methods.
-   * ******************************************************************/
-
-  /**
-   * A terrible hack: Set executable permissions on file f.  This
-   * should work on all versions of OS X, assuming /bin/chmod doesn't
-   * go away, which seems like a safe bet.  This method will simply
-   * return if /etc/chmod doesn't exist.
-   *
-   * TODO: Make this more platform-independant.  I'm not sure what
-   * the correct behavior should be if this is being run on Windows,
-   * for example.
-   *
-   */
-  private void setExecutable(File f) throws IOException {
-    String filePath = f.getAbsolutePath();
-
-    // See if the the chmod command is really present.  If not, return.
-    File test = new File(mChmodCommand);
-    if (!test.exists()) {
-      return;
-    }
-
-    if (mVerbose) {
-      System.out.println("Setting file " + f + " executable.");
-    }
-
-    Process p = Runtime.
-      getRuntime().exec(new String[] {mChmodCommand, "a+x", filePath});
-
-    // The process *may* block until all input and error
-    // is consumed.  The command should not produce any output,
-    // however.
-    InputStream is = null;
-    InputStream es = null;
-    try {
-      is = p.getInputStream();
-      es = p.getErrorStream();
-
-      byte[] buf = new byte[1024];
-      int len = 0;
-
-      while ((len = is.read(buf)) != -1) {
-	System.out.write(buf, 0, len);
-      }
-
-      while ((len = es.read(buf)) != -1) {
-	System.out.write(buf, 0, len);
-      }
-
-    } finally {
-      if (is != null) is.close();
-      if (es != null) es.close();
-    }
-  }
-
-  /**
-   * Utility method to determine whether this app bundle is targeting a 1.3 or 1.4
-   * VM.  The Mac OS X 1.3 VM uses different Java property names from the 1.4 VM
-   * to hint at native Mac OS X look and feel options.  For example, on 1.3
-   * the Java property to tell the VM to display Swing menu bars as screen menus
-   * is "com.apple.macos.useScreenMenuBar".  Under 1.4, it becomes
-   * "apple.laf.useScreenMenuBar".  Such is the price of progress, I suppose.
-   *
-   * Obviously, this logic may need refactoring in the future.
-   */
-  private boolean useOldPropertyNames() {
-    return (mProps.getJVMVersion().startsWith("1.3"));
-  }
-
-  private void addToClasspath(String fileName) {
-    if (!mFirstElement) {
-      mClassPath.append(":");
-    }
-
-    mClassPath.append("$JAVAROOT/" + fileName);
-
-    if (mFirstElement) {
-      mFirstElement = false;
-    }
-  }
-
-  private void processJarAttrs() throws BuildException {
-    try {
-      for (Iterator jarIter = mJarAttrs.iterator(); jarIter.hasNext(); ) {
-    File src = (File)jarIter.next();
-    File dest = new File(mJavaDir, src.getName());
-    if (mVerbose) {
-      System.out.println("Copying from " + src + " to " + dest);
-    }
-    mFileUtils.copyFile(src, dest);
-    addToClasspath(dest.getName());
-      }
-    } catch (IOException ex) {
-      throw new BuildException("Cannot copy jar file: " + ex);
-    }
-  }
-
-  private void processJarFileSets() throws BuildException {
-    for (Iterator jarIter = mJarFileSets.iterator(); jarIter.hasNext();) {
-      JarFileSet fs = (JarFileSet)jarIter.next();
-      Project p = fs.getProject();
-      File srcDir = fs.getDir(p);
-      FileScanner ds = fs.getDirectoryScanner(p);
-      fs.setupDirectoryScanner(ds,p);
-      ds.scan();
-      String[] files = ds.getIncludedFiles();
-      try {
-	for (int i = 0; i < files.length; i++) {
-	  String fileName = files[i];
-	  File src = new File(srcDir, fileName);
-	  File dest = new File(mJavaDir, fileName);
-	  if (mVerbose) {
-	    System.out.println("Copying from " + src + " to " + dest);
-	  }
-	  mFileUtils.copyFile(src, dest);
-	  if (fs.addAllToClasspath || fileName.endsWith(".jar"))
-	    addToClasspath(fileName);
-	}
-
-      } catch (IOException ex) {
-	throw new BuildException("Cannot copy jar file: " + ex);
-      }
-    }
-  }
-
-  private void processJarFileLists() throws BuildException {
-    for (Iterator jarIter = mJarFileLists.iterator(); jarIter.hasNext();) {
-      JarFileList fl = (JarFileList)jarIter.next();
-      Project p = fl.getProject();
-      File srcDir = fl.getDir(p);
-      String[] files = fl.getFiles(p);
-      try {
-	for (int i = 0; i < files.length; i++) {
-	  String fileName = files[i];
-	  File src = new File(srcDir, fileName);
-	  File dest = new File(mJavaDir, fileName);
-	  if (mVerbose) {
-	    System.out.println("Copying from " + src + " to " + dest);
-	  }
-	  mFileUtils.copyFile(src, dest);
-	  if (fl.addAllToClasspath || fileName.endsWith(".jar"))
-	    addToClasspath(fileName);
-	}
-      } catch (IOException ex) {
-	throw new BuildException("Cannot copy jar file: " + ex);
-      }
-    }
-  }
-
-  private void processExecAttrs() throws BuildException {
-    try {
-      for (Iterator execIter = mExecAttrs.iterator(); execIter.hasNext();) {
-	File src = (File)execIter.next();
-	File dest = new File(mMacOsDir, src.getName());
-	if (mVerbose) {
-	  System.out.println("Copying from " + src + " to " + dest);
-	}
-	mFileUtils.copyFile(src, dest);
-	setExecutable(dest);
-      }
-    } catch (IOException ex) {
-      throw new BuildException("Cannot copy exec file: " + ex);
-    }
-  }
-
-  private void processExecFileSets() {
-    for (Iterator execIter = mExecFileSets.iterator(); execIter.hasNext();) {
-      FileSet fs = (FileSet)execIter.next();
-      Project p = fs.getProject();
-      File srcDir = fs.getDir(p);
-      FileScanner ds = fs.getDirectoryScanner(p);
-      fs.setupDirectoryScanner(ds,p);
-      ds.scan();
-      String[] files = ds.getIncludedFiles();
-      try {
-	for (int i = 0; i < files.length; i++) {
-	  String fileName = files[i];
-	  File src = new File(srcDir, fileName);
-	  File dest = new File(mMacOsDir, fileName);
-	  if (mVerbose) {
-	    System.out.println("Copying from " + src + " to " + dest);
-	  }
-	  mFileUtils.copyFile(src, dest);
-	  setExecutable(dest);
-	}
-      } catch (IOException ex) {
-	throw new BuildException("Cannot copy exec file: " + ex);
-      }
-    }
-  }
-
-  private void processExecFileLists() throws BuildException {
-    for (Iterator execIter = mExecFileLists.iterator(); execIter.hasNext();) {
-      FileList fl = (FileList)execIter.next();
-      Project p = fl.getProject();
-      File srcDir = fl.getDir(p);
-      String[] files = fl.getFiles(p);
-      try {
-	for (int i = 0; i < files.length; i++) {
-	  String fileName = files[i];
-	  File src = new File(srcDir, fileName);
-	  File dest = new File(mMacOsDir, fileName);
-	  if (mVerbose) {
-	    System.out.println("Copying from " + src + " to " + dest);
-	  }
-	  mFileUtils.copyFile(src, dest);
-	  setExecutable(dest);
-	}
-      } catch (IOException ex) {
-	throw new BuildException("Cannot copy jar file: " + ex);
-      }
-    }
-  }
-
-  private void copyApplicationStub() throws BuildException {
-    if (mVerbose) {
-      System.out.println("Copying JavaApplicationStub...");
-    }
-
-    File newStubFile = new File(mMacOsDir, "JavaApplicationStub");
-
-    try {
-      mFileUtils.copyFile(mStubFile, newStubFile);
-    } catch (IOException ex) {
-      throw new BuildException("Cannot copy JavaApplicationStub: " + ex);
-    }
-
-    // Tweak the permissions on the stub file to set it executable
-    try {
-      setExecutable(newStubFile);
-    } catch (IOException ex) {
-      throw new BuildException("Cannot set executable bit: " + ex);
-    }
-  }
-
-  private void writeInfoPlist() throws BuildException {
-    PropertyListWriter listWriter = new PropertyListWriter(mProps);
-    File infoPlist = new File(mContentsDir, "Info.plist");
-    listWriter.writeFile(infoPlist);
-  }
-
-  private void writePkgInfo() throws BuildException {
-    File pkgInfo = new File(mContentsDir, "PkgInfo");
-    PrintWriter pkgWriter = null;
-    try {
-      pkgWriter =
-	new PrintWriter(new BufferedWriter(new FileWriter(pkgInfo)));
-      pkgWriter.println(mProps.getCFBundlePackageType()
-			+ mProps.getCFBundleSignature());
-      pkgWriter.flush();
-    } catch (IOException ex) {
-      throw new BuildException("Cannot create PkgInfo file: " + ex);
-    } finally {
-      if (pkgWriter != null) pkgWriter.close();
-    }
-  }
-
-  public class JarFileSet extends FileSet
-  {
-      boolean addAllToClasspath;
-      
-      public void setAddAllToClasspath(boolean b)
-      {
-          addAllToClasspath = b;
-      }
-  }
-
-  public class JarFileList extends FileList
-  {
-      boolean addAllToClasspath;
-      
-      public void setAddAllToClasspath(boolean b)
-      {
-          addAllToClasspath = b;
-      }
-  }
+
+	private static final String DEFAULT_STUB = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
+
+	private static final String ABOUTMENU_KEY = "com.apple.mrj.application.apple.menu.about.name";
+	private static final Set menuItems = new HashSet();
+	private File mAppIcon;
+
+	private File mRootDir;
+
+	private final List mJavaFileLists = new ArrayList();
+	private final List mJarFileSets = new ArrayList();
+
+	private final List mExecFileLists = new ArrayList();
+	private final List mExecFileSets = new ArrayList();
+
+	private final List mResourceFileLists = new ArrayList();
+	private final List mResourceFileSets = new ArrayList();
+
+	private final List mJarFileLists = new ArrayList();
+	private final List mJavaFileSets = new ArrayList();
+
+	private final List mExtraClassPathFileLists = new ArrayList();
+	private final List mExtraClassPathFileSets = new ArrayList();
+
+	private final List mJarAttrs = new ArrayList();
+
+	private final List mExecAttrs = new ArrayList();
+
+	private final List mExtraClassPathAttrs = new ArrayList();
+	
+	private final List mHelpBooks = new ArrayList();
+
+	private boolean mVerbose = false;
+	private boolean mShowPlist = false;
+
+	// Java properties used by Mac OS X Java applications
+
+	private File mStubFile = new File(DEFAULT_STUB);
+
+	private Boolean mAntiAliasedGraphics = null;
+
+	private Boolean mAntiAliasedText = null;
+
+	private Boolean mLiveResize = null;
+
+	private Boolean mScreenMenuBar = null;
+
+	private Boolean mGrowbox = null;
+
+	private Boolean mGrowboxIntrudes = null;
+
+	// The root of the application bundle
+	private File bundleDir;
+
+	// "Contents" directory
+	private File mContentsDir;
+
+	// "Contents/MacOS" directory
+	private File mMacOsDir;
+
+	// "Contents/Resources" directory
+	private File mResourcesDir;
+
+	// "Contents/Resources/Java" directory
+	private File mJavaDir;
+
+	// Full path to the 'chmod' command. Can be overridden
+	// with the 'chmod' attribute. Won't cause any harm if
+	// not set, or if this executable doesn't exist.
+
+
+	private AppBundleProperties bundleProperties = new AppBundleProperties();
+
+	// Ant file utilities
+
+	private FileUtils mFileUtils = FileUtils.getFileUtils();
+
+	/***************************************************************************
+	 * Retreive task attributes
+	 **************************************************************************/
+
+	/**
+	 * Arguments to the
+	 * 
+	 * @param s
+	 *            The arguments to pass to the application being launched.
+	 */
+	public void setArguments(String s) {
+		bundleProperties.setArguments(s);
+	}
+
+	/**
+	 * Override the stub file path to build on non-MacOS platforms
+	 * 
+	 * @param file
+	 *            the path to the stub file
+	 */
+	public void setStubFile(File file) {
+		mStubFile = (file.exists()) ? file : new File(DEFAULT_STUB);
+		bundleProperties.setCFBundleExecutable(file.getName());
+	}
+
+	/**
+	 * Setter for the "dir" attribute (required)
+	 */
+	public void setDir(File f) {
+		mRootDir = f;
+	}
+
+	/**
+	 * Setter for the "name" attribute (required) This attribute names the
+	 * output application bundle and asks as the CFBundleName if 'bundlename' is
+	 * not specified
+	 */
+	public void setName(String s) {
+		bundleProperties.setApplicationName(s);
+	}
+
+	/**
+	 * Setter for the "shortname" attribute (optional) This key identifies the
+	 * short name of the bundle. This name should be less than 16 characters
+	 * long and be suitable for displaying in the menu and the About box. The
+	 * name is (silently) cropped to this if necessary.
+	 */
+	public void setShortName(String s) {
+		bundleProperties.setCFBundleName(s);
+	}
+
+	/**
+	 * Setter for the "mainclass" attribute (required)
+	 */
+	public void setMainClass(String s) {
+		bundleProperties.setMainClass(s);
+	}
+
+	/**
+	 * Setter for the "WorkingDirectory" attribute (optional)
+	 */
+	public void setWorkingDirectory(String s) {
+		bundleProperties.setWorkingDirectory(s);
+	}
+
+	/**
+	 * Setter for the "icon" attribute (optional)
+	 */
+
+	public void setIcon(File f) {
+		mAppIcon = f;
+		bundleProperties.setCFBundleIconFile(f.getName());
+	}
+
+	/**
+	 * Setter for the "bundleid" attribute (optional) This key specifies a
+	 * unique identifier string for the bundle. This identifier should be in the
+	 * form of a Java-style package name, for example com.mycompany.myapp. The
+	 * bundle identifier can be used to locate the bundle at runtime. The
+	 * preferences system uses this string to identify applications uniquely.
+	 * 
+	 * No default.
+	 */
+	public void setBundleid(String s) {
+		bundleProperties.setCFBundleIdentifier(s);
+	}
+
+	/**
+	 * Setter for the "developmentregion" attribute(optional) Default "English".
+	 */
+	public void setDevelopmentregion(String s) {
+		bundleProperties.setCFBundleDevelopmentRegion(s);
+	}
+
+	/**
+	 * Setter for the "aboutmenuname" attribute (optional)
+	 */
+	public void setAboutmenuname(String s) {
+		bundleProperties.setCFBundleName(s);
+	}
+
+	/**
+	 * Setter for the "smalltabs" attribute (optional)
+	 */
+	public void setSmallTabs(boolean b) {
+		bundleProperties.addJavaProperty("com.apple.smallTabs", new Boolean(b)
+				.toString());
+	}
+
+	/**
+	 * Setter for the "vmoptions" attribute (optional)
+	 */
+	public void setVmoptions(String s) {
+		bundleProperties.setVMOptions(s);
+	}
+
+	/**
+	 * Setter for the "antialiasedgraphics" attribute (optional)
+	 */
+	public void setAntialiasedgraphics(boolean b) {
+		mAntiAliasedGraphics = new Boolean(b);
+	}
+
+	/**
+	 * Setter for the "antialiasedtext" attribute (optional)
+	 */
+	public void setAntialiasedtext(boolean b) {
+		mAntiAliasedText = new Boolean(b);
+	}
+
+	/**
+	 * Setter for the "screenmenu" attribute (optional)
+	 */
+	public void setScreenmenu(boolean b) {
+		mScreenMenuBar = new Boolean(b);
+	}
+
+	/**
+	 * Setter for the "growbox" attribute (optional)
+	 */
+	public void setGrowbox(boolean b) {
+		mGrowbox = new Boolean(b);
+	}
+
+	/**
+	 * Setter for the "growboxintrudes" attribute (optional)
+	 */
+	public void setGrowboxintrudes(boolean b) {
+		mGrowboxIntrudes = new Boolean(b);
+	}
+
+	/**
+	 * Setter for the "liveresize" attribute (optional)
+	 */
+	public void setLiveresize(boolean b) {
+		mLiveResize = new Boolean(b);
+	}
+
+	/**
+	 * Setter for the "type" attribute (optional)
+	 */
+	public void setType(String s) {
+		bundleProperties.setCFBundlePackageType(s);
+	}
+
+	/**
+	 * Setter for the "signature" attribute (optional)
+	 */
+	public void setSignature(String s) {
+		bundleProperties.setCFBundleSignature(s);
+	}
+
+	/**
+	 * Setter for the "jvmversion" attribute (optional)
+	 */
+	public void setJvmversion(String s) {
+		bundleProperties.setJVMVersion(s);
+	}
+
+	/**
+	 * Setter for the "infostring" attribute (optional) This key identifies a
+	 * human-readable plain text string displaying the copyright information for
+	 * the bundle. The Finder displays this information in the Info window of
+	 * the bundle. (This string was also known as the long version string in Mac
+	 * OS 9). The format of the key should be of the following format: "&copy;
+	 * Great Software, Inc, 1999". You can localize this string by including it
+	 * in the InfoPlist.strings file of the appropriate .lproj directory.
+	 */
+
+	public void setInfoString(String s) {
+		bundleProperties.setCFBundleGetInfoString(s);
+	}
+
+	/**
+	 * Setter for the "shortinfostring" attribute (optional) This key identifies
+	 * the marketing version of the bundle. The marketing version is a string
+	 * that usually displays the major and minor version of the bundle. This
+	 * string is usually of the form n.n.n where n is a number. The first number
+	 * is the major version number of the bundle. The second and third numbers
+	 * are minor revision numbers. You may omit minor revision numbers as
+	 * appropriate. The value of this key is displayed in the default About box
+	 * for Cocoa applications.
+	 * 
+	 * The value for this key differs from the value for "CFBundleVersion",
+	 * which identifies a specific build number. The CFBundleShortVersionString
+	 * value represents a more formal version that does not change with every
+	 * build.
+	 */
+	public void setShortInfoString(String s) {
+		setVersion(s);
+	}
+
+	/**
+	 * Setter for the "verbose" attribute (optional)
+	 */
+	public void setVerbose(boolean verbose) {
+		this.mVerbose = verbose;
+	}
+	public void setShowPlist(boolean showPlist) {
+		this.mShowPlist = showPlist;
+	}
+
+
+
+
+	/**
+	 * Setter for the "buildnumber" attribute (optional) This key specifies the
+	 * exact build version of the bundle. This string is usually of the form
+	 * nn.n.nxnnn where n is a digit and x is a character from the set [abdf].
+	 * The first number is the major version number of the bundle and can
+	 * contain one or two digits to represent a number in the range 0-99. The
+	 * second and third numbers are minor revision numbers and must be a single
+	 * numeric digit. The fourth set of digits is the specific build number for
+	 * the release.
+	 * 
+	 * You may omit minor revision and build number information as appropriate.
+	 * You may also omit major and minor revision information and specify only a
+	 * build number. For example, valid version numbers include: 1.0.1,
+	 * 1.2.1b10, 1.2d200, d125, 101, and 1.0.
+	 * 
+	 * The value of this key typically changes between builds and is displayed
+	 * in the Cocoa About panel in parenthesis. To specify the version
+	 * information of a released bundle, use the CFBundleShortVersionString key.
+	 */
+	public void setBuild(String s) {
+		bundleProperties.setCFBundleVersion(s);
+	}
+
+	/**
+	 * Setter for the version attribute (optional). It is this property, not
+	 * CFBundleVersion, which should receive the `short' version string. See for
+	 * example
+	 * <http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/>
+	 */
+	public void setVersion(String s) {
+		bundleProperties.setCFBundleShortVersionString(s);
+	}
+
+	public void setHelpBookFolder(String s) {
+		bundleProperties.setCFBundleHelpBookFolder(s);
+	}
+
+	public void setHelpBookName(String s) {
+		bundleProperties.setCFBundleHelpBookName(s);
+	}
+
+	/**
+	 * Setter for the "jars" attribute (required if no "jarfileset" is present)
+	 */
+	public void setJars(String s) {
+		PatternSet patset = new PatternSet();
+		patset.setIncludes(s);
+
+		String[] jarNames = patset.getIncludePatterns(getProject());
+
+		for (int i = 0; i < jarNames.length; i++)
+			mJarAttrs.add(getProject().resolveFile(jarNames[i]));
+	}
+
+	/**
+	 * Setter for the "jar" attribute (required if no "jarfileset" is present)
+	 */
+	public void setJar(File s) {
+		mJarAttrs.add(s);
+	}
+
+	/**
+	 * Setter for the "execs" attribute (optional)
+	 */
+	public void setExecs(String s) {
+		PatternSet patset = new PatternSet();
+		patset.setIncludes(s);
+
+		String[] execNames = patset.getIncludePatterns(getProject());
+
+		for (int i = 0; i < execNames.length; i++) {
+			File f = new File(execNames[i]);
+			mExecAttrs.add(f);
+		}
+	}
+
+	/**
+	 * Setter for the "extraclasspath" attribute (optional)
+	 */
+	public void setExtraclasspath(String s) {
+		PatternSet patset = new PatternSet();
+		patset.setIncludes(s);
+
+		String[] cpNames = patset.getIncludePatterns(getProject());
+
+		for (int i = 0; i < cpNames.length; i++) {
+			File f = new File(cpNames[i]);
+			mExtraClassPathAttrs.add(f);
+		}
+	}
+
+	/**
+	 * Set the 'chmod' executable.
+	 */
+	public void setChmod(String s) {
+		log("The \"chmod\" attribute has deprecaited, using the ANT Chmod task internally");
+	}
+
+	/***************************************************************************
+	 * Nested tasks - derived from FileList and FileSet
+	 **************************************************************************/
+
+	public void addJarfileset(FileSet fs) {
+		mJarFileSets.add(fs);
+	}
+
+	public void addJarfilelist(FileList fl) {
+		mJarFileLists.add(fl);
+	}
+
+	public void addExecfileset(FileSet fs) {
+		mExecFileSets.add(fs);
+	}
+
+	public void addExecfilelist(FileList fl) {
+		mExecFileLists.add(fl);
+	}
+
+	public void addResourcefileset(FileSet fs) {
+		mResourceFileSets.add(fs);
+	}
+
+	public void addResourcefilelist(FileList fl) {
+		mResourceFileLists.add(fl);
+	}
+
+	public void addJavafileset(FileSet fs) {
+		mJavaFileSets.add(fs);
+	}
+
+	public void addJavafilelist(FileList fl) {
+		mJavaFileLists.add(fl);
+	}
+
+	public void addExtraclasspathfileset(FileSet fs) {
+		mExtraClassPathFileSets.add(fs);
+	}
+
+	public void addExtraclasspathfilelist(FileList fl) {
+		mExtraClassPathFileLists.add(fl);
+	}
+
+
+	/***************************************************************************
+	 * Nested tasks - new tasks with custom attributes
+	 **************************************************************************/
+
+
+	public void addConfiguredJavaProperty(JavaProperty javaProperty)
+			throws BuildException {
+
+		String name = javaProperty.getName();
+		String value = javaProperty.getValue();
+
+		if ((name == null) || (value == null))
+			throw new BuildException(
+					"'<javaproperty>' must have both 'name' and 'value' attibutes");
+
+		bundleProperties.addJavaProperty(name, value);
+	}
+
+	public void addConfiguredDocumentType(DocumentType documentType) throws BuildException {
+
+		String name = documentType.getName();
+		String role = documentType.getRole();
+		List osTypes = documentType.getOSTypes();
+		List extensions = documentType.getExtensions();
+		List mimeTypes = documentType.getMimeTypes();
+
+		if ((name == null) || (role == null))
+			throw new BuildException(
+					"'<documenttype>' must have both a 'name' and a 'role' attibute");
+
+		if ((osTypes.isEmpty()) && (extensions.isEmpty()) && (mimeTypes.isEmpty()))
+			throw new BuildException(
+					"'<documenttype>' of \""
+							+ name
+							+ "\" must have 'osTypes' or 'extensions' or 'mimeTypes'");
+
+		bundleProperties.addDocumentType(documentType);
+	}
+
+	public void addConfiguredService(Service service) {
+	
+		//if (service.getPortName() == null)
+		//	throw new BuildException("\"<service>\" must have a \"portName\" attribute");
+		
+		if (service.getMessage() == null)
+			throw new BuildException("\"<service>\" must have a \"message\" attribute");
+		
+		String menuItem = service.getMenuItem();
+		if (menuItem == null)
+			throw new BuildException("\"<service>\" must have a \"menuItem\" attribute");
+		if (!menuItems.add(menuItem))
+			throw new BuildException("\"<service>\" \"menuItem\" value must be unique");
+		
+		if (service.getSendTypes().isEmpty() && service.getReturnTypes().isEmpty())
+			throw new BuildException("\"<service>\" must have either a \"sendTypes\" attribute, a \"returnTypes\" attribute or both");
+		
+		String keyEquivalent = service.getKeyEquivalent();
+		if ((keyEquivalent != null) && (1 != keyEquivalent.length()))
+			throw new BuildException("\"<service>\" \"keyEquivalent\" must be one character if present");
+		
+		String timeoutString = service.getTimeout();
+		if (timeoutString != null) {
+			long timeout = -1;
+			try {
+				timeout = Long.parseLong(timeoutString);
+			} catch (NumberFormatException nfe) {
+				throw new BuildException("\"<service>\" \"timeout\" must be a positive integral number");
+			}
+			if (timeout < 0)
+				throw new BuildException("\"<service>\" \"timeout\" must not be negative");
+		}
+		
+		bundleProperties.addService(service);
+	}
+	
+	public void addConfiguredHelpBook(HelpBook helpBook) {
+	
+		// Validity check on 'foldername'
+		if (helpBook.getFolderName() == null) {
+			if (bundleProperties.getCFBundleHelpBookFolder() == null)
+				throw new BuildException("Either the '<helpbook>' attribute 'foldername' or the '<jarbundler>' attribute 'helpbookfolder' must be defined");
+			helpBook.setFolderName(bundleProperties.getCFBundleHelpBookFolder());
+		}
+
+		// Validity check on 'title'
+		if (helpBook.getName() == null) {
+			if (bundleProperties.getCFBundleHelpBookName() == null)
+				throw new BuildException("Either the '<helpbook>' attribute 'name' or the '<jarbundler>' attribute 'helpbookname' must be defined");
+			helpBook.setName(bundleProperties.getCFBundleHelpBookName());
+		}
+
+		// Make sure some file were selected...
+		List fileLists = helpBook.getFileLists();
+		List fileSets = helpBook.getFileSets();
+
+		if ( fileLists.isEmpty() && fileSets.isEmpty() )
+			throw new BuildException("The '<helpbook>' task must have either " +
+			                         "'<fileset>' or  '<filelist>' nested tags");
+
+
+		mHelpBooks.add(helpBook);
+	}
+
+
+
+	/***************************************************************************
+	 * Execute the task
+	 **************************************************************************/
+
+	/**
+	 * The method executing the task
+	 */
+
+	public void execute() throws BuildException {
+
+		// Delete any existing Application bundle directory structure
+
+		bundleDir = new File(mRootDir, bundleProperties.getApplicationName() + ".app");
+
+		if (bundleDir.exists()) {
+			Delete deleteTask = new Delete();
+            deleteTask.setProject(getProject());
+			deleteTask.setDir(bundleDir);
+			deleteTask.execute();
+		}
+
+		// Validate - look for required attributes
+		// ///////////////////////////////////////////
+
+		if (mRootDir == null)
+			throw new BuildException("Required attribute \"dir\" is not set.");
+
+		if (mJarAttrs.isEmpty() && mJarFileSets.isEmpty()
+				&& mJarFileLists.isEmpty())
+			throw new BuildException("Either the attribute \"jar\" must "
+					+ "be set, or one or more jarfilelists or "
+					+ "jarfilesets must be added.");
+
+		if (!mJarAttrs.isEmpty()
+				&& (!mJarFileSets.isEmpty() || !mJarFileLists.isEmpty()))
+			throw new BuildException(
+					"Cannot set both the attribute "
+							+ "\"jars\" and use jar filesets/filelists.  Use only one or the other.");
+
+		if (bundleProperties.getApplicationName() == null)
+			throw new BuildException("Required attribute \"name\" is not set.");
+
+		if (bundleProperties.getMainClass() == null)
+			throw new BuildException(
+					"Required attribute \"mainclass\" is not set.");
+
+		// /////////////////////////////////////////////////////////////////////////////////////
+
+		// Set up some Java properties
+
+		// About Menu, deprecated under 1.4+
+		if (useOldPropertyNames())
+			bundleProperties.addJavaProperty(ABOUTMENU_KEY, bundleProperties
+					.getCFBundleName());
+
+		// Anti Aliased Graphics, renamed in 1.4+
+		String antiAliasedProperty = useOldPropertyNames()
+				? "com.apple.macosx.AntiAliasedGraphicsOn"
+				: "apple.awt.antialiasing";
+
+		if (mAntiAliasedGraphics != null)
+			bundleProperties.addJavaProperty(antiAliasedProperty,
+					mAntiAliasedGraphics.toString());
+
+		// Anti Aliased Text, renamed in 1.4+
+		String antiAliasedTextProperty = useOldPropertyNames()
+				? "com.apple.macosx.AntiAliasedTextOn"
+				: "apple.awt.textantialiasing";
+
+		if (mAntiAliasedText != null)
+			bundleProperties.addJavaProperty(antiAliasedTextProperty,
+					mAntiAliasedText.toString());
+
+		// Live Resize, deprecated under 1.4+
+		if (useOldPropertyNames() && (mLiveResize != null))
+			bundleProperties.addJavaProperty(
+					"com.apple.mrj.application.live-resize", mLiveResize
+							.toString());
+
+		// Screen Menu Bar, renamed in 1.4+
+		String screenMenuBarProperty = useOldPropertyNames()
+				? "com.apple.macos.useScreenMenuBar"
+				: "apple.laf.useScreenMenuBar";
+
+		if (mScreenMenuBar != null)
+			bundleProperties.addJavaProperty(screenMenuBarProperty,
+					mScreenMenuBar.toString());
+
+		// Growbox, added with 1.4+
+		if ((useOldPropertyNames() == false) && (mGrowbox != null))
+			bundleProperties.addJavaProperty("apple.awt.showGrowBox", mGrowbox
+					.toString());
+
+		// Growbox Intrudes, deprecated under 1.4+
+		if (useOldPropertyNames() && (mGrowboxIntrudes != null))
+			bundleProperties.addJavaProperty(
+					"com.apple.mrj.application.growbox.intrudes",
+					mGrowboxIntrudes.toString());
+
+		if (!mRootDir.exists()
+				|| (mRootDir.exists() && !mRootDir.isDirectory()))
+			throw new BuildException(
+					"Destination directory specified by \"dir\" "
+							+ "attribute must already exist.");
+
+		if (bundleDir.exists())
+			throw new BuildException("The directory/bundle \""
+					+ bundleDir.getName()
+					+ "\" already exists, cannot continue.");
+
+		// Status message
+		log("Creating application bundle: " + bundleDir);
+
+		if (!bundleDir.mkdir())
+			throw new BuildException("Unable to create bundle: " + bundleDir);
+
+		// Make the Contents directory
+		mContentsDir = new File(bundleDir, "Contents");
+
+		if (!mContentsDir.mkdir())
+			throw new BuildException("Unable to create directory "
+					+ mContentsDir);
+
+		// Make the "MacOS" directory
+		mMacOsDir = new File(mContentsDir, "MacOS");
+
+		if (!mMacOsDir.mkdir())
+			throw new BuildException("Unable to create directory " + mMacOsDir);
+
+		// Make the Resources directory
+		mResourcesDir = new File(mContentsDir, "Resources");
+
+		if (!mResourcesDir.mkdir())
+			throw new BuildException("Unable to create directory "
+					+ mResourcesDir);
+
+		// Make the Resources/Java directory
+		mJavaDir = new File(mResourcesDir, "Java");
+
+		if (!mJavaDir.mkdir())
+			throw new BuildException("Unable to create directory " + mJavaDir);
+
+		// Copy icon file to resource dir. If no icon parameter
+		// is supplied, the default icon will be used.
+
+		if (mAppIcon != null) {
+		
+
+			try {
+				File dest = new File(mResourcesDir, mAppIcon.getName());
+
+				if(mVerbose)
+					log("Copying application icon file to \"" + bundlePath(dest) + "\"");
+
+				mFileUtils.copyFile(mAppIcon, dest);
+			} catch (IOException ex) {
+				throw new BuildException("Cannot copy icon file: " + ex);
+			}
+		}
+
+		// Copy document type icons, if any, to the resource dir
+		try {
+			Iterator itor = bundleProperties.getDocumentTypes().iterator();
+
+			while (itor.hasNext()) {
+				DocumentType documentType = (DocumentType) itor.next();
+				File iconFile = documentType.getIconFile();
+				if (iconFile != null) {
+					File dest = new File(mResourcesDir, iconFile.getName());
+					if(mVerbose)
+						log("Copying document icon file to \"" + bundlePath(dest) + "\"");
+					mFileUtils.copyFile(iconFile, dest);
+				}
+			}
+		} catch (IOException ex) {
+			throw new BuildException("Cannot copy document icon file: " + ex);
+		}
+
+		// Copy application jar(s) from the "jars" attribute (if any)
+		processJarAttrs();
+
+		// Copy application jar(s) from the nested jarfileset element(s)
+		processJarFileSets();
+
+		// Copy application jar(s) from the nested jarfilelist element(s)
+		processJarFileLists();
+
+		// Copy executable(s) from the "execs" attribute (if any)
+		processExecAttrs();
+
+		// Copy executable(s) from the nested execfileset element(s)
+		processExecFileSets();
+
+		// Copy executable(s) from the nested execfilelist element(s)
+		processExecFileLists();
+
+		// Copy resource(s) from the nested resourcefileset element(s)
+		processResourceFileSets();
+
+		// Copy resource(s) from the nested javafileset element(s)
+		processJavaFileSets();
+
+		// Copy resource(s) from the nested resourcefilelist element(s)
+		processResourceFileLists();
+
+		// Copy resource(s) from the nested javafilelist element(s)
+		processJavaFileLists();
+
+		// Add external classpath references from the extraclasspath attributes
+		processExtraClassPathAttrs();
+
+		// Add external classpath references from the nested
+		// extraclasspathfileset element(s)
+		processExtraClassPathFileSets();
+
+		// Add external classpath references from the nested
+		// extraclasspathfilelist attributes
+		processExtraClassPathFileLists();
+
+		// Copy HelpBooks into place
+		copyHelpBooks();
+
+		// Copy the JavaApplicationStub file from the Java system directory to
+		// the MacOS directory
+		copyApplicationStub();
+
+		// Create the Info.plist file
+		writeInfoPlist();
+
+		// Create the PkgInfo file
+		writePkgInfo();
+
+		// Done!
+	}
+
+	/***************************************************************************
+	 * Private utility methods.
+	 **************************************************************************/
+
+	private void setExecutable(File f) {
+
+		Chmod chmodTask = new Chmod();
+		chmodTask.setProject(getProject());
+		chmodTask.setFile(f);
+		chmodTask.setPerm("ugo+rx");
+
+		if (mVerbose)
+			log("Setting \"" + bundlePath(f) + "\" to executable");
+
+		chmodTask.execute();
+
+	}
+
+	/**
+	 * Utility method to determine whether this app bundle is targeting a 1.3 or
+	 * 1.4 VM. The Mac OS X 1.3 VM uses different Java property names from the
+	 * 1.4 VM to hint at native Mac OS X look and feel options. For example, on
+	 * 1.3 the Java property to tell the VM to display Swing menu bars as screen
+	 * menus is "com.apple.macos.useScreenMenuBar". Under 1.4, it becomes
+	 * "apple.laf.useScreenMenuBar". Such is the price of progress, I suppose.
+	 * 
+	 * Obviously, this logic may need refactoring in the future.
+	 */
+
+	private boolean useOldPropertyNames() {
+		return (bundleProperties.getJVMVersion().startsWith("1.3"));
+	}
+
+	private void processJarAttrs() throws BuildException {
+
+		try {
+
+			for (Iterator jarIter = mJarAttrs.iterator(); jarIter.hasNext();) {
+				File src = (File) jarIter.next();
+				File dest = new File(mJavaDir, src.getName());
+
+				if (mVerbose) 
+					log("Copying JAR file to \"" + bundlePath(dest) + "\"");
+				
+
+				mFileUtils.copyFile(src, dest);
+				bundleProperties.addToClassPath(dest.getName());
+			}
+		} catch (IOException ex) {
+			throw new BuildException("Cannot copy jar file: " + ex);
+		}
+	}
+
+	private void processJarFileSets() throws BuildException {
+
+		for (Iterator jarIter = mJarFileSets.iterator(); jarIter.hasNext();) {
+
+			FileSet fs = (FileSet) jarIter.next();
+
+			Project p = fs.getProject();
+			File srcDir = fs.getDir(p);
+			FileScanner ds = fs.getDirectoryScanner(p);
+			fs.setupDirectoryScanner(ds, p);
+			ds.scan();
+
+			String[] files = ds.getIncludedFiles();
+
+			try {
+
+				for (int i = 0; i < files.length; i++) {
+					String fileName = files[i];
+					File src = new File(srcDir, fileName);
+					File dest = new File(mJavaDir, fileName);
+
+					if (mVerbose)
+						log("Copying JAR file to \"" + bundlePath(dest) + "\"");
+
+					mFileUtils.copyFile(src, dest);
+					bundleProperties.addToClassPath(fileName);
+				}
+
+			} catch (IOException ex) {
+				throw new BuildException("Cannot copy jar file: " + ex);
+			}
+		}
+	}
+
+	private void processJarFileLists() throws BuildException {
+
+		for (Iterator jarIter = mJarFileLists.iterator(); jarIter.hasNext();) {
+			FileList fl = (FileList) jarIter.next();
+			Project p = fl.getProject();
+			File srcDir = fl.getDir(p);
+			String[] files = fl.getFiles(p);
+
+			try {
+
+				for (int i = 0; i < files.length; i++) {
+					String fileName = files[i];
+					File src = new File(srcDir, fileName);
+					File dest = new File(mJavaDir, fileName);
+
+					if (mVerbose) 
+						log("Copying JAR file to \"" + bundlePath(dest) + "\"");
+					
+
+					mFileUtils.copyFile(src, dest);
+					bundleProperties.addToClassPath(fileName);
+				}
+			} catch (IOException ex) {
+				throw new BuildException("Cannot copy jar file: " + ex);
+			}
+		}
+	}
+
+	private void processExtraClassPathAttrs() throws BuildException {
+
+		for (Iterator jarIter = mExtraClassPathAttrs.iterator(); jarIter
+				.hasNext();) {
+			File src = (File) jarIter.next();
+			bundleProperties.addToExtraClassPath(src.getPath());
+		}
+	}
+
+	private void processExtraClassPathFileSets() throws BuildException {
+
+		for (Iterator jarIter = mExtraClassPathFileSets.iterator(); jarIter
+				.hasNext();) {
+			FileSet fs = (FileSet) jarIter.next();
+			Project p = fs.getProject();
+			File srcDir = fs.getDir(p);
+			FileScanner ds = fs.getDirectoryScanner(p);
+			fs.setupDirectoryScanner(ds, p);
+			ds.scan();
+
+			String[] files = ds.getIncludedFiles();
+
+			for (int i = 0; i < files.length; i++) {
+				File f = new File(srcDir, files[i]);
+				bundleProperties.addToExtraClassPath(f.getPath());
+			}
+		}
+	}
+
+	private void processExtraClassPathFileLists() throws BuildException {
+
+		for (Iterator jarIter = mExtraClassPathFileLists.iterator(); jarIter
+				.hasNext();) {
+			FileList fl = (FileList) jarIter.next();
+			Project p = fl.getProject();
+			File srcDir = fl.getDir(p);
+			String[] files = fl.getFiles(p);
+
+			for (int i = 0; i < files.length; i++) {
+				File f = new File(srcDir, files[i]);
+				bundleProperties.addToExtraClassPath(f.getPath());
+			}
+		}
+	}
+
+	private void processExecAttrs() throws BuildException {
+
+		try {
+
+			for (Iterator execIter = mExecAttrs.iterator(); execIter.hasNext();) {
+				File src = (File) execIter.next();
+				File dest = new File(mMacOsDir, src.getName());
+
+				if (mVerbose) 
+					log("Copying exec file to \"" + bundlePath(dest) + "\"");
+				
+
+				mFileUtils.copyFile(src, dest);
+				setExecutable(dest);
+			}
+		} catch (IOException ex) {
+			throw new BuildException("Cannot copy exec file: " + ex);
+		}
+	}
+
+	// Methods for copying FileSets into the application bundle ///////////////////////////////
+
+	// Files for the Contents/MacOS directory
+	private void processExecFileSets() {
+		processCopyingFileSets(mExecFileSets, mMacOsDir, true);
+	}
+
+	// Files for the Contents/Resources directory
+	private void processResourceFileSets() {
+		processCopyingFileSets(mResourceFileSets, mResourcesDir, false);
+	}
+
+	// Files for the Contents/Resources/Java directory
+	private void processJavaFileSets() {
+		processCopyingFileSets(mJavaFileSets, mJavaDir, false);
+	}
+
+	private void processCopyingFileSets(List fileSets, File targetdir, boolean setExec) {
+
+		for (Iterator execIter = fileSets.iterator(); execIter.hasNext();) {
+			FileSet fs = (FileSet) execIter.next();
+			Project p = fs.getProject();
+			File srcDir = fs.getDir(p);
+			FileScanner ds = fs.getDirectoryScanner(p);
+			fs.setupDirectoryScanner(ds, p);
+			ds.scan();
+
+			String[] files = ds.getIncludedFiles();
+
+			if (files.length == 0) {
+				// this is probably an error -- warn about it
+				System.err
+						.println("WARNING: fileset for copying from directory "
+								+ srcDir + ": no files found");
+			} else {
+				try {
+					for (int i = 0; i < files.length; i++) {
+						String fileName = files[i];
+						File src = new File(srcDir, fileName);
+						File dest = new File(targetdir, fileName);
+						
+						if (mVerbose) 
+							log("Copying "
+									+ (setExec ? "exec" : "resource")
+									+ " file to \"" + bundlePath(dest) +"\"");
+						
+						mFileUtils.copyFile(src, dest);
+						if (setExec)
+							setExecutable(dest);
+					}
+				} catch (IOException ex) {
+					throw new BuildException("Cannot copy file: " + ex);
+				}
+			}
+		}
+	}
+
+	// Methods for copying FileLists into the application bundle /////////////////////////////
+
+	// Files for the Contents/MacOS directory
+	private void processExecFileLists() throws BuildException {
+		processCopyingFileLists(mExecFileLists, mMacOsDir, true);
+	}
+
+	// Files for the Contents/Resources directory
+	private void processResourceFileLists() throws BuildException {
+		processCopyingFileLists(mResourceFileLists, mResourcesDir, false);
+	}
+
+	// Files for the Contents/Resources/Java directory
+	private void processJavaFileLists() throws BuildException {
+		processCopyingFileLists(mJavaFileLists, mJavaDir, false);
+	}
+
+	private void processCopyingFileLists(List fileLists, File targetDir, boolean setExec) throws BuildException {
+
+		for (Iterator execIter = fileLists.iterator(); execIter.hasNext();) {
+
+			FileList fl = (FileList) execIter.next();
+			Project p = fl.getProject();
+			File srcDir = fl.getDir(p);
+			String[] files = fl.getFiles(p);
+
+			if (files.length == 0) {
+				// this is probably an error -- warn about it
+				System.err.println("WARNING: filelist for copying from directory "
+								+ srcDir + ": no files found");
+			} else {
+				try {
+					for (int i = 0; i < files.length; i++) {
+						String fileName = files[i];
+						File src = new File(srcDir, fileName);
+						File dest = new File(targetDir, fileName);
+						
+						if (mVerbose) 
+							log("Copying "
+									+ (setExec ? "exec" : "resource")
+									+ " file to \"" + bundlePath(dest) +"\"");
+						
+						mFileUtils.copyFile(src, dest);
+						if (setExec)
+							setExecutable(dest);
+					}
+				} catch (IOException ex) {
+					throw new BuildException("Cannot copy jar file: " + ex);
+				}
+			}
+		}
+	}
+
+
+
+	private void copyHelpBooks() {
+
+		for (Iterator itor = mHelpBooks.iterator(); itor.hasNext();) {
+
+			HelpBook helpBook = (HelpBook)itor.next();
+			
+			String folderName = helpBook.getFolderName();
+			String name = helpBook.getName();
+			String locale = helpBook.getLocale();
+			
+			List fileLists = helpBook.getFileLists();
+			List fileSets = helpBook.getFileSets();
+
+
+			File helpBookDir = null;
+			
+			if (locale == null) {
+			
+				// Set the Bundle entries for a nonlocalized Help Book
+				if (folderName != null)
+					bundleProperties.setCFBundleHelpBookFolder(folderName);
+				
+				if (name != null)
+					bundleProperties.setCFBundleHelpBookName(name);
+				
+				// The non-localized Help Book is top level "/Resources"
+				helpBookDir = new File(mResourcesDir, folderName);
+				helpBookDir.mkdir();
+
+				if(mVerbose)
+					log("Creating Help Book at \"" + 
+					                    bundlePath(helpBookDir) + "\"");
+
+				
+			} else {
+
+				// The localized Help Book is "/Resources/locale.lproj"
+
+				File lproj = new File(mResourcesDir, locale + ".lproj");
+				lproj.mkdir();
+				helpBookDir = new File(lproj, folderName);
+				helpBookDir.mkdir();
+
+				if(mVerbose)
+					log("Creating Help Book for \"" + locale +
+					                    "\" at \"" + bundlePath(helpBookDir)  + "\"");
+
+				// Create a local file to override the Bundle settings
+				File infoPList = new File(lproj, "InfoPlist.strings");
+				PrintWriter writer = null;
+				try {
+ 					writer = new PrintWriter(new FileWriter(infoPList));
+       				writer.println("CFBundleHelpBookFolder = \"" + folderName + "\";");
+       				writer.println("CFBundleHelpBookName = \"" + name + "\";");
+       				writer.println("CFBundleName = \"" + bundleProperties.getCFBundleName() + "\";");
+       			} catch (IOException ioe) {
+       				throw new BuildException("IOException in writing Help Book locale: " + locale);
+       			} finally {
+		        	mFileUtils.close(writer);
+		        }
+			}
+
+			// Write the Help Book source files into the bundle
+
+			processCopyingFileSets(fileSets, helpBookDir, false);
+			processCopyingFileLists(fileLists, helpBookDir, false);
+
+		}
+	}
+
+
+
+
+	// Copy the application stub into the bundle
+	// /////////////////////////////////////////////
+
+	private void copyApplicationStub() throws BuildException {
+
+		File newStubFile = new File(mMacOsDir, bundleProperties.getCFBundleExecutable());
+
+		if (mVerbose)
+			log("Copying Java application stub to \"" + bundlePath(newStubFile) + "\"");
+
+		try {
+			mFileUtils.copyFile(mStubFile, newStubFile);
+		} catch (IOException ex) {
+			throw new BuildException("Cannot copy Java Application Stub: " + ex);
+		}
+
+		// Set the permissions on the stub file to executable
+
+		setExecutable(newStubFile);
+	}
+
+	private void writeInfoPlist() throws BuildException {
+		PropertyListWriter listWriter = new PropertyListWriter(bundleProperties);
+		File infoPlist = new File(mContentsDir, "Info.plist");
+
+		listWriter.writeFile(infoPlist);
+		
+		if (mVerbose) 
+			log("Creating \"" + bundlePath(infoPlist) + "\" file");
+
+
+		if (mShowPlist) {
+			try {
+				BufferedReader in = new BufferedReader(new FileReader(infoPlist));
+				String str;
+				while ((str = in.readLine()) != null) 
+					log(str);
+				in.close();
+    		} catch (IOException e) {
+    			throw new BuildException(e);
+    		}			
+		}
+	}
+
+
+	//
+	// Write the PkgInfo file into the application bundle
+	//
+
+	private void writePkgInfo() throws BuildException {
+		File pkgInfo = new File(mContentsDir, "PkgInfo");
+		PrintWriter writer = null;
+
+		try {
+			writer = new PrintWriter(new BufferedWriter(new FileWriter(pkgInfo)));
+			writer.print(bundleProperties.getCFBundlePackageType());
+			writer.println(bundleProperties.getCFBundleSignature());
+			writer.flush();
+		} catch (IOException ex) {
+			throw new BuildException("Cannot create PkgInfo file: " + ex);
+		} finally {
+			mFileUtils.close(writer);
+		}
+	}
+
+	private String bundlePath(File bundleFile) {
+	
+		String rootPath = bundleDir.getAbsolutePath();
+		String thisPath = bundleFile.getAbsolutePath();
+	
+		return thisPath.substring(rootPath.length());
+	
+	}
 }
doclet/Clean_Up_Javadoc.bsh to jars/MacOS/com/apple/cocoa/application/NSMenuItem.java
--- a/doclet/Clean_Up_Javadoc.bsh
+++ b/jars/MacOS/com/apple/cocoa/application/NSMenuItem.java
@@ -1,11 +1,15 @@
-fileDialogReturnValue = GUIUtilities.showVFSFileDialog(view,null,
-	VFSBrowser.CHOOSE_DIRECTORY_DIALOG,false);
-if(fileDialogReturnValue != null)
+package com.apple.cocoa.application;
+
+import com.apple.cocoa.foundation.NSCoding;
+import com.apple.cocoa.foundation.NSObject;
+import com.apple.cocoa.foundation.NSSelector;
+
+public class NSMenuItem extends NSObject implements _NSObsoleteMenuItemProtocol, NSCoding, NSValidatedUserInterfaceItem
 {
-	SearchAndReplace.setSearchString("(<SCRIPT type=\"text/javascript\">(.|\n)*?</SCRIPT>|onload=\".*\")");
-	SearchAndReplace.setReplaceString("");
-	SearchAndReplace.setRegexp(true);
-	SearchAndReplace.setSearchFileSet(new DirectoryListSet(
-		fileDialogReturnValue[0],"*.html",true));
-	SearchAndReplace.replaceAll(view);
+	public NSMenuItem() { }
+	public NSMenuItem(String s1, NSSelector nss, String s2) { }
+	public native void setSubmenu(NSMenu nsm);
+	public native void setTarget(Object o);
+	public NSMenuItem separatorItem() { return null; }
+	public native void setEnabled(boolean b);
 }
installer/mk_filelist.sh to jars/build.properties
--- a/installer/mk_filelist.sh
+++ b/jars/build.properties
@@ -1,74 +1,136 @@
-#!/bin/sh
+# jEdit & plugins directory settings
 
-function print_size() {
-	echo -n "$1: "
-	ls -l `cat installer/$1` | awk 'BEGIN { size=0 } { disk_size+=(int($5/4096+1)*4); size+=$5/1024 } END { print disk_size " " size }'
-}
+# jEdit install directory
+jedit.install.dir=../../build
 
-# This script must be run from the jEdit directory, *not* the installer
-# directory!!!
+# User settings directory
+#jedit.user.home=${user.home}/.jedit
 
-# jedit-program fileset
-echo jedit.jar > installer/jedit-program
-echo jars/LatestVersion.jar >> installer/jedit-program
-echo jars/QuickNotepad.jar >> installer/jedit-program
-echo properties/README.txt >> installer/jedit-program
-echo startup/README.txt >> installer/jedit-program
-echo startup/startup.bsh >> installer/jedit-program
-find modes -name \*.xml >> installer/jedit-program
-echo modes/catalog >> installer/jedit-program
-find doc \( -name \*.txt -o -name \*.png \) >> installer/jedit-program
-find doc/users-guide doc/FAQ doc/news42 doc/tips \( -name \*.html -o -name toc.xml \) >> installer/jedit-program
-echo doc/welcome.html >> installer/jedit-program
+# Top-level of the plugins source tree
+#plugins.srcdir=..
 
-print_size jedit-program
+# Where to place the built jar files
+install.dir=${jedit.install.dir}/jars
 
-# jedit-macros fileset
-find macros -name \*.bsh > installer/jedit-macros
+# Generic plugin build options
 
-print_size jedit-macros
+# Where the plugin source is located
+#src.dir=.
 
-# jedit-api fileset
-find doc/api \( -name \*.html -o -name toc.xml \) > installer/jedit-api
-echo doc/api/stylesheet.css >> installer/jedit-api
-echo doc/api/resources/inherit.gif >> installer/jedit-api
+# The name of the JAR file
+#jar.file=${ant.project.name}.jar
 
-print_size jedit-api
+# The name of the source ZIP file
+#src.zip.file=${ant.project.name}.zip
 
-# jedit-windows fileset
-#echo jeshlstb.dl_ > installer/jedit-windows
-#echo ltslog.dll >> installer/jedit-windows
-#echo jeditsrv.exe >> installer/jedit-windows
-#echo jedit.exe >> installer/jedit-windows
-#echo jedinit.exe >> installer/jedit-windows
-#echo unlaunch.exe >> installer/jedit-windows
-#echo jedinstl.dll >> installer/jedit-windows
-#echo jeservps.dll >> installer/jedit-windows
-#echo jedidiff.exe >> installer/jedit-windows
-#echo jEdit_IE.reg.txt >> installer/jedit-windows
-#
-#print_size jedit-windows
+# The target run when running dist
+#dist.target=dist.nojavadoc
 
-# jedit-mac fileset
-echo jars/MacOS.jar > installer/jedit-mac
+# Where to put temporary build files
+#build.dir=build
 
-print_size jedit-mac
+# Where to put compiled classes
+#build.classes=${build.dir}/classes
 
-# jedit-os2 fileset
-echo jedit.cmd > installer/jedit-os2
+# Where to put generated documentation
+#build.docs=${build.dir}/docs
 
-print_size jedit-os2
+# Where to put generated javadoc
+#build.javadoc=${build.docs}/javadoc
 
-# jedit-source fileset
-#find . \( -name \*.java -o -name \*.props -o -name \*.xml -o -name \*.png -o -name \*.gif \) -print > installer/jedit-source
+# Where to put other files
+#build.extras=${build.dir}/extras
 
-#print_size jedit-source
+# Default compiler flags
 
-rm -f installer/jedit-*.tar.bz2
+# Generate debugging code
+#compiler.debug=off
 
-for file in installer/jedit-*
-do
-	echo "creating $file.tar.bz2"
-	tar cfj $file.tar.bz2 `cat $file`
-	rm $file
-done
+# Gererate optimized code
+#compiler.optimize=off
+
+# Deprecation warnings.
+compiler.deprecation=on
+
+# Verbose compiler messages
+#compiler.verbose=off
+
+# Disable compiler warnings
+#compiler.nowarn=off
+
+# Target JVM version
+#compiler.target=1.4
+
+# Java version of the source files
+#compiler.source=1.4
+
+# List files being compiled
+#compiler.listfiles=no
+
+# Fork the javac compiler
+#compiler.fork=no
+
+# Documentation build options
+
+# What target to use for the docs
+docs-proc.target=xalan
+
+# Stylesheet file to use
+#user-doc.xsl=${build.support}/users-guide.xsl
+
+# Documentation docbook source
+user-doc.xml=${basedir}/users-guide.xml
+
+# Documentation output file
+#user-doc.out=${build.docs}/index.html
+
+# Title for javadoc documentation
+#javadoc.title=${ant.project.name} API
+
+# Where to find the docbook XML catalog file
+#docbook.catalog=C:\\Programme\\DocBook\\XML\\4.2\\docbook.cat
+
+# Where to find the DocBook XML DTD
+docbookx.dtd=C:\\Programme\\DocBook\\XML\\4.2\\docbookx.dtd
+
+# Where to find the docbook stylesheet
+docbook.xsl=C:\\Programme\\DocBook\\XSL\\1.70.1\\
+
+# The name of the xsl stylesheet (without the path info)
+#docbook.xsl.sheet=html/chunk.xsl
+
+# The path to the style sheet to use.
+#docs.style.sheet=${docbook.xsl}/${docbook.xsl.sheet}
+
+# The path to the xsltproc executable
+#xsltproc.executable=C:\\Programme\\xsltproc\\xsltproc.exe
+
+# CVS options
+
+# CVS user name
+#jedit.cvs.user=${user.name}
+
+# CVS_RSH value
+#cvs.rsh=ssh
+
+# CVSROOT
+#cvs.root=:ext:${jedit.cvs.user}@jedit.cvs.sourceforge.net:/cvsroot/jedit
+
+# JUnit options
+
+# Where to find jUnit
+#junit.jar=junit.jar
+
+# The name of the jUnit Testcase
+#junit.testcase=${ant.project.name}TestSuite
+
+# Whether to print a summary
+#junit.printsummary=on
+
+# Whether to halt if an error occurs
+#junit.haltonfailure=off
+
+# Ant Contrib
+
+# Where to find the ant-contrib jar.
+#ant-contrib.jar=ant-contrib-1.0b1.jar
installer/mk_installer.sh to jars/MacOS/com/apple/eio/FileManager.java
--- a/installer/mk_installer.sh
+++ b/jars/MacOS/com/apple/eio/FileManager.java
@@ -1,19 +1,9 @@
-#!/bin/sh
+package com.apple.eio;
 
-# This script must be run from the jEdit directory, *not* the installer
-# directory!!!
+import java.io.IOException;
 
-if [ "$1" = "" ]; then
-  echo "Must specify a command line parameter."
-  exit 1
-fi
-
-# By default, put it in your home directory
-DESTDIR=$HOME
-
-jar cf0m $DESTDIR/jedit${1}install.jar installer/install.mf \
-	installer/install.props \
-	installer/*.html \
-	installer/*.class \
-	installer/jedit-*.tar.bz2 \
-	jedit.1
+public class FileManager {
+	public static void setFileTypeAndCreator(String s, int i1, int i2) throws IOException { }
+	public static int getFileType(String s) throws IOException { return 0; }
+	public static int getFileCreator(String s) throws IOException { return 0; }
+}
installer/mk_source.sh to package-files/linux/jedit
--- a/installer/mk_source.sh
+++ b/package-files/linux/jedit
@@ -1,19 +1,28 @@
 #!/bin/sh
+#
+# Runs jEdit - Programmer's Text Editor.
+#
 
-# Creates the jEdit source tarball.
+# Set jvm heap initial and maximum sizes (in megabytes).
+JAVA_HEAP_INIT_SIZE=32
+JAVA_HEAP_MAX_SIZE=64
 
-if [ "$1" = "" ]; then
-  echo "Must specify a command line parameter."
-  exit 1
+# Find a java installation.
+if [ -z "$JAVA_HOME" ]; then
+	echo "Warning: \$JAVA_HOME environment variable not set! Consider setting it."
+	echo "          Attempting to locate java..."
+	j=`which java 2>/dev/null`
+	if [ -z "$j" ]; then
+		echo "Failed to locate the java virtual machine! Bailing..."
+		exit 1
+	else
+		echo "Found a virtual machine at: $j..."
+		JAVA="$j"
+	fi
+else
+	JAVA="$JAVA_HOME/bin/java"
 fi
 
-ant clean
-rm -f doc/{FAQ,users-guide}/{toc.xml,word-index.xml,*.html}
-
-cd ..
-tar cvfz ~/jedit${1}source.tar.gz `find jEdit -type f \! \( -name Entries \
-	-o -name Root -o -name Entries.Static -o -name Repository \
-	-o -name Baserev \
-	-o -name \*.class -o -name \*.jar -o -name .\*.marks -o -name .xvpics \
-	-o -name \*.exe -o -name \*.dll -o -name \*.dl_ \
-	-o -name .cvsignore -o -name tags -o -name \*.gz \)`
+# Launch application.
+cd /usr/share/jEdit
+exec $JAVA -Xms${JAVA_HEAP_INIT_SIZE}m -Xmx${JAVA_HEAP_MAX_SIZE}m -jar @jar.filename@ $@
jEdit_IE.reg.txt to package-files/linux/slackware/slack-desc
--- a/jEdit_IE.reg.txt
+++ b/package-files/linux/slackware/slack-desc
@@ -1,32 +1,19 @@
-REGEDIT4
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
 
-; This is an example of a Windows registry information file containing
-; registry entries for adding jEdit to the list of applications that
-; is displayed by Internet Explorer for editing the contents of a web page.
-; To use this file, rename the file to jEdit_IE.reg, modify the
-; path to jEdit.exe as indicated below, double-click the entry representing
-; the file in an Explorer window and respond to the prompts accordingly.
-;
-; Internet Explorer version 5.0 or greater is required, as well as
-; as jEdit 4.0 and jEditLauncher 4.0.4 or greater.
-;
-; Direct comments or questions about this file to John Gellene (jgellene@jedit.org).
-;
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit ]
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit \shell]
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit \shell\edit]
-
-; Substitute your path to jEdit.exe for the dummy path shown here.
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit \shell\edit\command]
-@="C:\\Path\\to\\jEdit.exe /1 %1"
-
-; The next entry makes jEdit the helper application for the "View Source"
-; command in Internet Explorer.  The preceding entries are required for
-; this entry to be effective.
-
-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
-@="jEdit"
+      |-----handy-ruler------------------------------------------------------|
+jEdit: jEdit @jedit.version@ (Programmer's Text Editor)
+jEdit: 
+jEdit: jEdit is a mature and well-designed programmer's text editor that
+jEdit: has been in development for over 7 years. While jEdit beats many
+jEdit: expensive development tools for features and ease of use, it is
+jEdit: released as free software with full source code, provided under
+jEdit: the terms of the GNU General Public License.
+jEdit: 
+jEdit: For more information please visit the jEdit website at:
+jEdit:   http://www.jEdit.org 
+jEdit: 
jedit.1 to package-files/linux/jedit.1
--- a/jedit.1
+++ b/package-files/linux/jedit.1
@@ -1,8 +1,8 @@
-.TH JEDIT 1 "April 23, 2003"
+.TH JEDIT 1 "June 14, 2006" jEdit "jEdit - Programmer's Text Editor"
 
 .SH NAME
-.B jedit
-\- Programmer's text editor written in Java
+.B jEdit
+\- Programmer's Text Editor written in Java
 
 .SH SYNOPSIS
 .B "jedit "
@@ -16,17 +16,17 @@
 
 This manual page briefly documents \fBjEdit\fP's command-line parameters.
 Complete documentation can be found by invoking the Help->jEdit Help
-menu item within \fBjEdit\fP.
+menu item within \fBjEdit\fP or by invoking jedit -usage.
 
 \fBjEdit\fP  is a cross-platform text editor written in Java. It
 has an extensive feature set that includes syntax highlighting, auto indent,
 folding, word wrap, abbreviation expansion, multiple clipboards, powerful search
-and replace, and much more.
+and replace and much more.
 
 Furthermore, \fBjEdit\fP is extremely customizable, and extensible, using either macros
 written in the BeanShell scripting language, or plugins written in Java.
 
-\fBjEdit\fP requires Java 2 version 1.3.
+\fBjEdit\fP requires Java 2 version 1.4.
 
 \fBjEdit\fP is released under the GNU General Public License, which can be found in
 the online help.
@@ -145,28 +145,7 @@
 .SH FILES
 
 .TP
-/usr/local/share/jedit/4.2/
-\fBjEdit\fP program files.
-
-.TP
-/usr/local/share/jedit/4.2/doc/
-\fBjEdit\fP online help, which can be viewed from within \fBjEdit\fP using the
-Help->jEdit Help command.
-
-.TP
-/usr/local/share/jedit/4.2/jedit.jar
-The \fBjEdit\fP program.
-
-.TP
-/usr/local/bin/jedit
-Shell script for starting \fBjEdit\fP.
-
-.TP
-/usr/local/man/man1/jedit.1
-This manual page.
-
-.TP
-$HOME/.jedit
+~/.jedit
 Each user who runs \fBjEdit\fP has a settings directory. Its content is documented
 in the "Customizing jEdit" section of the online help.
 
@@ -174,15 +153,10 @@
 .BR java (1)
 
 .SH VERSION
-\fBjEdit\fP 4.2
+\fBjEdit\fP @jedit.version@
 
 .SH BUGS
-See http://www.jedit.org/index.php?page=feedback for bug reporting information.
+See http://www.jEdit.org/index.php?page=feedback for bug reporting information.
 
 .SH WEB
-http://www.jedit.org/
-
-.SH AUTHOR
-This page was written by Krzysztof Krzyzaniak (eloy) <eloy@debian.org> for
-Debian project, with further modifications and additions for \fBjEdit\fP 4.2 by
-Slava Pestov <slava@jedit.org>.
+http://www.jEdit.org/
jedit.cmd to package-files/os2/jedit.cmd
--- a/jedit.cmd
+++ b/package-files/os2/jedit.cmd
@@ -1,73 +1,73 @@
-/* MAINTAINERS: Robert Henschel (os2info@gmx.net)
- *              Christoph vogt (ch.vogt@gmx.net)
- *              Gili Tzabari (junk@bbs.darktech.org)
- * PLATFORM: OS/2, eCS
- * 
- * Used to run JEdit 3.1
- */
-
-
-rc = QueryJavaVersion()
-if (rc = -1) then
-do
-  say "java.exe cannot be found"
-  return -1;
-end
-if (rc = -2) then
-  say "Unexpected response to JAVA -VERSION. Assuming newest version is being used."
-
-arguments = "-settings=%HOME%\.jedit -server=%HOME%\.jedit\server"
-jedit_dir = GetExecPath()
-
-if (iMajor = 1 & iMid <= 1) then
-    'java -classpath %classpath%;'jedit_dir'\jedit.jar org.gjt.sp.jedit.jEdit 'arguments
-  else
-    'java -jar 'jedit_dir'\jedit.jar 'arguments
-
-return 0
-
-
-
-
-
- /*
-  * Java version detector.
-  * Assumes java -version return quoted ("") version number.
-  * Written by os2bird on #netlabs
-  *
-  * Returns -1 on no java or failed to execute
-  *         -2 on invalid java version string.
-  *         version number.
-  */
-QueryJavaVersion: procedure expose iMajor iMid iMinor
-cQueued =  queued();
-'@echo off'
-'java -version 2>&1 | rxqueue /LIFO'
-i = queued();
-do while i > cQueued
-    pull sStr
-    if (pos("JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
-    do
-        do while(queued() > 0) 
-          pull sStrIngore; /* flush input stream */
-        end
-        parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
-        if (iMinor <> '') then
-            return iMajor*100 + iMid * 10 + iMinor;
-         else
-             return -2
-     end
-     i = i - 1;
- end
- return -1;
-
-
-/*
- * Returns the path of the script being executed.
- */
-GetExecPath: procedure
-parse source result
-parse var result 'OS/2 ' dummy result                        /* Get full path of script */
-result=filespec("drive", result) || filespec("path", result) /* strip away filename */
-result=substr(result, 1, length(result)-1)                   /* remove backslash */
+/* MAINTAINERS: Robert Henschel (os2info@gmx.net)
+ *              Christoph vogt (ch.vogt@gmx.net)
+ *              Gili Tzabari (junk@bbs.darktech.org)
+ * PLATFORM: OS/2, eCS
+ * 
+ * Used to run JEdit 3.1
+ */
+
+
+rc = QueryJavaVersion()
+if (rc = -1) then
+do
+  say "java.exe cannot be found"
+  return -1;
+end
+if (rc = -2) then
+  say "Unexpected response to JAVA -VERSION. Assuming newest version is being used."
+
+arguments = "-settings=%HOME%\.jedit -server=%HOME%\.jedit\server"
+jedit_dir = GetExecPath()
+
+if (iMajor = 1 & iMid <= 1) then
+    'java -classpath %classpath%;'jedit_dir'\jedit.jar org.gjt.sp.jedit.jEdit 'arguments
+  else
+    'java -jar 'jedit_dir'\jedit.jar 'arguments
+
+return 0
+
+
+
+
+
+ /*
+  * Java version detector.
+  * Assumes java -version return quoted ("") version number.
+  * Written by os2bird on #netlabs
+  *
+  * Returns -1 on no java or failed to execute
+  *         -2 on invalid java version string.
+  *         version number.
+  */
+QueryJavaVersion: procedure expose iMajor iMid iMinor
+cQueued =  queued();
+'@echo off'
+'java -version 2>&1 | rxqueue /LIFO'
+i = queued();
+do while i > cQueued
+    pull sStr
+    if (pos("JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
+    do
+        do while(queued() > 0) 
+          pull sStrIngore; /* flush input stream */
+        end
+        parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
+        if (iMinor <> '') then
+            return iMajor*100 + iMid * 10 + iMinor;
+         else
+             return -2
+     end
+     i = i - 1;
+ end
+ return -1;
+
+
+/*
+ * Returns the path of the script being executed.
+ */
+GetExecPath: procedure
+parse source result
+parse var result 'OS/2 ' dummy result                        /* Get full path of script */
+result=filespec("drive", result) || filespec("path", result) /* strip away filename */
+result=substr(result, 1, length(result)-1)                   /* remove backslash */
 return result
jedit.spec to package-files/linux/rpm/jedit.spec
--- a/jedit.spec
+++ b/package-files/linux/rpm/jedit.spec
@@ -20,7 +20,7 @@
 Group: Applications/Editors
 Source0: http://prdownloads.sourceforge.net/jedit/jedit41pre9source.tar.gz
 Source1: jedit.sh.in
-URL: http://www.jedit.org
+URL: http://www.jEdit.org
 Vendor: Slava Pestov <slava@jedit.org>
 Packager: Slava Pestov <slava@jedit.org>
 BuildArch: noarch
win32installer.iss to net/sourceforge/jarbundler/Service.java
--- a/win32installer.iss
+++ b/net/sourceforge/jarbundler/Service.java
@@ -1,214 +1,204 @@
-; Inno Setup installer script for jEdit
-; Ollie Rutherfurd <oliver@jedit.org>
-;
-; $Id$
-;
-; For each release:
-;
-; * change JEDIT_HOME to location of jEdit files, if 
-;   not building from source directory.
-; * change AppVerName
-;
-; TODO: create htmlhelp file?
-; TODO: read version number from source
-; TODO: figure out how to generate "jedit.bat" in source dir
-
-#define JEDIT_HOME "." ; Where files for installer are located.
-
-[Setup]
-AppName=jEdit
-AppVerName=jEdit 4.2pre15
-AppVersion=4.2
-AppPublisher=Slava Pestov
-AppPublisherURL=http://www.jedit.org/
-AppSupportURL=http://www.jedit.org/
-AppUpdatesURL=http://www.jedit.org/
-DefaultDirName={pf}\jEdit
-DefaultGroupName=jEdit 4.2
-AllowNoIcons=yes
-Compression=lzma
-SolidCompression=yes
-; using orange icon from: http://www.jedit.org/index.php?page=images
-SetupIconFile={#JEDIT_HOME}\jedit.ico
-LicenseFile={#JEDIT_HOME}\doc\COPYING.txt
-UninstallIconFile={#JEDIT_HOME}\jedit.ico
-ChangesAssociations=yes
-
-[Registry]
-Root: HKCR; Subkey: "*\Shell"; flags: uninsdeletekeyifempty
-Root: HKCR; Subkey: "*\Shell\Open with jEdit"; flags: uninsdeletekey
-Root: HKCR; Subkey: "*\Shell\Open with jEdit\command"; ValueType: string; ValueData: """{code:GetJavaPath}"" -jar ""{app}\jedit.jar"" -reuseview ""%1"""; flags: uninsdeletekey
-
-[Tasks]
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
-Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"
-
-[Files]
-; May need to copy icon file to JEDIT_HOME
-; Using orange icon from: http://www.jedit.org/index.php?page=images
-Source: "{#JEDIT_HOME}\jedit.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: main
-Source: "{#JEDIT_HOME}\jedit.jar"; DestDir: "{app}"; Flags: ignoreversion; Components: main
-Source: "{#JEDIT_HOME}\doc\*"; Excludes: "api\*"; DestDir: "{app}\doc"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\doc\api\*"; DestDir: "{app}\doc\api"; Flags: ignoreversion recursesubdirs; Components: apidoc
-Source: "{#JEDIT_HOME}\jars\*"; DestDir: "{app}\jars"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\macros\*"; DestDir: "{app}\macros"; Flags: ignoreversion recursesubdirs; Components: macros
-Source: "{#JEDIT_HOME}\modes\*"; DestDir: "{app}\modes"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\properties\*"; DestDir: "{app}\properties"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\startup\*"; DestDir: "{app}\startup"; Flags: ignoreversion recursesubdirs; Components: main
-; This batch file can be empty, but it must exist. 
-; I couldn't figure out how generate a file without 
-; an existing one.
-Source: "{#JEDIT_HOME}\jedit.bat"; DestDir: "{win}"; AfterInstall: UpdateBatchFile; Components: batchfile
-
-[Components]
-Name: "main"; Description: "jEdit text editor"; Types: full compact custom; Flags: fixed
-Name: "apidoc"; Description: "API Documentation (for macro and plugin development)"; Types: full custom
-Name: "macros"; Description: "Default set of macros (highly recommended)"; Types: full compact custom
-Name: "batchfile"; Description: "Batch file (for command-line usage)"; Types: full compact custom
-
-[Icons]
-Name: "{group}\jEdit"; IconFilename: "{app}\jedit.ico"; Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""
-Name: "{group}\{cm:UninstallProgram,jEdit}"; Filename: "{uninstallexe}"
-Name: "{userdesktop}\jEdit"; IconFilename: "{app}\jedit.ico"; Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""; Tasks: desktopicon
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\jEdit"; IconFilename: "{app}\jedit.ico"; Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""; Tasks: quicklaunchicon
-
-[Run]
-Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""; Description: "{cm:LaunchProgram,jEdit}"; Flags: shellexec postinstall skipifsilent
-
-[Code]
-var
-	javawExePath: String;
-
-(* looks for JRE version, in Registry *)
-function getJREVersion(): String;
-var
-	javaVersion: String;
-begin
-	javaVersion := '';
-	RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', javaVersion);
-	GetVersionNumbersString(javaVersion, javaVersion);
-	Result := javaVersion;
-end;
-
-(* looks for JDK version, in Registry *)
-function getJDKVersion(): String;
-var
-	jdkVersion: String;
-begin
-	jdkVersion := '';
-	RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion', jdkVersion);
-	GetVersionNumbersString(jdkVersion, jdkVersion);
-	Result := jdkVersion;
-end;
-
-(* Finds path to "javaw.exe" by looking up JDK or JRE locations *)
-(* in the registry.  Ensures the file actually exists.  If none *)
-(* is found, an empty string is returned. 						*)
-function GetJavaPath(Default: String): String;
-var
-	javaVersion: String;
-	javaHome: String;
-	path: String;
-begin
-	path := '';
-	if Length(javawExePath) > 0 then begin
-		Result := javawExePath;
-		path := javawExePath;
-	end;
-
-	// try to find JDK "javaw.exe"
-	javaVersion := getJDKVersion();
-	if (Length(path) = 0) and (Length(javaVersion) > 0) and ((javaVersion) >= '1.3.0') then begin
-		RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion, 'JavaHome', javaHome);
-		path := javaHome + '\bin\' + 'javaw.exe';
-		if FileExists(path) then begin
-			Log('(JDK) found javaw.exe: ' + path);
-			Result := path;
-		end;
-	end;
-
-	// if we didn't find a JDK "javaw.exe", try for a JRE one
-	if Length(path) = 0 then begin
-		Log('(JRE) JDK not found, looking for JRE');
-		javaVersion := getJREVersion();
-		if (Length(javaVersion) > 0) and ((javaVersion) >= '1.3.0') then begin
-			RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion, 'JavaHome', javaHome);
-			path := javaHome + '\bin\' + 'javaw.exe';
-			if FileExists(path) then begin
-				Log('(JRE) found javaw.exe: ' + path);
-				Result := path;
-			end
-		end;
-	end;
-
-	(*
-	// if unable to find Java path in registry, try %JAVA_HOME%
-	// (maybe not a good idea)
-	if Length(path) = 0 then begin
-		javaHome := GetEnv('JAVA_HOME');
-		if Length(javaHome) > 0 then begin
-			path := javaHome + '\bin\' + 'javaw.exe';
-			if FileExists(path) then begin
-				Log('(JAVA_HOME) found java.exe: ' + path);
-				Result := path;
-			end;
-		end;
-	end;
-	*)
-
-	(*
-	// let user browse for Java -- maybe not a good idea
-	if Length(path) = 0 then begin
-		MsgBox('Setup was unable to automatically find "javaw.exe".' + #13  
-			    + #13 +
-			   'If you have a JDK or JRE, version 1.3 or greater, installed' + #13
-			   'please locate "javaw.exe".  If you don''t have a JDK or JRE' + #13
-			   'installed, download and install from http://java.sun.com/ and' + #13
-			   'restart setup.', mbError, MB_OK);
-		Log('unable to find javaw.exe, prompting for path');
-		if GetOpenFileName('Browse for javaw.exe', path, '.', 'EXE files (*.exe)|*.exe', '.exe') then begin
-			Log('(BROWSE): user selected: ' + path);
-			Result := path;
-		end;
-	end;
-	*)
-
-	javawExePath := Result;	// save found value as global
-end;
-
-(* generates a batch file for command-line usage *)
-procedure UpdateBatchFile();
-var
-	appDir: String;
-	batchFile: String;
-	jarPath: String;
-	javaPath: String;
-	winDir: String;
-begin
-	winDir := ExpandConstant('{win}');
-	appDir := ExpandConstant('{app}');
-	javaPath := GetJavaPath('');
-	batchFile := winDir + '\' + 'jedit.bat';
-	jarPath := appDir + '\' + 'jedit.jar';
-	SaveStringToFile(batchFile, javaPath + ' -jar "' + jarPath + '" -reuseview %1 %2 %3 %4 %5 %6 %7 %8 %9', False);
-end;
-
-(* Called on setup startup *)
-function InitializeSetup(): Boolean;
-var
-	javaPath: String;
-begin
-	javaPath := GetJavaPath('');
-	if Length(javaPath) > 0 then begin
-		//MsgBox('Found javaw.exe here: ' + javaPath, mbInformation, MB_OK);
-		Result := true;
-	end
-	else begin
-		MsgBox('Setup unable to find a Java Development Kit or Java Runtime 1.3, or higher, installed.' + #13 +
-			   'You must have installed at least JDK or JRE, 1.3 or higher to continue setup.' + #13 +
-			   'Please install one from http://java.sun.com and restart setup.', mbInformation, MB_OK);
-		Result := false;
-	end;
-end;
-
-// :noTabs=false:tabSize=4:
+package net.sourceforge.jarbundler;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+
+
+/**
+ * Represents an Info.plist Service specifying a service provided by the application.
+ * 
+ * Port Name - The name of the port the application monitors for incoming service requests.
+ * 
+ 
+ * Message - The name of the instance method to invoke for the service. 
+ * In Objective-C, the instance method must be of the form messageName:userData:error:.
+ * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
+ * 
+ * 
+ * Menu Item - The text to add to the Services menu. The value must be unique.
+ * You can use a slash character "/" to specify a submenu. For example, Mail/Send
+ * would appear in the Services Menu as a menu named Mail with an item named Send.
+ * 
+ * 
+ * Send Types - A list of the data type names that can be read by the service.
+ *   The NSPasteboard class description lists several common data types.
+ *
+ *
+ * Return Types - A list of the data type names that can be returned by the service.
+ * The NSPasteboard class description lists several common data types.
+ * You must specify either Return Types, Send Types or both.
+ * 
+ * You must specify either Send Types, Return Types or both.
+ *  
+ * 
+ * Key Equivalent - This attribute is optional. The keyboard equivalent used to invoke
+ * the service menu command. The value has to be a single character. Users invoke this
+ * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
+ * 
+ * 
+ * User Data - This attribute is optional. The value is free choosable and is passed
+ * to the method as second parameter.
+ * 
+ * 
+ * Timeout - This attribute is optional. It indicates the number of milliseconds
+ * Services should wait for a response from the application providing
+ * a service when a respond is required.
+ * 
+ * 
+ * <service portname="jarBundler"
+ *          message="processRequest"
+ *          menuitem="JarBundler/Process Request"
+ *          sendtypes="NSStringPboardType,NSFilenamesPboardType"
+ *          returntypes="NSStringPboardType"
+ *          keyequivalent="p"
+ *          userdata="a string passed to the method"
+ *          timeout="5000" />
+ */
+public class Service {
+	private static final List EMPTYLIST = new ArrayList(0);
+
+	
+	/** The name of the port the application monitors for incoming service requests. */
+	private String portName = null;
+	
+
+	/** 
+
+	 * The name of the instance method to invoke for the service. 
+	 * In Objective-C, the instance method must be of the form messageName:userData:error:.
+
+	 * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
+	 */
+	private String message = null;
+	
+
+	/** 
+
+	 * The text to add to the Services menu. The value must be unique.
+
+	 * You can use a slash character "/" to specify a submenu. For example, Mail/Send
+
+	 * would appear in the Services Menu as a menu named Mail with an item named Send.
+	 */
+	private String menuItem = null;
+	
+	/**
+	 * A list of the data type names that can be read by the service.
+
+	 * The NSPasteboard class description lists several common data types.
+
+	 * You must specify either Send Types, Return Types or both.
+	 */
+	private String[] sendTypes = null;
+	
+
+	/**
+	 * A list of the data type names that can be returned by the service.
+
+	 * The NSPasteboard class description lists several common data types.
+
+	 * You must specify either Return Types, Send Types or both.
+	 */
+	private String[] returnTypes = null;
+	
+
+	/**
+	 * This attribute is optional. The keyboard equivalent used to invoke
+
+	 * the service menu command. The value has to be a single character. Users invoke this
+
+	 * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
+
+	 */
+	private String keyEquivalent = null;
+	
+
+	/** 
+
+	 * This attribute is optional. The value is free choosable and is passed
+
+	 * to the method as second parameter.
+
+	 */
+	private String userData = null;
+	
+
+	/** 
+
+	 * This attribute is optional. It indicates the number of milliseconds
+
+	 * Services should wait for a response from the application providing
+
+	 * a service when a respond is required.
+
+	 */
+	private String timeout = null;
+	
+
+	public void setPortName(String portName) {
+		this.portName = portName;
+	}
+	
+	public String getPortName() {
+		return portName;
+	}
+	
+	public void setMessage(String message) {
+		this.message = message;
+	}
+	
+	public String getMessage() {
+		return message;
+	}
+	
+	public void setMenuItem(String menuItem) {
+		this.menuItem = menuItem;
+
+	}
+	
+	public String getMenuItem() {
+		return menuItem;
+	}
+	
+	public void setSendTypes(String sendTypes) {
+		this.sendTypes = sendTypes.split("[\\s,]");
+	}
+	
+	public List getSendTypes() {
+		return (sendTypes == null) ? EMPTYLIST : Arrays.asList(sendTypes);
+	}
+	
+	public void setReturnTypes(String returnTypes) {
+		this.returnTypes = returnTypes.split("[\\s,]");
+	}
+	
+	public List getReturnTypes() {
+		return (returnTypes == null) ? EMPTYLIST : Arrays.asList(returnTypes);
+	}
+	
+	public void setKeyEquivalent(String keyEquivalent) {
+		this.keyEquivalent = keyEquivalent;
+	}
+	
+	public String getKeyEquivalent() {
+		return keyEquivalent;
+	}
+	
+	public void setUserData(String userData) {
+		this.userData = userData;
+	}
+	
+	public String getUserData() {
+		return userData;
+	}
+	
+	public void setTimeout(String timeout) {
+		this.timeout = timeout;
+	}
+	
+	public String getTimeout() {
+		return timeout;
+	}
+}
<< < 1 2 3 4 5 6 > >> (Page 3 of 6)