Closed AntumDeluge closed 9 months ago
Looking at the diff of build.xml
between version 1.41 & 1.42 it seems the problem is in this change:
<!-- include marauroa source if available -->
- <sourcepath path="../marauroa/src/" if:true="${include.marauroa}"/>
- <sourcepath path="${src}"/>
+ <fileset dir="${marauroa_src}" includes="**/*.java" if:true="${include.marauroa}"/>
+ <fileset dir="${src}" includes="**/*.java"/>
It seems the javadoc
executable can't handle the longer names on Windows when using fileset
element as opposed to sourcepath
.
Note: This bug is likely related to Java & not directly to the Stendhal project.
π Describe the bug
Somewhere between version 1.41 & 1.42 filenames became too long to build Java documentation on Windows. Windows has a limit of 260 characters in path names. I believe this is the cause of the error. According to the article, it is possible to enable long paths in Windows 10. I have set the registry key & rebooted, but still cannot build. I believe the problem is in the second condition: "The application manifest must also include the
longPathAware
element". I'm guessing thejavadoc.exe
executable does not include this manifest element. I'm not sure if this is something that can be invoked using a command line parameter inbuild.xml
, or if it needs to be compiled into the executable.I could move the source code to directory with a shorter root path. But that seems like a temporary solution.
π₯ How to reproduce
Steps to reproduce the behavior:
ant javadocs
.It should be noted that the problem occurs in the
javadocs
target ofbuildtools/ant_modules/docs.xml
on the line<fileset dir="${src}" includes="**/*.java"/>
. Removing the "src" directory from the build allows the process to complete.π Environment
π Additional information
Some other resources I looked at while trying to fix the problem:
javadoc.exe
manifest exported with Resource Hacker:As per the instructions here, I added the following to the manifests of both
javadoc.exe
&java.exe
, but problem persists: