This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git
The following commit(s) were added to refs/heads/master by this push:
new b83ddd0 tweak Maven Parent POM version detection in /pom/ index page
b83ddd0 is described below
commit b83ddd0e91b4782e8ead8973f3162e0b7b4247e5
Author: Hervé Boutemy <[email protected]>
AuthorDate: Wed Nov 8 00:14:46 2017 +0100
tweak Maven Parent POM version detection in /pom/ index page
after MPOM-171 http://svn.apache.org/r1814267
---
.../maven/dist/tools/index/DistCheckIndexPageMojo.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/maven/dist/tools/index/DistCheckIndexPageMojo.java
b/src/main/java/org/apache/maven/dist/tools/index/DistCheckIndexPageMojo.java
index 5e7311f..69c1ed7 100644
---
a/src/main/java/org/apache/maven/dist/tools/index/DistCheckIndexPageMojo.java
+++
b/src/main/java/org/apache/maven/dist/tools/index/DistCheckIndexPageMojo.java
@@ -292,17 +292,25 @@ public class DistCheckIndexPageMojo
indexPage.document = doc;
}
- Elements a = doc.select( "tr > td > a[href]:not(.externalLink)" );
+ // Maven parent POM is now a special case in
http://maven.apache.org/pom/
+ boolean isMavenParentPoms = ( "maven-parent".equals(
cli.getArtifactId() ) );
+
+ Elements a = isMavenParentPoms ? doc.select( "tr > th > b" )
+ : doc.select( "tr > td > a[href]:not(.externalLink)" );
String path = paths.get( cli.getArtifactId() );
- if ( path == null )
+ if ( isMavenParentPoms )
+ {
+ path = "Maven Parent POMs"; // looking for this <th><b> content
+ }
+ else if ( path == null )
{
path = '/' + cli.getArtifactId() + '/';
}
for ( Element e : a )
{
- String href = e.attr( "href" );
+ String href = isMavenParentPoms ? e.text() : e.attr( "href" );
if ( href.contains( path ) )
{
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].