You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/01/13 12:21:05 UTC

svn commit: r125065 - /maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml /maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly /maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java

Author: brett
Date: Thu Jan 13 03:21:05 2005
New Revision: 125065

URL: http://svn.apache.org/viewcvs?view=rev&rev=125065
Log:
status check
Modified:
   maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml
   maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly
   maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java

Modified: maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml?view=diff&rev=125065&p1=maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml&r1=125064&p2=maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml&r2=125065
==============================================================================
--- maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml	(original)
+++ maven/maven-1/plugins/branches/scm-1.5-branch/maven.xml	Thu Jan 13 03:21:05 2005
@@ -14,6 +14,7 @@
 
     <!-- Workaround JAR override bug with SNAPSHOT versions in 1.0.2 -->
     <ant:replace file="${maven.build.dest}/project.xml" token="1.0-alpha-1-SNAPSHOT" value="1.0-alpha-1-dev" />
+    <ant:replace file="${maven.build.dest}/project.xml" token="1.0-alpha-2-SNAPSHOT" value="1.0-alpha-2-dev" />
 
     <j:file name="${maven.build.dest}/project.properties"><j:whitespace>
 maven.jar.override=on

Modified: maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly?view=diff&rev=125065&p1=maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly&r1=125064&p2=maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly&r2=125065
==============================================================================
--- maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly	(original)
+++ maven/maven-1/plugins/branches/scm-1.5-branch/plugin.jelly	Thu Jan 13 03:21:05 2005
@@ -195,8 +195,12 @@
     
     <scm:status var="scmStatusBean" url="${scmConnection}" workingDirectory="${basedir}" excludes="project.xml,xdocs/changes.xml" />
 
-    <j:if test="${scmStatusBean.hasModifications()}">
-      <!-- TODO: list modifications? -->
+    <j:set var="modifiedItems" value="${scmStatusBean.changedFiles}" />
+    <j:if test="${not empty modifiedItems}">
+      <ant:echo>Modified:</ant:echo>
+      <j:forEach var="item" items="${modifiedItems}">
+        <ant:echo>(${item.status}) ${item.path}</ant:echo>
+      </j:forEach>
       <ant:fail>Cannot prepare a release - there are modifications outside of project.xml and changes.xml</ant:fail>
     </j:if>
 

Modified: maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java?view=diff&rev=125065&p1=maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java&r1=125064&p2=maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java&r2=125065
==============================================================================
--- maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java	(original)
+++ maven/maven-1/plugins/branches/scm-1.5-branch/src/main/org/apache/maven/plugins/scm/ScmStatusBean.java	Thu Jan 13 03:21:05 2005
@@ -17,12 +17,15 @@
  * ====================================================================
  */
 
-//import org.apache.maven.scm.command.status.StatusScmResult;
-
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.command.status.StatusScmResult;
 import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.scm.repository.ScmRepository;
 import org.codehaus.plexus.embed.Embedder;
 
+import java.io.File;
+import java.util.List;
+
 /**
  * A bean for using the Maven SCM API because wrangling objects in Jelly is no fun.
  *
@@ -30,6 +33,8 @@
  */
 public class ScmStatusBean extends ScmPatternBean
 {
+    private List changedFiles;
+
     public void status()
         throws Exception
     {
@@ -37,12 +42,16 @@
 
         ScmRepository repository = scmManager.makeScmRepository( getUrl() );
 
-/* TODO
-        // TODO: svn tag base, unless is HEAD, BASE, COMMITTED, PREV, rev#, {DATE}
-        UpdateScmResult result = scmManager.update( repository, new File( workingDirectory ), tag );
+        StatusScmResult result = scmManager.status( repository, new ScmFileSet( new File( getWorkingDirectory() ), getIncludes(), getExcludes() ) );
 
         checkResult( result );
-*/
+
+        changedFiles = result.getChangedFiles();
+    }
+
+    public List getChangedFiles()
+    {
+        return changedFiles;
     }
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org