语言

Menu
Sites
Language
Problem on build webapp with CLI and optimization

Hi,

curently I'm working on a tizen wearable web project.
So far everything is fine and I tried to create a build script for an automatic build of this project.
I used the CLI commands metioned in the help files:

  1. web-build
  2. web-signing
  3. web-packaging

After having some trouble with the signing all works fine now until I tried to use --optimize flag for the web-build call.
If using the optimization in the IDE under "project properties --> Tizen SDk --> Web --> Build" it's working as expected. 
But the cli command returns just "null" if using the --optimize flag.

I used -l debug to get some more output and see the following java exception:

[DEBUG] AbstractMinifier.java(91) - Extension candidate: [js]
[DEBUG] JSMinifyBuilder.java(94) - minify : host/testing/unittests/test/js/app.js
null
[ERROR] AbstractLauncher.java(491) - Command stop because of exception
java.lang.RuntimeException
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber(JavaScriptCompressor.java:299)
	at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:336)
	at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
	at org.tizen.web.compressor.minifier.core.JavaScriptMinifier.compress(JavaScriptMinifier.java:68)
	at org.tizen.web.builder.JSMinifyBuilder.build(JSMinifyBuilder.java:95)
	at org.tizen.common.builder.BuildProcess.buildInternal(BuildProcess.java:339)
	at org.tizen.common.builder.BuildProcess.build(BuildProcess.java:292)
	at org.tizen.cli.exec.web.build.Main.execute(Main.java:206)
	at org.tizen.cli.exec.AbstractLauncher.run(AbstractLauncher.java:432)
	at org.tizen.cli.exec.web.build.Main.main(Main.java:146)

This happens also on freshly created projects if trying to build them on CLI with --optimize flag.

Also I can see in logs that the .css files seems to be minified without problems, but they did not appear in the .buildResult folder.
Maybe this is a bug in the CLI ?

I use following IDE:

Tizen SDK for Wearable
Version : 1.0.0 b3
Build id : 20140411-1445