Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.3
    • Component/s: dependencies, summary
    • Labels:
      None
    • Flags:
      Patch

      Description

      It would be nice to add a section to the dependency report showing the java version requirements.

      Attaching a patch which discovers the java version and compiler options from the java-compiler-plugin configuration and outputs a "Java Version" section. Has an option to configure whether or not this section is shown (default to false).

      1. maven-projectinfo-dependency-java.patch
        8 kB
        Niall Pemberton
      2. maven-projectinfo-summary-java.patch
        4 kB
        Niall Pemberton
      3. maven-projectinfo-dependency-java-v3.patch
        10 kB
        Niall Pemberton

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          97d 20h 20m 1 Hervé Boutemy 20/Apr/08 16:38
          Closed Closed Reopened Reopened
          1d 13m 1 Hervé Boutemy 21/Apr/08 16:51
          Reopened Reopened Closed Closed
          956d 13h 45m 1 Siveton Vincent 04/Dec/10 05:37
          Mark Thomas made changes -
          Workflow jira [ 12961002 ] Default workflow, editable Closed status [ 12997772 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:45:01 UTC 2015 [ 1428281101090 ]
          Mark Thomas made changes -
          Flags Patch [ 10430 ]
          Patch Submitted Yes [ 10763 ]
          Mark Thomas made changes -
          Workflow jira [ 12723353 ] Default workflow, editable Closed status [ 12756056 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:10:01 UTC 2015 [ 1428235801085 ]
          Lukas Theussl made changes -
          Link This issue is related to MPIR-212 [ MPIR-212 ]
          Siveton Vincent made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Siveton Vincent added a comment -

          This feature is implemented only for java projects. For other requirements, please create a new issue.

          Show
          Siveton Vincent added a comment - This feature is implemented only for java projects. For other requirements, please create a new issue.
          Hervé Boutemy made changes -
          Fix Version/s 2.3 [ 16664 ]
          Hide
          Sebb added a comment -

          I think the output should include both the source and target settings from the POM. Both are important.

          Not sure why the code bothers reading the fork and compilerVersion settings.

          Show
          Sebb added a comment - I think the output should include both the source and target settings from the POM. Both are important. Not sure why the code bothers reading the fork and compilerVersion settings.
          Hide
          Hervé Boutemy added a comment -

          I just added a "JDK Rev" information on summary page: see r981102
          please review and improve (there is room for improvement)

          Show
          Hervé Boutemy added a comment - I just added a "JDK Rev" information on summary page: see r981102 please review and improve (there is room for improvement)
          Hide
          Sebb added a comment -

          Why not just add it to both reports?

          The information can be made optional on both.

          But please let's get something done to fix this omission - it's now been over two years since the request was raised.

          Show
          Sebb added a comment - Why not just add it to both reports? The information can be made optional on both. But please let's get something done to fix this omission - it's now been over two years since the request was raised.
          Hide
          Dennis Lundberg added a comment -

          I feel that this should be added to the project summary rather than the dependency report. The reason is that a project with no dependencies might choose to remove the dependency report, thereby loosing the JVM info in the process. Also I don't see the JVM as a dependency, but rather a prerequisite which makes it fit poorly into the dependency report.

          Show
          Dennis Lundberg added a comment - I feel that this should be added to the project summary rather than the dependency report. The reason is that a project with no dependencies might choose to remove the dependency report, thereby loosing the JVM info in the process. Also I don't see the JVM as a dependency, but rather a prerequisite which makes it fit poorly into the dependency report.
          Hide
          Sebb added a comment -

          The "target" Java version needs to be added to the dependencies report, because the JVM version is a run-time dependency.
          The "source" Java version should also be included as it affects the compile-time dependencies.

          It would be helpful to add both the "source" and "target" Java versions to the project report.

          What's important to report are the intended source and target Java versions, as defined by the POM.

          I think it would be unsafe to examine the bytecode of whatever is in the local repo, as that may well be out of date.
          Besides, AFAIK that can not be used to determine the "source" version.

          Show
          Sebb added a comment - The "target" Java version needs to be added to the dependencies report, because the JVM version is a run-time dependency. The "source" Java version should also be included as it affects the compile-time dependencies. It would be helpful to add both the "source" and "target" Java versions to the project report. What's important to report are the intended source and target Java versions, as defined by the POM. I think it would be unsafe to examine the bytecode of whatever is in the local repo, as that may well be out of date. Besides, AFAIK that can not be used to determine the "source" version.
          Hide
          Hervé Boutemy added a comment -

          from a recent discussion on dev list

          > I had another look at Niall's patch. My original objection was that the
          > value of the JVM that ran the build (or really the site generation) was
          > output in the report. I think we should just remove that part and only
          > focus on the "source" and "target" values of the maven-compiler-plugin
          > configuration.
          Well since toolchains is released, the JVM that's running Maven is really
          irrelevant in deciding what JVM is required for a plugin

          Another idea: why not calculate the JDK Rev for the currently built artifact the same way it is calculated for dependencies, ie bytecode analysis? the artifact could (should?) be taken from local repository.

          Another point: should this requirement be added to the dependencies report or to the project summary?

          Show
          Hervé Boutemy added a comment - from a recent discussion on dev list > I had another look at Niall's patch. My original objection was that the > value of the JVM that ran the build (or really the site generation) was > output in the report. I think we should just remove that part and only > focus on the "source" and "target" values of the maven-compiler-plugin > configuration. Well since toolchains is released, the JVM that's running Maven is really irrelevant in deciding what JVM is required for a plugin Another idea: why not calculate the JDK Rev for the currently built artifact the same way it is calculated for dependencies, ie bytecode analysis? the artifact could (should?) be taken from local repository. Another point: should this requirement be added to the dependencies report or to the project summary ?
          Hervé Boutemy made changes -
          Attachment maven-projectinfo-dependency-java-v2.patch [ 32352 ]
          Hervé Boutemy made changes -
          Comment [ I don't have the karma to remove attachments ]
          Hervé Boutemy made changes -
          Comment [ A comment with security level 'LoggedIn' was removed. ]
          Dennis Lundberg made changes -
          Fix Version/s 2.1 [ 12621 ]
          Dennis Lundberg made changes -
          Component/s summary [ 13336 ]
          Component/s dependencies [ 13326 ]
          Hervé Boutemy made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee Herve Boutemy [ hboutemy ]
          Resolution Fixed [ 1 ]
          Hide
          Hervé Boutemy added a comment -

          reverted the commit

          Show
          Hervé Boutemy added a comment - reverted the commit
          Hide
          Dennis Lundberg added a comment -

          I'd like to see the commit reverted. We had a lengthy discussion about this path over on the commons dev list.

          My main objection is that the site is not necessarily built with the same JDK as the artifact itself, or at the same time. This can lead to false information on the site.

          Show
          Dennis Lundberg added a comment - I'd like to see the commit reverted. We had a lengthy discussion about this path over on the commons dev list. My main objection is that the site is not necessarily built with the same JDK as the artifact itself, or at the same time. This can lead to false information on the site.
          Hervé Boutemy made changes -
          Resolution Fixed [ 1 ]
          Assignee Herve Boutemy [ hboutemy ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 2.1 [ 12621 ]
          Hide
          Hervé Boutemy added a comment -

          patch applied in r649973
          Thanks

          Show
          Hervé Boutemy added a comment - patch applied in r649973 Thanks
          Hervé Boutemy made changes -
          Link This issue relates to MPIR-55 [ MPIR-55 ]
          Hide
          Sebb added a comment -

          I'd like to suggest a change to the text in the Java dependency paragraph.

          instead of:

          This project requires a minimum of Java 1.3.

          it would read something like:

          Version xxx of this project requires a minimum of Java 1.3.

          Updated patch to follow.

          Show
          Sebb added a comment - I'd like to suggest a change to the text in the Java dependency paragraph. instead of: This project requires a minimum of Java 1.3. it would read something like: Version xxx of this project requires a minimum of Java 1.3. Updated patch to follow.
          Hide
          Sebb added a comment -

          The dependencies page needs to list which version of the POM was used to provide the information.
          This is already listed on the project summary page.

          Show
          Sebb added a comment - The dependencies page needs to list which version of the POM was used to provide the information. This is already listed on the project summary page.
          Hide
          Sebb added a comment -

          @Niall: if patch v2 is obsolete, perhaps it should be deleted...

          @all: IMO put the information in both dependencies and project-summary.

          Show
          Sebb added a comment - @Niall: if patch v2 is obsolete, perhaps it should be deleted... @all: IMO put the information in both dependencies and project-summary.
          Niall Pemberton made changes -
          Attachment maven-projectinfo-dependency-java-v3.patch [ 32354 ]
          Hide
          Niall Pemberton added a comment - - edited

          Woops sorry ignore maven-projectinfo-dependency-java-v2.patch - it didn't include the updated test - attaching v3

          Show
          Niall Pemberton added a comment - - edited Woops sorry ignore maven-projectinfo-dependency-java-v2.patch - it didn't include the updated test - attaching v3
          Niall Pemberton made changes -
          Field Original Value New Value
          Attachment maven-projectinfo-dependency-java-v2.patch [ 32352 ]
          Attachment maven-projectinfo-summary-java.patch [ 32353 ]
          Hide
          Niall Pemberton added a comment -

          The patch was only ever one change to add the java version - but one line I had copy/pasted by mistake referred to repository locations.

          Anyway I still think this info would be really good on the "dependencies" report - since its a requirement to run the project. I'm attaching an updated patch for that. However I am also attaching a separate patch to include the java version info on the summary page as you request - IMO this is not as good, but if it is your preference it is better than nothing.

          Show
          Niall Pemberton added a comment - The patch was only ever one change to add the java version - but one line I had copy/pasted by mistake referred to repository locations. Anyway I still think this info would be really good on the "dependencies" report - since its a requirement to run the project. I'm attaching an updated patch for that. However I am also attaching a separate patch to include the java version info on the summary page as you request - IMO this is not as good, but if it is your preference it is better than nothing.
          Hide
          Siveton Vincent added a comment - - edited

          Your idea is a good addon but your patch proposes two features:

          • Java Version
          • Dependency Repository Locations

          So, create a new issue for the second one.

          For the Java Version point, IMHO the patch should be against the project-summary.html after the build section. Could send us a new patch?

          Show
          Siveton Vincent added a comment - - edited Your idea is a good addon but your patch proposes two features: Java Version Dependency Repository Locations So, create a new issue for the second one. For the Java Version point, IMHO the patch should be against the project-summary.html after the build section. Could send us a new patch?
          Niall Pemberton created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Niall Pemberton
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development