[Yanel-dev] Problem building binary version for Windows

Guillaume Déflache guillaume.deflache at wyona.com
Wed Jan 14 12:35:51 CET 2009


Michael Wechner schrieb:
> Hi
> 
> I am currently struggling with building a binary version for Yanel
> (http://yanel.wyona.org/create-windows-installer.html)
> 
> whereas I am dealing with two problems
> 
> 1)  During the build process the javadoc generation makes trouble, 
> whereas on the second build it's fine strangely, whereas this problem 
> only occurs on Windows

The only reason it works the second time is because the javadoc 
generation is skipped if the javadoc build directory already exists: I 
changed this in r40939 to check for the existence of the index-all.html 
file here, to be sure we try to regenerate javadoc if it fails at some 
point (I guess the index is done last).

It only occurs on Windows because this is a problem with path lengths: 
they must not be longer that ~260 characters or so, even on a NTFS 
filesystem, at least under Windows 2000 where I tested (it is probably 
the same with XP, no idea about Vista).

The exact problem is that the javadoc classpath is very long, and on 
Windows the javadoc Ant task seems to just run javadoc.exe from the 
command line, with the whole (huge) classpath as argument.
So to reduce the classpath length I had to move my working copy to C:\Y 
and it was enough. You can also probably move your Maven cache to a 
similar shorter path (i.e. not $HOME/.m2), although I am not sure how to 
do that.

A few general tricks to reduce path lengths:
a - use a short-named directory at the root of one drive
b - use virtual drives, for example with cmd.exe (you can probably also 
do this through the GUI somewhere, but anyway this also seems to 
propagate to the GUI itself) type:
subst y: "C:\Documents and Settings\guillaume\Desktop\yanel-trunk"
y:
cd \

> 2) When using nullsoft then I receive errors on certain files (for 
> example the nutch plugins within WEB-INF/classes directory)

I have similar problems that are yet again related to path lengths.
However sadly here trick a is not enough (even using c:\y) and trick b 
does not seems to help as for some reason y: is "resolved" to the real 
path in NSIS (I guess a different FS API is used there).
So to fix this we have to shorten paths like 
C:\Y\build\bin-snapshots\wyona-yanel-SNAPSHOT-1.0-dev-r40933-bin-win\apache-tomcat-5.5.20\yanel-webapps\wyona-yanel-webapp-v-1.0-dev-r-40933\realms\javadoc\content\org\wyona\yanel\core\attributes\translatable\DefaultTranslationManager.TranslationSAXHandler.html 
which should not be too hard I guess! ;)

I will be looking into it this afternoon.

Also path lengths trigger warnings in some JARs where paths are more 
than 100 characters long, not sure yet why/if this may be a problem.


More information about the Yanel-development mailing list