Giter Site home page Giter Site logo

ckeditor / ckbuilder Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 11.0 26.15 MB

The development repository of CKBuilder, a command line builder for CKEditor 4.

License: Other

Shell 0.10% JavaScript 49.71% HTML 31.00% CSS 18.79% PHP 0.27% Batchfile 0.13% Classic ASP 0.01%

ckbuilder's Introduction

CKBuilder

This repository contains the source files of CKBuilder, a command line builder for CKEditor.

CKBuilder generates release packages of CKEditor out of its source code.

Compiling CKBuilder

You can compile CKBuilder into a single .jar file by running build_jar.sh located in the dev\build folder. The compiled file will be generated in the bin folder. Apache Ant is required to run it.

Using CKBuilder source files

You can generate a CKEditor release version using CKBuilder source files by running build.sh available in the dev\scripts folder. The release version of CKEditor will be generated in the release folder. Make sure to download the CKEditor submodule first:

> git submodule update --init

Using the default ckbuilder.jar

If you did not compile your own version of ckbuilder.jar and all you want to do is to build CKEditor, then there is a simpler way to do this:

  1. Clone the CKEditor repository.

  2. Inside ckeditor-dev run:

    > ./dev/builder/build.sh
    
  3. That's it - CKBuilder will be downloaded automatically and a "release" version of CKEditor will be built in the new dev/builder/release/ folder.

Note: CKBuilder which is run by calling build.sh script will use default build-config.js which define skin, files to be ignored and plugins. For more information about build-config run builder with --build-help command.

Note2: The shell script is designed to run on Mac/Linux. If you are a Windows user, install Git for Windows, make sure "Git Bash" is checked during the installation process and then run this script using "Git Bash".

Using a custom ckbuilder.jar

To get the list of all available commands and options, run:

> java -jar ckbuilder.jar --help

Available commands

This is just an overview of available commands. For more details, check the built-in help options.

--help | --build-help | --full-help

Display various help information.

--build

Build CKEditor, definitely the most frequently used command.

--build-skin

Creates a release version of a skin (icons are merged into a single strip image, CSS files are merged and minified, JavaScript files are minified).

Note: if you want to share your skin with others, do not upload the release version of a skin to the CKEditor addons repository, upload the source version instead.

--verify-plugin | --verify-skin

Used by the online builder to verify if a plugin or skin is valid. If you have problems with uploading a skin or a plugin, it might be because this command returned errors.

--preprocess-core | --preprocess-plugin | --preprocess-skin

Used by the online builder, unless you intend to do a similar service, you don't need it.

--generate-build-config

Creates a fresh build-config.js.

Build config

License

Licensed under the terms of the MIT License. For full details about license, please check LICENSE.md file.

ckbuilder's People

Contributors

adelura avatar dumluregn avatar f1ames avatar jacekbogdanski avatar mlewand avatar sculpt0r avatar tade0 avatar vokiel avatar wwalc avatar zipp3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ckbuilder's Issues

Add new lines when concatenating files

When merging files that do not have EOL character at the end there might be a situation where merged files will result in an invalid JavaScript file. We should either detect whether the file has a new line at the end and add it or simply always add a new line at the end when merging JS files (they will be removed during minification anyway).

Add note about required toolbar button image size

Plugins with images highly exceeding 16x16 px results in broken build. Contributors should be aware of the required size of the image.

Error message from the builder with incorrect icon size:

cowardly refused to add an image to a sprite because it’s too big

Let's add a short information to the plugin contribution page about requirements, e.g.:

Make sure your button icon is in the right dimensions 16x16px.

Tests failing due to year in copyright headers

There are some failing tests simply to wrong year in the copyright header. See the conosle dump below:

Testing processing language files

FAILED: Language file: en.js
  Expected: /*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['en']={"uicolor":{"title":"UI Color Picker","preview":"Live preview","config":"Paste this string into your config.js file","predefined":"Predefined color sets"},"placeholder":{"title":"Placeholder Properties","toolbar":"Create Placeholder","text":"Placeholder Text","edit":"Edit Placeholder","textMissing":"The placeholder must contain text."},"devtools":{"title":"Element Information","dialogName":"Dialog window name","tabName":"Tab name","elementId":"Element ID","elementType":"Element type"},"dir":"ltr","editorTitle":"Rich text editor, %1, press ALT 0 for help.","common":{"browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","unavailable":"%1<span class=\"cke_accessibility\">, unavailable</span>"},"contextmenu":{"options":"Context Menu Options"},"specialChar":{"toolbar":"Insert Special Character","title":"Select Special Character","options":"Special Character Options"},"docprops":{"label":"Document Properties","title":"Document Properties","design":"Design","previewHtml":"<p>This is some <strong>sample text</strong>. You are using <a href=\"javascript:void(0)\">CKEditor</a>.</p>"}};
  Actual  : /*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['en']={"uicolor":{"title":"UI Color Picker","preview":"Live preview","config":"Paste this string into your config.js file","predefined":"Predefined color sets"},"placeholder":{"title":"Placeholder Properties","toolbar":"Create Placeholder","text":"Placeholder Text","edit":"Edit Placeholder","textMissing":"The placeholder must contain text."},"devtools":{"title":"Element Information","dialogName":"Dialog window name","tabName":"Tab name","elementId":"Element ID","elementType":"Element type"},"dir":"ltr","editorTitle":"Rich text editor, %1, press ALT 0 for help.","common":{"browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","unavailable":"%1<span class=\"cke_accessibility\">, unavailable</span>"},"contextmenu":{"options":"Context Menu Options"},"specialChar":{"toolbar":"Insert Special Character","title":"Select Special Character","options":"Special Character Options"},"docprops":{"label":"Document Properties","title":"Document Properties","design":"Design","previewHtml":"<p>This is some <strong>sample text</strong>. You are using <a href=\"javascript:void(0)\">CKEditor</a>.</p>"}};
FAILED: Language file: he.js
  Expected: /*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['he']={"uicolor":{"preview":"????? ??????","config":"???? ?? ????? ??? ???? ????? config.js","title":"UI Color Picker","predefined":"Predefined color sets"},"placeholder":{"title":"??????? ???? ????","toolbar":"??? ???? ????","text":"???? ???? ?????","edit":"???? ???? ????","textMissing":"???? ????? ???? ????? ????."},"devtools":{"title":"Element Information","dialogName":"Dialog window name","tabName":"Tab name","elementId":"Element ID","elementType":"Element type"},"dir":"rtl","editorTitle":"???? ???? ????, %1, ??? ??? (ALT) + 0 ?????.","common":{"browseServer":"???? ????","url":"????? (URL)","protocol":"????????","upload":"?????","uploadSubmit":"????? ????","unavailable":"%1<span class=\"cke_accessibility\">, ?? ????</span>"},"contextmenu":{"options":"???????? ????? ?????"},"specialChar":{"toolbar":"????? ?? ?????","title":"????? ?? ?????","options":"???????? ????? ???????"},"docprops":{"label":"??????? ????","title":"??????? ????","design":"?????","previewHtml":"<p>??? <strong>???? ?????</strong>. ??/? ?????/? ?<a href=\"javascript:void(0)\">CKEditor</a>.</p>"}};
  Actual  : /*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['he']={"uicolor":{"preview":"????? ??????","config":"???? ?? ????? ??? ???? ????? config.js","title":"UI Color Picker","predefined":"Predefined color sets"},"placeholder":{"title":"??????? ???? ????","toolbar":"??? ???? ????","text":"???? ???? ?????","edit":"???? ???? ????","textMissing":"???? ????? ???? ????? ????."},"devtools":{"title":"Element Information","dialogName":"Dialog window name","tabName":"Tab name","elementId":"Element ID","elementType":"Element type"},"dir":"rtl","editorTitle":"???? ???? ????, %1, ??? ??? (ALT) + 0 ?????.","common":{"browseServer":"???? ????","url":"????? (URL)","protocol":"????????","upload":"?????","uploadSubmit":"????? ????","unavailable":"%1<span class=\"cke_accessibility\">, ?? ????</span>"},"contextmenu":{"options":"???????? ????? ?????"},"specialChar":{"toolbar":"????? ?? ?????","title":"????? ?? ?????","options":"???????? ????? ???????"},"docprops":{"label":"??????? ????","title":"??????? ????","design":"?????","previewHtml":"<p>??? <strong>???? ?????</strong>. ??/? ?????/? ?<a href=\"javascript:void(0)\">CKEditor</a>.</p>"}};
FAILED: Language file: pl.js
  Expected: /*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['pl']={"uicolor":{"title":"UI Color Picker","preview":"Live preview","config":"Paste this string into your config.js file","predefined":"Predefined color sets"},"placeholder":{"title":"W?a?ciwo?ci wype?nienia","edit":"Edytuj wype?nienie","textMissing":"Wype?nienie powinno posiada? jaki? tekst.","toolbar":"Create Placeholder","text":"Placeholder Text"},"devtools":{"title":"Element Information","dialogName":"Dialog window name","tabName":"Tab name","elementId":"Element ID","elementType":"Element type"},"dir":"ltr","editorTitle":"Edytor tekstu sformatowanego, %1, w celu uzyskania pomocy naci?nij ALT 0.","common":{"browseServer":"Przegl?daj","url":"Adres URL","protocol":"Protokó?","upload":"Wy?lij","uploadSubmit":"Wy?lij","unavailable":"%1<span class=\"cke_accessibility\">, niedost?pne</span>"},"contextmenu":{"options":"Opcje menu kontekstowego"},"specialChar":{"toolbar":"Wstaw znak specjalny","title":"Wybierz znak specjalny","options":"Opcje znaków specjalnych"},"docprops":{"label":"W?a?ciwo?ci dokumentu","title":"W?a?ciwo?ci dokumentu","design":"Projekt strony","previewHtml":"<p>To jest <strong>przyk?adowy tekst</strong>. Korzystasz z programu <a href=\"javascript:void(0)\">CKEditor</a>.</p>"}};
  Actual  : /*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['pl']={"uicolor":{"title":"UI Color Picker","preview":"Live preview","config":"Paste this string into your config.js file","predefined":"Predefined color sets"},"placeholder":{"title":"W?a?ciwo?ci wype?nienia","edit":"Edytuj wype?nienie","textMissing":"Wype?nienie powinno posiada? jaki? tekst.","toolbar":"Create Placeholder","text":"Placeholder Text"},"devtools":{"title":"Element Information","dialogName":"Dialog window name","tabName":"Tab name","elementId":"Element ID","elementType":"Element type"},"dir":"ltr","editorTitle":"Edytor tekstu sformatowanego, %1, w celu uzyskania pomocy naci?nij ALT 0.","common":{"browseServer":"Przegl?daj","url":"Adres URL","protocol":"Protokó?","upload":"Wy?lij","uploadSubmit":"Wy?lij","unavailable":"%1<span class=\"cke_accessibility\">, niedost?pne</span>"},"contextmenu":{"options":"Opcje menu kontekstowego"},"specialChar":{"toolbar":"Wstaw znak specjalny","title":"Wybierz znak specjalny","options":"Opcje znaków specjalnych"},"docprops":{"label":"W?a?ciwo?ci dokumentu","title":"W?a?ciwo?ci dokumentu","design":"Projekt strony","previewHtml":"<p>To jest <strong>przyk?adowy tekst</strong>. Korzystasz z programu <a href=\"javascript:void(0)\">CKEditor</a>.</p>"}};
Generating sprite image

Release Build Includes Test Directory

I'm building a CKEditor build from source. I have tried release/4.3.x and release/4.4.x branches of that directory, which use version 1.7.2 and version 2.0.1, respectively. I have also manually tried CKBuilder 2.0.2 with the same command used for version 2.0.1. Versions 2.0.1 and 2.0.2 include an extra tests directory that should not be present. Also included are extra files that may or may not be expected; I'm not familiar.

I'm using build.sh:
release/4.3.x uses the command
java -jar ckbuilder/$CKBUILDER_VERSION/ckbuilder.jar --build ../../ release --version="4.3.5 DEV" --build-config build-config.js --overwrite "$@"
release/4.4.x uses the command
java -jar ckbuilder/$CKBUILDER_VERSION/ckbuilder.jar --build ../../ release --version="4.4.2 DEV" --overwrite $JAVA_ARGS

Results:
CKBuilder 2.0.1 and 2.0.2 includes extra directories and files I would not expect in a release build.
CHANGES.md LICENSE.md adapters bender.js ckeditor.js config.js contents.css lang package.json plugins samples skins styles.js tests
CKBuilder 1.7.2 produces:
CHANGES.md LICENSE.md adapters ckeditor.js config.js contents.css lang plugins samples skins styles.js

Expected:
No directories needed for testing etc, as with 1.7.2. I'm not sure if bender.js, package.json, etc are needed by the new release; they may.

Easy steps to repro:

  • Clone the ckeditor-dev repo.
  • Check out release/4.3.x
  • Run cd dev/builder/ && build.sh && ls release/ckeditor.
  • Check out release/4.4.x and run the same command.

ckbuilder wrongly includes image2 plugin

I use the following build-config.js

var CKBUILDER_CONFIG = {
        skin: 'moono',
        ignore: [
                'bender.js',
                '.bender',
                'bender-err.log',
                'bender-out.log',
                'dev',
                'docs',
                '.DS_Store',
                '.editorconfig',
                '.gitignore',
                '.gitattributes',
                'gruntfile.js',
                '.idea',
                '.jscsrc',
                '.jshintignore',
                '.jshintrc',
                'less',
                '.mailmap',
                'node_modules',
                'package.json',
                'README.md',
                'tests'
        ],
        plugins: {
                a11yhelp: 1,
                about: 1,
                basicstyles: 1,
                bidi: 1,
                blockquote: 1,
                clipboard: 1,
                colorbutton: 1,
                colordialog: 1,
                contextmenu: 1,
                dialogadvtab: 1,
                div: 1,
                elementspath: 1,
                enterkey: 1,
                entities: 1,
                filebrowser: 1,
                find: 1,
                flash: 1,
                floatingspace: 1,
                font: 1,
                format: 1,
                forms: 1,
                horizontalrule: 1,
                htmlwriter: 1,
                iframe: 1,
                image: 1,
wsc: 1,
scayt: 1,
widget: 1,
lineutils: 1,
                indentlist: 1,
                indentblock: 1,
                justify: 1,
                link: 1,
                list: 1,
                liststyle: 1,
                magicline: 1,
                maximize: 1,
                newpage: 1,
                pagebreak: 1,
                pastefromword: 1,
                pastetext: 1,
                preview: 1,
                print: 1,
                removeformat: 1,
                resize: 1,
                save: 1,
                selectall: 1,
                showblocks: 1,
                showborders: 1,
                smiley: 1,
                sourcearea: 1,
                specialchar: 1,
                stylescombo: 1,
                tab: 1,
                table: 1,
                tabletools: 1,
                templates: 1,
                toolbar: 1,
                undo: 1,
                wysiwygarea: 1
        }
};

It does not include image2 plugin. However, the resulting .tar.gz release file holds a populated plugin/image2 directory.

--preprocess-plugin fails for widget plugin

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.

how to change ckbuilder configuration to include and minify all ckeditor plugins

hello, I would like to include and minify all available plugins from https://github.com/ckeditor/ckeditor-dev/tree/4.5.3/plugins, but I do not know how to set up build.sh to include them.

I tried to include the names of all the plugins in build-config.js configuration file, and run the build script again, however, it again did not include all the plugins.

related to this issue: django-ckeditor/django-ckeditor#212

I could not find any documentation explaining how to change it.

I read somewhere of the documentation (not figured out where), which is not good practice to include all plugins, however, I did not saw any information explaining why.

I can supposing that ckeditor only loads the standard plugins, and plugins listed in extraPlugins

luzfcb@luzfcb:~$ git clone https://github.com/ckeditor/ckeditor-dev.git
luzfcb@luzfcb:~$ cd ckeditor-dev
luzfcb@luzfcb:~/ckeditor-dev$ git checkout 4.5.3
luzfcb@luzfcb:~/ckeditor-dev$ # count number of plugins
luzfcb@luzfcb:~/ckeditor-dev$ ls -1 plugins/ | wc -l
101
luzfcb@luzfcb:~/ckeditor-dev$ cd dev/builder/
luzfcb@luzfcb:~/ckeditor-dev/dev/builder$ ./build.sh
luzfcb@luzfcb:~/ckeditor-dev/dev/builder$ # count number of minified plugins 
luzfcb@luzfcb:~/ckeditor-dev/dev/builder$ ls -1 release/ckeditor/plugins/ | wc -l
58

Misleading hint on Readme.

It says

hint: there is a "Download ZIP" button on the right side of the page if you don't know how to use git.

But when you download the zip and run the builder it says

Starting CKBuilder...
fatal: Not a git repository (or any of the parent directories): .git

Various plugin folders stripped of files

I've been trying to use this on the ckeditor-dev (v4.11.x) repo, and noticed that, for plugins, the plugin.js, lang, and others in a given plugin directory are destroyed after the build is completed (this appears to be during the second "cleaning up target folder" phase, in deleteUnusedFiles().

It looks, from the code, like this is expected behavior. I can't help but think, then, that I might subsequently be including my built library into my project in an invalid way. When including (the subsequently built) CKEditor in my project, eventually, it tries to load (over HTTP) the lang.js from the plugin, and does not find it (because it was deleted during the build process, and is not present in the built library folder). Is this the expected behavior? Any tips or ideas about what I'm doing wrong would be so much appreciated 🙇.

Update license blocks produced by the builder

Currently the builder produces old license headers, e.g. for 4.8.0 file lang/af.js has a following license block:

/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/

Same thing goes to minified file, like ckeditor.js.

It was added in ckeditor/ckeditor4#1203.

Stub timestamp in tests

Tests do not use stubbed CKBuilder.options.timestamp which make tests for any resource working with it pointless - sine it changes between test runs.

2.0.1 --full-help, --build-help & --help not working

I checked out ckeditor-dev repo and checked out tag 4.4.7. It has dev/builder/build.sh version 2.0.1.

When I run ./build.sh with either --full-help, --build-help or --help it just ignores it and goes on building.

The version of build.sh 1.7.2 that comes in the tag 4.4.1 works fine with those options.

Ampersand gets encoded in ku.js file on Windows

There is a failing test on Windows in "Testing minification..." group, that produces following failure:

FAILED: minification[ku.js]
  Expected: CKEDITOR.plugins.setLang("about","ku",{copy:"???? ?????????????? &copy; $1. ???? ?????????.",dlgTitle:"???????? CKEditor",help:"????? $1 ??? ?? ???????.",moreInfo:"?? ??????? ?????? ?????, ????? ??????? ???????????? ???:",title:"???????? CKEditor",userGuide:"??????????? CKEditors"});
  Actual  : CKEDITOR.plugins.setLang("about","ku",{copy:"???? ?????????????? \x26copy; $1. ???? ?????????.",dlgTitle:"???????? CKEditor",help:"????? $1 ??? ?? ???????.",moreInfo:"?? ??????? ?????? ?????, ????? ??????? ???????????? ???:",title:"???????? CKEditor",userGuide:"??????????? CKEditors"});

The problem is that it encodes: &copy; into \x26copy;.

This has been experienced with Windows 7, by running tests with test.bat, Java version at 1.8.0_51, Java SE RE 1.8.0_51-b16.

Allow to include plugins without inlining into ckeditor.js

Currently all the plugins listed in <preset>-build-config.js are inlined into ckeditor.js. The only way to get additional plugins into ckeditor/plugins directory, is to put --all flag which will include all the plugins.

It would be nice to provide an option to include just some plugins, but without inlining them into ckeditor.js.

Ignore "dev" folders in plugin files

Some plugins include "dev" folder in which additional plugins are located. As a result CKBuilder finds multiple plugin.js files and throws an error as it expects exactly one file.

Help command does not work when other command is passed before

Calling such script start building procedure, but should show help. It looks a bit silly but we need this functionality in order to work well calling help command using build.sh file. Issue created base on this stackoverflow answer comments.

java -jar ckbuilder.jar --build ../../ release --version="4.4.2 DEV" --overwrite --help

This is regression, not reproducible in 1.. versions.

Java exception when running builder/build.sh

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Run /dev/builder/build.sh
  2. builds some files but then stops with exception thrown

Expected result

Build script executes correctly.

NOTE: If I add --add-exports java.desktop/sun.java2d=ALL-UNNAMED argument to java runtime cmd this error does not occur, fixes it?

Actual result

Java Exception thrown:

Starting CKBuilder...
Cleaning up target folder
Copying files (relax, this may take a while)
    Time taken.....: 31.87seconds
Merging language files
    Time taken.....: 5.082seconds
Generating plugins sprite image
Exception in thread "main" org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalAccessException: class org.mozilla.javascript.MemberBox cannot access class sun.java2d.SunGraphics2D (in module java.desktop) because module java.desktop does not export sun.java2d to unnamed module @619713e5 (C:\ckbuilder\src/lib/image.js#282)
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:134)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
	at ckbuilder.lib.image._c_anonymous_7(C:\ckbuilder\src/lib/image.js:282)
	at ckbuilder.lib.image.call(C:\ckbuilder\src/lib/image.js)
	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
	at ckbuilder.lib.image._c_anonymous_4(C:\ckbuilder\src/lib/image.js:144)
	at ckbuilder.lib.image.call(C:\ckbuilder\src/lib/image.js)
	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
	at ckbuilder.lib.builder._c_createPluginsSpriteImage_15(C:\ckbuilder\src/lib/builder.js:476)
	at ckbuilder.lib.builder.call(C:\ckbuilder\src/lib/builder.js)
	at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
	at ckbuilder.lib.builder._c_anonymous_20(C:\ckbuilder\src/lib/builder.js:703)
	at ckbuilder.lib.builder.call(C:\ckbuilder\src/lib/builder.js)
	at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
	at ckbuilder.lib.controller._c_anonymous_5(C:\ckbuilder\src/lib/controller.js:78)
	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)
Caused by: java.lang.IllegalAccessException: class org.mozilla.javascript.MemberBox cannot access class sun.java2d.SunGraphics2D (in module java.desktop) because module java.desktop does not export sun.java2d to unnamed module @619713e5
	at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:385)
	at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:687)
	at java.base/java.lang.reflect.Method.invoke(Method.java:559)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	... 34 more

Other details

  • Browser: N/A
  • OS: MacOS 11.4
  • CKEditor version: 4.16.1
  • Java Version: 16.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.