Bug 980205 - DeltaSpike quickstarts imported into JBDS with JRE 1.7 yield a warning
DeltaSpike quickstarts imported into JBDS with JRE 1.7 yield a warning
Status: CLOSED INSUFFICIENT_DATA
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: DeltaSpike (Show other bugs)
2.3.0
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Jason Porter
Ron Šmeral
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-01 13:27 EDT by Ron Šmeral
Modified: 2016-10-31 21:37 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
Eclipse infers the build path execution environment from the "target" property of maven-compiler-plugin. Importing DeltaSpike quickstarts into JBDS with only a JRE 1.7 configured yields the following warning "Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment." A possible workaround is to set the "target" property of maven-compiler-plugin to version 1.7 or to configure JRE 1.7 in JBDS.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-09 09:11:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFK2-141 Minor Closed DeltaSpike quickstarts imported into JBDS with JRE 1.7 yield a warning 2013-09-04 02:49:43 EDT

  None (edit)
Description Ron Šmeral 2013-07-01 13:27:03 EDT
Description of problem:
DeltaSpike quickstarts specify '1.6' as their source and target version for the java compiler in maven compiler plugin's properties. When these quickstarts are imported into JBDS which has only a single 1.7 JRE configured, a warning is shown.

Version-Release number of selected component (if applicable):
WFK 2.3.0.CR1
JBDS 7.0.0.Beta2b

How reproducible:
Import any DeltaSpike quickstart into JBDS.

Actual results:
A warning is shown:
"Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment."

Expected results:
No warning should be shown. According to the documentation of the '-target' argument of the java compiler, classes that target a specified version will run on JRE of that version *or higher*.
Comment 1 Jason Porter 2013-07-01 14:42:32 EDT
Looking at this, that seems more like an eclipse / JBDS issue than DeltaSpike. Java 7 isn't as widespread yet (according to Max's numbers from Tools/JBDS) to switch over in the poms, plus DeltaSpike will probably never completely target Java 7.
Comment 2 Ron Šmeral 2013-07-02 05:41:23 EDT
I agree that this is an issue of JBDS, but I still wanted to have this (and a few similar ones) tracked but can't see any more appropriate component here in BZ (Tooling? JBDS?) so I filed it under DeltaSpike. How should other DeltaSpike+JBDS issues be classified?
Comment 3 Ron Šmeral 2013-07-02 07:30:12 EDT
I found an issue in Eclipse Bugzilla that describes this problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=373023 .

It is closed as invalid, so apparently there is no intention from Eclipse team to change this behaviour the benefit of which is IMHO dubitable in this case.

It might be worth documenting this as a known issue along with a workaround for getting rid of the warning.
Comment 4 Pete Muir 2013-07-02 09:42:40 EDT
Why do we have the compiler plugin in there?
Comment 5 Ron Šmeral 2013-07-02 14:57:33 EDT
One reason to specify the source/target version for maven-compiler-plugin is to support JBDS, which uses maven-compiler-plugin's configuration to infer the target JRE for the project.

Also, @pmuir, do you think these low severity issues regarding JBDS support should be documented? That includes this one, 980492 and 980532.
Comment 6 Pete Muir 2013-07-04 12:07:03 EDT
@rsmeral, I think we can document them easily, no?
Comment 7 Pete Muir 2013-07-04 12:10:54 EDT
@rsmeral could you file an upstream issue in JDF to remove the compiler plugin declaration. There is no reason for it to be there at all. JBDS will just use the latest JDK in this case.
Comment 8 Ron Šmeral 2013-07-08 06:57:44 EDT
It seems to be more complicated. There are three states, all of them showing a warning in JBDS:
* maven-compiler-plugin declared and maven.compiler.target property declared:
 - described in original comment

* only maven.compiler.target property declared:
 - JBDS (m2e) apparently takes this property into account, as it behaves the same as above, irregardless of whether maven-compiler-plugin is declared

* none of the above declared:
 - here, JBDS assumes that the JRE is Java 1.5, not sure what this is based on.

IMHO, it is a good practice to have versions of plugins declared to support build stability. If for some reasons we really want to drop the compiler plugin declaration, we can keep the maven.compiler.target property and JBDS considers that as the target JRE.

Note You need to log in before you can comment on or make changes to this bug.