Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 980205 - DeltaSpike quickstarts imported into JBDS with JRE 1.7 yield a warning
Summary: DeltaSpike quickstarts imported into JBDS with JRE 1.7 yield a warning
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: DeltaSpike
Version: 2.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Jason Porter
QA Contact: Ron Šmeral
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-01 17:27 UTC by Ron Šmeral
Modified: 2016-11-01 01:37 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-08-09 13:11:36 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Eclipse Project 373023 None None None Never
Red Hat Bugzilla 958447 None None None Never
Red Hat Bugzilla 982193 None None None Never
Red Hat One Jira Issue Tracker WFK2-141 Minor Closed DeltaSpike quickstarts imported into JBDS with JRE 1.7 yield a warning 2018-06-19 20:04:00 UTC

Internal Links: 958447 982193

Description Ron Šmeral 2013-07-01 17:27:03 UTC
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 18:42:32 UTC
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 09:41:23 UTC
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 11:30:12 UTC
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 13:42:40 UTC
Why do we have the compiler plugin in there?

Comment 5 Ron Šmeral 2013-07-02 18:57:33 UTC
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 16:07:03 UTC
@rsmeral, I think we can document them easily, no?

Comment 7 Pete Muir 2013-07-04 16:10:54 UTC
@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 10:57:44 UTC
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.