You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Duncan Doyle (JIRA)" <ji...@codehaus.org> on 2008/10/16 01:01:20 UTC
[jira] Issue Comment Edited: (MSITE-227) site:deploy -> wrong links
in ${modules} when artifactId=module's directory
[ http://jira.codehaus.org/browse/MSITE-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=150935#action_150935 ]
mccloud edited comment on MSITE-227 at 10/15/08 6:00 PM:
--------------------------------------------------------------
I think I've got a similar problem. I also use Eclipse with a flat project layout. I have defined a site distribution url in my root pom. My directory layout is like this:
MyProject/MavenRoot
MyProject/Module1
MyProject/Module2
The POM in the MavenRoot includes the modules:
<modules>
<module>../Module1</module>
<module>../Module2</module>
</modules>
When the artifactId's of the Modules are NOT equal to the directory-name, and I define the site url as "file://C:/mavensites/MyProject" the deployed site looks like this:
C:\mavensites\MyProject
C:\mavensites\MyProject\\{artifactId Module1}
C:\mavensites\MyProject\\{artifactId Module2}
and the links to the modules work from the main site.
However, when the artifactIds and the directories have exactly the same name, the deployed site looks like this:
C:\mavensites\MyProject
C:\mavensites\\{artifactId Module1}
C:\mavensites\\{artifactId Module2}
and the links to the modules do not work anymore.
I added some debug statements to the maven-site-plugin (version 2.0-beta-7) and saw that the url from "site.getUrl()" in the site-deploy Mojo retrieves a different URL based on the fact whether the directory names and artifactIds match or not.
I did some more testing and found out that this behaviour was not present in Maven 2.0.7, it was introduced in Maven 2.0.8 and is still present in 2.0.9.
was (Author: mccloud):
I think I've got a similar problem. I also use Eclipse with a flat project layout. I have defined a site distribution url in my root pom. My directory layout is like this:
MyProject/MavenRoot
MyProject/Module1
MyProject/Module2
The POM in the MavenRoot includes the modules:
<modules>
<module>../Module1</module>
<module>../Module2</module>
</modules>
When the artifactId's of the Modules are NOT equal to the directory-name, and I define the site url as "file://C:/mavensites/MyProject" the deployed site looks like this:
C:\mavensites\MyProject
C:\mavensites\MyProject\{artifactId Module1}
C:\mavensites\MyProject\{artifactId Module2}
and the links to the modules work from the main site.
However, when the artifactIds and the directories have exactly the same name, the deployed site looks like this:
C:\mavensites\MyProject
C:\mavensites\{artifactId Module1}
C:\mavensites\{artifactId Module2}
and the links to the modules do not work anymore.
I added some debug statements to the maven-site-plugin (version 2.0-beta-7) and saw that the url from "site.getUrl()" in the site-deploy Mojo retrieves a different URL based on the fact whether the directory names and artifactIds match or not.
I did some more testing and found out that this behaviour was not present in Maven 2.0.7, it was introduced in Maven 2.0.8 and is still present in 2.0.9.
> site:deploy -> wrong links in ${modules} when artifactId=module's directory
> ---------------------------------------------------------------------------
>
> Key: MSITE-227
> URL: http://jira.codehaus.org/browse/MSITE-227
> Project: Maven 2.x Site Plugin
> Issue Type: Bug
> Components: multi module
> Affects Versions: 2.0-beta-5
> Environment: Eclipse IDE
> Reporter: Guimiot Isabelle
>
> I have a problem in the ${modules} part when I run the site:deploy goal.
> my project contains a root module and 2 sub-modules, at the same directory depth (I'm using Eclipse) :
> workspace/myRoot/
> workspace/myModule1/
> workspace/myModule2/
> my root pom contains this module declaration :
> <modules>
> <module>../myModule1</module>
> <module>../myModule1</module>
> </modules>
> the site:deploy goal gives this structure :
> [deploydir]/myRoot/index.html --> root's index
> [deploydir]/myRoot/myModule1/index.html --> first module's index
> [deploydir]/myRoot/myModule2/index.html --> second module's index
> when the project name (directory name in the workspace) and the artifactId are exactly the same, I have wrong links, both in root and in sub-modules pages :
> - in the root page, my links to submodules are like this :
> <h5>Modules</h5>
> <ul>
> <li class="none">
> <a href="../myModule1/index.html">myModule1</a> <!-- should be "myModule1/index.html" instead -->
> </li>
> <li class="none">
> <a href="../myModule2/index.html">myModule2</a> <!-- should be "myModule2/index.html" instead -->
> </li>
> </ul>
> - and in both modules pages, my link to the parent project is like this :
> <h5>Parent project</h5>
> <ul>
> <li class="none">
> <a href="../myRoot/index.html">myRoot</a> <!-- should be "../index.html" instead -->
> </li>
> </ul>
> The weirdest thing is that everything is fine when the artefactId and the eclipse project name (directory) are different !!! the problem appears only when they are identical...
> Thanks for your help !
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira