I previously had an error with gwt 1.5.1 with the spaces in the
classpath that has been corrected in 1.5.2. I was able to provide a
workaround so that 1.5.1 still worked for me. However, I'm not able
to run 1.5.2 completely successfully. I get the following error when
I run gwt:compile:
[INFO] Failed to configure plugin parameters for: com.totsp.gwt:maven-
googlewebtoolkit2-plugin:1.5.2
(found static expression: 'com.myproject.MyApp' which may act as a
default value).
Cause: Cannot assign configuration entry 'compileTarget' to 'class
[Ljava.lang.String;' from 'com.myproject.MyApp', which is of type
class java.lang.String
My plugin config looks like this:
<plugin>
<groupId>com.totsp.gwt</groupId>
<artifactId>maven-googlewebtoolkit2-plugin</
artifactId>
<version>1.5.2</version>
<configuration>
<logLevel>ALL</logLevel>
<runTarget>com.myproject.MyApp/MyApp.html</
runTarget>
<compileTarget>com.myproject.MyApp</compileTarget>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
And my command line looks like this...
mvn.bat -U -Dgoogle.webtoolkit.home="E:\gwt-windows-1.3.3" gwt:compile
Any help would be appreciated. It looks like it can't retrieve the
value for the compileTarget, though it's specified properly. Perhaps
I'm leaving something out?
Thanks,
Tim
> Hi,
Hi Tim,
> <compileTarget>com.myproject.MyApp</compileTarget>
The plugin now supports multiple targets, you need to remplace this
configuration by
<compileTarget>
<param>com.myproject.MyApp</param>
</compileTarget>
--
Thomas
Thanks for the quick reply! That fixed it for that issue. I'm now
getting an issue with an IllegalArgumentException. I'm not sure
what's causing that, but it looks similar to one you posted...
[INFO] Running GWTCompile with command: ...
java.lang.IllegalArgumentException
at java.lang.ProcessImpl.<init>(ProcessImpl.java:69)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:
692)
at
org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:
74)
at
org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:
60)
at com.totsp.mavenplugin.gwt.CompileMojo.execute(CompileMojo.java:78)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:
412)
Were you able to work around it? Is it a bug? My classpath is
relatively long...could that potentially cause it?
Tim
> Thanks for the quick reply! That fixed it for that issue. I'm now
> getting an issue with an IllegalArgumentException. I'm not sure
> what's causing that, but it looks similar to one you posted...
>
> [INFO] Running GWTCompile with command: ...
> java.lang.IllegalArgumentException
> at java.lang.ProcessImpl.<init>(ProcessImpl.java:69)
> at java.lang.ProcessImpl.start(ProcessImpl.java:30)
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
> at java.lang.Runtime.exec(Runtime.java:591)
> at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:
I think this is caused by the pathing issue correction.
The java path is now :
--------
protected static final String JAVA_COMMAND =
System.getProperty( "java.home") != null ?
"\""+System.getProperty( "java.home") + File.separator + "bin
\"" + File.separator + "java" :
"java";
--------
The are quotes after the between the bin folder and the java
executable.
For the moment, I suggest you to use the 1.5.1 version.
--
Thomas
--
Thomas