cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.12k stars 7.05k forks source link

Missing closure-compiler jar file #16382

Open ntrrgc opened 8 years ago

ntrrgc commented 8 years ago

Steps to Reproduce:

  1. Install cocos2d-x (clone, clone submodules, ./setup.py, exec bash)
  2. Create new JS project: cocos new -l js test 3: cd test
  3. Try to compile it: cocos compile -p web -m release

Result:

Buildfile: /tmp/test/publish/html5/build.xml

BUILD FAILED
/tmp/test/publish/html5/build.xml:5: taskdef class com.google.javascript.jscomp.ant.CompileTask cannot be found
 using the classloader AntClassLoader[]

Total time: 0 seconds
Error running command, return code: 1.

Looking at build.xml I can find this line:

    <taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
             classpath="/home/ntrrgc/Programas/cocos2d-x/tools/cocos2d-console/plugins/plugin_compile/build_web/bin/compiler-1.7.jar"/>

It fails because tools/cocos2d-console/plugins/plugin_compile/build_web/bin/compiler-1.7.jar does not exist in the cocos2d-x directory (the build_web/bin directory does not exist at all).

I guess that file is the closure compiler, which should be automatically downloaded at some point. Am I missing something?

minggo commented 8 years ago

@natural-law could you please take a look? Thanks.

natural-law commented 8 years ago

@ntrrgc I just checked the logic. The files in build_web/bin should be downloaded before invoking ant -f /tmp/test/publish/html5/build.xml if the files are missed. I've no idea why it's not downloaded correctly.

You can try to download the files manually by invoking download-bin.py in the path cocos2d-x/tools/cocos2d-console.