From: Matti Tahvonen Date: Tue, 6 Oct 2009 07:58:36 +0000 (+0000) Subject: widget packaging X-Git-Tag: 6.7.0.beta1~2433^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eebf12833e059de5caf3dc52ef0ed7ed67fde177;p=vaadin-framework.git widget packaging svn changeset:9093/svn branch:2009-09-widget-packaging_3332 --- diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java b/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java index c51e2a2188..1c6b3968c0 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java @@ -142,6 +142,15 @@ public class ClassPathExplorer { String pathSep = System.getProperty("path.separator"); String classpath = System.getProperty("java.class.path"); + if (classpath.startsWith("\"")) { + classpath = classpath.substring(1); + } + if (classpath.endsWith("\"")) { + classpath = classpath.substring(0, classpath.length() - 1); + } + + System.err.println("Classpath: " + classpath); + String[] split = classpath.split(pathSep); for (int i = 0; i < split.length; i++) { String classpathEntry = split[i]; @@ -172,10 +181,12 @@ public class ClassPathExplorer { url = new URL("jar:" + url.toExternalForm() + "!/"); JarURLConnection conn = (JarURLConnection) url .openConnection(); + System.out.println(url); JarFile jarFile = conn.getJarFile(); Manifest manifest = jarFile.getManifest(); Attributes mainAttributes = manifest.getMainAttributes(); if (mainAttributes.getValue("Vaadin-Widgetsets") != null) { + System.err.println("Accepted jar file" + url); return true; } } catch (MalformedURLException e) { diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java index 8bd961d925..bc2e99732b 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java @@ -131,6 +131,9 @@ public class WidgetMapGenerator extends Generator { } } + logger.log(Type.INFO, + "Widget set will contain implementations for following components: " + + paintablesHavingWidgetAnnotation.toString()); } /** diff --git a/src/com/vaadin/tools/WidgetsetCompiler.java b/src/com/vaadin/tools/WidgetsetCompiler.java index 0421164873..ce7ab37625 100644 --- a/src/com/vaadin/tools/WidgetsetCompiler.java +++ b/src/com/vaadin/tools/WidgetsetCompiler.java @@ -2,6 +2,8 @@ package com.vaadin.tools; import java.lang.reflect.Method; +import com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder; + /** * A wrapper for the GWT 1.6 compiler that runs the compiler in a new thread. * @@ -44,6 +46,13 @@ public class WidgetsetCompiler { try { // GWTCompiler.main(args); // avoid warnings + + String wsname = args[args.length - 1]; + + // TODO expecting this is launched via eclipse WTP + // project + WidgetSetBuilder.updateWidgetSet(wsname, "src"); + System.setProperty("gwt.nowarn.legacy.tools", "true"); Class compilerClass = Class .forName("com.google.gwt.dev.GWTCompiler");