Compiling on windows causes the classpath to exceed limit

315 views
Skip to first unread message

mroot

unread,
Mar 24, 2008, 10:21:41 PM3/24/08
to gwt-maven
When using the maven-googlewebtoolkit2-plugin on my macox everything
compiles fine. After moving this to a windows platform I am getting
the error

"input line is too long".

Appears that the plugin is appending to the classpath multiple times
causing this to be very large and as a result is failing on windows.
I was wondering if anyone else has ran into this problem.

Below I have attached my plugin configuration from my pom.

<plugin>
<groupId>com.totsp.gwt</groupId>
<artifactId>maven-googlewebtoolkit2-plugin</artifactId>
<configuration>
<logLevel>INFO</logLevel>
<runTarget>com.mitratech.widgets.gwt.PortLight/PortLight.html</
runTarget>
<style>OBF</style>
<gwtVersion>1.4.61</gwtVersion>
<compileTargets>
<param>com.mitratech.widgets.PortLight.PortLight</param>
<param>com.mitratech.widgets.GridGrouping</param>
</compileTargets>
</configuration>
<executions>
<execution>
<goals>
<goal>setup</goal>
<goal>extractGwt</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>

Michael

Charlie Collins

unread,
Mar 25, 2008, 8:23:48 AM3/25/08
to gwt-maven
Others have run into this, yes. It's an open issue that Cooper was
working on, not sure the status right now.

http://code.google.com/p/gwt-maven/issues/detail?id=84

Charlie Collins

unread,
Mar 25, 2008, 8:30:20 AM3/25/08
to gwt-maven
We actually have three issues in the tracker right now for this, one
has a fix with it:
http://code.google.com/p/gwt-maven/issues/detail?id=87

Can somebody build locally, try this, test this, and report back? If
so we can add this to the source. I don't have a Windows machine to
do this on right now (and won't for several weeks).

Need a Windows contributor/tester.

mroot

unread,
Mar 25, 2008, 2:08:21 PM3/25/08
to gwt-maven
I downloaded the source from the svn. I checked the file
ScriptWriterWindows to see if the change specified in defect 87 was
actually present in the source. The fix was present. I compiled and
tested. Still getting the line to long error.

Michael

Charlie Collins

unread,
Mar 26, 2008, 8:21:37 AM3/26/08
to gwt-maven
Thanks for trying it out. I have been trying to get a hold of Cooper
(who said he had a fix for this in SVN), but haven't been able to. If
this gets no more traction from him I will install Windows and try to
look at it this weekend.

mroot

unread,
Mar 27, 2008, 8:51:26 AM3/27/08
to gwt-maven
Charlie,

I was able to extend the comspec on windows by adding /e:32768. As a
result of this change I am no longer getting the "line too long"
error. The fix in the code was to prevent the command line from
exceeding 4000 chars, which works. I was exceeding the limit on the
env space. I also read some where that there was a limit on env
variables to 8kb. Not sure if this is true on windows xp or not. I
know I am exceeding this limit and it is working fine on windows xp
once I extended the comspec.

Charlie Collins

unread,
Mar 27, 2008, 7:50:09 PM3/27/08
to gwt-maven
Awesome, good to know.

Just to sum up, for my own edification, you used the latest code in
SVN, which has the fix already in it for the 4000 char line thing,
right?

Then, you extended comspec, right?

If so I think we are good on that code fix, just need a release, and
we can add the comspec thing to the FAQ (really appreciate the
feedback here too, BTW).

mroot

unread,
Mar 28, 2008, 6:11:23 PM3/28/08
to gwt-maven
Charlie,

Correct. I used the latest code from the SVN and checked to make sure
the fix was already in there for the 4000 char limit. But since our
classpath was about 16kb we were exceeding the comspec. After
extending the size of the comspec everything worked.

Robert "kebernet" Cooper

unread,
Mar 29, 2008, 12:12:10 PM3/29/08
to gwt-...@googlegroups.com
There was an error in the splitting code for this. I believe the current code, 2.0beta8 in the repo now, should work.

The new code will break you classpath up into 4000 byte (give or take the length of a single classpath entry) chunks and build a %CLASSPATH% incrementally. I am not sure if -cp replacement on windows will work, though. I don't have a windows machine easily available to me to test, so we might need to just eliminate the -cp argument from the commandline and let windows pickup the CLASSPATH evn var. I am not sure.
--
:Robert "kebernet" Cooper
::kebe...@gmail.com
Alice's cleartext
Charlie is the attacker
Bob signs and encrypts
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8

Charlie Collins

unread,
Apr 2, 2008, 10:10:10 AM4/2/08
to gwt-maven
How does on "extend the size of the comspec" just so I can add a FAQ
entry? (Forgive my ignorance.)

Charlie Collins

unread,
Apr 2, 2008, 10:11:40 AM4/2/08
to gwt-maven
Nevermind that last question, I went back and READ your previous
post ;).

"by adding /e:32768"
Reply all
Reply to author
Forward
0 new messages