[
http://jira.jboss.com/jira/browse/JBIDE-2194?page=comments#action_12419259 ]
Snjezana Peco commented on JBIDE-2194:
--------------------------------------
I can't reproduce this issue on Ganymede. Suppose that it is an Eclipse JDT issue.
It can be fixed in the 2.1.x branch by adding the following code to
Seam2FacetInstallDelegate, after line 508:
if (JavaCore.VERSION_1_6.equals(JavaFacetUtils.getCompilerLevel()) ||
JavaCore.VERSION_1_7.equals(JavaFacetUtils.getCompilerLevel())) {
JavaFacetUtils.scheduleFullBuild(ejbProjectToBeImported);
}
This will rebuild the ejb project if the system compliance level is 1.6 or 1.7
However, there is yet another issue related to the project compliance level (the issue
exists on Ganymede as well) and can be reproduced in the following way:
- start Eclipse with JDK 6
- start the Seam Web Project Wizard
- set the java facet version to 6.0
- choose "Deploy as EAR"
- finish the project
As a result, the war project will have Java 6.0 compliance level, the ejb project will
have Java 5.0 compliance level and the test project will have the default system
compliance level.
I suppose that all the projects have to have Java 6.0 compliance level.
This can be achieved by adding the following code to Seam2FacetInstallDelegate after line
508:
String level = JavaFacetUtils.getCompilerLevel(project);
String ejbLevel = JavaFacetUtils.getCompilerLevel(ejbProjectToBeImported);
if (!ejbLevel.equals(level)) {
JavaFacetUtils.setCompilerLevel(ejbProjectToBeImported, level);
}
Action action = new Action(
Action.Type.VERSION_CHANGE,JavaFacetUtils.compilerLevelToFacet( level ), null );
IFacetedProject facetedProject = ProjectFacetsManager.create( ejbProjectToBeImported );
facetedProject.modify( Collections.singleton( action ), null );
and the following code at the end of the Seam2FacetInstallDelegate.doExecute() method :
String level = JavaFacetUtils.getCompilerLevel(project);
String testLevel = JavaFacetUtils.getCompilerLevel(testProjectToBeImported);
if (!testLevel.equals(level)) {
JavaFacetUtils.setCompilerLevel(testProjectToBeImported, level);
}
The JavaFacetUtils class is placed in the org.eclipse.jst.common.frameworks plugin.
We can either copy this class to the org.jboss.tools.seam.core plugin or add the
dependency to the org.eclipse.jst.common.frameworks plugin.
Max, Denis, Marshall
Will we include these changes in the trunk and/or 2.1.x branch ?
If compiler compliance 6 and JDK 6 EAR projects will have
compile/build errors until clean is called
----------------------------------------------------------------------------------------------------
Key: JBIDE-2194
URL:
http://jira.jboss.com/jira/browse/JBIDE-2194
Project: Tools (JBoss Tools)
Issue Type: Task
Affects Versions: 2.1.0.CR1
Reporter: Max Rydahl Andersen
Assigned To: Snjezana Peco
Fix For: 3.0.0.alpha
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira