You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@codehaus.org> on 2014/12/22 16:51:10 UTC
[jira] (MSITE-632) from child module ignored
[ https://jira.codehaus.org/browse/MSITE-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MSITE-632.
--------------------------------
Resolution: Cannot Reproduce
More than 1.5 years later, no one reacted on Hervè's request. Closing this.
> <site> from child module ignored
> --------------------------------
>
> Key: MSITE-632
> URL: https://jira.codehaus.org/browse/MSITE-632
> Project: Maven Site Plugin
> Issue Type: Bug
> Components: site:deploy
> Affects Versions: 3.0
> Reporter: Kohsuke Kawaguchi
>
> In trying to deploy https://github.com/kohsuke/windows-package-checker/tree/4658075119d6ce9e4d6b9975342bbbef477d5f50 , I noticed that the <site> I specified in this POM is ignored and the one specified in the parent is used instead. The same site deploys as expected with Maven2 with the site plugin 2.0-beta-7.
> Looking at the source code, I see that {{SiteDeployMojo.getDeployRepositoryURL()}} uses {{getRootSite}} to determine the site to deploy, which explains why my <site> definition is getting ignored.
> I believe the fix is to use the nearest site definition, not the one that's closest to the root of the inheritance chain. That is, the {{getRootSite()}} should be changed from:
> {code}
> protected Site getRootSite( MavenProject project )
> throws MojoExecutionException
> {
> Site site = getSite( project );
> MavenProject parent = project;
> while ( parent.getParent() != null )
> {
> // MSITE-585, MNG-1943
> parent = siteTool.getParentProject( parent, reactorProjects, localRepository );
> try
> {
> site = getSite( parent );
> }
> catch ( MojoExecutionException e )
> {
> break;
> }
> }
> return site;
> }
> {code}
> to
> {code}
> protected Site getRootSite( MavenProject project )
> throws MojoExecutionException
> {
> Site site = getSite( project );
> MavenProject parent = project;
> while ( site ==null && parent.getParent() != null )
> {
> // MSITE-585, MNG-1943
> parent = siteTool.getParentProject( parent, reactorProjects, localRepository );
> try
> {
> site = getSite( parent );
> }
> catch ( MojoExecutionException e )
> {
> break;
> }
> }
> return site;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)