dion 2003/08/07 09:56:39
Modified: src/java/org/apache/maven/verifier Tag: MAVEN_RC1_STABLE
DependencyVerifier.java
src/java/org/apache/maven/jelly Tag: MAVEN_RC1_STABLE
JellyUtils.java
src/java/org/apache/maven/jelly/tags/maven Tag:
MAVEN_RC1_STABLE PomTag.java ConcatTag.java
ReactorTag.java AddPathTag.java
SnapshotSignature.java MavenTagLibrary.java
WerkzDependencyResolver.java MavenTag.java
src/java/org/apache/maven/cli Tag: MAVEN_RC1_STABLE App.java
src/java/org/apache/maven/project Tag: MAVEN_RC1_STABLE
Repository.java License.java Project.java
Build.java Resource.java TestResource.java
src/java/org/apache/maven Tag: MAVEN_RC1_STABLE
MavenUtils.java DefaultProjectMarshaller.java
DefaultProjectUnmarshaller.java
NoGoalException.java
src/java/org/apache/maven/jelly/tags Tag: MAVEN_RC1_STABLE
BaseTagSupport.java
Added: src/java/org/apache/maven/jelly/tags/maven Tag:
MAVEN_RC1_STABLE ParamCheck.java UserCheck.java
CopyResources.java
src/java/org/apache/maven/util Tag: MAVEN_RC1_STABLE
StringTool.java DVSLFormatter.java
DVSLPathTool.java MavenTool.java
Log:
Update from back ported fixes
Revision Changes Path
No revision
No revision
1.25.2.1 +14 -9 maven/src/java/org/apache/maven/verifier/DependencyVerifier.java
Index: DependencyVerifier.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/verifier/DependencyVerifier.java,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -r1.25 -r1.25.2.1
--- DependencyVerifier.java 18 Jun 2003 02:48:08 -0000 1.25
+++ DependencyVerifier.java 7 Aug 2003 16:56:38 -0000 1.25.2.1
@@ -56,6 +56,8 @@
* ====================================================================
*/
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.AbstractMavenComponent;
import org.apache.maven.project.Project;
@@ -90,6 +92,9 @@
public class DependencyVerifier
extends AbstractMavenComponent
{
+ /** log for debug output */
+ private static final Log log = LogFactory.getLog(DependencyVerifier.class);
+
/** Control the use of timestamp comparison when downloading missing resources.
*/
private boolean useTimestamp = true;
@@ -184,7 +189,7 @@
{
failedDependencies.add( artifact );
}
- else if ( online == false && artifact.isSnapshot() )
+ else if ( !online && artifact.isSnapshot() )
{
System.out.println( getMessage( "offline.snapshot.warning",
artifact.getName() ) );
}
@@ -282,8 +287,8 @@
{
// The snapshot jar locally exists and not in remote repository
// FIXME: localize this message
- System.out.println("Artifact " + artifact.getUrlPath() +
- " doesn't exists in remote repository, but
it exists locally");
+ log.debug("Artifact " + artifact.getUrlPath()
+ + " doesn't exists in remote repository, but it exists
locally");
i.remove();
}
else
@@ -330,8 +335,8 @@
true );
// Artifact was found, continue checking additional remote repos
(if any)
- // in case there is a newer version (i.e. snapshots) in another
repo
- artifactFound = true;
+ // in case there is a newer version (i.e. snapshots) in another repo
+ artifactFound = true;
}
catch (FileNotFoundException e)
{
@@ -343,7 +348,7 @@
{
// If there are additional remote repos, then ignore exception
// as artifact may be found in another remote repo. If there
- // are no more remote repos to check and the artifact wasn't found
in
+ // are no more remote repos to check and the artifact wasn't found
in
// a previous remote repo, then artifactFound is false indicating
// that the artifact could not be found in any of the remote repos
//
@@ -359,7 +364,7 @@
// print a warning, in any case, so user catches on to mistyped
// hostnames, or other snafus
// FIXME: localize this message
- System.out.println("Error retrieving artifact from [" + url + "]: "
+ e);
+ System.out.println("Error retrieving artifact from [" + url + "]: "
+ e);
}
}
@@ -385,7 +390,7 @@
artifact.verify();
}
}
-
+
/**
* @return true if the ignore errors flag is set.
*/
No revision
No revision
1.10.2.1 +11 -9 maven/src/java/org/apache/maven/jelly/JellyUtils.java
Index: JellyUtils.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyUtils.java,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- JellyUtils.java 12 Apr 2003 00:02:06 -0000 1.10
+++ JellyUtils.java 7 Aug 2003 16:56:38 -0000 1.10.2.1
@@ -56,6 +56,14 @@
* ====================================================================
*/
+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.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.Script;
import org.apache.commons.jelly.XMLOutput;
@@ -65,13 +73,6 @@
import org.apache.commons.jelly.parser.XMLParser;
import org.xml.sax.XMLReader;
-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;
-
/**
* Utilities for Jelly.
*
@@ -155,7 +156,7 @@
JellyContext context )
throws Exception
{
- return context.compileScript( scriptFile.toURL() );
+ return compileScript( new FileInputStream(scriptFile), context );
}
/**
@@ -195,6 +196,7 @@
XMLReader reader = factory.newSAXParser().getXMLReader();
XMLParser parser = new XMLParser( reader );
parser.setContext( context );
+ parser.setClassLoader( context.getClassLoader() );
Script script = null;
No revision
No revision
1.10.2.1 +4 -11 maven/src/java/org/apache/maven/jelly/tags/maven/PomTag.java
Index: PomTag.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/PomTag.java,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- PomTag.java 12 Apr 2003 00:02:02 -0000 1.10
+++ PomTag.java 7 Aug 2003 16:56:38 -0000 1.10.2.1
@@ -106,19 +106,12 @@
* another error occurs
*/
public void doTag( XMLOutput output )
- throws JellyTagException
+ throws MissingAttributeException, JellyTagException
{
// Check to make sure that we have a valid POM
// before processing.
- if ( projectDescriptor == null )
- {
- throw new MissingAttributeException( "projectDescriptor" );
- }
-
- if ( var == null )
- {
- throw new MissingAttributeException( "var" );
- }
+ checkAttribute( projectDescriptor, "projectDescriptor" );
+ checkAttribute( var, "var" );
try
{
1.7.2.1 +3 -6 maven/src/java/org/apache/maven/jelly/tags/maven/ConcatTag.java
Index: ConcatTag.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/ConcatTag.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- ConcatTag.java 11 Apr 2003 23:45:33 -0000 1.7
+++ ConcatTag.java 7 Aug 2003 16:56:38 -0000 1.7.2.1
@@ -100,15 +100,12 @@
* @throws JellyTagException If there is an error while concatenating the file.
*/
public void doTag( XMLOutput output )
- throws JellyTagException
+ throws MissingAttributeException, JellyTagException
{
try
{
// Make sure we have an output file.
- if ( outputFile == null )
- {
- throw new MissingAttributeException( "outputFile" );
- }
+ checkAttribute(outputFile, "outputFile");
// Collect all the input files by invoking the body.
invokeBody( output );
1.31.2.1 +6 -8 maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java
Index: ReactorTag.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -u -r1.31 -r1.31.2.1
--- ReactorTag.java 21 Jul 2003 22:31:08 -0000 1.31
+++ ReactorTag.java 7 Aug 2003 16:56:38 -0000 1.31.2.1
@@ -62,10 +62,10 @@
import org.apache.maven.MavenUtils;
import org.apache.maven.project.Project;
+import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.io.File;
/**
* Reactor tag that processes a set of project descriptors taking into
@@ -281,12 +281,9 @@
* @throws JellyTagException If an error occurs while processing the tag.
*/
public void doTag( XMLOutput output )
- throws JellyTagException
+ throws MissingAttributeException, JellyTagException
{
- if ( getBasedir() == null )
- {
- throw new MissingAttributeException( "basedir" );
- }
+ checkAttribute( getBasedir(), "basedir" );
if ( getGlob() == null && getIncludes() == null )
{
@@ -336,6 +333,7 @@
projects = null;
System.out.println( "Our processing order:" );
+
for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
{
Project p = (Project) i.next();
1.6.2.1 +5 -11 maven/src/java/org/apache/maven/jelly/tags/maven/AddPathTag.java
Index: AddPathTag.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/AddPathTag.java,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- AddPathTag.java 11 Apr 2003 23:45:33 -0000 1.6
+++ AddPathTag.java 7 Aug 2003 16:56:38 -0000 1.6.2.1
@@ -84,10 +84,10 @@
* the [EMAIL PROTECTED] #refid other path} to it.
*
* @param output used to write output
- * @throws Exception when anything goes wrong. FIXME
+ * @throws JellyTagException when anything goes wrong.
*/
public void doTag( XMLOutput output )
- throws JellyTagException
+ throws MissingAttributeException, JellyTagException
{
GrantProject project = getMavenContext().getProject().getAntProject();
@@ -96,15 +96,9 @@
throw new JellyTagException( "cannot find ant project" );
}
- if (getId() == null)
- {
- throw new MissingAttributeException("id must be specified");
- }
+ checkAttribute( getId(), "id" );
+ checkAttribute( getRefid(), "refid" );
- if (getRefid() == null)
- {
- throw new MissingAttributeException("refid must be specified");
- }
Path path = (Path) project.getReferences().get( getId() );
Path addPath = (Path) project.getReferences().get( getRefid() );
1.7.2.1 +4 -8
maven/src/java/org/apache/maven/jelly/tags/maven/SnapshotSignature.java
Index: SnapshotSignature.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/SnapshotSignature.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- SnapshotSignature.java 12 Apr 2003 00:02:02 -0000 1.7
+++ SnapshotSignature.java 7 Aug 2003 16:56:38 -0000 1.7.2.1
@@ -57,8 +57,8 @@
*/
import org.apache.commons.jelly.MissingAttributeException;
-import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
+import org.apache.maven.jelly.tags.BaseTagSupport;
import org.apache.maven.project.Project;
import java.text.SimpleDateFormat;
@@ -71,7 +71,7 @@
* @version $Id$
*/
public class SnapshotSignature
- extends TagSupport
+ extends BaseTagSupport
{
/** Maven project */
private Project project;
@@ -105,11 +105,7 @@
*/
public void doTag( XMLOutput output ) throws MissingAttributeException
{
-
- if ( project == null )
- {
- throw new MissingAttributeException( "project" );
- }
+ checkAttribute( project, "project" );
Date now = new Date();
SimpleDateFormat formatter = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
1.4.2.1 +4 -1
maven/src/java/org/apache/maven/jelly/tags/maven/MavenTagLibrary.java
Index: MavenTagLibrary.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/MavenTagLibrary.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- MavenTagLibrary.java 12 Apr 2003 00:02:02 -0000 1.4
+++ MavenTagLibrary.java 7 Aug 2003 16:56:38 -0000 1.4.2.1
@@ -80,5 +80,8 @@
registerTag( "reactor", ReactorTag.class );
registerTag( "concat", ConcatTag.class );
registerTag( "input", InputTag.class );
+ registerTag( "user-check", UserCheck.class);
+ registerTag( "param-check", ParamCheck.class);
+ registerTag( "copy-resources", CopyResources.class);
}
}
1.5.2.1 +2 -1
maven/src/java/org/apache/maven/jelly/tags/maven/WerkzDependencyResolver.java
Index: WerkzDependencyResolver.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/WerkzDependencyResolver.java,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- WerkzDependencyResolver.java 23 Jun 2003 04:39:59 -0000 1.5
+++ WerkzDependencyResolver.java 7 Aug 2003 16:56:38 -0000 1.5.2.1
@@ -1,4 +1,5 @@
package org.apache.maven.jelly.tags.maven;
+
/* ====================================================================
* The Apache Software License, Version 1.1
*
1.7.2.1 +4 -7 maven/src/java/org/apache/maven/jelly/tags/maven/MavenTag.java
Index: MavenTag.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/MavenTag.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- MavenTag.java 12 Apr 2003 00:02:02 -0000 1.7
+++ MavenTag.java 7 Aug 2003 16:56:38 -0000 1.7.2.1
@@ -93,15 +93,12 @@
* goals and verify.
*
* @param output for providing xml output
- * @throws Exception if anything goes wrong. FIXME
+ * @throws JellyTagException if anything goes wrong.
*/
public void doTag( XMLOutput output )
- throws JellyTagException
+ throws MissingAttributeException, JellyTagException
{
- if ( getDescriptor() == null )
- {
- throw new MissingAttributeException( "descriptor" );
- }
+ checkAttribute( getDescriptor(), "descriptor" );
try
{
No revision
No revision
1.1.4.1 +0 -0 maven/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java
Index: ParamCheck.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/ParamCheck.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
1.1.4.1 +0 -0 maven/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java
Index: UserCheck.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/UserCheck.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
1.1.4.1 +0 -0
maven/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java
Index: CopyResources.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/CopyResources.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
No revision
No revision
1.28.2.1 +3 -3 maven/src/java/org/apache/maven/cli/App.java
Index: App.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/App.java,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -r1.28 -r1.28.2.1
--- App.java 31 May 2003 14:52:19 -0000 1.28
+++ App.java 7 Aug 2003 16:56:38 -0000 1.28.2.1
@@ -607,7 +607,8 @@
long fullDiff = fullStop.getTime() - fullStart.getTime();
System.out.println( "Total time: " + formatTime( fullDiff ) );
-
+ System.out.println( "Finished at: " + fullStop );
+
System.out.println( "" );
exit( returnCode );
}
@@ -814,7 +815,6 @@
goalDescription = goalDescription.trim();
hasDesc = goalDescription.length() != 0;
}
-
if ( newPlugin )
{
No revision
No revision
1.13.4.1 +83 -1 maven/src/java/org/apache/maven/project/Repository.java
Index: Repository.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Repository.java,v
retrieving revision 1.13
retrieving revision 1.13.4.1
diff -u -r1.13 -r1.13.4.1
--- Repository.java 12 Apr 2003 00:02:03 -0000 1.13
+++ Repository.java 7 Aug 2003 16:56:39 -0000 1.13.4.1
@@ -78,6 +78,9 @@
/** Connection URL. */
private String connection;
+ /** Developer connection URL. */
+ private String developerConnection;
+
/** Web URL. */
private String url;
@@ -92,6 +95,16 @@
}
/**
+ * Sets the connection attribute of the Repository object
+ *
+ * @param connection Developer connection URL.
+ */
+ public void setDeveloperConnection( String developerConnection )
+ {
+ this.developerConnection = developerConnection;
+ }
+
+ /**
* Gets the connection attribute of the Repository object
*
* @return Connection URL.
@@ -102,6 +115,16 @@
}
/**
+ * Gets the connection attribute of the Repository object
+ *
+ * @return Connection URL.
+ */
+ public String getDeveloperConnection()
+ {
+ return developerConnection;
+ }
+
+ /**
* Sets the url attribute of the Repository object
*
* @param url Web URL.
@@ -151,6 +174,65 @@
return null;
}
+ /**
+ * Get cvs server.
+ *
+ * Used in xdocs/src/plugin-resources/templates/cvs-usage.xml
+ *
+ * @param conn six token connection string
+ * @return CVS module.
+ */
+ public String getCvsServer(String conn)
+ {
+ String[] tokens = splitSCMConnection(conn);
+ if(tokens[3].indexOf('@') >= 0)
+ {
+ return tokens[3].substring(tokens[3].indexOf('@')+1);
+ }
+ else
+ {
+ return tokens[3];
+ }
+ }
+
+ /**
+ * Get cvs root.
+ *
+ * Used in xdocs/src/plugin-resources/templates/cvs-usage.xml
+ *
+ * @param conn six token connection string
+ * @param username username override if non-empty.
+ * @return CVS root.
+ */
+ public String getCvsRoot(String conn, String username)
+ {
+ String[] tokens = splitSCMConnection(conn);
+ if(tokens[3].indexOf('@') >= 0)
+ {
+ if (username.length() == 0)
+ {
+ username = tokens[3].substring(0, tokens[3].indexOf('@'));
+ }
+ tokens[3] = username + "@" + tokens[3].substring(tokens[3].indexOf('@')
+ 1);
+ }
+ String result = tokens[2] + ":" + tokens[3] + ":" + tokens[4];
+ return result;
+ }
+
+ /**
+ * Get cvs module.
+ *
+ * Used in xdocs/src/plugin-resources/templates/cvs-usage.xml
+ *
+ * @param conn six token connection string
+ * @return CVS module.
+ */
+ public String getCvsModule(String conn)
+ {
+ String[] tokens = splitSCMConnection(conn);
+ return tokens[5];
+ }
+
/**
* Splits an SCM string into parts
1.2.2.1 +3 -2 maven/src/java/org/apache/maven/project/License.java
Index: License.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/License.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- License.java 15 Feb 2003 08:00:10 -0000 1.2
+++ License.java 7 Aug 2003 16:56:39 -0000 1.2.2.1
@@ -55,7 +55,7 @@
*
* ====================================================================
*/
-
+
/**
* A License as specified in the project descriptor
*
@@ -63,6 +63,7 @@
* @version $Id$
*/
public class License
+ extends BaseObject
{
private String name;
private String url;
1.83.2.1 +33 -18 maven/src/java/org/apache/maven/project/Project.java
Index: Project.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Project.java,v
retrieving revision 1.83
retrieving revision 1.83.2.1
diff -u -r1.83 -r1.83.2.1
--- Project.java 2 Jul 2003 14:39:14 -0000 1.83
+++ Project.java 7 Aug 2003 16:56:39 -0000 1.83.2.1
@@ -130,7 +130,7 @@
/** Project's (non-committing) contributors. */
private List contributors;
-
+
/** Project's licenses. Typically only one. */
private List licenses;
@@ -210,6 +210,9 @@
/** Artifact list. */
private List artifactList;
+
+ /** maven.xml file */
+ private File mavenXml;
/**
* Reports to be generated for a project for a project. This is a list of the
@@ -226,11 +229,10 @@
*/
private Map pluginContexts = new HashMap();
- /**
- * A list of PackageGroup instances used for documenting the packages
- */
+ /** A list of PackageGroup instances used for documenting the packages */
private List packageGroups;
+ /** ArtifactId. */
private String artifactId;
/**
@@ -260,7 +262,9 @@
public String getId()
{
// The id has already been set.
- if ( id != null && id.indexOf( ":" ) > 0 )
+ if ( id != null
+ &&
+ id.indexOf( ":" ) > 0 )
{
return id;
}
@@ -471,7 +475,7 @@
{
return new File( parentBasedir(), MavenConstants.BUILD_FILE_NAME );
}
-
+
/**
* Set the gump repository descriptor.
*
@@ -848,7 +852,7 @@
{
return contributors;
}
-
+
/**
* Set licenses for this project.
*
@@ -1212,7 +1216,7 @@
*
* @param packageGroups is the list of PackageGroup instances
*/
- public void setPackageGroups(List packageGroups)
+ public void setPackageGroups( List packageGroups )
{
this.packageGroups = packageGroups;
}
@@ -1223,9 +1227,9 @@
* @param packageGroup is the new PackageGroup instance to be added to the
* list
*/
- public void addPackageGroup(PackageGroup packageGroup)
+ public void addPackageGroup( PackageGroup packageGroup )
{
- packageGroups.add(packageGroup);
+ packageGroups.add( packageGroup );
}
/**
@@ -1360,9 +1364,9 @@
* @throws UnsatisfiedDependencyException If an error occurs due to missing
exceptions.
*/
public void verifyDependencies()
- throws RepoConfigException,
- UnsatisfiedDependencyException,
- ChecksumVerificationException
+ throws RepoConfigException,
+ UnsatisfiedDependencyException,
+ ChecksumVerificationException
{
// Only attempt to verify the dependencies if a project.xml file exists.
if ( getFile() != null )
@@ -1448,6 +1452,17 @@
}
/**
+ * Currently this is just jars.
+ *
+ * @param d
+ * @return true if the given dependency belongs on the classpath
+ */
+ private boolean isClasspathDependency(Dependency d)
+ {
+ return d.getType().equals( "jar" );
+ }
+
+ /**
* Build the dependency classpath.
*
* @throws Exception If an error occurs while building the dependency classpath.
@@ -1551,13 +1566,13 @@
public static String legacyToStandardId( String id )
{
String newId = id;
- if (id.indexOf("+") != -1 )
+ if ( id.indexOf( "+" ) != -1 )
{
// legacy format is groupId "+" partial artifactId
// standard format is groupId ":" groupId "-" partialArtifactId
- int plusPos = id.indexOf("+");
- String groupId = id.substring(0, plusPos);
- String partialArtifactId = id.substring(plusPos + 1);
+ int plusPos = id.indexOf( "+" );
+ String groupId = id.substring( 0, plusPos );
+ String partialArtifactId = id.substring( plusPos + 1 );
newId = groupId + ":" + groupId + "-" + partialArtifactId;
}
else if ( id.indexOf( ":" ) == -1 )
1.21.2.1 +7 -1 maven/src/java/org/apache/maven/project/Build.java
Index: Build.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Build.java,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -r1.21 -r1.21.2.1
--- Build.java 11 Apr 2003 23:45:33 -0000 1.21
+++ Build.java 7 Aug 2003 16:56:39 -0000 1.21.2.1
@@ -292,4 +292,10 @@
{
return resources;
}
+
+ public String toString()
+ {
+ return "[ sourceDirectory = " + getSourceDirectory() +
+ ", unitTestSourceDirectory = " + getUnitTestSourceDirectory() + " ]";
+ }
}
1.9.2.1 +2 -1 maven/src/java/org/apache/maven/project/Resource.java
Index: Resource.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Resource.java,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -r1.9 -r1.9.2.1
--- Resource.java 13 Jun 2003 12:24:35 -0000 1.9
+++ Resource.java 7 Aug 2003 16:56:39 -0000 1.9.2.1
@@ -65,6 +65,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">James Taylor</a>
*/
public class Resource
+ extends BaseObject
{
/** Resource Directory */
private String dir;
@@ -78,7 +79,7 @@
/** Exclude patterns. */
private List excludes = new ArrayList();
- /**
+ /**
* Is filtering on?
*/
private boolean isFiltering = false;
1.6.2.1 +2 -1 maven/src/java/org/apache/maven/project/TestResource.java
Index: TestResource.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/TestResource.java,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- TestResource.java 12 Apr 2003 00:02:03 -0000 1.6
+++ TestResource.java 7 Aug 2003 16:56:39 -0000 1.6.2.1
@@ -65,7 +65,8 @@
*
* @deprecated Resource is prefered.
*/
-public class TestResource extends Resource
+public class TestResource
+ extends Resource
{
// Empty, alias for parent class Resource.
}
No revision
No revision
1.1.4.1 +1 -1 maven/src/java/org/apache/maven/util/StringTool.java
Index: StringTool.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/util/StringTool.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
1.1.4.1 +1 -1 maven/src/java/org/apache/maven/util/DVSLFormatter.java
Index: DVSLFormatter.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/util/DVSLFormatter.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
1.1.4.1 +1 -1 maven/src/java/org/apache/maven/util/DVSLPathTool.java
Index: DVSLPathTool.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/util/DVSLPathTool.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
1.1.4.1 +0 -0 maven/src/java/org/apache/maven/util/MavenTool.java
Index: MavenTool.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/util/MavenTool.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
No revision
No revision
1.94.2.1 +2 -2 maven/src/java/org/apache/maven/MavenUtils.java
Index: MavenUtils.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenUtils.java,v
retrieving revision 1.94
retrieving revision 1.94.2.1
diff -u -r1.94 -r1.94.2.1
--- MavenUtils.java 7 Jun 2003 01:27:52 -0000 1.94
+++ MavenUtils.java 7 Aug 2003 16:56:39 -0000 1.94.2.1
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
1.3.2.1 +58 -3 maven/src/java/org/apache/maven/DefaultProjectMarshaller.java
Index: DefaultProjectMarshaller.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/DefaultProjectMarshaller.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- DefaultProjectMarshaller.java 2 Jul 2003 14:39:14 -0000 1.3
+++ DefaultProjectMarshaller.java 7 Aug 2003 16:56:39 -0000 1.3.2.1
@@ -1,5 +1,61 @@
package org.apache.maven;
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Maven" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Maven", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ====================================================================
+ */
+
import org.apache.maven.project.Build;
import org.apache.maven.project.Branch;
import org.apache.maven.project.Contributor;
@@ -147,8 +203,7 @@
serializer.startTag( NAMESPACE, "repository" );
marshallRequiredString( project.getRepository().getConnection(),
"connection" );
- //!!!
- //marshallString(project.getRepository().getDeveloperConnection(),
"developerConnection");
+ marshallString(project.getRepository().getDeveloperConnection(),
"developerConnection");
marshallString( project.getRepository().getUrl(), "url" );
serializer.endTag( NAMESPACE, "repository" );
@@ -417,7 +472,6 @@
if ( build != null )
{
-
serializer.startTag( NAMESPACE, "build" );
marshallString( build.getNagEmailAddress(), "nagEmailAddress" );
@@ -597,6 +651,7 @@
{
System.out.println( "WARNING : " + tag + " should not be null" );
}
+
marshallString( line, tag );
}
1.3.2.1 +110 -6 maven/src/java/org/apache/maven/DefaultProjectUnmarshaller.java
Index: DefaultProjectUnmarshaller.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/DefaultProjectUnmarshaller.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- DefaultProjectUnmarshaller.java 2 Jul 2003 14:39:14 -0000 1.3
+++ DefaultProjectUnmarshaller.java 7 Aug 2003 16:56:39 -0000 1.3.2.1
@@ -1,10 +1,67 @@
package org.apache.maven;
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Maven" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Maven", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ====================================================================
+ */
+
import org.apache.maven.project.Build;
import org.apache.maven.project.Branch;
import org.apache.maven.project.Contributor;
import org.apache.maven.project.Dependency;
import org.apache.maven.project.Developer;
+import org.apache.maven.project.License;
import org.apache.maven.project.MailingList;
import org.apache.maven.project.Organization;
import org.apache.maven.project.Project;
@@ -147,12 +204,10 @@
{
project.getRepository().setConnection(
parser.nextText() );
}
- /*
else if ( parser.getName().equals( "developerConnection" ) )
{
project.getRepository().setDeveloperConnection(
parser.nextText() );
}
- */
else if ( parser.getName().equals( "url" ) )
{
project.getRepository().setUrl( parser.nextText() );
@@ -338,6 +393,55 @@
{
c.setEmail( parser.nextText() );
}
+ else if ( parser.getName().equals( "roles" ) )
+ {
+ while ( parser.nextTag() ==
XmlPullParser.START_TAG )
+ {
+ if ( parser.getName().equals( "role" ) )
+ {
+ c.addRole( parser.nextText() );
+ }
+ else
+ {
+ parser.nextText();
+ }
+ }
+ }
+ else
+ {
+ parser.nextText();
+ }
+ }
+ }
+ else
+ {
+ parser.nextText();
+ }
+ }
+ }
+ else if ( parser.getName().equals( "licenses" ) )
+ {
+ while ( parser.nextTag() == XmlPullParser.START_TAG )
+ {
+ if ( parser.getName().equals( "license" ) )
+ {
+ License l = new License();
+ project.addLicense( l );
+
+ while ( parser.nextTag() == XmlPullParser.START_TAG )
+ {
+ if ( parser.getName().equals( "name" ) )
+ {
+ l.setName( parser.nextText() );
+ }
+ else if ( parser.getName().equals( "url" ) )
+ {
+ l.setUrl( parser.nextText() );
+ }
+ else if ( parser.getName().equals( "distribution" )
)
+ {
+ l.setDistribution( parser.nextText() );
+ }
else
{
parser.nextText();
@@ -388,9 +492,9 @@
}
else if ( parser.getName().equals( "jar" ) )
{
- d.setJar( parser.nextText() );
+ d.setJar( parser.nextText() );
}
- else if ( parser.getName().equals( "properties") )
+ else if ( parser.getName().equals( "properties" ) )
{
//d.setProperties( unmarshallProperties( parser
) );
}
@@ -572,7 +676,7 @@
}
}
}
- else if ( parser.getName().equals( "properties") )
+ else if ( parser.getName().equals( "properties" ) )
{
//project.setProperties( unmarshallProperties( parser ) );
}
1.2.4.1 +2 -2 maven/src/java/org/apache/maven/NoGoalException.java
Index: NoGoalException.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/NoGoalException.java,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -r1.2 -r1.2.4.1
--- NoGoalException.java 12 Apr 2003 00:02:05 -0000 1.2
+++ NoGoalException.java 7 Aug 2003 16:56:39 -0000 1.2.4.1
@@ -3,7 +3,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
No revision
No revision
1.4.2.1 +18 -0 maven/src/java/org/apache/maven/jelly/tags/BaseTagSupport.java
Index: BaseTagSupport.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/BaseTagSupport.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- BaseTagSupport.java 11 Apr 2003 23:45:33 -0000 1.4
+++ BaseTagSupport.java 7 Aug 2003 16:56:39 -0000 1.4.2.1
@@ -56,6 +56,7 @@
* ====================================================================
*/
+import org.apache.commons.jelly.MissingAttributeException;
import org.apache.commons.jelly.TagSupport;
import org.apache.maven.jelly.MavenJellyContext;
@@ -71,4 +72,21 @@
{
return (MavenJellyContext) getContext();
}
+
+ /**
+ * Check a given 'attribute' has a value and throw the corresponding
+ * exception if it doesn't
+ *
+ * @param attribute the attribute to check
+ * @param message the message to pass in with the exception
+ * @throws MissingAttributeException when the attribute is null
+ */
+ protected void checkAttribute(Object attribute, String message) throws
MissingAttributeException
+ {
+ if (attribute == null)
+ {
+ throw new MissingAttributeException(message);
+ }
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]