I've seen a couple of like posts on issues similar to this one, however I've not seen a resolution and hoping someone can shed some light or at least confirm this should be filed as a jira.

Using maven 2.0.9 and site plugin 2.0 with a multi-module project.

The parent pom defines distributionManagement as follows:

<distributionManagement>
    <site>
      <id>messaging.site</id>
      <url>file:///Library/WebServer/Documents/site-test/</url>
    </site>
</distributionManagement>

I have several different modules in a directory called 'components' like:

$ ls ~/src/messaging/*
components              pom.xml                 target

~/src/messaging/components:
messaging-api                           messaging-mock
messaging-services                      messaging-adaptor-a
messaging-adaptor-b             messaging-adaptor-c


When I run site:site and then site:deploy

Some of the modules in components, when deployed work fine (ie. show up in file:///Library/WebServer/Documents/site-test) , others show up under 'components' in the deployed directory structure (ie. show up in file:///Library/WebServer/Documents/site-test/components) causing links to appear broken from the main site page which expects them in the site-test directory.

I do not have anything that should affect this in the component poms, here is a sample of one of them:

<project
    xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">

  <modelVersion>4.0.0</modelVersion>

  <artifactId>messaging-services</artifactId>
  <version>${messaging-services.module.version}</version>
  <packaging>jar</packaging>

  <name>Messaging :: Services</name>

  <!-- PARENT POM CONFIGURATION -->
  <!-- *********************************************************** -->
  <!-- Ties this pom to the platform parent pom.  This should stay -->
  <!-- in place to help with global dependencies and module        -->
  <!-- management.                                                 -->
  <!-- *********************************************************** -->

  <parent>
    <groupId>com.unet.hyperion.messaging</groupId>
    <artifactId>messaging-project</artifactId>
    <version>2.1-SNAPSHOT</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <dependencies>
   ....
  </dependencies>
</project>

All component poms are the same in this respect. But I see consistently the same module show up in the right place and wrong place respectively.

I pulled the source for the site plugin and added a few debug statements, only to find that the code does the following to get the deploy URL:

DistributionManagement distributionManagement = project.getDistributionManagement();
Site site = distributionManagement.getSite();
String url = site.getUrl();

What I found is that somewhere in the pass off to the plugin, maven has either decided to append the 'componets' path to the URL for distribution in some cases and in others it has not to match which ones get deployed properly and which don't. So this appears to either be something I'm doing wrong in my pom for configuring these modules or a bug in maven (at least from what I can tell just looking at the plugin source).

Any help on this would be greatly appreciated.

Thanks.

MiKey

To go faster, slow down. Everybody who knows about orbital mechanics understands that.

-- Scott Cherf

Reply via email to