[ https://issues.apache.org/jira/browse/DOXIATOOLS-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16864699#comment-16864699 ]
Chris Neve commented on DOXIATOOLS-59: -------------------------------------- Cannot reproduce. See in bugfix.zip the project I generated. I followed these steps: * Create a project and add maven-site-plugin, maven-project-info-reports-plugin and maven-linkcheck-plugin plugins to pom * Create site.xml under src/site and populated it as documented above * Run mvn clean install, then mvn site. Site is then generated under target/site * Run mvn linkcheck:linkcheck, which succeeds instead of failing as I understood it would. Did I reproduce the error wrong? Or does this issue no longer seem to exist? Versions used: * Fluido skin: 1.7 as documented above * Site plugin: 3.7.1 * maven-project-info-reports-plugin: 3.0.0 * maven-linkcheck-plugin: 1.2 as documented above > Link checker not handling anchors of fluido skin topbar very well > ----------------------------------------------------------------- > > Key: DOXIATOOLS-59 > URL: https://issues.apache.org/jira/browse/DOXIATOOLS-59 > Project: Maven Doxia Tools > Issue Type: Improvement > Components: Doxia Linkcheck > Affects Versions: doxia-linkcheck-1.2 > Reporter: Alix Lourme > Priority: Minor > Labels: up-for-grabs > Attachments: bugfix.zip > > > When you are using > [maven-fluido-skin|https://maven.apache.org/skins/maven-fluido-skin/] with > [topbar|https://maven.apache.org/skins/maven-fluido-skin/topbar/index.html], > category menus are produced with a *single anchor* (*#*) like that: > {code} > <a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b > class="caret"></b></a> > {code} > In this case, _maven-linkcheck-plugin_ fails. You can simply reproduce the > problem with this _site.xml_: > {code} > <project> > <skin> > <groupId>org.apache.maven.skins</groupId> > <artifactId>maven-fluido-skin</artifactId> > <version>1.7</version> > </skin> > <custom> > <fluidoSkin> > <topBarEnabled>true</topBarEnabled> > <sideBarEnabled>false</sideBarEnabled> > </fluidoSkin> > </custom> > <body> > <menu name="Overview"> > <item name="Apache" href="http://www.apache.org" /> > <item name="Maven" href="https://maven.apache.org" /> > </menu> > </body> > </project> > {code} > ---- > You can use *excludedLink* property, but the pattern to use in > [LinkValidatorManager.matchPattern|https://github.com/apache/maven-doxia-linkcheck/blob/1afc9f52cecea900b0c21926973afc5460c7a12e/src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java#L337] > is a little tricky to found : > * # : All links page are excluded > * ^#$ : Not found ... Java pattern seems not really used > * *# : Do the trick finally > Snippet for proof: > {code} > String pattern = "#"; > System.out.println(matchPattern("#", pattern)); // --> true > System.out.println(matchPattern("#localLink", pattern)); // --> true > System.out.println(matchPattern("http://fake.url.org/index.html#", > pattern)); // --> true > > System.out.println(matchPattern("http://fake.url.org/index.html#link", > pattern)); // --> true > pattern = "^#$"; > System.out.println(matchPattern("#", pattern)); // --> false > System.out.println(matchPattern("#localLink", pattern)); // --> false > System.out.println(matchPattern("http://fake.url.org/index.html#", > pattern)); // --> false > > System.out.println(matchPattern("http://fake.url.org/index.html#link", > pattern)); // --> false > pattern = "*#"; > System.out.println(matchPattern("#", pattern)); // --> true > System.out.println(matchPattern("#localLink", pattern)); // --> false > System.out.println(matchPattern("http://fake.url.org/index.html#", > pattern)); // --> false ... corner case ? > > System.out.println(matchPattern("http://fake.url.org/index.html#link", > pattern)); // --> false > {code} > ---- > Perhaps consider a single anchor (#) as valid link by default could be useful > and avoiding some headlock. -- This message was sent by Atlassian JIRA (v7.6.3#76005)