Createprocess error=206; the filename or extension is too long [duplicate]

痞子三分冷 提交于 2019-11-29 13:40:59

I finally managed to solve it:

Turns out birt, together with its dependencies, was simply adding too many libraries and the classpath became too long for windows command to handle. Furthermore, birt libraries have stupidly long names.

Solved it using this dependency (I only needed the runtime), I created the lib and birt directories and placed the jar there myself:

<dependency>
    <groupId>org.eclipse.birt.runtime</groupId>
    <artifactId>org.eclipse.birt.runtime</artifactId>
    <version>4.4.1</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/birt/birt.runtime-4.4.1.jar</systemPath>
</dependency>

Birt has no reason to be in the classpath if it's not used client-side.

Unfortunately, Maven sometimes makes things harder than necessary; so with Maven you need your GWT client code to be a specific Maven module with no dependency on server-side code; then "merge" everything into a single WAR using WAR overlays.

With that layout (let's call the modules app-client and app-server), you have several solutions to launch gwt:run or gwt:debug:

  • never tried but you could probably configure hostedWebapp to point to your app-server output directory:

    <hostedWebapp>../app-server/target/app-server-${project.version}/</hostedWebapp>
    

    Make sure you run mvn clean before packaging your app-server WAR though to be sure the generated JS files come from app-client (as a WAR overlay) and not app-server (generated by gwt:run)

  • what I use in gwt-maven-archetypes: launch the server-side code in a distinct servlet container, and use <noServer>true</noServer>

    Make sure you run mvn clean before packaging too, or use -Dgwt.compiler.force, to be sure gwt:compile won't treat the DevMode-generated *.nocache.js file as up-to-date and will recompile the application.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!