[
http://jira.codehaus.org/browse/MGWT-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209556#action_209556
]
nicolas de loof edited comment on MGWT-156 at 2/9/10 5:19 AM:
--------------------------------------------------------------
Closed as this is a [GWT
bug|http://code.google.com/p/google-web-toolkit/issues/detail?id=3557] (not a
gwt-maven-plugin one) with no simple workaround.
*Workaround :*
*1.* Add dependency on aspectjtools-1.2 in your project (this will add support
the JDTCompilerAdatper class in your project)
{code:xml}
<dependency>
groupId>aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
{code}
*2.* Create the following class in your project:
{code:java}
public class JDTCompiler15 extends JDTCompilerAdapter {
@Override
public void setJavac(Javac attributes) {
if (attributes.getTarget() == null) {
attributes.setTarget("1.5");
}
if (attributes.getSource() == null) {
attributes.setSource("1.5");
}
super.setJavac(attributes);
}
}
{code}
*3.* configure the run goal with extraJvmArgs :
{{-Dbuild.compiler="mypackage.JDTCompiler15"}}
was (Author: ndeloof):
Closed as this is a [GWT
bug|http://code.google.com/p/google-web-toolkit/issues/detail?id=3557] (not a
gwt-maven-plugin one) with no simple workaround.
*Workaround :*
*1.* Add dependency on plexus-compiler-eclipse in your project (this will add
support the JDTCompilerAdatper class in your project)
{code:xml}
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compilers</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
{code}
*2.* Create the following class in your project:
{code:java}
public class JDTCompiler15 extends JDTCompilerAdapter {
@Override
public void setJavac(Javac attributes) {
if (attributes.getTarget() == null) {
attributes.setTarget("1.5");
}
if (attributes.getSource() == null) {
attributes.setSource("1.5");
}
super.setJavac(attributes);
}
}
{code}
*3.* configure the run goal with extraJvmArgs :
{{-Dbuild.compiler="mypackage.JDTCompiler15"}}
> JSP pages compile with JDK 1.4, not 1.5
> ---------------------------------------
>
> Key: MGWT-156
> URL: http://jira.codehaus.org/browse/MGWT-156
> Project: Maven 2.x GWT Plugin
> Issue Type: Bug
> Affects Versions: 1.2
> Environment: Mac OS X 10.6.2, JDK 1.6.0_17, GWT 1.7.1
> Reporter: Matt Bishop
> Attachments: mgwt_156.zip
>
>
> Our project uses an index.jsp to load the GWT application. The GWT app uses
> JDK 1.5 features like enums and generics. When running (gwt:run) with
> gwt-maven-plugin 1.2, jetty seems to think the source is 1.4 and will fail to
> compile classes with java5 syntax.
> REGRESSION! This worked as expected with plugin 1.1; if I merely change the
> plugin version from 1.2 to 1.1, the app works as expected.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email