Uploaded image for project: 'Maven SCM Publish Plugin'
  1. Maven SCM Publish Plugin
  2. MSCMPUB-4

Need a working example for GitHub/gh-pages, preferably naturally linked to natural site lifecycle, and multi-module

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.0
    • None
    • 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

    Description

      I am trying to update my lombok-maven-plugin project to use this plugin to publish the project to Github Pages.

      When I try this command:

      mvn clean site site:stage-deploy scm-publish:publish-scm
      

      which is outlined here, I get this error:

      [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
      

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

      <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:git@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>
      

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            awhitford Anthony Whitford
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment