You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "dohadwala, moiz" <do...@emc.com> on 2005/09/22 01:45:21 UTC

[m2] issues with site:deploy

I ran into several problems with site:deploy.
 
I have created a regular project using the archetype plug-in.
I have specified an internal repository running on RedHat Enterprise server
in the project's pom.xml as follows:
 
 <distributionManagement>
    <repository>
   <id>CORP-Internal</id>
   <name>CORP-Internal</name>
   <url>http://10.239.23.58/maven2</url>
    </repository>
    <site>
      <id>CORP-Internal</id>
      <url>scp://10.239.23.58/opt/maven/maven2/</url>
    </site>
  </distributionManagement>

Here's what I have in my settings.xml:

  <servers>
    <server>
      <id>Corp-Internal</id>
      <username>map</username>
      <password>map</password>
      <privateKey/>
      <passphrase/>
    </server>
  </servers>

I ran the maven deploy using m2 site:site on a windows box
What does work is the fact, that maven can login in using scp and upload the
file.
 
The problem are as follows:
The path the file is that path names are not checked to see if they end with
a trailing slash before appending other paths to the end.
 
Below is the output of the m2 site:site command.
[INFO] Searching repository for plug-in with prefix: 'site'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Hello World project
[INFO]    task-segment: [site:deploy]
[INFO]
----------------------------------------------------------------------------
[INFO] [site:deploy]
Executing command:  mkdir -p /opt/maven/maven2/
Executing command: mkdir -p -m /opt/maven/maven2/
 
Executing command: scp -t /opt/maven/maven2//site28009.zip
Uploading: site28009.zip to scp://10.239.23.58/opt/maven/maven2/
 
#############
Transfer finished. 51713 bytes copied in 0.062 seconds
Executing command:  cd /opt/maven/maven2/;unzip -o site28009.zip
>scpdeploymojo.log
Executing command: rm -f /opt/maven/maven2//site28009.zip scpdeploymojo.log
scp://10.239.23.58/opt/maven/maven2/ - Session: Disconnecting  
scp://10.239.23.58/opt/maven/maven2/ - Session: Disconnected
[INFO]
----------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 9 minutes 1 second
[INFO] Finished at: Wed Sep 21 16:11:57 PDT 2005
[INFO] Final Memory: 2M/4M
[INFO]
----------------------------------------------------------------------------
 
The double slashes caused problems with the file upload and zip extraction.
 
I downloaded the code for wagon-ssh and modified
org/apache/maven/wagon/providers/ssh/ScpWagon.java.
The change was made in the put( File source, String resourceName ) method
to check for trailing slashes while initializing the mkdirCmd ( line 256 ).
 
I rebuilt wagon-ssh and replaced the jar in maven's lib folder.
After that, the file uploaded ok. But maven won't extract the zip file's
contents. I ran the maven-site plug-in in debug mode using the eclipse
project created using the Eclipse plug-in.
 
I stopped just before the unzip command. Then I stepped through the command
execution. This time maven extracted the files. I think it is a timing
issue. Maven is terminating the channel too quickly without waiting for the
command to finish.
 
-Moiz

Re: [m2] issues with site:deploy

Posted by Brett Porter <br...@gmail.com>.
This bug was closed for beta-1: can you please reopen it with this
information. I thought catting the output had resolved this issue.

- Brett

On 9/22/05, dohadwala, moiz <do...@emc.com> wrote:
> I ran into several problems with site:deploy.
>
> I have created a regular project using the archetype plug-in.
> I have specified an internal repository running on RedHat Enterprise server
> in the project's pom.xml as follows:
>
>  <distributionManagement>
>     <repository>
>    <id>CORP-Internal</id>
>    <name>CORP-Internal</name>
>    <url>http://10.239.23.58/maven2</url>
>     </repository>
>     <site>
>       <id>CORP-Internal</id>
>       <url>scp://10.239.23.58/opt/maven/maven2/</url>
>     </site>
>   </distributionManagement>
>
> Here's what I have in my settings.xml:
>
>   <servers>
>     <server>
>       <id>Corp-Internal</id>
>       <username>map</username>
>       <password>map</password>
>       <privateKey/>
>       <passphrase/>
>     </server>
>   </servers>
>
> I ran the maven deploy using m2 site:site on a windows box
> What does work is the fact, that maven can login in using scp and upload the
> file.
>
> The problem are as follows:
> The path the file is that path names are not checked to see if they end with
> a trailing slash before appending other paths to the end.
>
> Below is the output of the m2 site:site command.
> [INFO] Searching repository for plug-in with prefix: 'site'.
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Hello World project
> [INFO]    task-segment: [site:deploy]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [site:deploy]
> Executing command:  mkdir -p /opt/maven/maven2/
> Executing command: mkdir -p -m /opt/maven/maven2/
>
> Executing command: scp -t /opt/maven/maven2//site28009.zip
> Uploading: site28009.zip to scp://10.239.23.58/opt/maven/maven2/
>
> #############
> Transfer finished. 51713 bytes copied in 0.062 seconds
> Executing command:  cd /opt/maven/maven2/;unzip -o site28009.zip
> >scpdeploymojo.log
> Executing command: rm -f /opt/maven/maven2//site28009.zip scpdeploymojo.log
> scp://10.239.23.58/opt/maven/maven2/ - Session: Disconnecting
> scp://10.239.23.58/opt/maven/maven2/ - Session: Disconnected
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Total time: 9 minutes 1 second
> [INFO] Finished at: Wed Sep 21 16:11:57 PDT 2005
> [INFO] Final Memory: 2M/4M
> [INFO]
> ----------------------------------------------------------------------------
>
> The double slashes caused problems with the file upload and zip extraction.
>
> I downloaded the code for wagon-ssh and modified
> org/apache/maven/wagon/providers/ssh/ScpWagon.java.
> The change was made in the put( File source, String resourceName ) method
> to check for trailing slashes while initializing the mkdirCmd ( line 256 ).
>
> I rebuilt wagon-ssh and replaced the jar in maven's lib folder.
> After that, the file uploaded ok. But maven won't extract the zip file's
> contents. I ran the maven-site plug-in in debug mode using the eclipse
> project created using the Eclipse plug-in.
>
> I stopped just before the unzip command. Then I stepped through the command
> execution. This time maven extracted the files. I think it is a timing
> issue. Maven is terminating the channel too quickly without waiting for the
> command to finish.
>
> -Moiz
>
>

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