1.1 --- a/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/JSONTest.java Sat Jan 10 19:38:00 2015 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,393 +0,0 @@
1.4 -/**
1.5 - * Back 2 Browser Bytecode Translator
1.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
1.7 - *
1.8 - * This program is free software: you can redistribute it and/or modify
1.9 - * it under the terms of the GNU General Public License as published by
1.10 - * the Free Software Foundation, version 2 of the License.
1.11 - *
1.12 - * This program is distributed in the hope that it will be useful,
1.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.15 - * GNU General Public License for more details.
1.16 - *
1.17 - * You should have received a copy of the GNU General Public License
1.18 - * along with this program. Look for COPYING file in the top folder.
1.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
1.20 - */
1.21 -package org.apidesign.bck2brwsr.htmlpage;
1.22 -
1.23 -import java.util.Iterator;
1.24 -import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.25 -import org.apidesign.bck2brwsr.htmlpage.api.OnReceive;
1.26 -import org.apidesign.bck2brwsr.htmlpage.api.Page;
1.27 -import org.apidesign.bck2brwsr.htmlpage.api.Property;
1.28 -import org.apidesign.bck2brwsr.vmtest.BrwsrTest;
1.29 -import org.apidesign.bck2brwsr.vmtest.Http;
1.30 -import org.apidesign.bck2brwsr.vmtest.VMTest;
1.31 -import org.json.JSONException;
1.32 -import org.json.JSONObject;
1.33 -import org.json.JSONTokener;
1.34 -import org.testng.annotations.Test;
1.35 -import static org.testng.Assert.*;
1.36 -import org.testng.annotations.Factory;
1.37 -
1.38 -/** Need to verify that models produce reasonable JSON objects.
1.39 - *
1.40 - * @author Jaroslav Tulach <jtulach@netbeans.org>
1.41 - */
1.42 -@Page(xhtml = "Empty.html", className = "JSONik", properties = {
1.43 - @Property(name = "fetched", type = PersonImpl.class),
1.44 - @Property(name = "fetchedCount", type = int.class),
1.45 - @Property(name = "fetchedSex", type = Sex.class, array = true)
1.46 -})
1.47 -public class JSONTest {
1.48 - private JSONik js;
1.49 - private Integer orig;
1.50 -
1.51 - @Test public void personToString() throws JSONException {
1.52 - Person p = new Person();
1.53 - p.setSex(Sex.MALE);
1.54 - p.setFirstName("Jarda");
1.55 - p.setLastName("Tulach");
1.56 -
1.57 - JSONTokener t = new JSONTokener(p.toString());
1.58 - JSONObject o;
1.59 - try {
1.60 - o = new JSONObject(t);
1.61 - } catch (JSONException ex) {
1.62 - throw new AssertionError("Can't parse " + p.toString(), ex);
1.63 - }
1.64 -
1.65 - Iterator it = o.sortedKeys();
1.66 - assertEquals(it.next(), "firstName");
1.67 - assertEquals(it.next(), "lastName");
1.68 - assertEquals(it.next(), "sex");
1.69 -
1.70 - assertEquals(o.getString("firstName"), "Jarda");
1.71 - assertEquals(o.getString("lastName"), "Tulach");
1.72 - assertEquals(o.getString("sex"), "MALE");
1.73 - }
1.74 -
1.75 - @BrwsrTest public void toJSONInABrowser() throws Throwable {
1.76 - Person p = new Person();
1.77 - p.setSex(Sex.MALE);
1.78 - p.setFirstName("Jarda");
1.79 - p.setLastName("Tulach");
1.80 -
1.81 - Object json;
1.82 - try {
1.83 - json = parseJSON(p.toString());
1.84 - } catch (Throwable ex) {
1.85 - throw new IllegalStateException("Can't parse " + p).initCause(ex);
1.86 - }
1.87 -
1.88 - Person p2 = new Person(json);
1.89 -
1.90 - assert p2.getFirstName().equals(p.getFirstName()) :
1.91 - "Should be the same: " + p.getFirstName() + " != " + p2.getFirstName();
1.92 - }
1.93 -
1.94 - @Test public void personWithWildCharactersAndNulls() throws JSONException {
1.95 - Person p = new Person();
1.96 - p.setFirstName("'\"\n");
1.97 - p.setLastName("\t\r\u0002");
1.98 -
1.99 - JSONTokener t = new JSONTokener(p.toString());
1.100 - JSONObject o;
1.101 - try {
1.102 - o = new JSONObject(t);
1.103 - } catch (JSONException ex) {
1.104 - throw new AssertionError("Can't parse " + p.toString(), ex);
1.105 - }
1.106 -
1.107 - Iterator it = o.sortedKeys();
1.108 - assertEquals(it.next(), "firstName");
1.109 - assertEquals(it.next(), "lastName");
1.110 - assertEquals(it.next(), "sex");
1.111 -
1.112 - assertEquals(o.getString("firstName"), p.getFirstName());
1.113 - assertEquals(o.getString("lastName"), p.getLastName());
1.114 - assertEquals(o.get("sex"), JSONObject.NULL);
1.115 - }
1.116 -
1.117 - @Test public void personsInArray() throws JSONException {
1.118 - Person p1 = new Person();
1.119 - p1.setFirstName("One");
1.120 -
1.121 - Person p2 = new Person();
1.122 - p2.setFirstName("Two");
1.123 -
1.124 - People arr = new People();
1.125 - arr.getInfo().add(p1);
1.126 - arr.getInfo().add(p2);
1.127 - arr.getNicknames().add("Prvn\u00ed k\u016f\u0148");
1.128 - final String n2 = "Druh\u00fd hlem\u00fd\u017e\u010f, star\u0161\u00ed";
1.129 - arr.getNicknames().add(n2);
1.130 - arr.getAge().add(33);
1.131 - arr.getAge().add(73);
1.132 -
1.133 -
1.134 - final String json = arr.toString();
1.135 -
1.136 - JSONTokener t = new JSONTokener(json);
1.137 - JSONObject o;
1.138 - try {
1.139 - o = new JSONObject(t);
1.140 - } catch (JSONException ex) {
1.141 - throw new AssertionError("Can't parse " + json, ex);
1.142 - }
1.143 -
1.144 - assertEquals(o.getJSONArray("info").getJSONObject(0).getString("firstName"), "One");
1.145 - assertEquals(o.getJSONArray("nicknames").getString(1), n2);
1.146 - assertEquals(o.getJSONArray("age").getInt(1), 73);
1.147 - }
1.148 -
1.149 -
1.150 - @OnReceive(url="/{url}")
1.151 - static void fetch(Person p, JSONik model) {
1.152 - model.setFetched(p);
1.153 - }
1.154 -
1.155 - @OnReceive(url="/{url}")
1.156 - static void fetchArray(Person[] p, JSONik model) {
1.157 - model.setFetchedCount(p.length);
1.158 - model.setFetched(p[0]);
1.159 - }
1.160 -
1.161 - @OnReceive(url="/{url}")
1.162 - static void fetchPeople(People p, JSONik model) {
1.163 - model.setFetchedCount(p.getInfo().size());
1.164 - model.setFetched(p.getInfo().get(0));
1.165 - }
1.166 -
1.167 - @OnReceive(url="/{url}")
1.168 - static void fetchPeopleAge(People p, JSONik model) {
1.169 - int sum = 0;
1.170 - for (int a : p.getAge()) {
1.171 - sum += a;
1.172 - }
1.173 - model.setFetchedCount(sum);
1.174 - }
1.175 -
1.176 - @Http(@Http.Resource(
1.177 - content = "{'firstName': 'Sitar', 'sex': 'MALE'}",
1.178 - path="/person33.json",
1.179 - mimeType = "application/json"
1.180 - ))
1.181 - @BrwsrTest public void loadAndParseJSON() throws InterruptedException {
1.182 - try { throw new Exception(); } catch (Exception ex) {
1.183 - }
1.184 - if (js == null) {
1.185 - js = new JSONik();
1.186 - js.applyBindings();
1.187 -
1.188 - js.fetch("person33.json");
1.189 - }
1.190 -
1.191 - Person p = js.getFetched();
1.192 - if (p == null) {
1.193 - throw new InterruptedException();
1.194 - }
1.195 -
1.196 - assert "Sitar".equals(p.getFirstName()) : "Expecting Sitar: " + p.getFirstName();
1.197 - assert Sex.MALE.equals(p.getSex()) : "Expecting MALE: " + p.getSex();
1.198 - }
1.199 -
1.200 - @OnReceive(url="/{url}?callme={me}", jsonp = "me")
1.201 - static void fetchViaJSONP(Person p, JSONik model) {
1.202 - model.setFetched(p);
1.203 - }
1.204 -
1.205 - @Http(@Http.Resource(
1.206 - content = "$0({'firstName': 'Mitar', 'sex': 'MALE'})",
1.207 - path="/person22.json",
1.208 - mimeType = "application/javascript",
1.209 - parameters = { "callme" }
1.210 - ))
1.211 - @BrwsrTest public void loadAndParseJSONP() throws InterruptedException {
1.212 -
1.213 - if (js == null) {
1.214 - orig = scriptElements();
1.215 - assert orig > 0 : "There should be some scripts on the page";
1.216 -
1.217 - js = new JSONik();
1.218 - js.applyBindings();
1.219 -
1.220 - js.fetchViaJSONP("person22.json");
1.221 - }
1.222 -
1.223 - Person p = js.getFetched();
1.224 - if (p == null) {
1.225 - throw new InterruptedException();
1.226 - }
1.227 -
1.228 - assert "Mitar".equals(p.getFirstName()) : "Unexpected: " + p.getFirstName();
1.229 - assert Sex.MALE.equals(p.getSex()) : "Expecting MALE: " + p.getSex();
1.230 -
1.231 - int now = scriptElements();
1.232 -
1.233 - assert orig == now : "The set of elements is unchanged. Delta: " + (now - orig);
1.234 - }
1.235 -
1.236 - @JavaScriptBody(args = { }, body = "return window.document.getElementsByTagName('script').length;")
1.237 - private static native int scriptElements();
1.238 -
1.239 - @JavaScriptBody(args = { "s" }, body = "return window.JSON.parse(s);")
1.240 - private static native Object parseJSON(String s);
1.241 -
1.242 - @Http(@Http.Resource(
1.243 - content = "{'firstName': 'Sitar', 'sex': 'MALE'}",
1.244 - path="/person15.json",
1.245 - mimeType = "application/json"
1.246 - ))
1.247 - @BrwsrTest public void loadAndParseJSONSentToArray() throws InterruptedException {
1.248 - if (js == null) {
1.249 - js = new JSONik();
1.250 - js.applyBindings();
1.251 -
1.252 - js.fetchArray("person15.json");
1.253 - }
1.254 -
1.255 - Person p = js.getFetched();
1.256 - if (p == null) {
1.257 - throw new InterruptedException();
1.258 - }
1.259 -
1.260 - assert p != null : "We should get our person back: " + p;
1.261 - assert "Sitar".equals(p.getFirstName()) : "Expecting Sitar: " + p.getFirstName();
1.262 - assert Sex.MALE.equals(p.getSex()) : "Expecting MALE: " + p.getSex();
1.263 - }
1.264 -
1.265 - @Http(@Http.Resource(
1.266 - content = "[{'firstName': 'Gitar', 'sex': 'FEMALE'}]",
1.267 - path="/person5.json",
1.268 - mimeType = "application/json"
1.269 - ))
1.270 - @BrwsrTest public void loadAndParseJSONArraySingle() throws InterruptedException {
1.271 - if (js == null) {
1.272 - js = new JSONik();
1.273 - js.applyBindings();
1.274 -
1.275 - js.fetch("person5.json");
1.276 - }
1.277 -
1.278 - Person p = js.getFetched();
1.279 - if (p == null) {
1.280 - throw new InterruptedException();
1.281 - }
1.282 -
1.283 - assert p != null : "We should get our person back: " + p;
1.284 - assert "Gitar".equals(p.getFirstName()) : "Expecting Gitar: " + p.getFirstName();
1.285 - assert Sex.FEMALE.equals(p.getSex()) : "Expecting FEMALE: " + p.getSex();
1.286 - }
1.287 -
1.288 -// @Http(@Http.Resource(
1.289 -// content = "{'info':[{'firstName': 'Gitar', 'sex': 'FEMALE'}]}",
1.290 -// path="/people.json",
1.291 -// mimeType = "application/json"
1.292 -// ))
1.293 -// @BrwsrTest public void loadAndParseArrayInPeople() throws InterruptedException {
1.294 -// if (js == null) {
1.295 -// js = new JSONik();
1.296 -// js.applyBindings();
1.297 -//
1.298 -// js.fetchPeople("people.json");
1.299 -// }
1.300 -//
1.301 -// if (0 == js.getFetchedCount()) {
1.302 -// throw new InterruptedException();
1.303 -// }
1.304 -//
1.305 -// assert js.getFetchedCount() == 1 : "One person loaded: " + js.getFetchedCount();
1.306 -//
1.307 -// Person p = js.getFetched();
1.308 -//
1.309 -// assert p != null : "We should get our person back: " + p;
1.310 -// assert "Gitar".equals(p.getFirstName()) : "Expecting Gitar: " + p.getFirstName();
1.311 -// assert Sex.FEMALE.equals(p.getSex()) : "Expecting FEMALE: " + p.getSex();
1.312 -// }
1.313 -
1.314 - @Http(@Http.Resource(
1.315 - content = "{'age':[1, 2, 3]}",
1.316 - path="/people8.json",
1.317 - mimeType = "application/json"
1.318 - ))
1.319 - @BrwsrTest public void loadAndParseArrayOfIntegers() throws InterruptedException {
1.320 - if (js == null) {
1.321 - js = new JSONik();
1.322 - js.applyBindings();
1.323 -
1.324 - js.fetchPeopleAge("people8.json");
1.325 - }
1.326 -
1.327 - if (0 == js.getFetchedCount()) {
1.328 - throw new InterruptedException();
1.329 - }
1.330 -
1.331 - assert js.getFetchedCount() == 6 : "1 + 2 + 3 is " + js.getFetchedCount();
1.332 - }
1.333 -
1.334 - @OnReceive(url="/{url}")
1.335 - static void fetchPeopleSex(People p, JSONik model) {
1.336 - model.setFetchedCount(1);
1.337 - model.getFetchedSex().addAll(p.getSex());
1.338 - }
1.339 -
1.340 -
1.341 - @Http(@Http.Resource(
1.342 - content = "{'sex':['FEMALE', 'MALE', 'MALE']}",
1.343 - path="/people11.json",
1.344 - mimeType = "application/json"
1.345 - ))
1.346 - @BrwsrTest public void loadAndParseArrayOfEnums() throws InterruptedException {
1.347 - if (js == null) {
1.348 - js = new JSONik();
1.349 - js.applyBindings();
1.350 -
1.351 - js.fetchPeopleSex("people11.json");
1.352 - }
1.353 -
1.354 - if (0 == js.getFetchedCount()) {
1.355 - throw new InterruptedException();
1.356 - }
1.357 -
1.358 - assert js.getFetchedCount() == 1 : "Loaded";
1.359 -
1.360 - assert js.getFetchedSex().size() == 3 : "Three values " + js.getFetchedSex();
1.361 - assert js.getFetchedSex().get(0) == Sex.FEMALE : "Female first " + js.getFetchedSex();
1.362 - assert js.getFetchedSex().get(1) == Sex.MALE : "male 2nd " + js.getFetchedSex();
1.363 - assert js.getFetchedSex().get(2) == Sex.MALE : "male 3rd " + js.getFetchedSex();
1.364 - }
1.365 -
1.366 - @Http(@Http.Resource(
1.367 - content = "[{'firstName': 'Gitar', 'sex': 'FEMALE'},"
1.368 - + "{'firstName': 'Peter', 'sex': 'MALE'}"
1.369 - + "]",
1.370 - path="/person13.json",
1.371 - mimeType = "application/json"
1.372 - ))
1.373 - @BrwsrTest public void loadAndParseJSONArray() throws InterruptedException {
1.374 - if (js == null) {
1.375 - js = new JSONik();
1.376 - js.applyBindings();
1.377 - js.fetchArray("person13.json");
1.378 - }
1.379 -
1.380 -
1.381 - Person p = js.getFetched();
1.382 - if (p == null) {
1.383 - throw new InterruptedException();
1.384 - }
1.385 -
1.386 - assert js.getFetchedCount() == 2 : "We got two values: " + js.getFetchedCount();
1.387 - assert p != null : "We should get our person back: " + p;
1.388 - assert "Gitar".equals(p.getFirstName()) : "Expecting Gitar: " + p.getFirstName();
1.389 - assert Sex.FEMALE.equals(p.getSex()) : "Expecting FEMALE: " + p.getSex();
1.390 - }
1.391 -
1.392 - @Factory public static Object[] create() {
1.393 - return VMTest.create(JSONTest.class);
1.394 - }
1.395 -
1.396 -}
2.1 --- a/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java Sat Jan 10 19:38:00 2015 +0100
2.2 +++ b/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java Sun Jan 11 13:20:32 2015 +0100
2.3 @@ -96,8 +96,35 @@
2.4 public static Bck2Brwsr configureFrom(
2.5 Bck2Brwsr c, File jar, final ClassLoader classpath
2.6 ) throws IOException {
2.7 + return configureFrom(c, jar, classpath, true);
2.8 + }
2.9 +
2.10 + /** Creates new compiler pre-configured from the content of
2.11 + * provided JAR file. The compiler will compile all classes.
2.12 + * The system understands OSGi manifest entries and NetBeans
2.13 + * module system manifest entries and will export
2.14 + * all packages that are exported in the JAR file. The system
2.15 + * also recognizes META-INF/services and makes sure the class names
2.16 + * are not mangled.
2.17 + *
2.18 + * @param c the compiler to {@link Bck2Brwsr#addClasses(java.lang.String...) add classes},
2.19 + * {@link Bck2Brwsr#addResources(java.lang.String...) add resources} and
2.20 + * {@link Bck2Brwsr#addExported(java.lang.String...) exported objects} to.
2.21 + * Can be <code>null</code> - in such case an
2.22 + * {@link Bck2Brwsr#newCompiler() empty compiler} is constructed.
2.23 + * @param jar the file to process
2.24 + * @param classpath additional resources to make available during
2.25 + * compilation, but not include them in the generated JavaScript
2.26 + * @param ignoreBootClassPath should we ignore classes on bootclasspath?
2.27 + * @return newly configured compiler
2.28 + * @throws IOException if something goes wrong
2.29 + * @since 0.14
2.30 + */
2.31 + public static Bck2Brwsr configureFrom(
2.32 + Bck2Brwsr c, File jar, final ClassLoader classpath, final boolean ignoreBootClassPath
2.33 + ) throws IOException {
2.34 if (jar.isDirectory()) {
2.35 - return configureDir(c, jar, classpath);
2.36 + return configureDir(ignoreBootClassPath, c, jar, classpath);
2.37 }
2.38 final JarFile jf = new JarFile(jar);
2.39 final List<String> classes = new ArrayList<>();
2.40 @@ -105,7 +132,7 @@
2.41 Set<String> exported = new HashSet<>();
2.42 class JarRes extends EmulationResources implements Bck2Brwsr.Resources {
2.43 JarRes() {
2.44 - super(classpath, classes);
2.45 + super(ignoreBootClassPath, classpath, classes);
2.46 }
2.47 @Override
2.48 public InputStream get(String resource) throws IOException {
2.49 @@ -236,8 +263,10 @@
2.50 private final Map<String,byte[]> converted = new HashMap<>();
2.51 private final BytecodeProcessor proc;
2.52 private final ClassLoader cp;
2.53 + private final boolean ignoreBootClassPath;
2.54
2.55 - protected EmulationResources(ClassLoader cp, List<String> classes) {
2.56 + protected EmulationResources(boolean ignoreBootClassPath, ClassLoader cp, List<String> classes) {
2.57 + this.ignoreBootClassPath = ignoreBootClassPath;
2.58 this.classes = classes;
2.59 this.cp = cp != null ? cp : Bck2BrwsrJars.class.getClassLoader();
2.60 BytecodeProcessor p;
2.61 @@ -273,7 +302,7 @@
2.62 LOG.log(Level.FINE, "Cannot find {0}", name);
2.63 return null;
2.64 }
2.65 - if (u.toExternalForm().contains("/rt.jar!")) {
2.66 + if (ignoreBootClassPath && u.toExternalForm().contains("/rt.jar!")) {
2.67 LOG.log(Level.WARNING, "No bootdelegation for {0}", name);
2.68 return null;
2.69 }
2.70 @@ -307,12 +336,12 @@
2.71 }
2.72 }
2.73
2.74 - private static Bck2Brwsr configureDir(Bck2Brwsr c, final File dir, ClassLoader cp) throws IOException {
2.75 + private static Bck2Brwsr configureDir(final boolean ignoreBootClassPath, Bck2Brwsr c, final File dir, ClassLoader cp) throws IOException {
2.76 List<String> arr = new ArrayList<>();
2.77 List<String> classes = new ArrayList<>();
2.78 class DirRes extends EmulationResources {
2.79 public DirRes(ClassLoader cp, List<String> classes) {
2.80 - super(cp, classes);
2.81 + super(ignoreBootClassPath, cp, classes);
2.82 }
2.83
2.84 @Override
3.1 --- a/rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AOTLibrary.java Sat Jan 10 19:38:00 2015 +0100
3.2 +++ b/rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AOTLibrary.java Sun Jan 11 13:20:32 2015 +0100
3.3 @@ -78,7 +78,10 @@
3.4
3.5 @Parameter
3.6 private String[] aotDeps;
3.7 -
3.8 +
3.9 + @Parameter(defaultValue = "true")
3.10 + private boolean ignoreBootClassPath;
3.11 +
3.12 @Override
3.13 public void execute() throws MojoExecutionException, MojoFailureException {
3.14 URLClassLoader loader;
3.15 @@ -161,7 +164,7 @@
3.16 continue;
3.17 }
3.18 getLog().info("Generating bck2brwsr for " + a.getFile());
3.19 - Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, a.getFile(), loader);
3.20 + Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, a.getFile(), loader, ignoreBootClassPath);
3.21 if (exports != null) {
3.22 for (String e : exports) {
3.23 c = c.addExported(e.replace('.', '/'));
3.24 @@ -197,7 +200,7 @@
3.25 }
3.26
3.27 private Bck2Brwsr configureMain(URLClassLoader loader) throws IOException {
3.28 - Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, mainJar, loader);
3.29 + Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, mainJar, loader, ignoreBootClassPath);
3.30 if (exports != null) {
3.31 for (String e : exports) {
3.32 c = c.addExported(e.replace('.', '/'));
4.1 --- a/rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AheadOfTime.java Sat Jan 10 19:38:00 2015 +0100
4.2 +++ b/rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AheadOfTime.java Sun Jan 11 13:20:32 2015 +0100
4.3 @@ -85,6 +85,9 @@
4.4 @Parameter(defaultValue = "true")
4.5 private boolean generateAotLibraries;
4.6
4.7 + @Parameter(defaultValue = "true")
4.8 + private boolean ignoreBootClassPath;
4.9 +
4.10 /**
4.11 * The obfuscation level for the generated JavaScript file.
4.12 *
4.13 @@ -131,7 +134,7 @@
4.14 getLog().info("Skipping " + mainJavaScript + " as it already exists.");
4.15 } else {
4.16 getLog().info("Generating " + mainJavaScript);
4.17 - Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, mainJar, loader);
4.18 + Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, mainJar, loader, ignoreBootClassPath);
4.19 if (exports != null) {
4.20 for (String e : exports) {
4.21 c = c.addExported(e.replace('.', '/'));
4.22 @@ -201,7 +204,7 @@
4.23 }
4.24 getLog().info("Generating " + js);
4.25 Writer w = new OutputStreamWriter(new FileOutputStream(js), "UTF-8");
4.26 - Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, a.getFile(), loader);
4.27 + Bck2Brwsr c = Bck2BrwsrJars.configureFrom(null, a.getFile(), loader, ignoreBootClassPath);
4.28 c.
4.29 obfuscation(obfuscation).
4.30 generate(w);
5.1 --- a/rt/vm/pom.xml Sat Jan 10 19:38:00 2015 +0100
5.2 +++ b/rt/vm/pom.xml Sun Jan 11 13:20:32 2015 +0100
5.3 @@ -105,7 +105,7 @@
5.4 <dependency>
5.5 <groupId>com.google.javascript</groupId>
5.6 <artifactId>closure-compiler</artifactId>
5.7 - <version>r2388</version>
5.8 + <version>v20141215</version>
5.9 <scope>compile</scope>
5.10 </dependency>
5.11 <dependency>