diff --git a/src/it/MPIR-412/invoker.properties b/src/it/MPIR-412/invoker.properties new file mode 100644 index 00000000..e62a0658 --- /dev/null +++ b/src/it/MPIR-412/invoker.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:dependencies diff --git a/src/it/MPIR-412/pom.xml b/src/it/MPIR-412/pom.xml new file mode 100644 index 00000000..251d5fe4 --- /dev/null +++ b/src/it/MPIR-412/pom.xml @@ -0,0 +1,55 @@ + + + + + 4.0.0 + + org.apache.maven.plugins.project-info-reports.its + MPIR-412 + 1.0-SNAPSHOT + pom + http://maven.apache.org/plugins/it/${project.artifactId} + + + UTF-8 + UTF-8 + + + + + + xml-apis + xml-apis-ext + 1.3.04 + + + + + + + maven-project-info-reports-plugin + @pom.version@ + + + + + diff --git a/src/it/MPIR-412/verify.groovy b/src/it/MPIR-412/verify.groovy new file mode 100644 index 00000000..b1e5036c --- /dev/null +++ b/src/it/MPIR-412/verify.groovy @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// should be able to parse the output as XML +parser = new XmlParser(); +parser.setFeature('http://apache.org/xml/features/disallow-doctype-decl', false); +result = parser.parse(new File(basedir, 'target/site/dependencies.html')); +assert result instanceof Node; diff --git a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java index b8fa96a5..e44fdb79 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java +++ b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java @@ -889,8 +889,6 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid ) sink.rawText( "
" ); - sink.table(); - if ( !Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) ) { try @@ -902,6 +900,8 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid ) List licenses = artifactProject.getLicenses(); + sink.table(); + sink.tableRow(); sink.tableHeaderCell(); sink.text( artifactName ); @@ -989,6 +989,11 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid ) licenseMap.put( unknownLicenseMessage, artifactName ); } sink.paragraph_(); + + sink.tableCell_(); + sink.tableRow_(); + + sink.table_(); } catch ( ProjectBuildingException e ) { @@ -1006,6 +1011,8 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid ) } else { + sink.table(); + sink.tableRow(); sink.tableHeaderCell(); sink.text( id ); @@ -1031,12 +1038,12 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid ) sink.text( artifact.getFile().getAbsolutePath() ); sink.paragraph_(); } - } - sink.tableCell_(); - sink.tableRow_(); + sink.tableCell_(); + sink.tableRow_(); - sink.table_(); + sink.table_(); + } sink.rawText( "
" ); }