You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "belingueres (via GitHub)" <gi...@apache.org> on 2024/06/09 17:00:44 UTC

[PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

belingueres opened a new pull request, #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70

   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MPIR) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MPIR-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MPIR-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [x] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1634011475


##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>

Review Comment:
   It seems to add no needed behavior...I can delete this config.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1637256757


##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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
+                        });
+
+                        JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
+                        Collection<JarVersionedRuntime> versionedRuntimeList =
+                                versionedRuntimes.getVersionedRuntimeMap().values();
+
+                        // workaround to count the number of root content entries
+                        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,
+                            "",
+                            rootContentNumEntries.toString(),
+                            String.valueOf(jarDetails.getNumClasses()),
+                            String.valueOf(jarDetails.getNumPackages()),

Review Comment:
   classes, packages and jdkRevision in the JarData object belong to the root content



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1633941736


##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>
+
               <goals>
                 <goal>site</goal>
               </goals>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.6.0</version>

Review Comment:
   I couldn't find the mrm-maven-plugin defined in a parent pom.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#issuecomment-2156713496

   Here is one thing we need to discuss:
   ![grafik](https://github.com/apache/maven-project-info-reports-plugin/assets/573017/d50401fc-083c-433b-9672-22ff933d9608)
   
   As far as I can see 37 applies to *all*  entries, regardless of the version. The question is whether this number correct to display...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#issuecomment-2161306930

   > Regarding the entry count, it seems to be a bug in the shared-jar library. The root version entries are not saved anywhere. However an easy workaround (until the next shared-jar version release with a fix) would be to take the difference between the total count and each version. In this case is 37-(9+9)=19 in the root. The total of 37 can be in the first row (showing file attributes). WDYT?
   
   That sounds quite reasonable! Can you create an issue with the library first, then tacke in MPIR and then add a comment around the dep entry in the POM that we depend on issue and code needs to be changed? That would be a way forward until then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635270543


##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>
+
               <goals>
                 <goal>site</goal>
               </goals>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.6.0</version>
+            <configuration>
+              <propertyName>repository.proxy.url</propertyName>
+              <repositories>
+                <mockRepo>
+                  <source>src/it/mrm/repository</source>
+                  <!--

Review Comment:
   Using the plugin is totally fine, I do not object. I was solely referring that the comment bears the JIRA issue id. If more ITs will use it, the comment won't be accurate anymore.



##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>

Review Comment:
   Then drop it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1637256426


##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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
+                        });
+
+                        JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
+                        Collection<JarVersionedRuntime> versionedRuntimeList =
+                                versionedRuntimes.getVersionedRuntimeMap().values();
+
+                        // workaround to count the number of root content entries

Review Comment:
   ok



##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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
+                        });
+
+                        JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
+                        Collection<JarVersionedRuntime> versionedRuntimeList =
+                                versionedRuntimes.getVersionedRuntimeMap().values();
+
+                        // workaround to count the number of root content entries
+                        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,
+                            "",
+                            rootContentNumEntries.toString(),

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1637256257


##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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()),
+                            "",
+                            "",

Review Comment:
   I prefer to omit them, since the getNumClasses() and getNumPackages() are already asociated to the root content. In addition, we cannot sum over the root class/package names with the versioned class/package names because some of them will be in more than one place, so putting a "total" in the first row seems somewhat inaccurate.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o closed pull request #70: [MPIR-455] - add support for multi-release JARs.
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#issuecomment-2159657720

   Regarding the entry count, it seems to be a bug in the shared-jar library. The root version entries are not saved anywhere. However an easy workaround (until the next shared-jar version release with a fix) would be to take the difference between the total count and each version. In this case is 37-(9+9)=19 in the root. The total of 37 can be in the first row (showing file attributes). WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635269049


##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>
+
               <goals>
                 <goal>site</goal>
               </goals>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.6.0</version>

Review Comment:
   Weird, I bet I have seen it. Must be something else where I bumped this plugin. Never mind



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1632354657


##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>
+
               <goals>
                 <goal>site</goal>
               </goals>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.6.0</version>
+            <configuration>
+              <propertyName>repository.proxy.url</propertyName>
+              <repositories>
+                <mockRepo>
+                  <source>src/it/mrm/repository</source>
+                  <!--

Review Comment:
   Let's keep the comment for now, but will be incorrect as soon as other ITs will start to use it.



##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>
+
               <goals>
                 <goal>site</goal>
               </goals>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.6.0</version>

Review Comment:
   This is set in parent



##########
src/it/MPIR-455/verify.groovy:
##########
@@ -0,0 +1,119 @@
+/*
+ * 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="left">module-info-only-test-0.0.1.jar</td>
+<td align="right">3.3 kB</td>
+<td align="right">-</td>
+<td align="right">-</td>
+<td align="right">-</td>
+<td align="center">-</td>
+<td align="center">-</td></tr>
+<tr class="a">
+<td align="left">&#160;&#160;&#160;&#x2022; Root</td>
+<td align="right">-</td>
+<td align="right">10</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">1</td>
+<td align="right">1</td>
+<td align="center">11</td>
+<td align="center">No</td></tr>
+<tr class="a">
+<td align="left">multi-release-test-0.0.1.jar</td>
+<td align="right">10.2 kB</td>
+<td align="right">-</td>
+<td align="right">-</td>
+<td align="right">-</td>
+<td align="center">-</td>
+<td align="center">-</td></tr>
+<tr class="b">
+<td align="left">&#160;&#160;&#160;&#x2022; Root</td>
+<td align="right">-</td>
+<td align="right">37</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">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">1</td>
+<td align="right">1</td>
+<td align="center">11</td>
+<td align="center">Yes</td></tr>
+<tr class="a">
+<td align="left">plexus-utils-4.0.0.jar</td>
+<td align="right">192.4 kB</td>
+<td align="right">-</td>
+<td align="right">-</td>
+<td align="right">-</td>
+<td align="center">-</td>
+<td align="center">-</td></tr>
+<tr class="b">
+<td align="left">&#160;&#160;&#160;&#x2022; Root</td>
+<td align="right">-</td>
+<td align="right">128</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">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">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">1</td>
+<td align="right">1</td>
+<td align="center">11</td>
+<td align="center">Yes</td></tr>'''
+
+assert html.contains( summaryLine.replaceAll( "\n", System.lineSeparator() ) )

Review Comment:
   `summaryLine.normalize()` should do it as well. See https://github.com/apache/maven-reporting-impl/commit/610c5230c447102f9899a7ae35d30541c3b1df6c#diff-b244770c8a4089f904938a9ae65dec0b76fa696cf8b3f12bc8f6ae358cd00a55L30-L34



##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>

Review Comment:
   Curiousity: What explicitly do you need?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635907183


##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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
+                        });
+
+                        JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
+                        Collection<JarVersionedRuntime> versionedRuntimeList =
+                                versionedRuntimes.getVersionedRuntimeMap().values();
+
+                        // workaround to count the number of root content entries

Review Comment:
   Please add the ticket ref for MSHARED here.



##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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
+                        });
+
+                        JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
+                        Collection<JarVersionedRuntime> versionedRuntimeList =
+                                versionedRuntimes.getVersionedRuntimeMap().values();
+
+                        // workaround to count the number of root content entries
+                        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,
+                            "",
+                            rootContentNumEntries.toString(),

Review Comment:
   Make is `String#valueOf()` for consistency reasons



##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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
+                        });
+
+                        JarVersionedRuntimes versionedRuntimes = jarDetails.getVersionedRuntimes();
+                        Collection<JarVersionedRuntime> versionedRuntimeList =
+                                versionedRuntimes.getVersionedRuntimeMap().values();
+
+                        // workaround to count the number of root content entries
+                        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,
+                            "",
+                            rootContentNumEntries.toString(),
+                            String.valueOf(jarDetails.getNumClasses()),
+                            String.valueOf(jarDetails.getNumPackages()),

Review Comment:
   Shouldn't this value be reduced as well?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635906351


##########
src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:
##########
@@ -591,16 +595,75 @@ private void renderSectionDependencyFileDetails() {
                         fileLength = "-";
                     }
 
-                    tableRow(hasSealed, new String[] {
-                        name,
-                        fileLength,
-                        String.valueOf(jarDetails.getNumEntries()),
-                        String.valueOf(jarDetails.getNumClasses()),
-                        String.valueOf(jarDetails.getNumPackages()),
-                        jdkRevisionCellValue,
-                        debugInformationCellValue,
-                        sealedCellValue
-                    });
+                    if (jarDetails.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()),
+                            "",
+                            "",

Review Comment:
   Does it make sense to omit num of classes/packages here? What do you think? Hard to tell...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on code in PR #70:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1633942122


##########
pom.xml:
##########
@@ -511,11 +511,47 @@ under the License.
                 <pomExclude>pom.xml</pomExclude>
               </pomExcludes>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <filterProperties>
+                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
+              </filterProperties>
+              <addTestClassPath>true</addTestClassPath>
+
               <goals>
                 <goal>site</goal>
               </goals>
             </configuration>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.6.0</version>
+            <configuration>
+              <propertyName>repository.proxy.url</propertyName>
+              <repositories>
+                <mockRepo>
+                  <source>src/it/mrm/repository</source>
+                  <!--

Review Comment:
   I tried to set the .jar file in the root of the repo, but what is actually served by the mock repo is an empty .jar file.
   Alternatively, I could try not using the mrm-maven-plugin, and instead use a setup.groovy preBuildHookScript to copy the actual jars to the IT /local-repo.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org