Skip to content

Commit

Permalink
[MPIR-431] Dependency file details section: segregate Java version co…
Browse files Browse the repository at this point in the history
…lumn into execution and test versions

This closes #47
  • Loading branch information
belingueres authored and michael-o committed May 26, 2023
1 parent 2d60f95 commit dbd863f
Show file tree
Hide file tree
Showing 3 changed files with 379 additions and 73 deletions.
93 changes: 93 additions & 0 deletions src/it/MPIR-431/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.plugins.project-info-reports.its</groupId>
<artifactId>MPIR-431</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<url>http://maven.apache.org/plugins/it/${project.artifactId}</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencies>
<!-- an example of a dependency with a problematic POM -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis-ext</artifactId>
<version>1.3.04</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>@project.version@</version>
<reportSets>
<reportSet>
<reports>
<report>dependencies</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

</project>
53 changes: 53 additions & 0 deletions src/it/MPIR-431/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* 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.
*/
String html = new File( basedir, 'target/site/dependencies.html' ).text

def summaryLine = '''\
<tr class="b">
<td align="right">compile: 1</td>
<td align="right">compile: 45.5 kB</td>
<td align="right">compile: 47</td>
<td align="right">compile: 36</td>
<td align="right">compile: 4</td>
<td rowspan="3" style="vertical-align: middle" align="center">1.3</td>
<td align="right">compile: 1</td></tr>
<tr class="a">
<td align="right">runtime: 1</td>
<td align="right">runtime: 284.2 kB</td>
<td align="right">runtime: 155</td>
<td align="right">runtime: 133</td>
<td align="right">runtime: 10</td>
<td align="right">runtime: 1</td></tr>
<tr class="b">
<td align="right">provided: 1</td>
<td align="right">provided: 85.7 kB</td>
<td align="right">provided: 209</td>
<td align="right">provided: 192</td>
<td align="right">provided: 4</td>
<td align="right">-</td></tr>
<tr class="a">
<td align="right">test: 3</td>
<td align="right">test: 2.2 MB</td>
<td align="right">test: 1619</td>
<td align="right">test: 1493</td>
<td align="right">test: 91</td>
<td align="center">1.8</td>
<td align="right">test: 3</td></tr>'''

assert html.contains( summaryLine.replaceAll( "\n", System.lineSeparator() ) )

0 comments on commit dbd863f

Please sign in to comment.