You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Carlos Sanchez (JIRA)" <ji...@codehaus.org> on 2006/04/17 02:29:48 UTC

[jira] Created: (WAGON-41) Wagon SCM does not add correctly new files

Wagon SCM does not add correctly new files
------------------------------------------

         Key: WAGON-41
         URL: http://jira.codehaus.org/browse/WAGON-41
     Project: wagon
        Type: Bug

    Versions: 1.0-alpha-7    
    Reporter: Carlos Sanchez


If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.

We need to:
cover that case in unit tests (better if done at wagon-test level)
make wagon fail when the add command fails
make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-41?page=all ]

Carlos Sanchez updated WAGON-41:
--------------------------------

    Comment: was deleted

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>     Versions: 1.0-alpha-7
>     Reporter: Carlos Sanchez

>
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-41?page=all ]

Carlos Sanchez updated WAGON-41:
--------------------------------

       Priority: Critical  (was: Major)
    Fix Version: 1.0-alpha-7

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>     Versions: 1.0-alpha-7
>     Reporter: Carlos Sanchez
>     Priority: Critical
>      Fix For: 1.0-alpha-7

>
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-41?page=all ]

Carlos Sanchez updated WAGON-41:
--------------------------------

    Component: wagon-scm

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>   Components: wagon-scm
>     Versions: 1.0-beta-1
>     Reporter: Carlos Sanchez
>     Priority: Critical
>      Fix For: 1.0-beta-1

>
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-41?page=all ]
     
Carlos Sanchez closed WAGON-41:
-------------------------------

     Assign To: Carlos Sanchez  (was: Henry S. Isidro)
    Resolution: Fixed

Quick fix adding files that failed again

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>   Components: wagon-scm
>     Versions: 1.0-beta-1
>     Reporter: Carlos Sanchez
>     Assignee: Carlos Sanchez
>     Priority: Critical
>      Fix For: 1.0-beta-1

>
>   Time Spent: 9 hours, 30 minutes
>    Remaining: 0 minutes
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-41?page=comments#action_63648 ] 

Carlos Sanchez commented on WAGON-41:
-------------------------------------

This would do the second point (make wagon fail when the add command fails)

{noformat}
Index: C:/dev/maven/sandbox/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java
===================================================================
--- C:/dev/maven/sandbox/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java	(revision 394582)
+++ C:/dev/maven/sandbox/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java	(working copy)
@@ -184,7 +184,7 @@
 
             File basedir = scmFile.getParentFile();
 
-            String msg = "Adding " + resourceName + " to repository";
+            String msg = "Adding " + resourceName + " to repository"; // TODO use project name
 
             ScmProvider scmProvider = scmManager.getProviderByRepository( scmRepository );
 
@@ -269,9 +269,11 @@
      * @return the number of files added.
      */
     private int addFiles( ScmProvider scmProvider, ScmRepository scmRepository, File basedir, File scmFile )
-        throws ScmException
+        throws ScmException, TransferFailedException
     {
         AddScmResult result = scmProvider.add( scmRepository, new ScmFileSet( basedir, scmFile ) );
+        
+        checkScmResult( result );
 
         int addedFiles = result.getAddedFiles().size();
 
{noformat}

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>     Versions: 1.0-alpha-7
>     Reporter: Carlos Sanchez

>
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-41?page=comments#action_63647 ] 

Carlos Sanchez commented on WAGON-41:
-------------------------------------

This would do the second point (make wagon fail when the add command fails)


Index: C:/dev/maven/sandbox/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java
===================================================================
--- C:/dev/maven/sandbox/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java	(revision 394582)
+++ C:/dev/maven/sandbox/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java	(working copy)
@@ -184,7 +184,7 @@
 
             File basedir = scmFile.getParentFile();
 
-            String msg = "Adding " + resourceName + " to repository";
+            String msg = "Adding " + resourceName + " to repository"; // TODO use project name
 
             ScmProvider scmProvider = scmManager.getProviderByRepository( scmRepository );
 
@@ -269,9 +269,11 @@
      * @return the number of files added.
      */
     private int addFiles( ScmProvider scmProvider, ScmRepository scmRepository, File basedir, File scmFile )
-        throws ScmException
+        throws ScmException, TransferFailedException
     {
         AddScmResult result = scmProvider.add( scmRepository, new ScmFileSet( basedir, scmFile ) );
+        
+        checkScmResult( result );
 
         int addedFiles = result.getAddedFiles().size();
 


> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>     Versions: 1.0-alpha-7
>     Reporter: Carlos Sanchez

>
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated WAGON-41:
------------------------------

    Fix Version/s:     (was: 1.0-beta-1)
                   1.0-beta-3

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>                 Key: WAGON-41
>                 URL: http://jira.codehaus.org/browse/WAGON-41
>             Project: Maven Wagon
>          Issue Type: Bug
>          Components: wagon-scm
>    Affects Versions: 1.0-beta-1
>            Reporter: Carlos Sanchez
>            Assignee: Carlos Sanchez
>            Priority: Critical
>             Fix For: 1.0-beta-3
>
>          Time Spent: 9 hours, 30 minutes
>  Remaining Estimate: 0 minutes
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-41) Wagon SCM does not add correctly new files

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-41?page=all ]

Carlos Sanchez updated WAGON-41:
--------------------------------

    Comment: was deleted

> Wagon SCM does not add correctly new files
> ------------------------------------------
>
>          Key: WAGON-41
>          URL: http://jira.codehaus.org/browse/WAGON-41
>      Project: wagon
>         Type: Bug

>   Components: wagon-scm
>     Versions: 1.0-beta-1
>     Reporter: Carlos Sanchez
>     Assignee: Carlos Sanchez
>     Priority: Critical
>      Fix For: 1.0-beta-1

>
>   Time Spent: 9 hours, 30 minutes
>    Remaining: 0 minutes
>
> If the directory to deploy the site to exists, but the files don't, the deploy doesn't add new files.
> The problem is that tries to add files target/checkout/* using target/checkout as working dir, so the scm add fails, but Wagon doesn't check for failure in the add command, so neither does it deploy or show the error.
> We need to:
> cover that case in unit tests (better if done at wagon-test level)
> make wagon fail when the add command fails
> make wagon add the right file name relative from the working dir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira