evenisse 2004/03/14 07:47:54
Modified: maven-plugins/maven-scm-plugin project.xml
maven-plugins/maven-scm-plugin/src/java/org/apache/maven/plugin
ScmPlugin.java
maven-plugins/maven-scm-plugin/src/resources/META-INF/maven
plugin.xml
Log:
Add new goals. (checkout, update and changelog)
Revision Changes Path
1.3 +9 -57 maven-components/maven-plugins/maven-scm-plugin/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven-components/maven-plugins/maven-scm-plugin/project.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.xml 2 Mar 2004 15:25:29 -0000 1.2
+++ project.xml 14 Mar 2004 15:47:54 -0000 1.3
@@ -50,76 +50,28 @@
</dependency>
<dependency>
<groupId>maven</groupId>
- <artifactId>scm-cvslib</artifactId>
+ <artifactId>scm-clearcase</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
</dependency>
-
<dependency>
<groupId>maven</groupId>
- <artifactId>maven-core</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <artifactId>scm-cvslib</artifactId>
+ <version>1.0-beta-1-SNAPSHOT</version>
</dependency>
-
<dependency>
<groupId>maven</groupId>
- <artifactId>maven-model</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <artifactId>scm-perforce</artifactId>
+ <version>1.0-beta-1-SNAPSHOT</version>
</dependency>
-
<dependency>
<groupId>maven</groupId>
- <artifactId>maven-model-xpp3</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <artifactId>scm-starteam</artifactId>
+ <version>1.0-beta-1-SNAPSHOT</version>
</dependency>
-
<dependency>
<groupId>maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.0-beta-2</version>
- </dependency>
-
- <!-- Plexus -->
-
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- <version>1.1.3.3</version>
- </dependency>
-
- <dependency>
- <groupId>plexus</groupId>
- <artifactId>plexus</artifactId>
- <version>0.14-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>plexus</groupId>
- <artifactId>plexus-i18n</artifactId>
- <version>1.0-beta-2-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>classworlds</groupId>
- <artifactId>classworlds</artifactId>
- <version>1.1-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>plexus</groupId>
- <artifactId>plexus-compiler</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <artifactId>scm-svn</artifactId>
+ <version>1.0-beta-1-SNAPSHOT</version>
</dependency>
</dependencies>
1.2 +37 -5
maven-components/maven-plugins/maven-scm-plugin/src/java/org/apache/maven/plugin/ScmPlugin.java
Index: ScmPlugin.java
===================================================================
RCS file:
/home/cvs/maven-components/maven-plugins/maven-scm-plugin/src/java/org/apache/maven/plugin/ScmPlugin.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ScmPlugin.java 24 Feb 2004 16:44:56 -0000 1.1
+++ ScmPlugin.java 14 Mar 2004 15:47:54 -0000 1.2
@@ -58,6 +58,7 @@
import org.apache.maven.scm.manager.DefaultScmManager;
import org.apache.maven.scm.command.Command;
+import org.apache.maven.scm.command.changelog.ChangeLogCommand;
/**
*
@@ -70,7 +71,17 @@
private String connection;
- private String basedir;
+ private String workingDirectory;
+
+ private String branch;
+
+ private String tag;
+
+ private int range;
+
+ private String startDate;
+
+ private String endDate;
public void execute()
throws Exception
@@ -80,9 +91,30 @@
try
{
Command command = scmManager.getCommand( commandName );
-
- command.setWorkingDirectory( basedir );
-
+
+ // Default command parameters
+
+ command.setWorkingDirectory( workingDirectory );
+
+ if ( branch != null )
+ {
+ command.setBranch(branch);
+ }
+
+ if ( tag != null )
+ {
+ command.setTag(tag);
+ }
+
+ // Specific command parameters
+
+ if ( command.equals(ChangeLogCommand.NAME) )
+ {
+ ((ChangeLogCommand)command).setRange(range);
+ }
+
+ // Run command
+
command.execute();
}
catch ( Exception e )
1.2 +26 -4
maven-components/maven-plugins/maven-scm-plugin/src/resources/META-INF/maven/plugin.xml
Index: plugin.xml
===================================================================
RCS file:
/home/cvs/maven-components/maven-plugins/maven-scm-plugin/src/resources/META-INF/maven/plugin.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin.xml 24 Feb 2004 16:44:56 -0000 1.1
+++ plugin.xml 14 Mar 2004 15:47:54 -0000 1.2
@@ -3,13 +3,35 @@
<goals>
<goal>
<name>scm:checkout</name>
- <prereqs>
- <prereq>resources</prereq>
- </prereqs>
<configuration>
<commandName>checkout</commandName>
<connection>#project.repository.connection</connection>
- <basedir>#basedir</basedir>
+ <workingDirectory>#basedir</workingDirectory>
+ <branch>#branch</branch>
+ <tag>#tag</tag>
+ </configuration>
+ </goal>
+ <goal>
+ <name>scm:changelog</name>
+ <configuration>
+ <commandName>changelog</commandName>
+ <connection>#project.repository.connection</connection>
+ <workingDirectory>#basedir</workingDirectory>
+ <branch>#branch</branch>
+ <tag>#tag</tag>
+ <range>30</range>
+ <startDate>#startDate</startDate>
+ <endDate>#startDate</endDate>
+ </configuration>
+ </goal>
+ <goal>
+ <name>scm:update</name>
+ <configuration>
+ <commandName>update</commandName>
+ <connection>#project.repository.connection</connection>
+ <workingDirectory>#basedir</workingDirectory>
+ <branch>#branch</branch>
+ <tag>#tag</tag>
</configuration>
</goal>
</goals>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]