Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-11738

Solve/workaround the issue of needing endorsed libraries on Java 6

    XMLWordPrintable

Details

    • Hide

      In case endorsed directories are defined in the maven-compiler-plugin configuration, this new maven configurator :

      • parses <compilerArgument> for -Djava.endorsed.dirs=([^ \\t]+) and falls back on the <compilerArguments><endorseddirs> value.
      • lists all the jars and zips found under the endorsed directories and adds them to a new Endorsed Libraries classpath library. Endorsed Libraries is put first on the project's classpath. For now the endorsed dirs need to have been created/populated before the project's configuration.
      • During project configuration, if the endorsed directories are missing, an Error Marker is added at the maven-compiler-plugin location in pom.xml.
      • If there's a maven-dependency-plugin:copy goal defined in a plugin execution, then a quick fix will be available for the error marker, basically proposing the user to run mvn <phase_executing_dependency_copy>. After that goal is run, the project configuration is updated, effectively adding the Endorsed Libraries to the project's classpath.

      Please note that the maven-dependency-plugin execution is still not covered by m2e (this goes beyond the scope of this JIRA), thus requires custom lifecycle mapping (see http://wiki.eclipse.org/M2E_plugin_execution_not_covered)

      Show
      In case endorsed directories are defined in the maven-compiler-plugin configuration, this new maven configurator : parses <compilerArgument> for -Djava.endorsed.dirs=( [^ \\t] +) and falls back on the <compilerArguments><endorseddirs> value. lists all the jars and zips found under the endorsed directories and adds them to a new Endorsed Libraries classpath library. Endorsed Libraries is put first on the project's classpath. For now the endorsed dirs need to have been created/populated before the project's configuration. During project configuration, if the endorsed directories are missing, an Error Marker is added at the maven-compiler-plugin location in pom.xml. If there's a maven-dependency-plugin:copy goal defined in a plugin execution, then a quick fix will be available for the error marker, basically proposing the user to run mvn <phase_executing_dependency_copy>. After that goal is run, the project configuration is updated, effectively adding the Endorsed Libraries to the project's classpath. Please note that the maven-dependency-plugin execution is still not covered by m2e (this goes beyond the scope of this JIRA), thus requires custom lifecycle mapping (see http://wiki.eclipse.org/M2E_plugin_execution_not_covered )
    • Not Required

    Description

      JAX-WS has non-backwards compatible API changes requiring you to put specific jars on to endorsed libraries.

      Could we write a configurator that reacts to common ways of working around it in eclipse.

      m2e issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=363237

      Related to JBIDE-11348

      Attachments

        Issue Links

          Activity

            People

              fbricon@redhat.com Fred Bricon
              manderse@redhat.com Max Andersen
              Isaac Rooskov Isaac Rooskov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: