[
http://jira.codehaus.org/browse/MOJO-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Tran closed MOJO-1536.
--------------------------
Resolution: Fixed
Assignee: Dan Tran
it appears you are the first one using this feature :(
fixed at
Revision: 12280
Author: dantran
Date: 10:44:19 PM, Friday, June 18, 2010
Message:
[MOJO-1536] correctly unpack the optimize scp directory upload submitted by
Denis Cabasson
----
Modified : /trunk/mojo/wagon-maven-plugin/pom.xml
Added : /trunk/mojo/wagon-maven-plugin/src/it/MOJO-1536
Added : /trunk/mojo/wagon-maven-plugin/src/it/MOJO-1536/pom.xml
Added : /trunk/mojo/wagon-maven-plugin/src/it/MOJO-1536/src
Added : /trunk/mojo/wagon-maven-plugin/src/it/MOJO-1536/src/website
Added : /trunk/mojo/wagon-maven-plugin/src/it/MOJO-1536/src/website/test.txt
Modified :
/trunk/mojo/wagon-maven-plugin/src/main/java/org/codehaus/mojo/wagon/shared/DefaultWagonUpload.java
Please test out the latest 1.0-beta-4-SNAPSHOT
> Optimized wagon plugin is trying to unzip the wrong file
> --------------------------------------------------------
>
> Key: MOJO-1536
> URL: http://jira.codehaus.org/browse/MOJO-1536
> Project: Mojo
> Issue Type: Bug
> Components: wagon
> Reporter: Denis Cabasson
> Assignee: Dan Tran
> Priority: Critical
> Attachments: MOJO-1536-patch.txt, MOJO-1536-testcase.zip
>
>
> I am trying to use the optimized version of the wagon plugin to upload a
> bunch of files (using sshext).
> The wagon plugin is copying the zip allright :
> {quote}
> Executing command: cmd.exe /X /C "pscp -i "****.ppk" -batch wagon18317.zip
> *...@***:///thefolder/wagon18317.zip"
> {quote}
> but when trying to unzip :
> {quote}
> Executing command: cmd.exe /X /C "plink -i "****.ppk" -batch *...@**** "unzip
> -o -qq -d / //wagon18317.zip""
> {quote}
> The name of the remote folder has been lost....
> I tracked that in the code to :
> https://svn.codehaus.org/mojo/trunk/mojo/wagon-maven-plugin/src/main/java/org/codehaus/mojo/wagon/shared/DefaultWagonUpload.java
> {code:java}
> logger.info( "Uploading " + fileset );
> File zipFile;
> zipFile = File.createTempFile( "wagon", ".zip" );
> try
> {
> FileSetManager fileSetManager = new FileSetManager( logger,
> logger.isDebugEnabled() );
> String[] files = fileSetManager.getIncludedFiles( fileset );
>
> if ( files.length == 0 )
> {
> logger.info( "Nothing to upload.");
> return;
> }
>
> logger.info( "Creating " + zipFile + " ..." );
> createZip( files, zipFile, fileset.getDirectory() );
> String remoteFileName = zipFile.getName();
>
> String remoteFile = zipFile.getName();
> String remoteDir = fileset.getOutputDirectory();
> if ( !StringUtils.isBlank( remoteDir ) )
> {
> remoteFile = remoteDir + "/" + remoteFile;
> }
> logger.info( "Uploading " + zipFile + " to " +
> wagon.getRepository().getUrl() + "/" + remoteFile + " ..." );
> wagon.put( zipFile, remoteFile );
>
> String targetRepoBaseDirectory =
> wagon.getRepository().getBasedir();
>
> // We use the super quiet option here as all the noise seems to
> kill/stall the connection
> String command = "unzip -o -qq -d " + targetRepoBaseDirectory + "
> " + targetRepoBaseDirectory + "/" + remoteFileName;
> try
> {
> logger.info( "Remote: " + command );
> ( (CommandExecutor) wagon ).executeCommand( command );
> }
> finally
> {
> command = "rm -f " + targetRepoBaseDirectory + "/" +
> remoteFileName ;
> logger.info( "Remote: " + command );
> {code}
> Why use *wagon.getRepository().getUrl()* to get the remote directory to
> upload to, and *wagon.getRepository().getBasedir()* to unzip the zip file?
> Shouldn't it be the one and same folder at both places?
--
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
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email