diff --git a/apps/pants/build.xml b/apps/pants/build.xml
new file mode 100644
index 000000000..7770dae10
--- /dev/null
+++ b/apps/pants/build.xml
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+You currently have the recommended version installed. A newer
+version will be installed if you continue and this may break some
+applications which depend on this package. Are you sure you want
+to update? [y/N]
+
+
+
+
+
+
+
+ Update aborted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Pants usage:
+
+ ant [--usejikes] [-Dpbuild={name}] [-Dpbuild.version={version}]
+ [-D{property}={value}] [-Dno.prompts=true] build | fetch |
+ help | install | uninstall | update | version
+
+ build Build a pbuild and its dependencies
+ fetch Get package only
+ help Display usage synopsis
+ install Fetch, build and install a pbuild
+ uninstall Uninstall a pbuild
+ update Update pbuild(s) to the latest version(s)
+ version Display pbuild version information
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/pants/pants/build.xml b/apps/pants/pants/build.xml
new file mode 100644
index 000000000..3f8554c07
--- /dev/null
+++ b/apps/pants/pants/build.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/pants/pants/java/src/net/i2p/pants/MatchTask.java b/apps/pants/pants/java/src/net/i2p/pants/MatchTask.java
new file mode 100644
index 000000000..6750e6314
--- /dev/null
+++ b/apps/pants/pants/java/src/net/i2p/pants/MatchTask.java
@@ -0,0 +1,212 @@
+/*
+ * Ports + Ant = Pants, a simple Ant-based package manager
+ *
+ * free (adj.): unencumbered; not under the control of others
+ *
+ * Written by smeghead in 2005 and released into the public domain with no
+ * warranty of any kind, either expressed or implied. It probably won't make
+ * your computer catch on fire, or eat your children, but it might. Use at your
+ * own risk.
+ */
+
+package net.i2p.pants;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+/**
+ *
Custom Ant task for matching the contents of a file against a given
+ * regular expression and writing any matching groups to a file in
+ * java.util.Properties format.
+ *
+ *
Each key in the properties file is named after the number corresponding to
+ * its matching group and its value is the contents of the matching group.
+ *
+ *
Regular expressions passed to this task must conform to the specification
+ * used by Sun's java.util.regex package and thus are mostly
+ * compatible with Perl 5 regular expressions.
+ *
+ *
When calling the match task, the attributes
+ * input, output, and regex are required.
+ *
+ *
Optional boolean attributes may be used to toggle various modes for the
+ * regular expression engine (all are set to false by default):
+ *
+ *
+ *
canonicaleq
Enable canonical equivalence
+ *
caseinsensitive
Enable case-insensitive matching
+ *
comments
Permit whitespace and comments in pattern
+ *
dotall
Enable dotall mode
+ *
multiline
Enable multi-line mode
+ *
unicodecase
Enable Unicode-aware case folding
+ *
unixlines
Enable Unix lines mode
+ *
+ *
There is one additional optional boolean attribute,
+ * failOnNoMatch. If this attribute is true it causes
+ * the match task to throw a
+ * org.apache.tools.ant.BuildException and fail if no matches for
+ * the regular expression are found. The default value is false,
+ * meaning a failed match will simply result in a warning message to
+ * STDERR and an empty (0 byte) output file being
+ * created.
+ *
+ *
+ *
Example
+ *
+ *
Contents of input file letter.txt:
+ *
+ * Dear Alice,
+ *
+ * How's about you and me gettin' together for some anonymous foo action?
+ *
+ * Kisses,
+ * Bob
+ *
Contents of properties file matches.txt written by this task:
+ *
+ * group.0=about you and me gettin' together for some anonymous foo
+ * group.1=you
+ * group.2=me
+ * group.3=foo
+ *
+ *
+ *
These values can be loaded from matches.txt into Ant
+ * properties like so:
+ *
+ * <loadproperties srcFile="matches.txt" />
+ *
+ *
+ *
+ * @author smeghead
+ */
+public class MatchTask extends Task {
+
+ private boolean _failOnNoMatch;
+ private String _inputFile;
+ private String _outputFile;
+ private String _regex;
+ private int _regexFlags;
+
+ public void execute() throws BuildException {
+ int charRead = 0;
+ FileReader fileReader = null;
+ FileWriter fileWriter = null;
+ Matcher matcher = null;
+ Pattern pattern = null;
+ PrintWriter printWriter = null;
+ StringBuffer text = new StringBuffer();
+
+ if (_inputFile == null)
+ throw new BuildException("Error: 'match' task requires 'input' attribute");
+
+ if (_outputFile == null)
+ throw new BuildException("Error: 'match' task requires 'output' attribute");
+
+ if (_regex == null)
+ throw new BuildException("Error: 'match' task requires 'regex' attribute");
+
+ pattern = Pattern.compile(_regex, _regexFlags);
+
+ try {
+ fileReader = new FileReader(_inputFile);
+
+ while ((charRead = fileReader.read()) != -1)
+ text.append((char) charRead);
+
+ fileReader.close();
+ matcher = pattern.matcher(text);
+
+ if (matcher.find()) {
+ printWriter = new PrintWriter(new FileWriter(_outputFile));
+
+ for (int i = 0; i <= matcher.groupCount(); i++)
+ printWriter.println("group." + Integer.toString(i) + "=" + matcher.group(i));
+
+ printWriter.flush();
+ printWriter.close();
+ } else {
+ if (_failOnNoMatch) {
+ throw new BuildException("Error: No matches found in " + _inputFile);
+ } else {
+ System.err.println("Warning: No matches found in " + _inputFile);
+ // Create 0 byte output file.
+ fileWriter = new FileWriter(_outputFile);
+ fileWriter.close();
+ }
+ }
+ } catch (FileNotFoundException fnfe) {
+ throw new BuildException("File " + _inputFile + " not found", fnfe);
+ } catch (IOException ioe) {
+ throw new BuildException(ioe);
+ }
+ }
+
+ public void setCanonicalEq(boolean enableCanonicalEq) {
+ if (enableCanonicalEq)
+ _regexFlags |= Pattern.CANON_EQ;
+ }
+
+ public void setCaseInsensitive(boolean enableCaseInsensitive) {
+ if (enableCaseInsensitive)
+ _regexFlags |= Pattern.CASE_INSENSITIVE;
+ }
+
+ public void setComments(boolean enableComments) {
+ if (enableComments)
+ _regexFlags |= Pattern.COMMENTS;
+ }
+
+ public void setDotall(boolean enableDotall) {
+ if (enableDotall)
+ _regexFlags |= Pattern.DOTALL;
+ }
+
+ public void setFailOnNoMatch(boolean failOnNoMatch) {
+ _failOnNoMatch = failOnNoMatch;
+ }
+
+ public void setInput(String inputFile) {
+ _inputFile = inputFile;
+ }
+
+ public void setMultiLine(boolean enableMultiLine) {
+ if (enableMultiLine)
+ _regexFlags |= Pattern.MULTILINE;
+ }
+
+ public void setOutput(String outputFile) {
+ _outputFile = outputFile;
+ }
+
+ public void setRegex(String regex) {
+ _regex = regex;
+ }
+
+ public void setUnicodeCase(boolean enableUnicodeCase) {
+ if (enableUnicodeCase)
+ _regexFlags |= Pattern.UNICODE_CASE;
+ }
+
+ public void setUnixLines(boolean enableUnixLines) {
+ if (enableUnixLines)
+ _regexFlags |= Pattern.UNIX_LINES;
+ }
+}
diff --git a/apps/pants/pants/java/src/net/i2p/pants/MergeTypedPropertiesTask.java b/apps/pants/pants/java/src/net/i2p/pants/MergeTypedPropertiesTask.java
new file mode 100644
index 000000000..da876f6ab
--- /dev/null
+++ b/apps/pants/pants/java/src/net/i2p/pants/MergeTypedPropertiesTask.java
@@ -0,0 +1,164 @@
+/*
+ * Ports + Ant = Pants, a simple Ant-based package manager
+ *
+ * free (adj.): unencumbered; not under the control of others
+ *
+ * Written by smeghead in 2005 and released into the public domain with no
+ * warranty of any kind, either expressed or implied. It probably won't make
+ * your computer catch on fire, or eat your children, but it might. Use at your
+ * own risk.
+ */
+
+package net.i2p.pants;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+/**
+ *
Custom Ant task for loading properties from a
+ * java.util.Properties file then merging them with lists of
+ * expected properties. When an expected property is found in the properties
+ * file it is set to the value given for it in the file. If an expected property
+ * from a list isn't found in the properties file its value will be set to "" or
+ * "false", depending on the property's data type.
+ *
+ *
A property's data type is determined by membership in one of two lists
+ * which can be passed into an instance of this class: a string-typed list and a
+ * boolean-typed list. Values for string-typed properties may be any valid
+ * string accepted by java.util.Properties, and values for
+ * boolean-typed properties must be either "false" or "true".
+ *
+ *
Lists holding more than one property must be comma-delimited.
+ *
+ *
The output of this class is a temporary java.util.Properties
+ * file which is suitable for reading by the standard Ant
+ * loadproperties task.
+ *
+ *
Note that if any properties in the given lists have already been defined
+ * before the mergetypedproperties task is called, their values
+ * cannot be changed since Ant properties are immutable.
+ *
+ *
Example
+ *
+ *
Contents of a properties file my.properties:
+ *
+ * some.property.exists=true
+ * hasValue=false
+ * some.property=this is a value
+ * property0=bork bork
+ * propertyX=this property wasn't passed in a list
+ *
+ *
+ *
Ant mergetypedproperties task and a taskdef
+ * defining it:
+ *
Contents of properties file merged-properties.temp written by this task:
+ *
+ * some.property.exists=true
+ * is.valid=false
+ * hasValue=false
+ * some.property=this is a value
+ * another.property=
+ * property0=bork bork
+ * propertyX=this property wasn't passed in a list
+ *
+ *
+ *
If you don't want this task's output to include properties which weren't
+ * in the lists of expected properties, you can set the attribute
+ * onlyExpected to true. In the example, this would
+ * result in the file merged-properties.temp containing only the
+ * following properties:
+ *
+ * some.property.exists=true
+ * is.valid=false
+ * hasValue=false
+ * some.property=this is a value
+ * another.property=
+ * property0=bork bork
+ *
+ *
+ *
+ * @author smeghead
+ */
+public class MergeTypedPropertiesTask extends Task {
+
+ private String _booleanList = "";
+ private String _inputFile;
+ private boolean _onlyExpected;
+ private String _outputFile;
+ private Properties _propertiesIn = new Properties();
+ private Properties _propertiesOut = new Properties();
+ private String _stringList = "";
+
+ public void execute() throws BuildException {
+ StringTokenizer strtokBoolean = new StringTokenizer(_booleanList, ",");
+ StringTokenizer strtokString = new StringTokenizer(_stringList, ",");
+ String property = "";
+
+ if (_inputFile == null)
+ throw new BuildException("Error: 'mergetypedproperties' task requires 'input' attribute");
+
+ if (_outputFile == null)
+ throw new BuildException("Error: 'mergetypedproperties' task requires 'output' attribute");
+
+ // Add some type-checking on the list elements
+
+ try {
+ _propertiesIn.load(new FileInputStream(_inputFile));
+
+ while (strtokBoolean.hasMoreTokens())
+ _propertiesOut.setProperty(strtokBoolean.nextToken().trim(), "false");
+
+ while (strtokString.hasMoreTokens())
+ _propertiesOut.setProperty(strtokString.nextToken().trim(), "");
+
+ for (Enumeration enum = _propertiesIn.elements(); enum.hasMoreElements(); ) {
+ property = (String) enum.nextElement();
+
+ if (_onlyExpected && !_propertiesOut.containsKey(property))
+ continue;
+ else
+ _propertiesOut.setProperty(property, _propertiesIn.getProperty(property));
+ }
+
+ _propertiesOut.store(new FileOutputStream(_inputFile), "This is a temporary file. It is safe to delete it.");
+ } catch (IOException ioe) {
+ throw new BuildException(ioe);
+ }
+ }
+
+ public void setBooleanList(String booleanList) {
+ _booleanList = booleanList;
+ }
+
+ public void setInput(String inputFile) {
+ _inputFile = inputFile;
+ }
+
+ public void setOnlyExpected(boolean onlyExpected) {
+ _onlyExpected = onlyExpected;
+ }
+
+ public void setOutput(String outputFile) {
+ _outputFile = outputFile;
+ }
+
+ public void setStringList(String stringList) {
+ _stringList = stringList;
+ }
+}
diff --git a/apps/pants/pants/resources/README b/apps/pants/pants/resources/README
new file mode 100644
index 000000000..a11829f71
--- /dev/null
+++ b/apps/pants/pants/resources/README
@@ -0,0 +1,116 @@
+What is Pants?
+--------------
+
+ Pants is an Apache Ant-based package manager for the management of 3rd party
+ dependencies in Java development projects. It's loosely modeled after
+ FreeBSD's Ports and Gentoo Linux's Portage, with two major differences:
+
+ * Pants isn't intended for system-wide package management. It's tailored for
+ per-project 3rd party package management. You will typically have one
+ Pants repository per project and each repository will be located somewhere
+ under your project's root directory. If you're familiar with Ports or
+ Portage, a Pants repository is roughly analogous to /usr/ports or
+ /usr/portage.
+
+ * Pants is extremely portable. It goes anywhere Apache Ant goes.
+
+ Pants takes a modular approach to the standard Ant buildfile, breaking it
+ into 3 files for functionality and convenience:
+
+ 1. The Pants public interface, pants/build.xml, provides a single consistent
+ way to access and manipulate dependency packages and relieves some of the
+ developer's burden by providing implementations for some frequently-used
+ and complex Ant operations.
+
+ 2. pbuild.xml is a specially-structured and slimmed-down Ant buildfile in
+ which you implement custom handling for a package your project depends
+ on. This is known as the "pbuild" and is roughly analogous to a FreeBSD
+ port or a Gentoo ebuild. A fairly explanatory template for pbuilds,
+ pbuild.template.xml, is provided.
+
+ 3. pbuild.properties contains those properties for a specific pbuild which
+ are most likely to change over time. It uses the java.util.Properties
+ format which is more human-friendly for hand-editing than Ant/XML. A
+ fairly explanatory template, pbuild.template.properties, is provided.
+
+ There is one more file that completes the Pants system: the metadata file
+ pants/world is a database for keeping track of all packages managed by Pants
+ for your project.
+
+ Pants automatically handles versioning for your project's dependency
+ packages and keeps track of their recommended versions, currently used
+ versions, and latest available versions. This makes it extremely simple for
+ project developers to switch back and forth between different versions of a
+ dependency, and makes it just as easy to update a dependency. You can even
+ update all your project's Pants-managed packages with a single command.
+
+ Pbuilds are designed to automatically handle the downloading, building,
+ repackaging and deployment of source archives, binary archives, and CVS
+ sources, all in a manner that's completely transparent to the project
+ developer. Pbuilds currently support tar + gzip, tar + bzip2, and zip
+ archives.
+
+ Because it is based on Ant, Pants integrates very well with Ant buildfiles
+ and will fit easily into your project's Ant build framework. However, its
+ interface is simple enough to be called just as easily by more traditional
+ build systems such as GNU Make.
+
+
+Why Should I Use Pants?
+-----------------------
+
+ There are many applications for Pants, but a few use cases should best serve
+ to illustrate its usefulness:
+
+ 1. You have a project that you ship with several 3rd party libraries but the
+ versions you're using are stale. With a single command, Pants can
+ automatically discover the latest release versions for all of these, then
+ download, build, and place the fresh libraries where your project's main
+ build system expects them to be at build time.
+
+ 2. You want to test multiple versions of a 3rd party library against your
+ project. Pants only requires you to issue a single command to switch
+ library versions, so can spend more time testing and less time hunting
+ packages down, unpackaging them, symlinking, etc.
+
+ 3. Pants is public domain. You can ship it with your project if you need to
+ without having to worry about petty intellectual property or licensing
+ issues.
+
+
+Minimum Requirements
+--------------------
+
+ * Apache Ant 1.6.2 or higher is recommended
+
+ * Any Java runtime and operating system that will run Ant
+
+
+Installation
+------------
+
+ Not finished yet.
+
+
+Why the Silly Name?
+-------------------
+
+ Ports + Ant = Pants. Any other explanation is purely a product of your
+ twisted imagination.
+
+
+Miscellaneous Pocket Fluff
+--------------------------
+
+ Author: smeghead
+
+ License: No license necessary. This work is released into the public domain.
+
+ Price: Free! But if you really appreciate Pants, or you're just a sicko,
+ please send me a picture of your worst or most unusual pair of
+ pants so I can add it to the Whirling Hall of Pants on pants.i2p,
+ the official Pants eepsite (that's an anonymous website on I2P--see
+ http://www.i2p.net for more information).
+
+
+$Id$
diff --git a/apps/pants/pants/resources/pbuild.template.properties b/apps/pants/pants/resources/pbuild.template.properties
new file mode 100644
index 000000000..b346816b6
--- /dev/null
+++ b/apps/pants/pants/resources/pbuild.template.properties
@@ -0,0 +1,110 @@
+# The properties defined in this file can be overridden on the command line by
+# passing them in as parameters like so:
+#
+# ant -Dpbuild=myapp -Dversion.recommended=2.0.5 install
+#
+# *** DO NOT DEFINE A PROPERTY BUT LEAVE ITS VALUE BLANK. PANTS WILL BREAK! ***
+
+
+# Recommended Package Version
+#
+# Set this property's value to the package version you want Pants to use for the
+# pbuild by default. The version string specified must match the version
+# substring from the package's filename if the filename contains a version
+# number.
+#
+# Comment out this property to force use of the latest available version.
+#
+# If the pbuild is CVS-based rather than package-based, this property must be
+# set to 'CVS'.
+#
+# Example:
+#
+# version.recommended=2.0.4
+
+
+# Latest Package Version
+#
+# There are currently two ways to inform Pants of the latest version number for
+# your package.
+#
+# Method 1: Manually modify the property 'version.latest' to reflect the latest
+# version number.
+#
+# Method 2: Provide a URL for a page on the package's website and a regular
+# expression with which to parse it in order to extract the version
+# number of the latest available package. For this you must define the
+# properties 'version.latest.find.url', 'version.latest.find.regex',
+# and any regular expression engine mode flags needed. The pattern
+# defined must have exactly one capturing group to encapsulate the
+# version string, otherwise the operation will fail.
+#
+# You may use both methods, in which case the version number specified by Method
+# 1 will be used as the fallback value if Method 2 for some reason is
+# unsuccessful.
+#
+# If neither method is enabled here or they fail to return a valid value to
+# Pants, the 'ant update' operation for this pbuild may exit ungracefully unless
+# the pbuild is CVS-based (none of the version.latest.* properties are used by
+# CVS-based pbuilds).
+#
+# The following is a list of boolean properties for optional mode flags used by
+# the regular expression engine. Set a value of "true" for any you wish to use.
+#
+# version.latest.find.regex.canonicaleq - Enable canonical equivalence
+# version.latest.find.regex.caseinsensitive - Enable case-insensitive matching
+# version.latest.find.regex.comments - Permit whitespace and comments
+# version.latest.find.regex.dotall - Enable dotall mode
+# version.latest.find.regex.multiline - Enable multi-line mode
+# version.latest.find.regex.unicodecase - Enable Unicode-aware case folding
+# version.latest.find.regex.unixlines - Enable Unix lines mode
+#
+# Examples:
+#
+# version.latest=5.1.2
+# version.latest.find.url=http://sourceforge.net/projects/jetty/
+# version.latest.find.regex=Stable.+?Jetty-(.+?)
+
+
+# Package URL
+#
+# Specify the URL pointing to the pbuild's package from here. The token
+# '${pbuild.version}' if used will automatically be expanded to the appropriate
+# version string.
+#
+# The package URL property is not used by CVS-based pbuilds.
+#
+# Examples:
+#
+# package.url=ftp://borkbork.se/bork-${pbuild.version}.tar.bz2
+# package.url=http://bork.borkbork.se/bork-${pbuild.version}-src.tar.gz
+
+
+# CVS Repository
+#
+# The values expected for CVS properties here are the same as those expected by
+# their corresponding Apache Ant 'Cvs' task attributes. For details see:
+#
+# http://ant.apache.org/manual/CoreTasks/cvs.html
+#
+# Not all of the 'Cvs' task's attributes have corresponding Pants properties.
+# The following is a list of all valid CVS properties for Pants (and their
+# default values if applicable):
+#
+# cvs.compression.level
+# cvs.date
+# cvs.package
+# cvs.passfile=~/.cvspass
+# cvs.port=2401
+# cvs.root
+# cvs.rsh
+# cvs.tag
+#
+# Of these, only the 'cvs.root' property is required for CVS-based pbuilds.
+#
+# Examples:
+#
+# cvs.root=:pserver:anoncvs@borkbork.se:/cvsroot/bork
+# cvs.rsh=ssh
+# cvs.package=borkbork
+
diff --git a/apps/pants/pants/resources/pbuild.template.xml b/apps/pants/pants/resources/pbuild.template.xml
new file mode 100644
index 000000000..17017f85b
--- /dev/null
+++ b/apps/pants/pants/resources/pbuild.template.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/pants/pbuilds/fortuna/pbuild.properties b/apps/pants/pbuilds/fortuna/pbuild.properties
new file mode 100644
index 000000000..acfc8b4fa
--- /dev/null
+++ b/apps/pants/pbuilds/fortuna/pbuild.properties
@@ -0,0 +1,112 @@
+# The properties defined in this file can be overridden on the command line by
+# passing them in as parameters like so:
+#
+# ant -Dpbuild=myapp -Dversion.recommended=2.0.5 install
+#
+# *** DO NOT DEFINE A PROPERTY BUT LEAVE ITS VALUE BLANK. PANTS WILL BREAK! ***
+
+
+# Recommended Package Version
+#
+# Set this property's value to the package version you want Pants to use for the
+# pbuild by default. The version string specified must match the version
+# substring from the package's filename if the filename contains a version
+# number.
+#
+# Comment out this property to force use of the latest available version.
+#
+# If the pbuild is CVS-based rather than package-based, this property must be
+# set to 'CVS'.
+#
+# Example:
+#
+# version.recommended=2.0.4
+version.recommended=CVS
+
+# Latest Package Version
+#
+# There are currently two ways to inform Pants of the latest version number for
+# your package.
+#
+# Method 1: Manually modify the property 'version.latest' to reflect the latest
+# version number.
+#
+# Method 2: Provide a URL for a page on the package's website and a regular
+# expression with which to parse it in order to extract the version
+# number of the latest available package. For this you must define the
+# properties 'version.latest.find.url', 'version.latest.find.regex',
+# and any regular expression engine mode flags needed. The pattern
+# defined must have exactly one capturing group to encapsulate the
+# version string, otherwise the operation will fail.
+#
+# You may use both methods, in which case the version number specified by Method
+# 1 will be used as the fallback value if Method 2 for some reason is
+# unsuccessful.
+#
+# If neither method is enabled here or they fail to return a valid value to
+# Pants, the 'ant update' operation for this pbuild may exit ungracefully unless
+# the pbuild is CVS-based (none of the version.latest.* properties are used by
+# CVS-based pbuilds).
+#
+# The following is a list of boolean properties for optional mode flags used by
+# the regular expression engine. Set a value of "true" for any you wish to use.
+#
+# version.latest.find.regex.canonicaleq - Enable canonical equivalence
+# version.latest.find.regex.caseinsensitive - Enable case-insensitive matching
+# version.latest.find.regex.comments - Permit whitespace and comments
+# version.latest.find.regex.dotall - Enable dotall mode
+# version.latest.find.regex.multiline - Enable multi-line mode
+# version.latest.find.regex.unicodecase - Enable Unicode-aware case folding
+# version.latest.find.regex.unixlines - Enable Unix lines mode
+#
+# Examples:
+#
+# version.latest=5.1.2
+# version.latest.find.url=http://sourceforge.net/projects/jetty/
+# version.latest.find.regex=Stable.+?Jetty-(.+?)
+
+
+# Package URL
+#
+# Specify the URL pointing to the pbuild's package from here. The token
+# '${pbuild.version}' if used will automatically be expanded to the appropriate
+# version string.
+#
+# The package URL property is not used by CVS-based pbuilds.
+#
+# Examples:
+#
+# package.url=ftp://borkbork.se/bork-${pbuild.version}.tar.bz2
+# package.url=http://bork.borkbork.se/bork-${pbuild.version}-src.tar.gz
+
+
+# CVS Repository
+#
+# The values expected for CVS properties here are the same as those expected by
+# their corresponding Apache Ant 'Cvs' task attributes. For details see:
+#
+# http://ant.apache.org/manual/CoreTasks/cvs.html
+#
+# Not all of the 'Cvs' task's attributes have corresponding Pants properties.
+# The following is a list of all valid CVS properties for Pants (and their
+# default values if applicable):
+#
+# cvs.compression.level
+# cvs.date
+# cvs.package
+# cvs.passfile=~/.cvspass
+# cvs.port=2401
+# cvs.root
+# cvs.rsh
+# cvs.tag
+#
+# Of these, only the 'cvs.root' property is required for CVS-based pbuilds.
+#
+# Examples:
+#
+# cvs.root=:pserver:anoncvs@borkbork.se:/cvsroot/bork
+# cvs.rsh=ssh
+# cvs.package=borkbork
+cvs.root=:ext:anoncvs@savannah.gnu.org:/cvsroot/gnu-crypto
+cvs.rsh=ssh
+cvs.package=gnu-crypto
diff --git a/apps/pants/pbuilds/fortuna/pbuild.xml b/apps/pants/pbuilds/fortuna/pbuild.xml
new file mode 100644
index 000000000..02a3e8ce5
--- /dev/null
+++ b/apps/pants/pbuilds/fortuna/pbuild.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/pants/pbuilds/jetty/pbuild.properties b/apps/pants/pbuilds/jetty/pbuild.properties
new file mode 100644
index 000000000..c377e1299
--- /dev/null
+++ b/apps/pants/pbuilds/jetty/pbuild.properties
@@ -0,0 +1,112 @@
+# The properties defined in this file can be overridden on the command line by
+# passing them in as parameters like so:
+#
+# ant -Dpbuild=myapp -Dversion.recommended=2.0.5 install
+#
+# *** DO NOT DEFINE A PROPERTY BUT LEAVE ITS VALUE BLANK. PANTS WILL BREAK! ***
+
+
+# Recommended Package Version
+#
+# Set this property's value to the package version you want Pants to use for the
+# pbuild by default. The version string specified must match the version
+# substring from the package's filename if the filename contains a version
+# number.
+#
+# Comment out this property to force use of the latest available version.
+#
+# If the pbuild is CVS-based rather than package-based, this property must be
+# set to 'CVS'.
+#
+# Example:
+#
+# version.recommended=2.0.4
+version.recommended=5.1.2
+
+# Latest Package Version
+#
+# There are currently two ways to inform Pants of the latest version number for
+# your package.
+#
+# Method 1: Manually modify the property 'version.latest' to reflect the latest
+# version number.
+#
+# Method 2: Provide a URL for a page on the package's website and a regular
+# expression with which to parse it in order to extract the version
+# number of the latest available package. For this you must define the
+# properties 'version.latest.find.url', 'version.latest.find.regex',
+# and any regular expression engine mode flags needed. The pattern
+# defined must have exactly one capturing group to encapsulate the
+# version string, otherwise the operation will fail.
+#
+# You may use both methods, in which case the version number specified by Method
+# 1 will be used as the fallback value if Method 2 for some reason is
+# unsuccessful.
+#
+# If neither method is enabled here or they fail to return a valid value to
+# Pants, the 'ant update' operation for this pbuild may exit ungracefully unless
+# the pbuild is CVS-based (none of the version.latest.* properties are used by
+# CVS-based pbuilds).
+#
+# The following is a list of boolean properties for optional mode flags used by
+# the regular expression engine. Set a value of "true" for any you wish to use.
+#
+# version.latest.find.regex.canonicaleq - Enable canonical equivalence
+# version.latest.find.regex.caseinsensitive - Enable case-insensitive matching
+# version.latest.find.regex.comments - Permit whitespace and comments
+# version.latest.find.regex.dotall - Enable dotall mode
+# version.latest.find.regex.multiline - Enable multi-line mode
+# version.latest.find.regex.unicodecase - Enable Unicode-aware case folding
+# version.latest.find.regex.unixlines - Enable Unix lines mode
+#
+# Examples:
+#
+# version.latest=5.1.2
+# version.latest.find.url=http://sourceforge.net/projects/jetty/
+# version.latest.find.regex=Stable.+?Jetty-(.+?)
+version.latest=5.1.2
+version.latest.find.url=http://sourceforge.net/projects/jetty/
+version.latest.find.regex=Stable.+?Jetty-(.+?)
+
+# Package URL
+#
+# Specify the URL pointing to the pbuild's package from here. The token
+# '${pbuild.version}' if used will automatically be expanded to the appropriate
+# version string.
+#
+# The package URL property is not used by CVS-based pbuilds.
+#
+# Examples:
+#
+# package.url=ftp://borkbork.se/bork-${pbuild.version}.tar.bz2
+# package.url=http://bork.borkbork.se/bork-${pbuild.version}-src.tar.gz
+package.url=http://mesh.dl.sourceforge.net/sourceforge/jetty/jetty-${pbuild.version}.zip
+
+# CVS Repository
+#
+# The values expected for CVS properties here are the same as those expected by
+# their corresponding Apache Ant 'Cvs' task attributes. For details see:
+#
+# http://ant.apache.org/manual/CoreTasks/cvs.html
+#
+# Not all of the 'Cvs' task's attributes have corresponding Pants properties.
+# The following is a list of all valid CVS properties for Pants (and their
+# default values if applicable):
+#
+# cvs.compression.level
+# cvs.date
+# cvs.package
+# cvs.passfile=~/.cvspass
+# cvs.port=2401
+# cvs.root
+# cvs.rsh
+# cvs.tag
+#
+# Of these, only the 'cvs.root' property is required for CVS-based pbuilds.
+#
+# Examples:
+#
+# cvs.root=:pserver:anoncvs@borkbork.se:/cvsroot/bork
+# cvs.rsh=ssh
+# cvs.package=borkbork
+
diff --git a/apps/pants/pbuilds/jetty/pbuild.xml b/apps/pants/pbuilds/jetty/pbuild.xml
new file mode 100644
index 000000000..f10313512
--- /dev/null
+++ b/apps/pants/pbuilds/jetty/pbuild.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/pants/world b/apps/pants/world
new file mode 100644
index 000000000..9d4335e57
--- /dev/null
+++ b/apps/pants/world
@@ -0,0 +1,2 @@
+version.using.fortuna=CVS
+version.using.jetty=5.1.2
diff --git a/history.txt b/history.txt
index b60dffdc4..9e464e304 100644
--- a/history.txt
+++ b/history.txt
@@ -1,4 +1,10 @@
-$Id: history.txt,v 1.139 2005/02/07 05:04:23 jrandom Exp $
+$Id: history.txt,v 1.140 2005/02/09 14:28:29 duck Exp $
+
+2005-02-10 smeghead
+ * Initial check-in of Pants, a new utility to help us manage our 3rd-party
+ dependencies (Fortuna, Jetty, Java Service Wrapper, etc.). Some parts of
+ Pants are still non-functional at this time so don't mess with it yet
+ unless you want to potentially mangle your working copy of CVS.
2005-02-09 duck
* Allow an unneeded newline in the SAM client connection without