branch develop updated (d75ce5a -> 2f01bfa)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository maven-helper-plugin. See http://git.nuiton.org/maven-helper-plugin.git from d75ce5a [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 53ac534 Compute distribution site rul for any modules of the reactor + remove runOnce parameter (see #897) new 2f01bfa Fixes #3897 Merge branch 'feature/3897' into develop The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 2f01bfab562bfae3d80d2a4705313c60df876e34 Merge: d75ce5a 53ac534 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 27 17:30:31 2016 +0100 Fixes #3897 Merge branch 'feature/3897' into develop commit 53ac534183917850c6a291240e52cfdaf0b8d844 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 27 17:20:58 2016 +0100 Compute distribution site rul for any modules of the reactor + remove runOnce parameter (see #897) Summary of changes: .../plugin/ComputeDistributionSiteUrlMojo.java | 60 ++++++++++------------ 1 file changed, 28 insertions(+), 32 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository maven-helper-plugin. See http://git.nuiton.org/maven-helper-plugin.git commit 53ac534183917850c6a291240e52cfdaf0b8d844 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 27 17:20:58 2016 +0100 Compute distribution site rul for any modules of the reactor + remove runOnce parameter (see #897) --- .../plugin/ComputeDistributionSiteUrlMojo.java | 60 ++++++++++------------ 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/ComputeDistributionSiteUrlMojo.java b/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/ComputeDistributionSiteUrlMojo.java index 2a1a71b..ac124b5 100644 --- a/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/ComputeDistributionSiteUrlMojo.java +++ b/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/ComputeDistributionSiteUrlMojo.java @@ -39,7 +39,7 @@ import java.util.Properties; * @since 2.3 */ @Mojo(name = "compute-distribution-site-url", - defaultPhase = LifecyclePhase.VALIDATE, + defaultPhase = LifecyclePhase.PRE_SITE, requiresOnline = true, requiresProject = true) public class ComputeDistributionSiteUrlMojo extends AbstractPlugin { @@ -76,61 +76,50 @@ public class ComputeDistributionSiteUrlMojo extends AbstractPlugin { @Parameter(property = "helper.verbose", defaultValue = "${maven.verbose}") private boolean verbose; - /** - * A flag to execute only once the mojo. - * - * <b>Note:</b> By default, value is {@code true} since it is not necessary - * to inject twice secrets in session. - */ - @Parameter(property = "helper.runOnce", defaultValue = "true") - private boolean runOnce; - private String siteDeployClassifier; private String distributionSiteUrl; @Override public boolean checkSkip() { - - boolean result = true; - if (runOnce) { - - // compute the unique key refering to parameters of plugin - String key = "compute-distribution-site-url##" + project.getVersion(); - - // check if plugin was already done. - - boolean shouldInvoke = needInvoke(true, false, key); - - result = shouldInvoke && super.checkSkip(); - } - - return result; - + return true; } @Override protected void init() throws Exception { if (project.getVersion().endsWith(SNAPSHOT_SUFFIX)) { + siteDeployClassifier = snapshotSiteDeployClassifier; if (isVerbose()) { getLog().info("Use snapshot siteDeployClassifier: " + siteDeployClassifier); } + } else { + siteDeployClassifier = releaseSiteDeployClassifier; if (isVerbose()) { getLog().info("Use release siteDeployClassifier: " + siteDeployClassifier); } + } - distributionSiteUrl = distributionSiteUrlPrefix.trim(); - if (!distributionSiteUrl.endsWith("/")) { - distributionSiteUrl += "/"; + if (project.isExecutionRoot()) { + + distributionSiteUrl = distributionSiteUrlPrefix.trim(); + if (!distributionSiteUrl.endsWith("/")) { + distributionSiteUrl += "/"; + } + distributionSiteUrl += siteDeployClassifier; + + } else { + + distributionSiteUrl = project.getParent().getDistributionManagement().getSite().getUrl() + "/" + project.getArtifactId(); + } - distributionSiteUrl += siteDeployClassifier; + if (isVerbose()) { - getLog().info("Use release distributionSiteUrl: " + distributionSiteUrl); + getLog().info("distributionSiteUrl: " + distributionSiteUrl); } } @@ -142,9 +131,16 @@ public class ComputeDistributionSiteUrlMojo extends AbstractPlugin { getLog().info("export siteDeployClassifier [" + siteDeployClassifier + "]"); - project.getDistributionManagement().getSite().setUrl(distributionSiteUrl); properties.setProperty("siteDeployClassifier", siteDeployClassifier); + if (isVerbose()) { + + getLog().info("distributionManagement site url [" + distributionSiteUrl + "]"); + + } + + project.getDistributionManagement().getSite().setUrl(distributionSiteUrl); + } @Override -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository maven-helper-plugin. See http://git.nuiton.org/maven-helper-plugin.git commit 2f01bfab562bfae3d80d2a4705313c60df876e34 Merge: d75ce5a 53ac534 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 27 17:30:31 2016 +0100 Fixes #3897 Merge branch 'feature/3897' into develop .../plugin/ComputeDistributionSiteUrlMojo.java | 60 ++++++++++------------ 1 file changed, 28 insertions(+), 32 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm