Skip to content

Commit dbd863f

Browse files
belingueresmichael-o
authored andcommitted
[MPIR-431] Dependency file details section: segregate Java version column into execution and test versions
This closes #47
1 parent 2d60f95 commit dbd863f

File tree

3 files changed

+379
-73
lines changed

3 files changed

+379
-73
lines changed

src/it/MPIR-431/pom.xml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one
4+
~ or more contributor license agreements. See the NOTICE file
5+
~ distributed with this work for additional information
6+
~ regarding copyright ownership. The ASF licenses this file
7+
~ to you under the Apache License, Version 2.0 (the
8+
~ "License"); you may not use this file except in compliance
9+
~ with the License. You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing,
14+
~ software distributed under the License is distributed on an
15+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
~ KIND, either express or implied. See the License for the
17+
~ specific language governing permissions and limitations
18+
~ under the License.
19+
-->
20+
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<groupId>org.apache.maven.plugins.project-info-reports.its</groupId>
27+
<artifactId>MPIR-431</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
<packaging>pom</packaging>
30+
<url>http://maven.apache.org/plugins/it/${project.artifactId}</url>
31+
32+
<properties>
33+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
35+
</properties>
36+
37+
<dependencies>
38+
<!-- an example of a dependency with a problematic POM -->
39+
<dependency>
40+
<groupId>xml-apis</groupId>
41+
<artifactId>xml-apis-ext</artifactId>
42+
<version>1.3.04</version>
43+
<scope>provided</scope>
44+
</dependency>
45+
<dependency>
46+
<groupId>commons-io</groupId>
47+
<artifactId>commons-io</artifactId>
48+
<version>1.0</version>
49+
</dependency>
50+
<dependency>
51+
<groupId>commons-lang</groupId>
52+
<artifactId>commons-lang</artifactId>
53+
<version>2.6</version>
54+
<scope>runtime</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.springframework</groupId>
58+
<artifactId>spring-test</artifactId>
59+
<version>5.3.0</version>
60+
<scope>test</scope>
61+
</dependency>
62+
</dependencies>
63+
64+
<build>
65+
<pluginManagement>
66+
<plugins>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-site-plugin</artifactId>
70+
<version>@sitePluginVersion@</version>
71+
</plugin>
72+
</plugins>
73+
</pluginManagement>
74+
</build>
75+
76+
<reporting>
77+
<plugins>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-project-info-reports-plugin</artifactId>
81+
<version>@project.version@</version>
82+
<reportSets>
83+
<reportSet>
84+
<reports>
85+
<report>dependencies</report>
86+
</reports>
87+
</reportSet>
88+
</reportSets>
89+
</plugin>
90+
</plugins>
91+
</reporting>
92+
93+
</project>

src/it/MPIR-431/verify.groovy

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
String html = new File( basedir, 'target/site/dependencies.html' ).text
20+
21+
def summaryLine = '''\
22+
<tr class="b">
23+
<td align="right">compile: 1</td>
24+
<td align="right">compile: 45.5 kB</td>
25+
<td align="right">compile: 47</td>
26+
<td align="right">compile: 36</td>
27+
<td align="right">compile: 4</td>
28+
<td rowspan="3" style="vertical-align: middle" align="center">1.3</td>
29+
<td align="right">compile: 1</td></tr>
30+
<tr class="a">
31+
<td align="right">runtime: 1</td>
32+
<td align="right">runtime: 284.2 kB</td>
33+
<td align="right">runtime: 155</td>
34+
<td align="right">runtime: 133</td>
35+
<td align="right">runtime: 10</td>
36+
<td align="right">runtime: 1</td></tr>
37+
<tr class="b">
38+
<td align="right">provided: 1</td>
39+
<td align="right">provided: 85.7 kB</td>
40+
<td align="right">provided: 209</td>
41+
<td align="right">provided: 192</td>
42+
<td align="right">provided: 4</td>
43+
<td align="right">-</td></tr>
44+
<tr class="a">
45+
<td align="right">test: 3</td>
46+
<td align="right">test: 2.2 MB</td>
47+
<td align="right">test: 1619</td>
48+
<td align="right">test: 1493</td>
49+
<td align="right">test: 91</td>
50+
<td align="center">1.8</td>
51+
<td align="right">test: 3</td></tr>'''
52+
53+
assert html.contains( summaryLine.replaceAll( "\n", System.lineSeparator() ) )

0 commit comments

Comments
 (0)