ckeditor / ckbuilder

The development repository of CKBuilder, a command line builder for CKEditor 4.
Other
19 stars 11 forks source link

--preprocess-plugin fails for widget plugin #24

Open RainerSchwarze opened 6 years ago

RainerSchwarze commented 6 years ago

Steps to repeat

  1. In ckeditor4 project cd to dev/builder/
  2. Call build.sh to download ckbuilder.jar
  3. Run command java -jar ckbuilder/2.3.2/ckbuilder.jar --preprocess-plugin ../../plugins/widget xwidget

Expected behaviour

The target directory (xwidget) contains prepared plugin files

Actual behaviour

The command fails with an error and no files are copied/generated:

Exception in thread "main" org.mozilla.javascript.JavaScriptException: The plugin file (plugin.js) was not found in C:\work\ws-rte\ckeditor-dev\plugins\widget (C:\ckbuilder\src/lib/plugin.js#316)
        at ckbuilder.lib.plugin._c_anonymous_7(C:\ckbuilder\src/lib/plugin.js:316)
        at ckbuilder.lib.plugin.call(C:\ckbuilder\src/lib/plugin.js)
        at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
        at ckbuilder.lib.controller._c_anonymous_8(C:\ckbuilder\src/lib/controller.js:97)
        at ckbuilder.lib.controller.call(C:\ckbuilder\src/lib/controller.js)
        at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
        at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
        at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
        at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
        at ckbuilder.lib.controller._c_anonymous_14(C:\ckbuilder\src/lib/controller.js:235)
        at ckbuilder.lib.controller.call(C:\ckbuilder\src/lib/controller.js)
        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
        at ckbuilder.ckbuilder._c_script_0(C:\ckbuilder\src/ckbuilder.js:112)
        at ckbuilder.ckbuilder.call(C:\ckbuilder\src/ckbuilder.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
        at ckbuilder.ckbuilder.call(C:\ckbuilder\src/ckbuilder.js)
        at ckbuilder.ckbuilder.exec(C:\ckbuilder\src/ckbuilder.js)
        at org.mozilla.javascript.optimizer.OptRuntime$1.run(OptRuntime.java:218)
        at org.mozilla.javascript.Context.call(Context.java:489)
        at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504)
        at org.mozilla.javascript.optimizer.OptRuntime.main(OptRuntime.java:206)
        at ckbuilder.ckbuilder.main(C:\ckbuilder\src/ckbuilder.js)

Remarks

As far as I see widget is the only plugin which contains more than one plugin.js file. (See also issue #1) Removing the dev directory in the widget plugin "fixes" the error.

wwalc commented 6 years ago

It looks like it works if you run the command from the top level (from within the ckeditor-dev folder):

screen shot 2018-03-02 at 11 16 16

This is ofc a temporary workaround.