Mojo

Broken links in multimodule reports because of artifactId != directory name

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: dashboard
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    2

Description

Links in dashboard detailed reports are broken, if the directory a submodule was in during build does not match the artifact id.

Consider the following setup:

pom.xml

– module1
— pom.xml
— some java sources

where main pom includes module1:
<modules>
<module>module1</module>
</modules>

but artifact id of the project in directory module1 is e.g. "dashboard_broken_link.module1"
<groupId>com.sdm.foo</groupId>
<artifactId>dashboard_broken_link.module1</artifactId>

Building a maven site and deploying it with mvn site:deploy will result in the following directory structure on the server:

– dashboard-report.html
– dashboard-report-details.html
– dashboard_broken_link.module1 (directory)
– dashboard-report.html

The link in when clicking on e.g. "Checkstyle Report Summary" and "Dashboard Broken Link Example Module1" will point to "/module1/dashboard-report.html#checkstyle" instead of "/dashboard_broken_link.module1/dashboard-report.html#checkstyle".

Seems to be a bug for me, or is it just something I am missing here?
Find a toy project included in the attachment.

Activity

Hide
David Vicente added a comment -

HI,

could you give me the maven's version you used to make your build ?

I've had this problem before with directory's name and artifactId which are different but i've already corrected

Best regards

David

Show
David Vicente added a comment - HI, could you give me the maven's version you used to make your build ? I've had this problem before with directory's name and artifactId which are different but i've already corrected Best regards David
Hide
Christoph Ewerlin added a comment -

Hi David,
I'm using maven 2.0.7.

I have done some further investigation and this is probably not because of the directory structure, but because the artifactId contains a dot character.
I renamed the artifact to "dashboard_broken_link.module4711" and a link to "/module4711" is created.
Probably the plugin strips everything before the last dot of groupId:artifactId?
The dashboard-report.xml in module1 only has a line
<dashboard artefactId="com.sdm.foo.dashboard_broken_link.module4711">
and does not differentiate groupId and artifactId?

Best regards
Christoph

Show
Christoph Ewerlin added a comment - Hi David, I'm using maven 2.0.7. I have done some further investigation and this is probably not because of the directory structure, but because the artifactId contains a dot character. I renamed the artifact to "dashboard_broken_link.module4711" and a link to "/module4711" is created. Probably the plugin strips everything before the last dot of groupId:artifactId? The dashboard-report.xml in module1 only has a line <dashboard artefactId="com.sdm.foo.dashboard_broken_link.module4711"> and does not differentiate groupId and artifactId? Best regards Christoph
Hide
Christoph Ewerlin added a comment -

I wrote a patch for this issue, which solves the problem in my case.
The DashBoardMultiReport stripped everything before the last dot - character from the artitfactId to generate a link.
I'm not sure, if this was in some way an intended behaviour?

Show
Christoph Ewerlin added a comment - I wrote a patch for this issue, which solves the problem in my case. The DashBoardMultiReport stripped everything before the last dot - character from the artitfactId to generate a link. I'm not sure, if this was in some way an intended behaviour?
Hide
David Vicente added a comment -

ok done

Show
David Vicente added a comment - ok done
Hide
David Vicente added a comment -

released this day, February 10th 2008 as 1. 0-SNAPSHOT : dashboard-maven-plugin-1.0-20080210.183905-16.jar

Show
David Vicente added a comment - released this day, February 10th 2008 as 1. 0-SNAPSHOT : dashboard-maven-plugin-1.0-20080210.183905-16.jar

People

Vote (0)
Watch (0)

Dates

  • Due:
    Created:
    Updated:
    Resolved: