views:

40

answers:

1

I'm trying to deploy my Maven generated site to a googlecode project using mercurial. When I do a

mvn site:deploy

I get Transfer error: org.apache.maven.scm.NoSuchCommandScmException: No such command 'list'.

Its like its trying to do a "svn list" even though I am using mercurial.

In my pom I have maven wagon and mercurial setup (I think correctly):

org.apache.maven.wagon wagon-scm 1.0-beta-6 org.apache.maven.scm maven-scm-provider-hg 1.4

Then for my site deploy I have a separate mercurial repository:

   <distributionManagement>
  <site>
   <id>googlecode</id>
   <name>googlecode site</name>
   <url>scm:hg:${project.site.scm}/</url>
  </site>
   </distributionManagement>

In my settings.xml I have:

  <servers>
  <server>
    <id>googlecode</id>
    <username>...</username>
    <password>...</password>
  </server>
  </servers>
+1  A: 

site:deploy uses the scp or file protocol for deploying a site to the server (see here). I configure this along normal ssh lines (authorized_keys, etc). And in the pom have something along the lines:

  <!-- The location for generating the website. -->
  <distributionManagement>
    <site>
      <id>website</id>
      <url>scp://[email protected]/path/to/deploy/directory/</url>
    </site>
  </distributionManagement>

It takes everything from the target/site directory and copies it across to the defined destination. However, the downside is, that it is up to me to ensure that what I have deployed is actually checked into my version control system. i.e:

hg push (use mercurial directly to push my changes to other developers).
mvn site:deploy (deploys from my local machine using scp).
Clinton
Well the only issue is that googlecode does not have standard ssh access since they use the bigtable for everything (I think). So what I have done for now is make another mercurial repo for the site, clone it locally, rsync target/site to my local cloned copy and then hg commit, hg push.
Adam Gent