Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make site deployment consistent #116

Open
khmarbaise opened this issue Jun 1, 2020 · 1 comment
Open

Make site deployment consistent #116

khmarbaise opened this issue Jun 1, 2020 · 1 comment

Comments

@khmarbaise
Copy link
Member

Currently we make a difference between mono module project and non mono module projects.
We should make it consistent and only use one way to go.
This means from my point of view:

  • Use configuration for maven-scm-publish-plugin like this:
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-scm-publish-plugin</artifactId>
  <version>3.0.0</version>
  <configuration>
    <pubScmUrl>${project.scm.developerConnection}</pubScmUrl>
    <scmBranch>gh-pages</scmBranch>
    <content>${project.build.directory}/staging</content>
  </configuration>
..
</plugin>
  • Also we should use configuration during the release like this:
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5.3</version>
  <configuration>
    <arguments>${arguments}</arguments>
    <goals>deploy site site:stage scm-publish:publish-scm</goals>
    <autoVersionSubmodules>true</autoVersionSubmodules>
   </configuration>
</plugin>
  • This would result in having always the same path to go no differences

Consequences

  • every project has to define a property like this: <scmpublish.content>target/staging/${project.artifactId}</scmpublish.content>
  • every project has to define the distributionManagement like this:
  <distributionManagement>
    <site>
      <id>github</id>
      <url>scm:git:ssh://[email protected]/mojohaus/<repository>.git</url>
    </site>
  </distributionManagement>
@khmarbaise khmarbaise added this to the mojo-parent-60 milestone Jun 1, 2020
@hboutemy
Copy link
Member

hboutemy commented Aug 6, 2020

@khmarbaise on the second point (automatic site publish during release): this can't work for multi-module builds, because such build require site:stage during initial build then another build to do the scm-publish (from staging area)

this is why there is the optimisation on mono-module builds, that don't require this staging extra step...

I can't force you to prefer one single way to run site, then avoiding the mono-module optimisation, but I must avoid failure during release

@slachiewicz slachiewicz removed this from the mojo-parent-60 milestone Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants