You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ba...@apache.org on 2008/11/07 22:46:09 UTC

svn commit: r712280 - in /maven/plugins/trunk/maven-site-plugin/src/site: apt/examples/site-deploy-to-sourceforge.net.apt apt/index.apt site.xml

Author: baerrach
Date: Fri Nov  7 13:46:09 2008
New Revision: 712280

URL: http://svn.apache.org/viewvc?rev=712280&view=rev
Log:
[MSITE-362] Site upload is not compatible with sourceforge.net changes

Added example to show how to use shell.sourceforge.net to upload with existing site plugin.
Thanks to Johan Lindquist for providing the work around details.

Added:
    maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/site-deploy-to-sourceforge.net.apt
Modified:
    maven/plugins/trunk/maven-site-plugin/src/site/apt/index.apt
    maven/plugins/trunk/maven-site-plugin/src/site/site.xml

Added: maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/site-deploy-to-sourceforge.net.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/site-deploy-to-sourceforge.net.apt?rev=712280&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/site-deploy-to-sourceforge.net.apt (added)
+++ maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/site-deploy-to-sourceforge.net.apt Fri Nov  7 13:46:09 2008
@@ -0,0 +1,231 @@
+ ------
+ Deployment of site to web.sourceforge.net
+ ------
+ Barrie Treloar
+ ------
+ 8 November 2008
+ ------
+
+Deployment of site to web.sourceforge.net
+
+  This {{{http://sourceforge.net/community/forum/topic.php?id=3518&page}sf.net announcement}} indicates that the
+  new hostname for project web file management has changed. The new hostname for file management is: web.sourceforge.net and
+  the new accepted methods are: SFTP, SCP, rsync over SSH. Unfortunately web.sourceforge.net also has a restricted shell
+  environment and does not allow remote commands to be executed.
+
+  In addition shell access to shell.sourceforge.net now requires creation of a shell before it can be accessed.
+
+  Both of these mean that if you attempt to deploy without following these steps you will get an error.
+
+Quick Start
+
+  * Create a shell to shell.sourceforge.net with your username and project group.
+
+---
+ssh -t <username>,<project name>@shell.sf.net create
+---
+
+  * Use <<<shell.sourceforge.net>>> (instead of web.sourceforge.net) in you site url.
+
+---
+  ...
+  <distributionManagement>
+    ...
+    <site>
+      <id>your_project.sf.net</id>
+      <url>scp://shell.sourceforge.net/home/groups/y/yo/your_project/htdocs</url>
+    </site>
+  </distributionManagement>
+---
+
+  * run <<<mvn site:deploy>>>.
+
+  * verify you have a working web site.
+
+    Open a browser to http://your_project.sf.net
+
+  []
+
+Detailed Instructions with Examples
+
+  The following examples will use the <<<qifcon>>> project and the user <<<barrie>>> as detailed examples.
+
+* Create a shell to shell.sourceforge.net with your username and project group.
+
++---+
+$ ssh -t barrie,qifcon@shell.sf.net create
+barrie,qifcon@shell.sf.net's password:
+
+Requesting a new shell for "barrie" and waiting for it to start.
+queued... creating... starting...
+
+This is an interactive shell created for user barrie,qifcon.
+Use the "timeleft" command to see how much time remains before shutdown.
+Use the "shutdown" command to destroy the shell before the time limit.
+For path information and login help, type "sf-help".
+
+-bash-3.2$
++---+
+
+* Use <<<shell.sourceforge.net>>> (instead of web.sourceforge.net) in you site url.
+
+  In the projects <<<pom.xml>>>:
+
++---+
+  ...
+  <distributionManagement>
+    ...
+    <site>
+      <id>qifcon.sf.net</id>
+      <url>scp://shell.sourceforge.net/home/groups/q/qi/qifcon/htdocs</url>
+    </site>
+  </distributionManagement>
++---+
+
+* run <<<mvn site:deploy>>>.
+
++---+
+C:\ide\Finance\qifcon\site>mvn site:deploy
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'site'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building QifCon
+[INFO]    task-segment: [site:deploy]
+[INFO] ------------------------------------------------------------------------
+[INFO] [site:deploy]
+Using private key: C:\Projects\putty\barrie@sourceforge-net.openssh
+scp://shell.sourceforge.net/home/groups/q/qi/qifcon/htdocs - Session: Opened
+Executing command: mkdir -p /home/groups/q/qi/qifcon/htdocs/.
+Executing command: mkdir -p /home/groups/q/qi/qifcon/htdocs/.
+Executing command: scp -t /home/groups/q/qi/qifcon/htdocs/./wagon51463.zip
+Uploading: ./wagon51463.zip to scp://shell.sourceforge.net/home/groups/q/qi/qifcon/htdocs
+
+########################
+Transfer finished. 95979 bytes copied in 1.812 seconds
+Executing command: cd /home/groups/q/qi/qifcon/htdocs/.; unzip -q -o wagon51463.zip; rm -f wagon51463.zip
+Executing command: chmod -Rf g+w,a+rX /home/groups/q/qi/qifcon/htdocs
+scp://shell.sourceforge.net/home/groups/q/qi/qifcon/htdocs - Session: Disconnecting
+scp://shell.sourceforge.net/home/groups/q/qi/qifcon/htdocs - Session: Disconnected
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 30 seconds
+[INFO] Finished at: Sat Nov 08 08:09:40 CST 2008
+[INFO] Final Memory: 6M/11M
+[INFO] ------------------------------------------------------------------------
++---+
+
+* verify you have a working web site.
+
+  Open a browser to http://qifcon.sf.net
+
+
+Trouble Shooting
+
+* Trying to deploy to web.sourceforge.net
+
+  The accepted methods for deploying to web.sourceforge.net are: SFTP, SCP, rsync over SSH.
+
+  This will mean that the zipped archive created by wagon can be uploaded but the commands
+  wagon uses to create directories, unzip and chmod files will fail silently.
+
+  There are two types of failures.
+
+  [[1]] No such file or directory
+
+    This will occur if you are deploying into a subdirectory that does not yet exist.
+    The cause is the mkdir command has failed silently.
+
+    An example of this error:
+
++---+
+C:\ide\Finance\qifcon\site>mvn site:deploy
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'site'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building QifCon
+[INFO]    task-segment: [site:deploy]
+[INFO] ------------------------------------------------------------------------
+[INFO] [site:deploy]
+Using private key: C:\Projects\putty\barrie@sourceforge-net.openssh
+scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site - Session: Opened
+Executing command: mkdir -p /home/groups/q/qi/qifcon/htdocs/site/.
+Executing command: mkdir -p /home/groups/q/qi/qifcon/htdocs/site/.
+Executing command: scp -t /home/groups/q/qi/qifcon/htdocs/site/./wagon12736.zip
+scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site - Session: Disconnecting
+scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site - Session: Disconnected
+[INFO] ------------------------------------------------------------------------
+[ERROR] BUILD ERROR
+[INFO] ------------------------------------------------------------------------
+[INFO] Error uploading site
+
+Embedded error: SCP terminated with error: 'scp: /home/groups/q/qi/qifcon/htdocs/site/./wagon12736.zip: No such file or directory'
+[INFO] ------------------------------------------------------------------------
+[INFO] For more information, run Maven with the -e switch
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 15 seconds
+[INFO] Finished at: Sat Nov 08 07:27:34 CST 2008
+[INFO] Final Memory: 6M/11M
+[INFO] ------------------------------------------------------------------------
++---+
+
+  [[2]] Unable to unzip the wagon.zip file
+
+    If the directory exists then the wagon.zip file can be uploaded site:deploy will appear to
+    succeed but the web site will not work since the wagon.zip can not be unzipped.
+
++---+
+C:\ide\Finance\qifcon\site>mvn site:deploy
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'site'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building QifCon
+[INFO]    task-segment: [site:deploy]
+[INFO] ------------------------------------------------------------------------
+[INFO] [site:deploy]
+Using private key: C:\Projects\putty\barrie@sourceforge-net.openssh
+scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site - Session: Opened
+Executing command: mkdir -p /home/groups/q/qi/qifcon/htdocs/site/.
+Executing command: mkdir -p /home/groups/q/qi/qifcon/htdocs/site/.
+Executing command: scp -t /home/groups/q/qi/qifcon/htdocs/site/./wagon21889.zip
+Uploading: ./wagon21889.zip to scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site
+
+########################
+Transfer finished. 95979 bytes copied in 1.872 seconds
+Executing command: cd /home/groups/q/qi/qifcon/htdocs/site/.; unzip -q -o wagon21889.zip; rm -f wagon21889.zip
+Executing command: chmod -Rf g+w,a+rX /home/groups/q/qi/qifcon/htdocs/site
+scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site - Session: Disconnecting
+scp://web.sourceforge.net/home/groups/q/qi/qifcon/htdocs/site - Session: Disconnected
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 18 seconds
+[INFO] Finished at: Sat Nov 08 07:51:04 CST 2008
+[INFO] Final Memory: 6M/11M
+[INFO] ------------------------------------------------------------------------
++---+
+
+  []
+
+* No shell created error
+
+    If you try to run ssh without first creating a shell you will get the following error:
+
++---+
+$ ssh barrie,qifcon@shell.sf.net
+barrie,qifcon@shell.sf.net's password:
+Logging in to your interactive shell...
+
+You don't have an active shell at this time.  For basic file transfers and
+management, use web.sourceforge.net -- it allows rsync, sftp, and scp access.
+
+If you would like to create a shell, use ssh to login using a USER,PROJECT
+username with the "create" command.  If you tell ssh to allocate a tty
+(e.g. using -t), an interactive shell will be opened when the create is
+done.  Otherwise, the create command will exit when the shell becomes
+ready for use.  An example create that enters the shell when ready:
+
+    ssh -t USER,PROJECT@shell.sourceforge.net create
+
+Connection to shell.sf.net closed.
++---+
\ No newline at end of file

Modified: maven/plugins/trunk/maven-site-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/site/apt/index.apt?rev=712280&r1=712279&r2=712280&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-site-plugin/src/site/apt/index.apt Fri Nov  7 13:46:09 2008
@@ -92,4 +92,5 @@
 
    * {{{examples/creatingskins.html}Creating a Skin for the Maven Site Plugin}}
 
+   * {{{examples/site-deploy-to-sourceforge.net.html}Deploy to sourceforge.net}}
 

Modified: maven/plugins/trunk/maven-site-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/site/site.xml?rev=712280&r1=712279&r2=712280&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/src/site/site.xml Fri Nov  7 13:46:09 2008
@@ -39,6 +39,7 @@
       <item name="Changing the Template File" href="/examples/templatefile.html"/>
       <item name="Creating Skins" href="/examples/creatingskins.html"/>
       <item name="Excluding Modules" href="/examples/moduleexcludes.html"/>
+      <item name="Deploy to sourceforge.net" href="/examples/site-deploy-to-sourceforge.net.html"/>
     </menu>
   </body>
 </project>