jvanzyl 2002/11/24 10:46:01
Modified: src/java/org/apache/maven CreateDependencyClasspath.java
DVSLPathTool.java MavenTool.java MavenUtils.java
src/java/org/apache/maven/ant MavenTask.java
src/java/org/apache/maven/app Maven.java PluginManager.java
ProjectVerifier.java
src/java/org/apache/maven/cli App.java CLIManager.java
src/java/org/apache/maven/jelly BaseTagLibrary.java
JellyPropsHandler.java JellyUtils.java
MavenExpressionFactory.java MavenJellyContext.java
src/java/org/apache/maven/jelly/tags LazyAttainGoalTag.java
MavenJeezTagLibrary.java
src/java/org/apache/maven/jelly/tags/project AddPathTag.java
DependencyResolver.java MavenTag.java
ReactorTag.java SnapshotSignature.java
src/java/org/apache/maven/project BaseObject.java
Project.java Resource.java Resources.java
TestResource.java UnitTest.java
src/java/org/apache/maven/repository DefaultJarArtifact.java
GenericArtifact.java
src/java/org/apache/maven/util Expand.java HttpUtils.java
MD5Sum.java
Log:
o optimizing imports using my new IDEA toy :-)
Revision Changes Path
1.15 +6 -9
jakarta-turbine-maven/src/java/org/apache/maven/CreateDependencyClasspath.java
Index: CreateDependencyClasspath.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/CreateDependencyClasspath.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- CreateDependencyClasspath.java 24 Nov 2002 17:59:04 -0000 1.14
+++ CreateDependencyClasspath.java 24 Nov 2002 18:45:59 -0000 1.15
@@ -55,20 +55,17 @@
*
* ====================================================================
*/
-import java.io.File;
-
-import java.util.Iterator;
-
-import org.apache.maven.MavenConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.project.Dependency;
import org.apache.maven.project.Project;
-import org.apache.maven.repository.DefaultArtifactFactory;
import org.apache.maven.repository.Artifact;
+import org.apache.maven.repository.DefaultArtifactFactory;
import org.apache.tools.ant.types.Path;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.File;
+import java.util.Iterator;
/**
* Take a valid MavenJellyContext which contains references to the POM, ant
1.14 +60 -60
jakarta-turbine-maven/src/java/org/apache/maven/DVSLPathTool.java
Index: DVSLPathTool.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/DVSLPathTool.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DVSLPathTool.java 12 Sep 2002 23:44:04 -0000 1.13
+++ DVSLPathTool.java 24 Nov 2002 18:45:59 -0000 1.14
@@ -56,25 +56,25 @@
* ====================================================================
*/
-import java.io.IOException;
-import java.io.File;
-
-import org.apache.commons.lang.StringUtils;
-import jdepend.framework.JavaSourceFileParser;
import jdepend.framework.JavaClass;
+import jdepend.framework.JavaSourceFileParser;
+import org.apache.commons.lang.StringUtils;
-/**
+import java.io.File;
+import java.io.IOException;
+
+/**
* Path tool for use with the DVSL toolbox. This class contains static
* methods to assist in determining path-related information such as
* relative paths.
- *
+ *
* @author <a href="mailto:[EMAIL PROTECTED]">Pete Kazmier</a>
* @author <a href="[EMAIL PROTECTED]">Vincent Massol</a>
* @version $Id$
*/
public class DVSLPathTool
{
- /**
+ /**
* Determines the relative path of a filename from a base directory.
* This method is useful in building relative links within pages of
* a web site. It provides similar functionality to Anakia's
@@ -85,7 +85,7 @@
* link in a web page (again mimicking Anakia's behavior).
* <p/>
* This method is thread-safe.
- *
+ *
* @param basedir The base directory.
* @param filename The filename that is relative to the base
* directory.
@@ -95,14 +95,14 @@
* the base directory, <code>basedir</code> is null or zero-length,
* or <code>filename</code> is null or zero-length.
*/
- public static final String getRelativePath(String basedir, String filename)
+ public static final String getRelativePath( String basedir, String filename )
{
/*
* Verify the arguments and make sure the filename is relative
* to the base directory.
*/
- if (basedir == null || basedir.length() == 0 || filename == null
- || filename.length() == 0 || !filename.startsWith(basedir))
+ if ( basedir == null || basedir.length() == 0 || filename == null
+ || filename.length() == 0 || !filename.startsWith( basedir ) )
{
return "";
}
@@ -112,21 +112,21 @@
* that is being used, then strip that off the end of both the
* base directory and filename.
*/
- String separator = determineSeparator(filename);
- basedir = StringUtils.chompLast(basedir, separator);
- filename = StringUtils.chompLast(filename, separator);
+ String separator = determineSeparator( filename );
+ basedir = StringUtils.chompLast( basedir, separator );
+ filename = StringUtils.chompLast( filename, separator );
/*
* Remove the base directory from the filename to end up with a
* relative filename (relative to the base directory). This
* filename is then used to determine the relative path.
*/
- String relativeFilename = filename.substring(basedir.length());
+ String relativeFilename = filename.substring( basedir.length() );
- return determineRelativePath(relativeFilename, separator);
+ return determineRelativePath( relativeFilename, separator );
}
- /**
+ /**
* Determines the relative path of a filename. This method is
* useful in building relative links within pages of a web site. It
* provides similar functionality to Anakia's
@@ -137,15 +137,15 @@
* link in a web page (again mimicking Anakia's behavior).
* <p/>
* This method is thread-safe.
- *
+ *
* @param filename The filename to be parsed.
* @return The relative path of the filename. This value is not
* terminated with a forward slash. A zero-length string is
* returned if: <code>filename</code> is null or zero-length.
*/
- public static final String getRelativePath(String filename)
+ public static final String getRelativePath( String filename )
{
- if (filename == null || filename.length() == 0)
+ if ( filename == null || filename.length() == 0 )
{
return "";
}
@@ -156,40 +156,40 @@
* filename. Then, if the filename doesn't begin with a
* separator, add one.
*/
- String separator = determineSeparator(filename);
- filename = StringUtils.chompLast(filename, separator);
- if (!filename.startsWith(separator))
+ String separator = determineSeparator( filename );
+ filename = StringUtils.chompLast( filename, separator );
+ if ( !filename.startsWith( separator ) )
{
filename = separator + filename;
}
- return determineRelativePath(filename, separator);
+ return determineRelativePath( filename, separator );
}
- /**
+ /**
* Determines the directory component of a filename. This is useful
* within DVSL templates when used in conjunction with the DVSL's
* <code>$context.getAppValue("infilename")</code> to get the
* current directory that is currently being processed.
* <p/>
* This method is thread-safe.
- *
+ *
* @param filename The filename to be parsed.
* @return The directory portion of the <code>filename</code>. If
* the filename does not contain a directory component, "." is
* returned.
*/
- public static final String getDirectoryComponent(String filename)
+ public static final String getDirectoryComponent( String filename )
{
- if (filename == null || filename.length() == 0)
+ if ( filename == null || filename.length() == 0 )
{
return "";
}
- String separator = determineSeparator(filename);
- String directory = StringUtils.chomp(filename, separator);
+ String separator = determineSeparator( filename );
+ String directory = StringUtils.chomp( filename, separator );
- if (filename.equals(directory))
+ if ( filename.equals( directory ) )
{
return ".";
}
@@ -199,21 +199,21 @@
}
}
- /**
+ /**
* Determines the relative path of a filename. For each separator
* within the filename (except the leading if present), append the
* "../" string to the return value.
- *
+ *
* @param filename The filename to parse.
* @param separator The separator used within the filename.
* @return The relative path of the filename. This value is not
* terminated with a forward slash. A zero-length string is
* returned if: the filename is zero-length.
*/
- private static final String determineRelativePath(String filename,
- String separator)
+ private static final String determineRelativePath( String filename,
+ String separator )
{
- if (filename.length() == 0)
+ if ( filename.length() == 0 )
{
return "";
}
@@ -223,8 +223,8 @@
* leading slash. If the path has no slashes, then the filename
* is relative to the current directory.
*/
- int slashCount = StringUtils.countMatches(filename, separator) - 1;
- if (slashCount <= 0)
+ int slashCount = StringUtils.countMatches( filename, separator ) - 1;
+ if ( slashCount <= 0 )
{
return ".";
}
@@ -232,35 +232,35 @@
/*
* The relative filename contains one or more slashes indicating
* that the file is within one or more directories. Thus, each
- * slash represents a "../" in the relative path.
+ * slash represents a "../" in the relative path.
*/
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < slashCount ; i++)
+ StringBuffer sb = new StringBuffer();
+ for ( int i = 0; i < slashCount; i++ )
{
- sb.append ("../");
+ sb.append( "../" );
}
/*
* Finally, return the relative path but strip the trailing
* slash to mimic Anakia's behavior.
*/
- return StringUtils.chop(sb.toString());
+ return StringUtils.chop( sb.toString() );
}
- /**
+ /**
* Helper method to determine the file separator (forward or
* backward slash) used in a filename. The slash that occurs more
* often is returned as the separator.
- *
+ *
* @param filename The filename parsed to determine the file
* separator.
* @return The file separator used within <code>filename</code>.
* This value is either a forward or backward slash.
*/
- private static final String determineSeparator(String filename)
+ private static final String determineSeparator( String filename )
{
- int forwardCount = StringUtils.countMatches(filename, "/");
- int backwardCount = StringUtils.countMatches(filename, "\\");
+ int forwardCount = StringUtils.countMatches( filename, "/" );
+ int backwardCount = StringUtils.countMatches( filename, "\\" );
return forwardCount >= backwardCount ? "/" : "\\";
}
@@ -277,35 +277,35 @@
* @return the shortened file name matching the class package name.
* @throws IOException upon failure to read the java file
*/
- public static final String getPackagePath(String absoluteFileName) throws
- IOException
+ public static final String getPackagePath( String absoluteFileName ) throws
+ IOException
{
String shortenedPath;
-
+
JavaSourceFileParser parser = new JavaSourceFileParser();
JavaClass clazz = null;
-
+
try
{
- clazz = parser.parse(absoluteFileName);
+ clazz = parser.parse( absoluteFileName );
}
- catch (Exception e)
+ catch ( Exception e )
{
- System.out.println("\nError parsing " + absoluteFileName + ": " + e +
"\n");
+ System.out.println( "\nError parsing " + absoluteFileName + ": " + e +
"\n" );
return null;
}
String packageName = clazz.getPackageName();
// Handle default packages for which JDepend returns "default"
- if (packageName.equals("default"))
+ if ( packageName.equals( "default" ) )
{
shortenedPath = clazz.getName() + ".java";
}
else
{
- shortenedPath = packageName.replace('.', File.separatorChar)
- + File.separatorChar + clazz.getName() + ".java";
+ shortenedPath = packageName.replace( '.', File.separatorChar )
+ + File.separatorChar + clazz.getName() + ".java";
}
return shortenedPath;
1.12 +4 -5 jakarta-turbine-maven/src/java/org/apache/maven/MavenTool.java
Index: MavenTool.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/MavenTool.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- MavenTool.java 14 Jul 2002 15:51:23 -0000 1.11
+++ MavenTool.java 24 Nov 2002 18:45:59 -0000 1.12
@@ -56,6 +56,9 @@
* ====================================================================
*/
+import org.apache.maven.project.Project;
+import org.apache.tools.ant.types.Path;
+
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
@@ -64,12 +67,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeSet;
import java.util.TreeMap;
-
-import org.apache.tools.ant.types.Path;
-
-import org.apache.maven.project.Project;
+import java.util.TreeSet;
/**
* Context/pull tool for use in Maven templates.
1.65 +199 -210 jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java
Index: MavenUtils.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- MavenUtils.java 24 Nov 2002 17:58:59 -0000 1.64
+++ MavenUtils.java 24 Nov 2002 18:45:59 -0000 1.65
@@ -55,64 +55,53 @@
*
* ====================================================================
*/
+
import com.bluecast.xml.JAXPSAXParserFactory;
+import org.apache.commons.betwixt.XMLIntrospector;
+import org.apache.commons.betwixt.io.BeanReader;
+import org.apache.commons.betwixt.io.BeanWriter;
+import org.apache.commons.betwixt.strategy.DecapitalizeNameMapper;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.digester.ExtendedBaseRules;
+import org.apache.commons.digester.Rule;
+import org.apache.commons.jelly.JellyContext;
+import org.apache.commons.jelly.Script;
+import org.apache.commons.jelly.XMLOutput;
+import org.apache.commons.jelly.expression.CompositeExpression;
+import org.apache.commons.jelly.expression.Expression;
+import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.jelly.JellyUtils;
+import org.apache.maven.jelly.MavenJellyContext;
+import org.apache.maven.project.BaseObject;
+import org.apache.maven.project.Project;
+import org.apache.maven.util.StringInputStream;
+import org.apache.tools.ant.DirectoryScanner;
+import org.xml.sax.XMLReader;
+import javax.xml.parsers.SAXParserFactory;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.Writer;
-
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.HashMap;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.apache.commons.beanutils.BeanUtils;
-import org.apache.commons.collections.BeanMap;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.betwixt.io.BeanReader;
-import org.apache.commons.betwixt.io.BeanWriter;
-import org.apache.commons.betwixt.XMLIntrospector;
-import org.apache.commons.betwixt.strategy.DecapitalizeNameMapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.maven.MavenConstants;
-import org.apache.maven.project.BaseObject;
-import org.apache.maven.project.Project;
-
-import org.apache.tools.ant.DirectoryScanner;
-
-import org.apache.maven.jelly.MavenJellyContext;
-import org.apache.maven.jelly.JellyUtils;
-import org.apache.maven.util.StringInputStream;
-
-import org.xml.sax.XMLReader;
-
-import org.apache.commons.digester.ExtendedBaseRules;
-import org.apache.commons.digester.Rule;
-
-import org.apache.commons.jelly.JellyContext;
-import org.apache.commons.jelly.Script;
-import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.expression.CompositeExpression;
-import org.apache.commons.jelly.expression.Expression;
-import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory;
-
/**
* Utilities for reading maven project descriptors, profile descriptors and
* workspace descriptors.
@@ -123,8 +112,8 @@
public class MavenUtils
{
/** Log. */
- private static final Log logger = LogFactory.getLog(MavenUtils.class);
-
+ private static final Log logger = LogFactory.getLog( MavenUtils.class );
+
/** Internal encoding used for Jelly interpolation. */
private final static String INTERNAL_ENCODING = "ISO-8859-1";
@@ -150,10 +139,10 @@
* @return the Maven project object for the given project descriptor
* @throws Exception when any errors occur
*/
- public static Project getProject(File projectDescriptor)
- throws Exception
+ public static Project getProject( File projectDescriptor )
+ throws Exception
{
- return getProject(projectDescriptor, new File("."));
+ return getProject( projectDescriptor, new File( "." ) );
}
/**
@@ -164,23 +153,23 @@
* @return the Maven project object for the given project descriptor
* @throws Exception when any errors occur
*/
- public static Project getProject(File projectDescriptor, File dir)
- throws Exception
+ public static Project getProject( File projectDescriptor, File dir )
+ throws Exception
{
BeanReader projectBeanReader = getProjectBeanReader();
- Project project = (Project) projectBeanReader.parse(projectDescriptor);
+ Project project = (Project) projectBeanReader.parse( projectDescriptor );
String pomToExtend = project.getExtend();
- if (pomToExtend != null)
+ if ( pomToExtend != null )
{
Project parent = (Project)
- projectBeanReader.parse(new File(dir, pomToExtend));
+ projectBeanReader.parse( new File( dir, pomToExtend ) );
- project = (Project) mergeBeans(project, parent);
+ project = (Project) mergeBeans( project, parent );
}
- project = getJellyProject(project);
- project.setFile(projectDescriptor);
+ project = getJellyProject( project );
+ project.setFile( projectDescriptor );
return project;
}
@@ -193,11 +182,11 @@
* @throws Exception when anything goes wrong. FIXME this is bad
*/
private static BeanReader getProjectBeanReader()
- throws Exception
+ throws Exception
{
- if (projectBeanReader == null)
+ if ( projectBeanReader == null )
{
- projectBeanReader = createBeanReader(Project.class);
+ projectBeanReader = createBeanReader( Project.class );
}
return projectBeanReader;
@@ -211,27 +200,27 @@
* @return Jelly interpolated project.
* @throws Exception when anything goes wrong. FIXME this is bad
*/
- private static Project getJellyProject(Project project)
- throws Exception
+ private static Project getJellyProject( Project project )
+ throws Exception
{
JellyContext context = new JellyContext();
- context.setVariable(MavenConstants.MAVEN_POM, project);
+ context.setVariable( MavenConstants.MAVEN_POM, project );
- Script script = JellyUtils.compileScript(getProjectInputStream(project),
- context,
- INTERNAL_ENCODING);
+ Script script = JellyUtils.compileScript( getProjectInputStream( project ),
+ context,
+ INTERNAL_ENCODING );
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- Writer writer = new BufferedWriter(new OutputStreamWriter(baos));
- XMLOutput output = XMLOutput.createXMLOutput(writer);
- script.run(context, output);
+ Writer writer = new BufferedWriter( new OutputStreamWriter( baos ) );
+ XMLOutput output = XMLOutput.createXMLOutput( writer );
+ script.run( context, output );
writer.close();
BeanReader projectBeanReader = getProjectBeanReader();
return (Project) projectBeanReader.parse(
- new StringReader(baos.toString()));
+ new StringReader( baos.toString() ) );
}
/**
@@ -239,10 +228,10 @@
* @param project a {@link Project maven project}
* @throws Exception when anything goes wrong. FIXME this is bad
*/
- public static InputStream getProjectInputStream(Project project)
- throws Exception
+ public static InputStream getProjectInputStream( Project project )
+ throws Exception
{
- return new StringInputStream(getProjectString(project));
+ return new StringInputStream( getProjectString( project ) );
}
/**
@@ -252,20 +241,20 @@
* @return XML representation of the project
* @throws Exception when anything goes wrong. FIXME this is bad
*/
- public static String getProjectString(Project project)
- throws Exception
+ public static String getProjectString( Project project )
+ throws Exception
{
ByteArrayOutputStream projectStream = new ByteArrayOutputStream();
- BeanWriter beanWriter = new BeanWriter(projectStream);
- beanWriter.setXMLIntrospector(createXMLIntrospector());
- beanWriter.setWriteIDs(true);
- beanWriter.write(project);
+ BeanWriter beanWriter = new BeanWriter( projectStream );
+ beanWriter.setXMLIntrospector( createXMLIntrospector() );
+ beanWriter.setWriteIDs( true );
+ beanWriter.write( project );
// We do not care what the original encoding was originally. This
// is all completely internal. Our StringInputStream requires
// everything to be encoded in "ISO-8859-1".
- return projectStream.toString(INTERNAL_ENCODING);
+ return projectStream.toString( INTERNAL_ENCODING );
}
/**
@@ -275,12 +264,12 @@
* @param parent the maven project
* @return the child after properties from the parent are merged
*/
- private static Object mergeBeans(Object child, Object parent)
+ private static Object mergeBeans( Object child, Object parent )
{
- BeanMap parentBeanMap = new BeanMap(parent);
- BeanMap childBeanMap = new BeanMap(child);
+ BeanMap parentBeanMap = new BeanMap( parent );
+ BeanMap childBeanMap = new BeanMap( child );
- for (Iterator i = parentBeanMap.keySet().iterator(); i.hasNext(); )
+ for ( Iterator i = parentBeanMap.keySet().iterator(); i.hasNext(); )
{
// Take the property for the parent and insert it
// into the child bean map.
@@ -290,20 +279,20 @@
{
// If the childs property is null then take it from
// the parent.
- Object c = childBeanMap.get(property);
- Object p = parentBeanMap.get(property);
+ Object c = childBeanMap.get( property );
+ Object p = parentBeanMap.get( property );
- if (valueNeedsPopulating(c))
+ if ( valueNeedsPopulating( c ) )
{
- childBeanMap.put(property, p);
+ childBeanMap.put( property, p );
}
- else if (c != null && p != null && !valuePrimitive(c))
+ else if ( c != null && p != null && !valuePrimitive( c ) )
{
- Object mergedBean = mergeBeans(c, p);
- childBeanMap.put(property, mergedBean);
+ Object mergedBean = mergeBeans( c, p );
+ childBeanMap.put( property, mergedBean );
}
}
- catch (IllegalArgumentException e)
+ catch ( IllegalArgumentException e )
{
// There is no write method for this property.
}
@@ -317,10 +306,10 @@
* @param o the value to test
* @return true if o is a Boolean, String, Class or Integer.
*/
- private static boolean valuePrimitive(Object o)
+ private static boolean valuePrimitive( Object o )
{
- if (o instanceof Boolean || o instanceof String
- || o instanceof Class || o instanceof Integer)
+ if ( o instanceof Boolean || o instanceof String
+ || o instanceof Class || o instanceof Integer )
{
return true;
}
@@ -334,13 +323,13 @@
* @param o a child value
* @return true if the child value is an empty collection or null
*/
- private static boolean valueNeedsPopulating(Object o)
+ private static boolean valueNeedsPopulating( Object o )
{
- if (o instanceof Collection && ((Collection) o).size() == 0)
+ if ( o instanceof Collection && ( (Collection) o ).size() == 0 )
{
return true;
}
- else if (o == null)
+ else if ( o == null )
{
return true;
}
@@ -357,9 +346,9 @@
* @param includes Comma separated list of includes
* @return files
*/
- public static String[] getFiles(String directory, String includes)
+ public static String[] getFiles( String directory, String includes )
{
- return getFiles(new File(directory), includes);
+ return getFiles( new File( directory ), includes );
}
/**
@@ -369,22 +358,22 @@
* @param includes Comma separated list of includes
* @return files
*/
- public static String[] getFiles(File directory, String includes)
+ public static String[] getFiles( File directory, String includes )
{
String[] includePatterns = null;
- if (includes != null)
+ if ( includes != null )
{
- includePatterns = StringUtils.split(includes, ",");
+ includePatterns = StringUtils.split( includes, "," );
}
DirectoryScanner directoryScanner = new DirectoryScanner();
- directoryScanner.setBasedir(directory);
- directoryScanner.setIncludes(includePatterns);
+ directoryScanner.setBasedir( directory );
+ directoryScanner.setIncludes( includePatterns );
directoryScanner.scan();
String[] files = directoryScanner.getIncludedFiles();
- for (int i = 0; i < files.length; i++)
+ for ( int i = 0; i < files.length; i++ )
{
- files[i] = new File(directory, files[i]).getAbsolutePath();
+ files[i] = new File( directory, files[i] ).getAbsolutePath();
}
return files;
@@ -398,16 +387,16 @@
* @return a {link List} of {@link Project}s
* @throws Exception when anything goes wrong. FIXME this is bad
*/
- public static List getProjects(File directory, String includes)
- throws Exception
+ public static List getProjects( File directory, String includes )
+ throws Exception
{
- String[] files = getFiles(directory, includes);
+ String[] files = getFiles( directory, includes );
List projects = new ArrayList();
- for (int i = 0; i < files.length; i++)
+ for ( int i = 0; i < files.length; i++ )
{
- projects.add( getProject( new File( files[i] ),
+ projects.add( getProject( new File( files[i] ),
new File( files[i] ).getParentFile() ) );
}
@@ -423,15 +412,15 @@
* properties of the class provided
* @throws Exception when anything goes wrong. FIXME this is bad
*/
- public static BeanReader createBeanReader(Class clazz)
- throws Exception
+ public static BeanReader createBeanReader( Class clazz )
+ throws Exception
{
- BeanReader beanReader = new BeanReader(getXMLReader());
- beanReader.setRules(new ExtendedBaseRules());
- beanReader.addRule("*/properties/?", new MetaPropertiesRule());
+ BeanReader beanReader = new BeanReader( getXMLReader() );
+ beanReader.setRules( new ExtendedBaseRules() );
+ beanReader.addRule( "*/properties/?", new MetaPropertiesRule() );
- beanReader.setXMLIntrospector(getXMLIntrospector());
- beanReader.registerBeanClass(clazz);
+ beanReader.setXMLIntrospector( getXMLIntrospector() );
+ beanReader.registerBeanClass( clazz );
return beanReader;
}
@@ -441,9 +430,9 @@
*/
public static XMLIntrospector getXMLIntrospector()
{
- if (cacheIntrospector)
+ if ( cacheIntrospector )
{
- if (singletonIntrospector == null)
+ if ( singletonIntrospector == null )
{
singletonIntrospector = createXMLIntrospector();
}
@@ -462,9 +451,9 @@
{
XMLIntrospector introspector = new XMLIntrospector();
- introspector.setAttributesForPrimitives(false);
- introspector.setCachingEnabled(true);
- introspector.setNameMapper(new DecapitalizeNameMapper());
+ introspector.setAttributesForPrimitives( false );
+ introspector.setCachingEnabled( true );
+ introspector.setNameMapper( new DecapitalizeNameMapper() );
return introspector;
}
@@ -473,13 +462,13 @@
* @return an XMLReader which is pooled per thread
*/
public static XMLReader getXMLReader()
- throws Exception
+ throws Exception
{
XMLReader parser = (XMLReader) xmlReaderPool.get();
- if (parser == null)
+ if ( parser == null )
{
parser = createXMLReader();
- xmlReaderPool.set(parser);
+ xmlReaderPool.set( parser );
}
return parser;
}
@@ -488,11 +477,11 @@
* Creates a new XMLReader instance
*/
private static XMLReader createXMLReader()
- throws Exception
+ throws Exception
{
SAXParserFactory factory = new JAXPSAXParserFactory();
- factory.setNamespaceAware(true);
+ factory.setNamespaceAware( true );
return factory.newSAXParser().getXMLReader();
}
@@ -501,10 +490,10 @@
* Take a dominant and recessive Map and merge the key:value
* pairs where the recessive Map may add key:value pairs to the dominant
* Map but may not override any existing key:value pairs.
- *
+ *
* If we have two Maps, a dominant and recessive, and
* their respective keys are as follows:
- *
+ *
* dominantMapKeys = { a, b, c, d, e, f }
* recessiveMapKeys = { a, b, c, x, y, z }
*
@@ -516,49 +505,49 @@
* @param recessiveMap
* @return Map
*/
- public static Map mergeMaps(Map dominantMap, Map recessiveMap)
+ public static Map mergeMaps( Map dominantMap, Map recessiveMap )
{
Map result = new HashMap();
-
- if (dominantMap == null && recessiveMap == null)
+
+ if ( dominantMap == null && recessiveMap == null )
{
return null;
}
-
- if (dominantMap != null && recessiveMap == null)
+
+ if ( dominantMap != null && recessiveMap == null )
{
return dominantMap;
- }
-
- if (dominantMap == null && recessiveMap != null)
+ }
+
+ if ( dominantMap == null && recessiveMap != null )
{
return recessiveMap;
- }
-
+ }
+
// Grab the keys from the dominant and recessive maps.
Set dominantMapKeys = dominantMap.keySet();
Set recessiveMapKeys = recessiveMap.keySet();
-
+
// Create the set of keys that will be contributed by the
// recessive Map by subtracting the intersection of keys
// from the recessive Map's keys.
- Collection contributingRecessiveKeys =
- CollectionUtils.subtract(recessiveMapKeys,
- CollectionUtils.intersection(dominantMapKeys, recessiveMapKeys));
-
- result.putAll(dominantMap);
-
+ Collection contributingRecessiveKeys =
+ CollectionUtils.subtract( recessiveMapKeys,
+ CollectionUtils.intersection(
dominantMapKeys, recessiveMapKeys ) );
+
+ result.putAll( dominantMap );
+
// Now take the keys we just found and extract the values from
// the recessiveMap and put the key:value pairs into the dominantMap.
- for (Iterator i = contributingRecessiveKeys.iterator(); i.hasNext();)
+ for ( Iterator i = contributingRecessiveKeys.iterator(); i.hasNext(); )
{
Object key = i.next();
- result.put(key, recessiveMap.get(key));
+ result.put( key, recessiveMap.get( key ) );
}
-
+
return result;
}
-
+
/**
* Take a series of <code>Map</code>s and merge
* them where the ordering of the array from 0..n
@@ -567,66 +556,66 @@
* @param maps An array of Maps to merge.
* @return Map The result Map produced after the merging process.
*/
- public static Map mergeMaps(Map[] maps)
+ public static Map mergeMaps( Map[] maps )
{
Map result = null;
-
- if (maps.length == 0)
+
+ if ( maps.length == 0 )
{
result = null;
}
- else if (maps.length == 1)
+ else if ( maps.length == 1 )
{
result = maps[0];
}
else
{
- result = mergeMaps(maps[0], maps[1]);
-
- for (int i = 2; i < maps.length; i++)
+ result = mergeMaps( maps[0], maps[1] );
+
+ for ( int i = 2; i < maps.length; i++ )
{
- result = mergeMaps(result, maps[i]);
+ result = mergeMaps( result, maps[i] );
}
}
-
+
return result;
}
-
+
/**
* Process properties in dominant order.
*/
- public static MavenJellyContext createContext(File descriptorDirectory)
+ public static MavenJellyContext createContext( File descriptorDirectory )
{
- System.out.println("descriptorDirectory: " + descriptorDirectory);
-
+ System.out.println( "descriptorDirectory: " + descriptorDirectory );
+
// System properties
Properties systemProperties = System.getProperties();
-
+
// User build properties
- File userBuildPropertiesFile =
- new File( System.getProperty("user.home"), "build.properties" );
-
- logger.debug("Using userBuildPropertiesFile: " +
userBuildPropertiesFile.getAbsolutePath());
+ File userBuildPropertiesFile =
+ new File( System.getProperty( "user.home" ), "build.properties" );
+
+ logger.debug( "Using userBuildPropertiesFile: " +
userBuildPropertiesFile.getAbsolutePath() );
Properties userBuildProperties = loadProperties( userBuildPropertiesFile );
-
+
// project build properties
- File projectBuildPropertiesFile =
- new File( descriptorDirectory, "build.properties" );
-
- logger.debug("Using projectBuildPropertiesFile: " +
projectBuildPropertiesFile.getAbsolutePath());
+ File projectBuildPropertiesFile =
+ new File( descriptorDirectory, "build.properties" );
+
+ logger.debug( "Using projectBuildPropertiesFile: " +
projectBuildPropertiesFile.getAbsolutePath() );
Properties projectBuildProperties = loadProperties(
projectBuildPropertiesFile );
-
+
// project properties
- File projectPropertiesFile =
- new File( descriptorDirectory, "project.properties" );
-
- logger.debug("Using projectPropertiesFile: " +
projectPropertiesFile.getAbsolutePath());
+ File projectPropertiesFile =
+ new File( descriptorDirectory, "project.properties" );
+
+ logger.debug( "Using projectPropertiesFile: " +
projectPropertiesFile.getAbsolutePath() );
Properties projectProperties = loadProperties( projectPropertiesFile );
-
+
// driver properties
Properties driverProperties = loadProperties(
- MavenUtils.class.getClassLoader().getResourceAsStream(
- MavenConstants.DRIVER_PROPERTIES));
+ MavenUtils.class.getClassLoader().getResourceAsStream(
+ MavenConstants.DRIVER_PROPERTIES ) );
Map result = MavenUtils.mergeMaps( new Map[]
{
@@ -635,11 +624,11 @@
projectBuildProperties,
projectProperties,
driverProperties
- });
-
+ } );
+
MavenJellyContext context = new MavenJellyContext();
- MavenUtils.integrateMapInContext(result, context);
-
+ MavenUtils.integrateMapInContext( result, context );
+
return context;
}
@@ -651,29 +640,29 @@
* @param map
* @param context
*/
- public static void integrateMapInContext(Map map, MavenJellyContext context)
+ public static void integrateMapInContext( Map map, MavenJellyContext context )
{
- if (map == null)
+ if ( map == null )
{
return;
}
JexlExpressionFactory factory = new JexlExpressionFactory();
- for (Iterator i = map.keySet().iterator(); i.hasNext();)
+ for ( Iterator i = map.keySet().iterator(); i.hasNext(); )
{
String key = (String) i.next();
Object value;
-
- if (context.getVariable(key) == null)
+
+ if ( context.getVariable( key ) == null )
{
- String literalValue = (String) map.get(key);
-
+ String literalValue = (String) map.get( key );
+
try
{
- Expression expr = CompositeExpression.parse(literalValue,
factory);
+ Expression expr = CompositeExpression.parse( literalValue,
factory );
- if (expr != null)
+ if ( expr != null )
{
value = expr;
}
@@ -682,9 +671,9 @@
value = literalValue;
}
- context.setVariable(key, value);
+ context.setVariable( key, value );
}
- catch (Exception e)
+ catch ( Exception e )
{
// do nothing.
}
@@ -695,32 +684,32 @@
/**
* Load properties from a <code>File</code>.
*/
- private static Properties loadProperties(File file)
+ private static Properties loadProperties( File file )
{
try
{
- return loadProperties(new FileInputStream(file));
+ return loadProperties( new FileInputStream( file ) );
}
- catch(Exception e)
+ catch ( Exception e )
{
// ignore
}
-
+
return null;
}
/**
* Load properties from an <code>InputStream</code>.
*/
- private static Properties loadProperties(InputStream is)
+ private static Properties loadProperties( InputStream is )
{
try
{
Properties properties = new Properties();
- properties.load(is);
+ properties.load( is );
return properties;
}
- catch (IOException e)
+ catch ( IOException e )
{
// ignore
}
@@ -728,17 +717,17 @@
{
try
{
- if (is != null)
+ if ( is != null )
{
is.close();
}
}
- catch (IOException e)
+ catch ( IOException e )
{
// ignore
}
}
-
+
return null;
}
@@ -751,15 +740,15 @@
* with meta properties.
*/
static class MetaPropertiesRule
- extends Rule
+ extends Rule
{
private String value;
/**
* Constructor for the InfoRule object
*/
- public MetaPropertiesRule()
- {
+ public MetaPropertiesRule()
+ {
}
/**
@@ -768,8 +757,8 @@
* @param value body
* @throws Exception when any errors occur
*/
- public void body(String value)
- throws Exception
+ public void body( String value )
+ throws Exception
{
this.value = value;
}
@@ -780,11 +769,11 @@
* @throws Exception when any errors occur
*/
public void end()
- throws Exception
+ throws Exception
{
BaseObject baseObject = (BaseObject) getDigester().peek();
String name = getDigester().getCurrentElementName();
- baseObject.addProperty(name + ":" + value);
+ baseObject.addProperty( name + ":" + value );
}
}
}
1.6 +0 -1
jakarta-turbine-maven/src/java/org/apache/maven/ant/MavenTask.java
Index: MavenTask.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/ant/MavenTask.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MavenTask.java 15 Nov 2002 23:56:25 -0000 1.5
+++ MavenTask.java 24 Nov 2002 18:45:59 -0000 1.6
@@ -1,7 +1,6 @@
package org.apache.maven.ant;
import com.werken.forehead.Forehead;
-
import org.apache.maven.MavenConstants;
import org.apache.maven.app.Maven;
import org.apache.maven.cli.App;
1.138 +18 -30 jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java
Index: Maven.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- Maven.java 24 Nov 2002 17:57:45 -0000 1.137
+++ Maven.java 24 Nov 2002 18:45:59 -0000 1.138
@@ -56,53 +56,41 @@
* ====================================================================
*/
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Stack;
-
-import org.apache.commons.cli.CommandLine;
+import com.werken.werkz.Goal;
+import com.werken.werkz.Session;
import org.apache.commons.grant.GrantProject;
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.expression.CompositeExpression;
-import org.apache.commons.jelly.expression.ConstantExpression;
-import org.apache.commons.jelly.expression.Expression;
-import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory;
import org.apache.commons.jelly.tags.ant.AntTagLibrary;
import org.apache.commons.jelly.tags.jeez.JeezTagLibrary;
import org.apache.commons.jelly.tags.werkz.JellyBuildListener;
import org.apache.commons.jelly.tags.werkz.JellySession;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
import org.apache.maven.CreateDependencyClasspath;
import org.apache.maven.MavenConstants;
-import org.apache.maven.MavenUtils;
-import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.jelly.JellyPropsHandler;
import org.apache.maven.jelly.JellyUtils;
+import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.jelly.tags.MavenJeezTagLibrary;
import org.apache.maven.jelly.tags.project.MavenTagLibrary;
import org.apache.maven.project.Project;
-
import org.apache.tools.ant.DemuxOutputStream;
-import com.werken.werkz.Goal;
-import com.werken.werkz.Session;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Stack;
/**
* This class should represent the single place to access everything that
1.54 +22 -30
jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java
Index: PluginManager.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- PluginManager.java 24 Nov 2002 17:58:13 -0000 1.53
+++ PluginManager.java 24 Nov 2002 18:45:59 -0000 1.54
@@ -56,50 +56,42 @@
* ====================================================================
*/
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.StringTokenizer;
-
+import com.werken.forehead.Forehead;
+import com.werken.werkz.Goal;
+import org.apache.commons.grant.GrantProject;
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.expression.CompositeExpression;
import org.apache.commons.jelly.expression.Expression;
import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory;
-
-import org.apache.commons.grant.GrantProject;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import com.werken.forehead.Forehead;
-
-import com.werken.werkz.Goal;
-
+import org.apache.maven.CreateDependencyClasspath;
import org.apache.maven.MavenConstants;
import org.apache.maven.MavenUtils;
-import org.apache.maven.CreateDependencyClasspath;
import org.apache.maven.jelly.JellyUtils;
import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.project.Dependency;
import org.apache.maven.project.Project;
+import org.apache.maven.repository.Artifact;
+import org.apache.maven.repository.DefaultArtifactFactory;
import org.apache.maven.util.Expand;
-// Tmp
-import org.apache.maven.repository.DefaultArtifactFactory;
-import org.apache.maven.repository.Artifact;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
/**
* Plugin manager for Maven. <p>
1.19 +15 -19
jakarta-turbine-maven/src/java/org/apache/maven/app/ProjectVerifier.java
Index: ProjectVerifier.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/ProjectVerifier.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ProjectVerifier.java 24 Nov 2002 17:58:05 -0000 1.18
+++ ProjectVerifier.java 24 Nov 2002 18:45:59 -0000 1.19
@@ -56,32 +56,28 @@
* ====================================================================
*/
-import java.io.File;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.MavenConstants;
+import org.apache.maven.jelly.MavenJellyContext;
+import org.apache.maven.project.Dependency;
+import org.apache.maven.project.Project;
+import org.apache.maven.repository.Artifact;
+import org.apache.maven.repository.DefaultArtifactFactory;
+import org.apache.maven.util.HttpUtils;
+
import java.io.BufferedReader;
+import java.io.File;
import java.io.FileReader;
-
-import java.net.URL;
import java.net.MalformedURLException;
-
-import java.util.Iterator;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
-
-import org.apache.commons.grant.GrantProject;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.maven.MavenConstants;
-import org.apache.maven.jelly.MavenJellyContext;
-import org.apache.maven.project.Project;
-import org.apache.maven.project.Dependency;
-import org.apache.maven.util.HttpUtils;
-import org.apache.maven.repository.DefaultArtifactFactory;
-import org.apache.maven.repository.Artifact;
/**
* Make sure that everything that is required for the project to build
1.4 +16 -24 jakarta-turbine-maven/src/java/org/apache/maven/cli/App.java
Index: App.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/cli/App.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- App.java 24 Nov 2002 17:58:20 -0000 1.3
+++ App.java 24 Nov 2002 18:46:00 -0000 1.4
@@ -56,6 +56,21 @@
* ====================================================================
*/
+import com.werken.werkz.NoActionDefinitionException;
+import com.werken.werkz.UnattainableGoalException;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.XMLOutput;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.MavenConstants;
+import org.apache.maven.MavenUtils;
+import org.apache.maven.app.Maven;
+import org.apache.maven.app.RepoConfigException;
+import org.apache.maven.app.UnknownGoalException;
+import org.apache.maven.project.Project;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -76,29 +91,6 @@
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.ParseException;
-import org.apache.commons.jelly.JellyException;
-import org.apache.commons.jelly.XMLOutput;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.maven.app.Maven;
-import org.apache.maven.MavenConstants;
-import org.apache.maven.MavenUtils;
-import org.apache.maven.jelly.MavenJellyContext;
-import org.apache.maven.project.Project;
-
-import com.werken.werkz.Goal;
-import com.werken.werkz.NoActionDefinitionException;
-import com.werken.werkz.UnattainableGoalException;
-
-//!! These don't really belong here, clearly visible after
-// moving the cli stuff to its own package.
-import org.apache.maven.app.RepoConfigException;
-import org.apache.maven.app.UnknownGoalException;
/**
* The CLI wrapper for controlling Maven processes which are
1.2 +2 -3
jakarta-turbine-maven/src/java/org/apache/maven/cli/CLIManager.java
Index: CLIManager.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/cli/CLIManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CLIManager.java 15 Nov 2002 23:37:16 -0000 1.1
+++ CLIManager.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -56,14 +56,13 @@
* ====================================================================
*/
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.CommandLineParserFactory;
import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
-
import org.apache.env.Which;
/** Utility for managing and parsing Maven's command-line.
1.2 +1 -3
jakarta-turbine-maven/src/java/org/apache/maven/jelly/BaseTagLibrary.java
Index: BaseTagLibrary.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/BaseTagLibrary.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseTagLibrary.java 24 Nov 2002 18:00:02 -0000 1.1
+++ BaseTagLibrary.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -57,10 +57,8 @@
*/
import org.apache.commons.jelly.expression.CompositeExpression;
-import org.apache.commons.jelly.expression.ConstantExpression;
import org.apache.commons.jelly.expression.Expression;
import org.apache.commons.jelly.expression.ExpressionFactory;
-import org.apache.commons.jelly.impl.TagFactory;
import org.apache.commons.jelly.impl.TagScript;
import org.apache.commons.jelly.tags.core.CoreTagLibrary;
1.2 +3 -3
jakarta-turbine-maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java
Index: JellyPropsHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/JellyPropsHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JellyPropsHandler.java 24 Nov 2002 18:00:12 -0000 1.1
+++ JellyPropsHandler.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -55,11 +55,11 @@
*
* ====================================================================
*/
-import java.util.Hashtable;
-import java.util.Iterator;
-
import org.apache.commons.grant.DefaultPropsHandler;
import org.apache.commons.jelly.JellyContext;
+
+import java.util.Hashtable;
+import java.util.Iterator;
/**
* Implementation of a Commons Grant <code>propsHandler</code> to resolve
1.2 +6 -9
jakarta-turbine-maven/src/java/org/apache/maven/jelly/JellyUtils.java
Index: JellyUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/JellyUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JellyUtils.java 24 Nov 2002 17:59:52 -0000 1.1
+++ JellyUtils.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -55,25 +55,22 @@
*
* ====================================================================
*/
+import com.bluecast.xml.JAXPSAXParserFactory;
import org.apache.commons.jelly.JellyContext;
-import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.Script;
-import org.apache.commons.jelly.expression.Expression;
+import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.expression.CompositeExpression;
+import org.apache.commons.jelly.expression.Expression;
import org.apache.commons.jelly.expression.ExpressionFactory;
import org.apache.commons.jelly.parser.XMLParser;
+import org.xml.sax.XMLReader;
-import com.bluecast.xml.JAXPSAXParserFactory;
-
+import javax.xml.parsers.SAXParserFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
-
import java.net.URL;
-
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.XMLReader;
/**
* Utilities for Jelly.
1.2 +2 -6
jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenExpressionFactory.java
Index: MavenExpressionFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenExpressionFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MavenExpressionFactory.java 24 Nov 2002 18:00:07 -0000 1.1
+++ MavenExpressionFactory.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -1,14 +1,10 @@
package org.apache.maven.jelly;
import org.apache.commons.jelly.JellyContext;
-import org.apache.commons.jelly.expression.CompositeExpression;
import org.apache.commons.jelly.expression.Expression;
-import org.apache.commons.jelly.expression.ExpressionSupport;
import org.apache.commons.jelly.expression.ExpressionFactory;
-
+import org.apache.commons.jelly.expression.ExpressionSupport;
import org.apache.commons.jelly.expression.jexl.JexlExpression;
-
-import org.apache.maven.jelly.JellyUtils;
/**
* Represents a factory of <a href="http://jakarta.apache.org/commons/jexl.html">
1.4 +4 -8
jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
Index: MavenJellyContext.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MavenJellyContext.java 24 Nov 2002 18:00:18 -0000 1.3
+++ MavenJellyContext.java 24 Nov 2002 18:46:00 -0000 1.4
@@ -59,17 +59,13 @@
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.TagLibrary;
import org.apache.commons.jelly.expression.Expression;
-import org.apache.commons.jelly.tags.ant.AntTagLibrary;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectHelper;
+import org.apache.maven.MavenConstants;
+import org.apache.maven.app.PluginManager;
import java.net.URL;
+import java.util.HashSet;
import java.util.Hashtable;
import java.util.Set;
-import java.util.HashSet;
-
-import org.apache.maven.MavenConstants;
-import org.apache.maven.app.PluginManager;
/** Specialized version of a <code>JellyContext</code>.
*
1.4 +1 -4
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/LazyAttainGoalTag.java
Index: LazyAttainGoalTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/LazyAttainGoalTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LazyAttainGoalTag.java 24 Nov 2002 17:59:47 -0000 1.3
+++ LazyAttainGoalTag.java 24 Nov 2002 18:46:00 -0000 1.4
@@ -58,10 +58,7 @@
import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.tags.werkz.AttainGoalTag;
-
import org.apache.maven.MavenConstants;
-
-//!! Try to remove this
import org.apache.maven.app.Maven;
import org.apache.maven.app.PluginManager;
1.3 +2 -4
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/MavenJeezTagLibrary.java
Index: MavenJeezTagLibrary.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/MavenJeezTagLibrary.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MavenJeezTagLibrary.java 24 Nov 2002 17:59:41 -0000 1.2
+++ MavenJeezTagLibrary.java 24 Nov 2002 18:46:00 -0000 1.3
@@ -56,10 +56,8 @@
* ====================================================================
*/
-import org.apache.commons.jelly.tags.jeez.JeezTagLibrary;
-import org.apache.commons.jelly.tags.werkz.AttainGoalTag;
import org.apache.commons.jelly.impl.TagScript;
-
+import org.apache.commons.jelly.tags.jeez.JeezTagLibrary;
import org.xml.sax.Attributes;
/** Replacement for Jelly's <code>JeezTagLibrary</code> which uses
1.9 +2 -4
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/AddPathTag.java
Index: AddPathTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/AddPathTag.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AddPathTag.java 24 Nov 2002 17:59:10 -0000 1.8
+++ AddPathTag.java 24 Nov 2002 18:46:00 -0000 1.9
@@ -56,13 +56,11 @@
* ====================================================================
*/
+import org.apache.commons.jelly.JellyException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
-
import org.apache.maven.MavenConstants;
import org.apache.maven.jelly.MavenJellyContext;
-
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Path;
1.2 +5 -6
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/DependencyResolver.java
Index: DependencyResolver.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/DependencyResolver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DependencyResolver.java 24 Nov 2002 17:59:35 -0000 1.1
+++ DependencyResolver.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -57,15 +57,14 @@
*/
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
-import java.util.HashMap;
-
+import org.apache.commons.graph.domain.dependency.DependencyGraph;
import org.apache.maven.project.Dependency;
import org.apache.maven.project.Project;
-import org.apache.commons.graph.domain.dependency.DependencyGraph;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
public class DependencyResolver
{
1.14 +6 -8
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/MavenTag.java
Index: MavenTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/MavenTag.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- MavenTag.java 24 Nov 2002 17:59:30 -0000 1.13
+++ MavenTag.java 24 Nov 2002 18:46:00 -0000 1.14
@@ -56,18 +56,16 @@
* ====================================================================
*/
-import java.io.File;
-
-import org.apache.maven.MavenUtils;
+import org.apache.commons.jelly.MissingAttributeException;
+import org.apache.commons.jelly.TagSupport;
+import org.apache.commons.jelly.XMLOutput;
import org.apache.maven.MavenConstants;
+import org.apache.maven.MavenUtils;
import org.apache.maven.app.Maven;
import org.apache.maven.jelly.MavenJellyContext;
import org.apache.maven.project.Project;
-import org.apache.commons.jelly.MissingAttributeException;
-import org.apache.commons.jelly.TagSupport;
-import org.apache.commons.jelly.XMLOutput;
-
+import java.io.File;
import java.util.StringTokenizer;
/**
1.2 +8 -12
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/ReactorTag.java
Index: ReactorTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/ReactorTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ReactorTag.java 24 Nov 2002 17:59:25 -0000 1.1
+++ ReactorTag.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -55,24 +55,20 @@
*
* ====================================================================
*/
+import org.apache.commons.jelly.MissingAttributeException;
+import org.apache.commons.jelly.XMLOutput;
+import org.apache.maven.MavenUtils;
+import org.apache.maven.app.Maven;
+import org.apache.maven.project.Project;
+
+import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
-import java.io.BufferedWriter;
import java.io.Writer;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-
-import org.apache.maven.MavenUtils;
-import org.apache.maven.app.Maven;
-import org.apache.maven.project.Project;
-
-import org.apache.commons.jelly.MissingAttributeException;
-import org.apache.commons.jelly.TagSupport;
-import org.apache.commons.jelly.XMLOutput;
-
import java.util.StringTokenizer;
/**
1.5 +5 -7
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/SnapshotSignature.java
Index: SnapshotSignature.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/SnapshotSignature.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SnapshotSignature.java 22 Oct 2002 17:28:30 -0000 1.4
+++ SnapshotSignature.java 24 Nov 2002 18:46:00 -0000 1.5
@@ -56,16 +56,14 @@
* ====================================================================
*/
-import java.util.Date;
-import java.util.TimeZone;
-
-import java.text.SimpleDateFormat;
-
import org.apache.commons.jelly.MissingAttributeException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
-
import org.apache.maven.project.Project;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.TimeZone;
/** Create snapshot signature for non-release JARs and distributions.
*
1.18 +5 -5
jakarta-turbine-maven/src/java/org/apache/maven/project/BaseObject.java
Index: BaseObject.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/BaseObject.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- BaseObject.java 12 Nov 2002 16:41:01 -0000 1.17
+++ BaseObject.java 24 Nov 2002 18:46:00 -0000 1.18
@@ -56,13 +56,13 @@
* ====================================================================
*/
+import org.apache.commons.lang.StringUtils;
+
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
-import java.util.Map;
import java.util.List;
-import java.util.HashMap;
-
-import org.apache.commons.lang.StringUtils;
+import java.util.Map;
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
1.45 +7 -10
jakarta-turbine-maven/src/java/org/apache/maven/project/Project.java
Index: Project.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/Project.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Project.java 24 Nov 2002 18:01:36 -0000 1.44
+++ Project.java 24 Nov 2002 18:46:00 -0000 1.45
@@ -56,9 +56,13 @@
* ====================================================================
*/
-import java.io.InputStreamReader;
-import java.io.File;
+import org.apache.maven.MavenConstants;
+import org.apache.maven.MavenUtils;
+import org.dom4j.Document;
+import org.dom4j.io.SAXReader;
+import java.io.File;
+import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -66,13 +70,6 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-
-import org.apache.maven.MavenConstants;
-import org.apache.maven.MavenUtils;
-
-import org.dom4j.Document;
-import org.dom4j.io.SAXContentHandler;
-import org.dom4j.io.SAXReader;
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
1.2 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/project/Resource.java
Index: Resource.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/Resource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Resource.java 1 Nov 2002 16:52:25 -0000 1.1
+++ Resource.java 24 Nov 2002 18:46:00 -0000 1.2
@@ -56,8 +56,8 @@
* ====================================================================
*/
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* Represents a set of files in a single directory.
1.3 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/project/Resources.java
Index: Resources.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/Resources.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Resources.java 22 Aug 2002 19:40:44 -0000 1.2
+++ Resources.java 24 Nov 2002 18:46:00 -0000 1.3
@@ -56,8 +56,8 @@
* ====================================================================
*/
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/** Patterns for including or excluding arbitrary resources.
*
1.3 +2 -3
jakarta-turbine-maven/src/java/org/apache/maven/project/TestResource.java
Index: TestResource.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/TestResource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestResource.java 1 Nov 2002 16:52:25 -0000 1.2
+++ TestResource.java 24 Nov 2002 18:46:00 -0000 1.3
@@ -56,10 +56,9 @@
* ====================================================================
*/
-import java.util.List;
-import java.util.ArrayList;
-/**
+
+/**
* Patterns for including or excluding arbitrary test resources.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Emmanuel Venisse</a>
1.5 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/project/UnitTest.java
Index: UnitTest.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/project/UnitTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- UnitTest.java 1 Nov 2002 16:52:25 -0000 1.4
+++ UnitTest.java 24 Nov 2002 18:46:00 -0000 1.5
@@ -56,8 +56,8 @@
* ====================================================================
*/
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* Collects unit-test include and exclude patterns and resources.
1.5 +3 -4
jakarta-turbine-maven/src/java/org/apache/maven/repository/DefaultJarArtifact.java
Index: DefaultJarArtifact.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/repository/DefaultJarArtifact.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DefaultJarArtifact.java 14 Nov 2002 17:46:25 -0000 1.4
+++ DefaultJarArtifact.java 24 Nov 2002 18:46:01 -0000 1.5
@@ -56,12 +56,11 @@
* ====================================================================
*/
-import java.io.File;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
import org.apache.maven.project.Dependency;
+
+import java.io.File;
/**
*
1.4 +3 -3
jakarta-turbine-maven/src/java/org/apache/maven/repository/GenericArtifact.java
Index: GenericArtifact.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/repository/GenericArtifact.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GenericArtifact.java 2 Oct 2002 22:28:53 -0000 1.3
+++ GenericArtifact.java 24 Nov 2002 18:46:01 -0000 1.4
@@ -56,9 +56,9 @@
* ====================================================================
*/
-import java.io.File;
-
import org.apache.maven.project.Dependency;
+
+import java.io.File;
/**
* Generic artifact that builds its path and url information based on its
1.3 +3 -3 jakarta-turbine-maven/src/java/org/apache/maven/util/Expand.java
Index: Expand.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/util/Expand.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Expand.java 12 Nov 2002 04:21:02 -0000 1.2
+++ Expand.java 24 Nov 2002 18:46:01 -0000 1.3
@@ -58,14 +58,14 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.FileNotFoundException;
-import java.io.InputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Date;
import java.util.Vector;
-import java.util.zip.ZipInputStream;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
/**
* Unzip a file.
1.9 +3 -5
jakarta-turbine-maven/src/java/org/apache/maven/util/HttpUtils.java
Index: HttpUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/util/HttpUtils.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- HttpUtils.java 22 Aug 2002 19:40:45 -0000 1.8
+++ HttpUtils.java 24 Nov 2002 18:46:01 -0000 1.9
@@ -59,15 +59,13 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.io.InputStream;
import java.io.IOException;
-
-import java.net.URL;
-import java.net.URLConnection;
+import java.io.InputStream;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.PasswordAuthentication;
-
+import java.net.URL;
+import java.net.URLConnection;
import java.util.Date;
/**
1.4 +1 -2 jakarta-turbine-maven/src/java/org/apache/maven/util/MD5Sum.java
Index: MD5Sum.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/util/MD5Sum.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MD5Sum.java 2 Oct 2002 15:18:03 -0000 1.3
+++ MD5Sum.java 24 Nov 2002 18:46:01 -0000 1.4
@@ -4,7 +4,6 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
-
import java.security.MessageDigest;
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>