Anthony Whitford created MSCMPUB-4:
--------------------------------------

             Summary: Need a working example for GitHub/gh-pages, preferably 
naturally linked to natural site lifecycle, and multi-module
                 Key: MSCMPUB-4
                 URL: https://jira.codehaus.org/browse/MSCMPUB-4
             Project: maven-scm-publish-plugin
          Issue Type: Story
         Environment: Mac OSX 10.8.2, Java 1.6 Update 35, Maven 3.0.4, Maven 
Site Plugin 3.2, Maven SCM Plugin 1.8, Git
            Reporter: Anthony Whitford
            Priority: Critical


I am trying to update my 
[lombok-maven-plugin|http://awhitford.github.com/lombok.maven/lombok-maven-plugin/index.html]
 project to use this plugin to publish the project to _Github Pages_.

When I try this command:
{noformat}
mvn clean site site:stage-deploy scm-publish:publish-scm
{noformat}
which is outlined 
[here|http://maven.apache.org/plugins/maven-scm-publish-plugin/examples/multi-module-configuration.html],
 I get this error:
{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-scm-publish-plugin:1.0-beta-1:publish-scm 
(default-cli) on project lombok-maven: Unable to checkout from SCM
[ERROR] Provider message:
[ERROR] The git-log command failed.
[ERROR] Command output:
[ERROR] fatal: ambiguous argument 'master': unknown revision or path not in the 
working tree.
[ERROR] Use '--' to separate paths from revisions
{noformat}

(?) Is there a multi-module project in GitHub that uses this plugin that I can 
use as an example?

This is what I did so far...

{code:xml}
<properties>
  <siteMainDirectory>${user.home}/Sites/lombok.maven</siteMainDirectory>
  
<scmPubCheckoutDirectory>${user.home}/site-content-scm/lombok.maven</scmPubCheckoutDirectory>
</properties>
...
<pluginManagement>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-site-plugin</artifactId>
      <version>3.2</version>
      <configuration>
        <skipDeploy>true</skipDeploy>
        <stagingSiteURL>file://${siteMainDirectory}</stagingSiteURL>
      </configuration>
    </plugin>
...
  </plugins>
</pluginManagement>
...
<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <executions>
      <execution>
        <id>stage-for-scm-publish</id>
        <phase>post-site</phase>
        <goals>
          <goal>stage</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-scm-publish-plugin</artifactId>
    <version>1.0-beta-1</version>
    <configuration>
      <checkoutDirectory>${scmPubCheckoutDirectory}</checkoutDirectory>
      <content>\${siteMainDirectory}</content>
      <tryUpdate>true</tryUpdate>
      <scmBranch>gh-pages</scmBranch>
      <pubScmUrl>scm:git:g...@github.com:awhitford/lombok.maven.git</pubScmUrl>
    </configuration>
    <executions>
      <execution>
        <id>scm-publish</id>
        <phase>site-deploy</phase>
        <goals>
          <goal>publish-scm</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
</plugins>
{code}

Finally, I'm really interested in wiring this up so that when I do a normal 
{{site-deploy}} or an implicit one through the release process, it gets 
published to {{gh-pages}} -- just like I had working with 
[wagon-gitsite|https://github.com/awhitford/wagon-gitsite].

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

        

Reply via email to