You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Grégory Joseph (JIRA)" <ji...@codehaus.org> on 2009/05/06 16:02:44 UTC

[jira] Created: (WAGON-265) Let ftp wagon copy to a non-existing directory

Let ftp wagon copy to a non-existing directory
----------------------------------------------

                 Key: WAGON-265
                 URL: http://jira.codehaus.org/browse/WAGON-265
             Project: Maven Wagon
          Issue Type: Improvement
          Components: wagon-ftp
    Affects Versions: 1.0-beta-5
            Reporter: Grégory Joseph


I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}

This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.

Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?

Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

-- 
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] (WAGON-265) Let ftp wagon copy to a non-existing directory

Posted by "Falko Modler (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/WAGON-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285586#comment-285586 ] 

Falko Modler commented on WAGON-265:
------------------------------------

After Re-checking the logfiles, I can now see that wagon-ftp does try to create the missing "maven" folder but fails with "Permission denied" because it tries this in the wrong parent folder "/mms/www" instead of "/mms/www/reuse-sites".

This is because it executes CWD to the parent directory twice:
Command sent: CWD ..

I guess this is because the path already contains .. and something like an automatic CWD .. might have been implemented to fix this issue (WAGON-265).

I will create a new bug ticket.

                
> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: https://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>            Assignee: Mark Struberg
>             Fix For: 2.0
>
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (WAGON-265) Let ftp wagon copy to a non-existing directory

Posted by "Falko Modler (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/WAGON-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285586#comment-285586 ] 

Falko Modler edited comment on WAGON-265 at 12/12/11 3:43 AM:
--------------------------------------------------------------

After Re-checking the logfiles, I can now see that wagon-ftp does try to create the missing "maven" folder but fails with "Permission denied" because it tries this in the wrong parent folder "/mms/www" instead of "/mms/www/reuse-sites".

This is because it executes CWD to the parent directory twice:
Command sent: CWD ..

I guess this is because the path already contains .. and something like an automatic CWD .. might have been implemented to fix this issue (WAGON-265).

I will create a new bug ticket.
Edit: Done, see WAGON-363.
                
      was (Author: famod):
    After Re-checking the logfiles, I can now see that wagon-ftp does try to create the missing "maven" folder but fails with "Permission denied" because it tries this in the wrong parent folder "/mms/www" instead of "/mms/www/reuse-sites".

This is because it executes CWD to the parent directory twice:
Command sent: CWD ..

I guess this is because the path already contains .. and something like an automatic CWD .. might have been implemented to fix this issue (WAGON-265).

I will create a new bug ticket.

                  
> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: https://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>            Assignee: Mark Struberg
>             Fix For: 2.0
>
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (WAGON-265) Let ftp wagon copy to a non-existing directory

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

Brett Porter updated WAGON-265:
-------------------------------

      Fix Version/s: 1.0
    Patch Submitted: [Yes]

> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: http://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>             Fix For: 1.0
>
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

-- 
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-265) Let ftp wagon copy to a non-existing directory

Posted by "Falko Modler (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/WAGON-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285364#comment-285364 ] 

Falko Modler commented on WAGON-265:
------------------------------------

I use 2.1 but creating non-existent parent folders does not seem to work (real ftp-server replaced with "someurl.com"):

{code}

I use 2.1 but creating non-existent parent folders does not seem to work:

Command sent: SYST

Reply received: 215 UNIX Type: L8 Version: SUNOS

Remote system is UNIX Type: L8 Version: SUNOS
Command sent: TYPE I

Reply received: 200 Type set to I.

ftp://someurl.com/mms/www/reuse-sites/mms-parent/ - Session: Opened
[INFO] Pushing c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site
[INFO]    >>> to ftp://someurl.com/mms/www/reuse-sites/mms-parent/../maven/exec-listeners-extension
Command sent: CWD /mms/www/reuse-sites/mms-parent/

Reply received: 250 CWD command successful.

Recursively uploading directory c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site as ../maven/exec-listeners-extension
processing = c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site as ../maven/exec-listeners-extension
Command sent: CWD ../maven/exec-listeners-extension

Reply received: 550 ../maven/exec-listeners-extension: No such file or directory.

Command sent: PWD

Reply received: 257 "/mms/www/reuse-sites/mms-parent" is current directory.

Command sent: CWD ..

Reply received: 250 CWD command successful.

Command sent: CWD ..

Reply received: 250 CWD command successful.

Command sent: PWD

Reply received: 257 "/mms/www" is current directory.

Command sent: CWD maven

Reply received: 550 maven: No such file or directory.

Command sent: MKD maven

Reply received: 550 maven: Permission denied.

Command sent: CWD /mms/www

Reply received: 250 CWD command successful.

Command sent: CWD /mms/www/reuse-sites/mms-parent

Reply received: 250 CWD command successful.

ftp://someurl.com/mms/www/reuse-sites/mms-parent/ - Session: Disconnecting
ftp://someurl.com/mms/www/reuse-sites/mms-parent/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.461s
[INFO] Finished at: Fri Dec 09 20:56:09 CET 2011
[INFO] Final Memory: 33M/961M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:deploy (default-deploy) on project exec-listeners-extension: Error uploading site: Unable to create directory ../maven/exec-listeners-extension when processing c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site -> [Help 1]
{code}

This folder/path does already exist:
ftp://someurl.com/mms/www/reuse-sites/mms-parent/
But not the "maven" folder that needs to be created:
ftp://someurl.com/mms/www/reuse-sites/maven

The final site location sould be:
ftp://someurl.com/mms/www/reuse-sites/maven/exec-listeners-extension

Once I manually create the maven folder *and* it's subfolder exec-listeners-extension then site deployment works.

Important thing to note: The exec-listeners-extension module inherits from mms-modules-parent (direct parent) which inherits from mms-parent ("transitive" parent). I think that's why this relative navigation happens: [...]/mms-parent/../maven/exec-listeners-extension

> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: https://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>            Assignee: Mark Struberg
>             Fix For: 2.0
>
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Work started: (WAGON-265) Let ftp wagon copy to a non-existing directory

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

Work on WAGON-265 started by Mark Struberg.

> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: http://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>            Assignee: Mark Struberg
>             Fix For: 1.0
>
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

-- 
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-265) Let ftp wagon copy to a non-existing directory

Posted by "Ryan Lea (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=189466#action_189466 ] 

Ryan Lea commented on WAGON-265:
--------------------------------

I ran into the same issue and added a little code around the initial cwd to check if the directory existed.  If so, the directories are attempted to be created first, any failures will result in the call failing.

I had the intention of making this a configurable switch, although am not overly familiar with how to supply configuration to wagon providers.  As a result, there is a boolean to switch this feature on/off, which is on by default.  If someone is able to point me in the direction of how to provide configurable parameters to wagon providers, I'll happily also make it configurable, with the default being off.

Cheers

> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: http://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

-- 
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-265) Let ftp wagon copy to a non-existing directory

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

Ryan Lea updated WAGON-265:
---------------------------

    Attachment: WAGON-265-wagon-ftp.patch

Attached patch to create non existing directories, during the initial cwd.

> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: http://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

-- 
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-265) Let ftp wagon copy to a non-existing directory

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

Mark Struberg closed WAGON-265.
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.0)
                   2.0

fixed in wagon-2.0-SNAPSHOT and deployed to our snapshot repos.

I used the following section to test it (beside a few new unit tests)

{noformat}
  <distributionManagement>
    <site>
      <id>test-website</id>
      <url>ftp://myserver:/home/myuser/tmp/myftpdir/${project.version}</url>
    </site>
  </distributionManagement>

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ftp</artifactId>
        <version>2.0-SNAPSHOT</version>
      </extension>
    </extensions>
  </build>
{noformat}

can you please also test if your scenario works now? txs!


> Let ftp wagon copy to a non-existing directory
> ----------------------------------------------
>
>                 Key: WAGON-265
>                 URL: http://jira.codehaus.org/browse/WAGON-265
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-ftp
>    Affects Versions: 1.0-beta-5
>            Reporter: Grégory Joseph
>            Assignee: Mark Struberg
>             Fix For: 2.0
>
>         Attachments: WAGON-265-wagon-ftp.patch
>
>
> I usually configure my poms with such a site url : {{ftp://hostname/path/to/www/projects/${artifactId}-${version}}}
> This actually works (as far as I can tell) with the ssh wagon. The ftp wagon chokes, however, because the initial changeDir command is called with the path above, and unlike when copying further files, it doesn't attempt to create the missing directories.
> Is there a reason for this? Couldn't this be the default behaviour, or even an optional one ?
> Alternatively, I'd have fancied a way to configure the site:deploy mojo to tell it to pass something else than "." as destinationDirectory when calling wagon.putDirectory ...

-- 
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