| Summary: | Put endorsed libraries before the JRE on the eclipse classpath | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | jhite |
| Component: | m2e | Assignee: | Project Inbox <m2e.core-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | adietish, adrianboimvaser, eclipse.dserodio, fbricon, igor, jhite, jtk499, manderse, mpaesold, reschifl |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
jhite
Even making the m2e plugin not re-order the eclipse classpath would help. I could then just move the "Maven Dependencies" before the JRE in eclipse classpath. It's not pretty or ideal, but solves my problem. Couldn't we create a new Classpath Library (Endorsed Library?), that would always be put before the JRE one? (In reply to comment #2) > Couldn't we create a new Classpath Library (Endorsed Library?), that would > always be put before the JRE one? I like that idea, but what in pom.xml would be used to define "Endorsed library" to make m2e configure this correctly ? (In reply to comment #3) > (In reply to comment #2) > > Couldn't we create a new Classpath Library (Endorsed Library?), that would > > always be put before the JRE one? > > I like that idea, but what in pom.xml would be used to define "Endorsed > library" to make m2e configure this correctly ? If use of endorsed libraries is the way to solve the problem on command line, then adding the same libraries to JRE classpath (i.e. via Installed JREs preference page) is perfectly reasonable way to achieve the same effect inside IDE. A better/proper solution to the problem would require finding pom.xml representation for dependencies that needs to appear on classpath before JRE libraries and making all command-line tools and IDEs support the new notion. I do not believe m2e-only solution that does not work for command-line build is a good idea. (In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > Couldn't we create a new Classpath Library (Endorsed Library?), that would > > > always be put before the JRE one? > > > > I like that idea, but what in pom.xml would be used to define "Endorsed > > library" to make m2e configure this correctly ? > > If use of endorsed libraries is the way to solve the problem on command line, > then adding the same libraries to JRE classpath (i.e. via Installed JREs > preference page) is perfectly reasonable way to achieve the same effect inside > IDE. > But then you'd have a workspace wide custom JRE classpath, assuming you'd add the custom directory to existing Execution Environment(s). That might cause unexpected behavior on other maven projects in your workspace. The maven-compiler-plugin allows you to add this endorsed libraries specifically to your project build. Having a new Classpath Library per project would - I believe, but I may be wrong - lead to the same result, without impeding on other projects' classpath. > A better/proper solution to the problem would require finding pom.xml > representation for dependencies that needs to appear on classpath before JRE > libraries and making all command-line tools and IDEs support the new notion. I > do not believe m2e-only solution that does not work for command-line build is a > good idea. Why are you saying it doesn't work for command-line build? Endorsed libraries are currently supported in maven builds using a combination of maven-dependency-plugin:copy and the <compilerArgument> property of maven-compiler-plugin configuration. I agree though a better native support should be added to maven, as well as some improvments in JDT. But how long do you think it will take before we see that happen? (In reply to comment #5) > Why are you saying it doesn't work for command-line build? Endorsed libraries > are currently supported in maven builds using a combination of > maven-dependency-plugin:copy and the <compilerArgument> property of > maven-compiler-plugin configuration. I agree though a better native support > should be added to maven, as well as some improvments in JDT. But how long do > you think it will take before we see that happen? That's basically how our command line build works now. I just don't know how you could determine that the maven-dependency-plugin:copy is being used to setup endorsed libraries, unless copying to target/endorsed is a well known and accepted convention. For those interested, I'm implementing this feature under the JBoss Tools umbrella (for now) : https://issues.jboss.org/browse/JBIDE-11738?focusedCommentId=12691763&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12691763 I attached an archived update site on JIRA, so you can try. Current implementation doesn't copy the files to the endorsed lib, that needs to be done via a CLI build first. JBoss Tools 3.3.0.CR1 update site contains aforementioned configurator : http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.CR1.core/ Closing old/stale bugzilla entries. |