Skip to content

Commit

Permalink
maven-shared-jar-3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Jun 20, 2024
1 parent 1231c79 commit 866684c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 48 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-jar</artifactId>
<version>3.1.0</version>
<version>3.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
18 changes: 9 additions & 9 deletions src/it/MPIR-455/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def summaryLine = '''\
<tr class="a">
<td align="left">&#160;&#160;&#160;&#x2022; Root</td>
<td align="right">-</td>
<td align="right">9</td>
<td align="right">8</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="center">-</td>
<td align="center">-</td></tr>
<tr class="b">
<td align="left">&#160;&#160;&#160;&#x2022; Versioned</td>
<td align="right">-</td>
<td align="right">1</td>
<td align="right">2</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">11</td>
Expand All @@ -54,23 +54,23 @@ def summaryLine = '''\
<tr class="b">
<td align="left">&#160;&#160;&#160;&#x2022; Root</td>
<td align="right">-</td>
<td align="right">19</td>
<td align="right">17</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">1.8</td>
<td align="center">Yes</td></tr>
<tr class="a">
<td align="left">&#160;&#160;&#160;&#x2022; Versioned</td>
<td align="right">-</td>
<td align="right">9</td>
<td align="right">10</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">9</td>
<td align="center">Yes</td></tr>
<tr class="b">
<td align="left">&#160;&#160;&#160;&#x2022; Versioned</td>
<td align="right">-</td>
<td align="right">9</td>
<td align="right">10</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">11</td>
Expand All @@ -86,31 +86,31 @@ def summaryLine = '''\
<tr class="b">
<td align="left">&#160;&#160;&#160;&#x2022; Root</td>
<td align="right">-</td>
<td align="right">113</td>
<td align="right">110</td>
<td align="right">86</td>
<td align="right">7</td>
<td align="center">1.8</td>
<td align="center">Yes</td></tr>
<tr class="a">
<td align="left">&#160;&#160;&#160;&#x2022; Versioned</td>
<td align="right">-</td>
<td align="right">5</td>
<td align="right">6</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">9</td>
<td align="center">Yes</td></tr>
<tr class="b">
<td align="left">&#160;&#160;&#160;&#x2022; Versioned</td>
<td align="right">-</td>
<td align="right">5</td>
<td align="right">6</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">10</td>
<td align="center">Yes</td></tr>
<tr class="a">
<td align="left">&#160;&#160;&#160;&#x2022; Versioned</td>
<td align="right">-</td>
<td align="right">5</td>
<td align="right">6</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="center">11</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,13 @@ private void renderSectionDependencyFileDetails() {

if (JAR_SUBTYPE.contains(artifact.getType().toLowerCase())) {
try {
JarData jarDetails = dependencies.getJarDependencyDetails(artifact);
JarData jarData = dependencies.getJarDependencyDetails(artifact);

totalentries.addTotal(jarDetails.getNumEntries(), artifact.getScope());
totalclasses.addTotal(jarDetails.getNumClasses(), artifact.getScope());
totalpackages.addTotal(jarDetails.getNumPackages(), artifact.getScope());
totalentries.addTotal(jarData.getNumEntries(), artifact.getScope());
totalclasses.addTotal(jarData.getNumClasses(), artifact.getScope());
totalpackages.addTotal(jarData.getNumPackages(), artifact.getScope());

String jdkRevisionCellValue = jarDetails.getJdkRevision();
String jdkRevisionCellValue = jarData.getJdkRevision();
String debugInformationCellValue = null;
String sealedCellValue = null;

Expand All @@ -574,13 +574,13 @@ private void renderSectionDependencyFileDetails() {
}

debugInformationCellValue = debugInformationCellNo;
if (jarDetails.isDebugPresent()) {
if (jarData.isDebugPresent()) {
debugInformationCellValue = debugInformationCellYes;
totalDebugInformation.incrementTotal(artifact.getScope());
}

sealedCellValue = sealedCellNo;
if (jarDetails.isSealed()) {
if (jarData.isSealed()) {
sealedCellValue = sealedCellYes;
totalsealed.incrementTotal(artifact.getScope());
}
Expand All @@ -595,60 +595,47 @@ private void renderSectionDependencyFileDetails() {
fileLength = "-";
}

if (jarDetails.isMultiRelease()) {
if (jarData.isMultiRelease()) {
String htmlBullet = "&#160;&#160;&#160;&#x2022; ";
String rootTag = htmlBullet + getI18nString("file.details.multirelease.root");
String versionedTag = htmlBullet + getI18nString("file.details.multirelease.versioned");

// general jar information row
tableRow(hasSealed, new String[] {
name,
fileLength,
String.valueOf(jarDetails.getNumEntries()),
"",
"",
"",
"",
sealedCellValue
name, fileLength, String.valueOf(jarData.getNumEntries()), "", "", "", "", sealedCellValue
});

JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
JarVersionedRuntimes versionedRuntimes = jarData.getVersionedRuntimes();
Collection<JarVersionedRuntime> versionedRuntimeList =
versionedRuntimes.getVersionedRuntimeMap().values();

// workaround to count the number of root content entries
// TODO: rework this when MSHARED-1411 is fixed
Integer versionedNumEntries = versionedRuntimeList.stream()
.map(versionedRuntime ->
versionedRuntime.getEntries().size())
.reduce(0, Integer::sum);
Integer rootContentNumEntries = jarDetails.getNumEntries() - versionedNumEntries;

// root content information row
tableRow(hasSealed, new String[] {
rootTag,
"",
String.valueOf(rootContentNumEntries),
String.valueOf(jarDetails.getNumClasses()),
String.valueOf(jarDetails.getNumPackages()),
String.valueOf(jarData.getNumRootEntries()),
String.valueOf(jarData.getNumClasses()),
String.valueOf(jarData.getNumPackages()),
jdkRevisionCellValue,
debugInformationCellValue,
""
});

for (JarVersionedRuntime versionedRuntime : versionedRuntimeList) {
JarClasses rtJarClasses = versionedRuntime.getJarClasses();
JarClasses versionedJarClasses = versionedRuntime.getJarClasses();

debugInformationCellValue =
rtJarClasses.isDebugPresent() ? debugInformationCellYes : debugInformationCellNo;
debugInformationCellValue = versionedJarClasses.isDebugPresent()
? debugInformationCellYes
: debugInformationCellNo;

tableRow(hasSealed, new String[] {
versionedTag,
"",
String.valueOf(versionedRuntime.getEntries().size()),
String.valueOf(rtJarClasses.getClassNames().size()),
String.valueOf(rtJarClasses.getPackages().size()),
rtJarClasses.getJdkRevision(),
String.valueOf(versionedRuntime.getNumEntries()),
String.valueOf(
versionedJarClasses.getClassNames().size()),
String.valueOf(versionedJarClasses.getPackages().size()),
versionedJarClasses.getJdkRevision(),
debugInformationCellValue,
""
});
Expand All @@ -657,9 +644,9 @@ private void renderSectionDependencyFileDetails() {
tableRow(hasSealed, new String[] {
name,
fileLength,
String.valueOf(jarDetails.getNumEntries()),
String.valueOf(jarDetails.getNumClasses()),
String.valueOf(jarDetails.getNumPackages()),
String.valueOf(jarData.getNumEntries()),
String.valueOf(jarData.getNumClasses()),
String.valueOf(jarData.getNumPackages()),
jdkRevisionCellValue,
debugInformationCellValue,
sealedCellValue
Expand Down

0 comments on commit 866684c

Please sign in to comment.