incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmue...@apache.org
Subject [2/51] [partial] Apache-ization, port to node.js
Date Wed, 15 Feb 2012 17:42:36 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.application/src/weinre/application/GUIMain.java
----------------------------------------------------------------------
diff --git a/weinre.application/src/weinre/application/GUIMain.java b/weinre.application/src/weinre/application/GUIMain.java
deleted file mode 100644
index 28208ff..0000000
--- a/weinre.application/src/weinre/application/GUIMain.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package weinre.application;
-
-import java.io.IOException;
-
-import org.apache.wink.json4j.JSONException;
-import org.apache.wink.json4j.JSONObject;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-import weinre.server.Main;
-import weinre.server.ServerSettings;
-
-//-------------------------------------------------------------------
-public class GUIMain extends Main {
-    private Display          display;
-    private Shell            shell;
-    private Browser          debugger;
-    private StyledText       console;
-    private Browser          homePage;
-    private Color            red;
-    private GUIPreferences   preferences;
-    private ShellSizeTracker shellSizeTracker;
-
-    //---------------------------------------------------------------
-    static public void main(String[] args) {
-        GUIMain main = new GUIMain(args);
-        main.run();
-    }
-
-    //---------------------------------------------------------------
-    private GUIMain(String[] args) {
-        super(args);
-
-        preferences = new GUIPreferences();
-    }
-
-    //---------------------------------------------------------------
-    @Override
-    public void run() {
-        uiBuild();
-
-        Runnable serverRunnable = new Runnable() {
-            public void run() {
-                httpServerStart();
-            }
-        };
-
-        new Thread(serverRunnable, "main server thread").start();
-
-        uiRun();
-
-        exit();
-    }
-
-    //---------------------------------------------------------------
-    @Override
-    public void serverStarted() {
-        debugger.getDisplay().asyncExec(new Runnable() {
-            public void run() {
-                debugger.getDisplay().timerExec(1000, new Runnable() {
-                    public void run() {
-                        debugger.setUrl(getBrowserURL() + "client/index.html");
-                        homePage.setUrl(getBrowserURL() + "index.html");
-                    }
-                });
-            }
-        });
-    }
-
-    //---------------------------------------------------------------
-    @Override
-    public void addServerConsoleMessage(final String line, final boolean stdout) {
-        if (null == console) return;
-
-        if (console.isDisposed()) return;
-
-        console.getDisplay().asyncExec(new Runnable() {
-           public void run() {
-               if (console.isDisposed()) return;
-
-               String theLine = line + Text.DELIMITER;
-
-               Color color = null;
-               if (!stdout) color = red;
-
-               StyleRange styleRange = new StyleRange();
-               styleRange.start      = console.getCharCount();
-               styleRange.length     = theLine.length();
-               styleRange.foreground = color;
-
-               console.append(theLine);
-               console.setStyleRange(styleRange);
-           }
-        });
-    }
-
-    //---------------------------------------------------------------
-    @Override
-    public int severeError(final String message) {
-        if (null == display) return super.severeError(message);
-        if (display.isDisposed()) return super.severeError(message);
-
-        display.syncExec(new Runnable() {
-           public void run() {
-               boolean noGUI = false;
-               if (null == display)      noGUI = true;
-               if (null == shell)        noGUI = true;
-               if (display.isDisposed()) noGUI = true;
-               if (shell.isDisposed())   noGUI = true;
-
-               if (noGUI) {
-                   GUIMain.super.severeError(message);
-                   return;
-               }
-
-               MessageBox messageBox = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
-               messageBox.setMessage(message);
-               messageBox.setText("weinre exiting");
-               messageBox.open();
-               exit();
-           }
-        });
-
-        return 0;
-    }
-
-    //---------------------------------------------------------------
-    private void uiBuild() {
-        Display.setAppName("weinre");
-        Display.setAppVersion("???");
-
-        display = new Display();
-        shell   = new Shell(display);
-
-        red = new Color(display, 255, 0, 0);
-
-        shell.setText("weinre - Web Inspector Remote");
-
-        CTabFolder tabFolder       = new CTabFolder(shell, SWT.BORDER | SWT.BOTTOM);
-        CTabItem   tabItemDebugger = createTabItem(tabFolder, "Debugger");
-        CTabItem   tabItemConsole  = createTabItem(tabFolder, "Server Console");
-        CTabItem   tabItemHomePage = createTabItem(tabFolder, "Server Home Page");
-
-        debugger = new Browser(tabFolder, SWT.NONE);
-        tabItemDebugger.setControl(debugger);
-
-        console = new StyledText(tabFolder, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
-        console.setEditable(false);
-        console.setFont(getMonospaceFont(console));
-
-        homePage = new Browser(tabFolder, SWT.NONE);
-        tabItemHomePage.setControl(homePage);
-
-        tabItemConsole.setControl(console);
-
-        fillParent(debugger,  0, 0, 0, 0);
-        fillParent(console,   0, 0, 0, 0);
-        fillParent(homePage,  0, 0, 0, 0);
-        fillParent(tabFolder, 5, 5, 5, 5);
-
-        tabFolder.pack();
-        createMenuBar();
-
-        shellSizeTracker = new ShellSizeTracker("main", shell, preferences);
-        shellSizeTracker.start();
-
-        try {
-            String       boundsKey = ShellSizeTracker.getBoundsKey(shell, "main");
-            JSONObject   bounds    = preferences.getPreference(boundsKey);
-
-            if (null != bounds) {
-                Integer x, y, w, h;
-                try {
-                    x = bounds.getInt("x");
-                    y = bounds.getInt("y");
-                    w = bounds.getInt("width");
-                    h = bounds.getInt("height");
-                } catch (JSONException e) {
-                    throw new RuntimeException(e);
-                }
-
-                if ((null != w) && (null != h)) {
-                    shell.setBounds(x,y,w,h);
-                }
-            }
-
-            else {
-                shell.setBounds(100, 100, 700, 500);
-            }
-
-        }
-        catch (IOException e) {
-            Main.warn("exception reading preferences: " + e);
-        }
-
-    }
-
-    //---------------------------------------------------------------
-    private void createMenuBar() {
-//        Menu menu = new Menu(shell, SWT.BAR);
-//        shell.setMenuBar(menu);
-//        MenuItem fileMenuItem = new MenuItem(menu, SWT.CASCADE);
-//        fileMenuItem.setText("File");
-//        MenuItem editMenuItem = new MenuItem(menu, SWT.CASCADE);
-//        editMenuItem.setText("Edit");
-     }
-
-    //---------------------------------------------------------------
-    private void uiRun() {
-        shell.open();
-
-        while (!shell.isDisposed()) {
-            if (!display.readAndDispatch())
-                display.sleep();
-        }
-        display.dispose();
-    }
-
-    //---------------------------------------------------------------
-    private CTabItem createTabItem(CTabFolder tabFolder, String text) {
-        CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE);
-        tabItem.setText(text);
-
-        Font       font     = tabItem.getFont();
-        FontData[] fontData = font.getFontData();
-
-        for (FontData fontDatum: fontData) {
-            double newHeight = fontDatum.getHeight() * 1.25;
-            fontDatum.setHeight((int) newHeight);
-        }
-
-        font = new Font(display, fontData);
-        tabItem.setFont(font);
-
-        return tabItem;
-    }
-
-    //---------------------------------------------------------------
-    private void fillParent(Control control, int marginT, int marginR, int marginB, int marginL ) {
-        FormLayout formLayout = new FormLayout();
-
-        formLayout.marginTop    = marginT;
-        formLayout.marginBottom = marginB;
-        formLayout.marginLeft   = marginL;
-        formLayout.marginRight  = marginR;
-
-        FormData formData = new FormData();
-
-        formData.left     = new FormAttachment(0);
-        formData.right    = new FormAttachment(100);
-        formData.top      = new FormAttachment(0);
-        formData.bottom   = new FormAttachment(100);
-
-        control.getParent().setLayout(formLayout);
-        control.setLayoutData(formData);
-    }
-
-    //---------------------------------------------------------------
-    private String getBrowserURL() {
-        String result;
-
-        ServerSettings settings = weinre.server.Main.getSettings();
-
-        String host = settings.getNiceHostName();
-        int    port = settings.getHttpPort();
-
-        result = "http://" + host + ":" + port + "/";
-
-        return result;
-    }
-
-    //---------------------------------------------------------------
-    private Font getMonospaceFont(Control control) {
-        FontData[] fontData = control.getDisplay().getFontList(null, true);
-
-        FontData fontFound = null;
-
-        // essentially the defaults that web inspector uses
-        if (null == fontFound) fontFound = findFontNamed(fontData, "Menlo");
-        if (null == fontFound) fontFound = findFontNamed(fontData, "Monaco");
-        if (null == fontFound) fontFound = findFontNamed(fontData, "Consolas");
-        if (null == fontFound) fontFound = findFontNamed(fontData, "Lucida Console");
-        if (null == fontFound) fontFound = findFontNamed(fontData, "dejavu sans mono");
-        if (null == fontFound) fontFound = findFontNamed(fontData, "Courier");
-
-        if (null == fontFound) return null;
-
-        fontFound.setHeight(14);
-
-        return new Font(control.getDisplay(), fontFound);
-    }
-
-    //---------------------------------------------------------------
-    private FontData findFontNamed(FontData[] fontData, String name) {
-        for (FontData fontDatum: fontData) {
-            if (fontDatum.getStyle() != SWT.NORMAL) continue;
-            if (name.equals(fontDatum.getName())) return fontDatum;
-        }
-
-        return null;
-    }
-
-    //---------------------------------------------------------------
-    @SuppressWarnings("unused")
-    private void dumpFontData(FontData[] fontData) {
-        for (FontData fontDatum: fontData) {
-            int    style       = fontDatum.getStyle();
-            String styleString = "";
-
-            if (0 != (style & SWT.NORMAL)) styleString += "NORMAL ";
-            if (0 != (style & SWT.BOLD))   styleString += "BOLD ";
-            if (0 != (style & SWT.ITALIC)) styleString += "ITALIC ";
-
-            styleString = styleString.trim();
-
-            System.out.println("font: " + fontDatum.getName() + " : " + fontDatum.getHeight() + " : " + styleString);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.application/src/weinre/application/GUIPreferences.java
----------------------------------------------------------------------
diff --git a/weinre.application/src/weinre/application/GUIPreferences.java b/weinre.application/src/weinre/application/GUIPreferences.java
deleted file mode 100644
index 3751584..0000000
--- a/weinre.application/src/weinre/application/GUIPreferences.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package weinre.application;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.wink.json4j.JSONException;
-import org.apache.wink.json4j.JSONObject;
-
-import weinre.server.Utility;
-
-
-//-------------------------------------------------------------------
-public class GUIPreferences {
-    static final private String PROPERTIES_FILE_NAME = "ui.properties";
-
-    private Properties properties;
-
-    //---------------------------------------------------------------
-    public GUIPreferences() {
-        super();
-
-        properties = Utility.readPropertiesFile(PROPERTIES_FILE_NAME);
-    }
-
-    //---------------------------------------------------------------
-    public JSONObject getPreference(String key) throws IOException {
-        String val = properties.getProperty(key);
-        if (null == val) return null;
-
-        try {
-            return new JSONObject(val);
-        } catch (JSONException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    //---------------------------------------------------------------
-    public void setPreference(String key, JSONObject json) {
-        String val = json.toString();
-
-        properties.setProperty(key, val);
-        Utility.writePropertiesFile(PROPERTIES_FILE_NAME, properties);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.application/src/weinre/application/ShellSizeTracker.java
----------------------------------------------------------------------
diff --git a/weinre.application/src/weinre/application/ShellSizeTracker.java b/weinre.application/src/weinre/application/ShellSizeTracker.java
deleted file mode 100644
index e5d8972..0000000
--- a/weinre.application/src/weinre/application/ShellSizeTracker.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package weinre.application;
-
-import org.apache.wink.json4j.JSONException;
-import org.apache.wink.json4j.JSONObject;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Monitor;
-import org.eclipse.swt.widgets.Shell;
-
-//-------------------------------------------------------------------
-public class ShellSizeTracker {
-
-    private String         name;
-    private Shell          shell;
-    private GUIPreferences preferences;
-    private boolean        dirty;
-    private Point          lastSize;
-    private Point          lastLocation;
-    private long           lastChange;
-    private boolean        stop;
-
-    //---------------------------------------------------------------
-    static public String getBoundsKey(Shell shell, String name) {
-        return "bounds-" + name + "-" + ShellSizeTracker.getMonitorSetupKey(shell.getDisplay());
-    }
-
-    //---------------------------------------------------------------
-    static private String getMonitorSetupKey(final Display display) {
-        StringBuffer keyBuffer = new StringBuffer();
-
-        Monitor[] monitors = display.getMonitors();
-        for (Monitor monitor: monitors) {
-            Rectangle bounds     = monitor.getBounds();
-            Rectangle clientArea = monitor.getClientArea();
-
-            keyBuffer.append("__");
-            keyBuffer.append(bounds.x);      keyBuffer.append("_");
-            keyBuffer.append(bounds.y);      keyBuffer.append("_");
-            keyBuffer.append(bounds.width);  keyBuffer.append("_");
-            keyBuffer.append(bounds.height);
-
-            keyBuffer.append("__");
-            keyBuffer.append(clientArea.x);      keyBuffer.append("_");
-            keyBuffer.append(clientArea.y);      keyBuffer.append("_");
-            keyBuffer.append(clientArea.width);  keyBuffer.append("_");
-            keyBuffer.append(clientArea.height);
-        }
-
-        keyBuffer.insert(0, "monitor-setup");
-
-        return keyBuffer.toString();
-    }
-
-    //---------------------------------------------------------------
-    public ShellSizeTracker(String name, final Shell shell, GUIPreferences preferences) {
-        super();
-
-        this.name         = name;
-        this.shell        = shell;
-        this.preferences  = preferences;
-        this.dirty        = false;
-        this.lastSize     = new Point(0,0);
-        this.lastLocation = new Point(0,0);
-        this.stop         = false;
-
-        shell.addControlListener(new ControlListener() {
-            public void controlMoved(ControlEvent e)   {shellMoved();}
-            public void controlResized(ControlEvent e) {shellMoved();}
-        });
-
-    }
-
-    //---------------------------------------------------------------
-    public void start() {
-        startWaiterThread();
-    }
-
-    //---------------------------------------------------------------
-    public void stop() {
-
-    }
-
-    //---------------------------------------------------------------
-    private void shellMoved() {
-        dirty        = true;
-        lastChange   = System.currentTimeMillis();
-        lastLocation = shell.getLocation();
-        lastSize     = shell.getSize();
-    }
-
-    //---------------------------------------------------------------
-    private void checkForChanges() {
-        if (!dirty) return;
-        if (shell.isDisposed()) return;
-        if (System.currentTimeMillis() < lastChange + 3000) return;
-
-        JSONObject valueJSON = new JSONObject();
-
-        try {
-            valueJSON.put("x", lastLocation.x);
-            valueJSON.put("y", lastLocation.y);
-            valueJSON.put("width", lastSize.x);
-            valueJSON.put("height", lastSize.y);
-        } catch (JSONException e1) {
-            throw new RuntimeException(e1);
-        }
-
-        String key;
-        key = ShellSizeTracker.getBoundsKey(shell, name);
-
-        preferences.setPreference(key, valueJSON);
-
-        dirty = false;
-    }
-
-
-    //---------------------------------------------------------------
-    private Thread startWaiterThread() {
-        Runnable runnable = new Runnable() {
-            public void run() {
-                while (true) {
-                    try { Thread.sleep(1000); } catch(InterruptedException e) { return; }
-
-                    if (stop) return;
-                    if (shell.isDisposed()) return;
-
-                    shell.getDisplay().asyncExec(new Runnable() {
-                        public void run() { checkForChanges(); }
-                    });
-                }
-            }
-        };
-
-        Thread thread = new Thread(runnable, getClass().getSimpleName() + " for " + name);
-        thread.start();
-
-        return thread;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.application/weinre application using ~weinre-server.settings.launch
----------------------------------------------------------------------
diff --git a/weinre.application/weinre application using ~weinre-server.settings.launch b/weinre.application/weinre application using ~weinre-server.settings.launch
deleted file mode 100644
index 75a0fe3..0000000
--- a/weinre.application/weinre application using ~weinre-server.settings.launch	
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/weinre.application/src/weinre/application/GUIMain.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="weinre.application.GUIMain"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="weinre.application"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XstartOnFirstThread"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/.classpath
----------------------------------------------------------------------
diff --git a/weinre.build/.classpath b/weinre.build/.classpath
deleted file mode 100644
index 6e69b0c..0000000
--- a/weinre.build/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="out"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/.gitignore
----------------------------------------------------------------------
diff --git a/weinre.build/.gitignore b/weinre.build/.gitignore
index cdd5de8..dfb791d 100644
--- a/weinre.build/.gitignore
+++ b/weinre.build/.gitignore
@@ -2,7 +2,5 @@ bin
 cached
 out
 tmp
-vendor
-node_modules
 
 personal.properties
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/.project
----------------------------------------------------------------------
diff --git a/weinre.build/.project b/weinre.build/.project
deleted file mode 100644
index 6d3107b..0000000
--- a/weinre.build/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>weinre.build</name>
-	<comment></comment>
-	<projects>
-		<project>weinre.application</project>
-		<project>weinre.doc</project>
-		<project>weinre.playground</project>
-		<project>weinre.server</project>
-		<project>weinre.web</project>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/.wr
----------------------------------------------------------------------
diff --git a/weinre.build/.wr b/weinre.build/.wr
new file mode 100644
index 0000000..c415783
--- /dev/null
+++ b/weinre.build/.wr
@@ -0,0 +1,35 @@
+# ---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ---
+
+--stdoutcolor blue
+--stderrcolor red
+
+./build-dev.sh
+
+../weinre.build/build.xml
+../weinre.build/build.properties
+../weinre.build/scripts
+../weinre.doc
+../weinre.server/interfaces
+../weinre.server/lib
+../weinre.server/package.json
+../weinre.server/README.md
+../weinre.server/weinre
+../weinre.server/weinre-hot
+../weinre.web

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/README.md
----------------------------------------------------------------------
diff --git a/weinre.build/README.md b/weinre.build/README.md
deleted file mode 100644
index e47c046..0000000
--- a/weinre.build/README.md
+++ /dev/null
@@ -1,66 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-building weinre
-===============================================================================
-
-The weinre source base consists of file folders:
-
-- `weinre.application`
-- `weinre.build`
-- `weinre.doc`
-- `weinre.server`
-- `weinre.web`
-
-weinre was originally built using Eclipse, and still maintains Eclipse meta-data so that it can be developed in Eclipse.  Each of the folders above maps into a separate project.  Note however that the Eclipse-y-ness of the weinre source base is no longer maintained.  Please open a bug if there are problems.
-
-Before running a build, you should copy the `weinre.build/sample.personal.properties` file to the file `weinre.build/personal.properties`, and then customize that file.
-
-weinre requires additional code to produce the final jar.  These dependencies will be downloaded the first time you run a build, and then won't be downloaded for subsequent builds.  You can explicitly get the dependencies by running the `weinre.build/get-vendor.xml` file in Ant, as follows:
-
-    ant -f get-vendor.xml
-
-Various transient directories in this project (weinre.build) will be created after the build.  They are set to not be stored in the SCM.  They include:
-
-- `out`
-- `cached`
-- `tmp`
-- `vendor`
-
-You can delete them whenever you wish, or use the `"clean"` target of the  `weinre.build/build.xml` file to delete them.  Deleting them will cause the build to take longer, to rebuild what you deleted.
-
-The `weinre.build/out` directory in particular contains the final build artifacts:
-
--  `weinre.build/out/archives/weinre-doc-{version}.zip`
-
-   contains the HTML doc for weinre
-
--  `weinre.build/out/archives/weinre-jar-{version}.zip`
-
-   contains the platform-portable weinre.jar file
-
--  `weinre.build/out/archives/weinre-mac-{version}.zip`
-
-   contains the Mac OS X weinre.app application
-
--  `weinre.build/out/archives/weinre-src-{version}.zip`
-
-   contains the source of the projects (copy of what's in the SCM)
-
-To build while you are developing the weinre code, you can use the quicker-to-build `"build-dev"` target of `weinre.build/build.xml` . This will not build the jars or archives, just rebuilds the bits necessary to run the server transient output directories.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/build-continuous.sh
----------------------------------------------------------------------
diff --git a/weinre.build/build-continuous.sh b/weinre.build/build-continuous.sh
deleted file mode 100755
index e6f1181..0000000
--- a/weinre.build/build-continuous.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-# ---
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ---
-
-#-------------------------------------------------------------
-# create a link to your workspace first!
-#-------------------------------------------------------------
-EWS=~/weinre-workspace
-
-cd $EWS/weinre.build
-
-#-------------------------------------------------------------
-# run-when-changed: https://gist.github.com/240922
-#-------------------------------------------------------------
-
-run-when-changed "ant build" \
-  ../weinre.application \
-  ../weinre.build/*.xml \
-  ../weinre.build/*.properties \
-  ../weinre.build/scripts \
-  ../weinre.doc \
-  ../weinre.server \
-  ../weinre.web
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/build-dev.sh
----------------------------------------------------------------------
diff --git a/weinre.build/build-dev.sh b/weinre.build/build-dev.sh
new file mode 100755
index 0000000..2d8991f
--- /dev/null
+++ b/weinre.build/build-dev.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# ---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ---
+
+# this script builds enough of weinre to test at development time
+
+cd `dirname $0`
+ant build-dev
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/build.properties
----------------------------------------------------------------------
diff --git a/weinre.build/build.properties b/weinre.build/build.properties
index 8cb1b96..a1fe6d5 100644
--- a/weinre.build/build.properties
+++ b/weinre.build/build.properties
@@ -20,7 +20,8 @@
 #-----------------------------------------------------------
 # weinre version
 #-----------------------------------------------------------
-WEINRE_VERSION: 1.6.1
+
+WEINRE_VERSION: 1.7.0-pre
 
 #-----------------------------------------------------------
 # some common locations used in the ant scripts
@@ -28,7 +29,7 @@ WEINRE_VERSION: 1.6.1
 
 TMP:    tmp
 OUT:    out
-WEB:    out/web
+WEB:    ../weinre.server/web
 CACHED: cached
 VENDOR: vendor
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/build.xml
----------------------------------------------------------------------
diff --git a/weinre.build/build.xml b/weinre.build/build.xml
index eab7546..21efe08 100644
--- a/weinre.build/build.xml
+++ b/weinre.build/build.xml
@@ -39,20 +39,32 @@
     </tstamp>
 
     <tstamp>
-        <format property="BUILD_NUMBER_DATE" pattern="yyyy-MM-dd--HH-mm-ss" timezone="GMT"/>
+        <format property="BUILD_DATE" pattern="yyyy-MM-dd--HH-mm-ss" timezone="GMT"/>
     </tstamp>
 
-    <property name="BUILD_NUMBER" value="${WEINRE_VERSION}build-${BUILD_NUMBER_DATE}"/>
+    <condition property="BUILD_VERSION" value="${WEINRE_VERSION}-${BUILD_DATE}">
+        <matches pattern=".*pre$" string="${WEINRE_VERSION}"/>
+    </condition>
+    
+    <condition property="BUILD_VERSION" value="${WEINRE_VERSION}">
+        <not>
+            <matches pattern=".*pre$" string="${WEINRE_VERSION}"/>
+        </not>
+    </condition>
+    
+    <!-- ============================================================
+         do a clean build
+         ============================================================ -->
 
+    <target name="build-clean" depends="clean,build">
+    </target>
 
     <!-- ============================================================
          main entry point
          ============================================================ -->
 
     <target name="build" depends="build-dev">
-        <antcall target="build-jar"/>
-        <antcall target="build-ui-jar"/>
-        <antcall target="build-application-mac"/>
+        <antcall target="build-doc"/>
         <antcall target="build-archives"/>
 
         <echo>full ant build completed successfully</echo>
@@ -64,12 +76,9 @@
 
     <target name="clean">
         <delete dir="${OUT}"/>
-        <mkdir  dir="${OUT}"/> <!-- this is an Eclipse source folder! -->
-
         <delete dir="${TMP}"/>
+        <delete dir="${WEB}"/>
         <delete dir="${CACHED}"/>
-        <delete dir="${VENDOR}"/>
-        <delete dir="node_modules"/>
     </target>
 
     <!-- ============================================================
@@ -77,20 +86,32 @@
          ============================================================ -->
 
     <target name="build-dev">
-        <delete dir="${OUT}"/>
-        <mkdir  dir="${OUT}"/>
+        <fail>
+            <condition>
+                <not>
+                    <resourceexists>
+                        <file file="personal.properties"/>
+                    </resourceexists>
+                </not>
+            </condition>
+            The file 'personal.properties' was not found; create one based on 'sample.personal.properties'.
+        </fail>
+
+        <echo>building version ${BUILD_VERSION}</echo>
 
+        <mkdir  dir="${OUT}"/>
+        <delete includeemptydirs="true">
+            <fileset dir="${OUT}" includes="**/*" excludes="build-done.txt"/>
+        </delete>        
+        
         <property
             name  = "build-info-text"
-            value = "weinre build ${BUILD_NUMBER} by ${BUILDER}"
+            value = "weinre build ${BUILD_VERSION} by ${BUILDER}"
         />
 
         <echo file="${OUT}/build-info.txt" message="${build-info-text}"/>
 
-        <antcall target="build-vendor"/>
-        <antcall target="compile-java"/>
         <antcall target="build-web"/>
-        <antcall target="build-doc"/>
         <antcall target="build-json-idl"/>
         <antcall target="build-client"/>
         <antcall target="build-target"/>
@@ -103,54 +124,16 @@
 
         <antcall target="finished"/>
         <antcall target="finished-growl"/>
+        
+        <echo file="${OUT}/build-done.txt" message="${build-info-text} is finished!"/>
+        
     </target>
 
     <!-- ============================================================
-         compile java code
-         ============================================================ -->
-
-    <target name="compile-java" unless="USE_ECLIPSE">
-        <delete dir="../${PROJECT_SERVER}/bin"/>
-        <mkdir  dir="../${PROJECT_SERVER}/bin"/>
-
-        <javac
-            srcdir            = "../${PROJECT_SERVER}/src"
-            destdir           = "../${PROJECT_SERVER}/bin"
-            debug             = "true"
-            verbose           = "false"
-            includeAntRuntime = "false"
-        >
-            <classpath path="../${PROJECT_BUILD}/vendor/cli/commons-cli.jar"/>
-            <classpath path="../${PROJECT_BUILD}/vendor/jetty/jetty.jar"/>
-            <classpath path="../${PROJECT_BUILD}/vendor/json4j/json4j.jar"/>
-            <classpath path="../${PROJECT_BUILD}/vendor/jetty/servlet-api.jar"/>
-            <compilerarg value="-Xlint"/>
-        </javac>
-
-        <delete dir="../${PROJECT_APPLICATION}/bin"/>
-        <mkdir  dir="../${PROJECT_APPLICATION}/bin"/>
-
-        <javac
-            srcdir            = "../${PROJECT_APPLICATION}/src"
-            destdir           = "../${PROJECT_APPLICATION}/bin"
-            debug             = "true"
-            verbose           = "false"
-            includeAntRuntime = "false"
-        >
-            <classpath path="../${PROJECT_SERVER}/bin"/>
-            <classpath path="../${PROJECT_BUILD}/vendor/json4j/json4j.jar"/>
-            <classpath path="../${PROJECT_BUILD}/vendor/swt/cocoa-macosx-x86_64/swt.jar"/>
-            <compilerarg value="-Xlint"/>
-        </javac>
-
-    </target>
-
-    <!-- ============================================================
-         build vendor libs
+         check for personal properties
          ============================================================ -->
 
-    <target name="build-vendor" unless="VENDOR_FOUND">
-        <ant antfile="get-vendor.xml"/>
+    <target name="check-personal-properties" unless="personal.properties.exists">
     </target>
 
     <!-- ============================================================
@@ -172,24 +155,24 @@
         <echo message="compiling CoffeeScript files in: ${PROJECT_WEB}/modules/weinre/client"/>
         <exec executable="sh" failonerror="true" failifexecutionfails="true">
             <arg value="-c"/>
-            <arg value="node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/client ../${PROJECT_WEB}/modules/weinre/client/*.coffee"/>
+            <arg value="${VENDOR}/node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/client ../${PROJECT_WEB}/modules/weinre/client/*.coffee"/>
         </exec>
 
         <echo message="compiling CoffeeScript files in: ${PROJECT_WEB}/modules/weinre/common"/>
         <exec executable="sh" failonerror="true" failifexecutionfails="true">
             <arg value="-c"/>
-            <arg value="node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/common ../${PROJECT_WEB}/modules/weinre/common/*.coffee"/>
+            <arg value="${VENDOR}/node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/common ../${PROJECT_WEB}/modules/weinre/common/*.coffee"/>
         </exec>
 
         <echo message="compiling CoffeeScript files in: ${PROJECT_WEB}/modules/weinre/target"/>
         <exec executable="sh" failonerror="true" failifexecutionfails="true">
             <arg value="-c"/>
-            <arg value="node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/target ../${PROJECT_WEB}/modules/weinre/target/*.coffee"/>
+            <arg value="${VENDOR}/node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/target ../${PROJECT_WEB}/modules/weinre/target/*.coffee"/>
         </exec>
 
         <echo message="transportd-izing modules"/>
         <exec executable="python" failonerror="true" failifexecutionfails="true">
-            <arg  file="vendor/modjewel/module2transportd.py"/>
+            <arg  file="scripts/module2amd.py"/>
             <arg value="--quiet"/>
             <arg value="--out"/>
             <arg  file="${WEB}"/>
@@ -197,12 +180,14 @@
         </exec>
 
         <copy todir="${WEB}">
-            <fileset file="${VENDOR}/modjewel/modjewel-require.js"/>
+            <fileset file="../${PROJECT_WEB}/modjewel.js"/>
         </copy>
 
+<!--
         <copy todir="${WEB}">
             <fileset file="${VENDOR}/json2/json2.js"/>
         </copy>
+-->
 
         <copy todir="${WEB}">
             <fileset dir="../${PROJECT_WEB}">
@@ -235,30 +220,17 @@
             </fileset>
 
             <filterset>
-                <filter token="WEINRE_VERSION"             value="${WEINRE_VERSION}"/>
-                <filter token="BUILD_NUMBER"               value="${BUILD_NUMBER}"/>
-                <filter token="BUILD_NUMBER_DATE"          value="${BUILD_NUMBER_DATE}"/>
-                <filter token="CLI_VERSION"                value="${CLI_VERSION}"/>
-                <filter token="JSON4J_VERSION"             value="${JSON4J_VERSION}"/>
-                <filter token="JSON2_VERSION"              value="${JSON2_VERSION}"/>
-                <filter token="WEBKIT_VERSION"             value="${WEBKIT_VERSION}"/>
-                <filter token="SWT_VERSION"                value="${SWT_VERSION}"/>
-                <filter token="JETTY_VERSION"              value="${JETTY_VERSION}"/>
-                <filter token="MODJEWEL_VERSION"           value="${MODJEWEL_VERSION}"/>
-                <filter token="JAVAX_SERVLET_VERSION"      value="${JAVAX_SERVLET_VERSION}"/>
-                <filter token="JAVAX_SERVLET_VERSION_IMPL" value="${JAVAX_SERVLET_VERSION_IMPL}"/>
+                <filter token="WEINRE_VERSION" value="${BUILD_VERSION}"/>
+                <filter token="BUILD_DATE"     value="${BUILD_DATE}"/>
             </filterset>
         </copy>
 
-<!--
-        <echo message="building add-css-properties.js"/>
-        <exec executable="python" failonerror="true" failifexecutionfails="true">
-            <arg  file="scripts/build-css-properties.py"/>
-            <arg value="vendor/webkit/WebCore/CSSPropertyNames.in"/>
-            <arg value="${WEB}/add-css-properties.js"/>
-        </exec>
--->
-
+        <echo message="building package.json"/>
+        <copy file="package.json.template"  tofile="../${PROJECT_SERVER}/package.json" overwrite="true">
+            <filterset>
+                <filter token="WEINRE_VERSION" value="${BUILD_VERSION}"/>
+            </filterset>
+        </copy>
     </target>
 
     <!-- ============================================================
@@ -387,99 +359,6 @@
     </target>
 
     <!-- ============================================================
-         build the main jar
-         ============================================================ -->
-
-    <target name="build-jar">
-
-        <jar destfile="${OUT}/weinre.jar">
-            <manifest>
-                <attribute name="Built-By" value="${ant.file.basename} - ${ant.project.name}"/>
-                <attribute name="Main-Class" value="weinre.server.Main"/>
-            </manifest>
-
-            <fileset file="${OUT}/build-info.txt"/>
-
-            <zipfileset src="${VENDOR}/jetty/jetty.jar">
-                <exclude name="about*.html"/>
-                <exclude name="META-INF/**/*"/>
-            </zipfileset>
-
-            <zipfileset src="${VENDOR}/jetty/servlet-api.jar">
-                <exclude name="META-INF/**/*"/>
-            </zipfileset>
-
-            <zipfileset src="${VENDOR}/cli/commons-cli.jar">
-                <exclude name="META-INF/**/*"/>
-            </zipfileset>
-
-            <zipfileset src="${VENDOR}/json4j/json4j.jar">
-                <exclude name="META-INF/**/*"/>
-            </zipfileset>
-
-            <fileset dir="../${PROJECT_SERVER}/bin"/>
-
-            <zipfileset dir="${WEB}" prefix="web"/>
-        </jar>
-
-    </target>
-
-    <!-- ============================================================
-         build the ui jar
-         ============================================================ -->
-
-    <target name="build-ui-jar">
-
-        <fileset dir="../${PROJECT_APPLICATION}/bin"/>
-
-        <jar destfile="${OUT}/weinre-ui.jar">
-            <manifest>
-                <attribute name="Built-By" value="${ant.file.basename} - ${ant.project.name}"/>
-                <attribute name="Main-Class" value="weinre.application.GUIMain"/>
-            </manifest>
-
-            <fileset file="${OUT}/build-info.txt"/>
-
-            <fileset dir="../${PROJECT_APPLICATION}/bin"/>
-
-            <zipfileset src="${VENDOR}/swt/cocoa-macosx-x86_64/swt.jar">
-                <exclude name="META-INF/**/*"/>
-            </zipfileset>
-        </jar>
-
-    </target>
-
-    <!-- ============================================================
-         build the mac application
-         ============================================================ -->
-
-    <target name="build-application-mac">
-        <delete dir="${OUT}/applications/mac"/>
-        <mkdir  dir="${OUT}/applications/mac/weinre.app"/>
-
-        <copy todir="${OUT}/applications/mac/weinre.app">
-            <fileset dir="../${PROJECT_APPLICATION}/resources/macosx/weinre.app">
-                <exclude name="**/Info.plist"/>
-            </fileset>
-        </copy>
-
-        <copy todir="${OUT}/applications/mac/weinre.app">
-            <fileset dir="../${PROJECT_APPLICATION}/resources/macosx/weinre.app">
-                <include name="**/Info.plist"/>
-            </fileset>
-            <filterset>
-                <filter token="VERSION" value="${WEINRE_VERSION}"/>
-            </filterset>
-        </copy>
-
-        <chmod file="${OUT}/applications/mac/weinre.app/Contents/MacOS/launcher" perm="+x"/>
-        <copy todir="${OUT}/applications/mac/weinre.app/Contents/MacOS" file="${OUT}/weinre.jar" />
-        <copy todir="${OUT}/applications/mac/weinre.app/Contents/MacOS" file="${OUT}/weinre-ui.jar"/>
-        <copy todir="${OUT}/applications/mac/weinre.app/Contents/Resources" file="${OUT}/build-info.txt"/>
-
-    </target>
-
-    <!-- ============================================================
          build the archives
          ============================================================ -->
     <target name="build-archives">
@@ -490,67 +369,64 @@
 
         <delete dir="${OUT}/files"/>
 
-        <delete dir="${OUT}/files/weinre-jar"/>
-        <mkdir  dir="${OUT}/files/weinre-jar"/>
-        <copy todir="${OUT}/files/weinre-jar" file="${OUT}/build-info.txt"/>
-        <copy todir="${OUT}/files/weinre-jar" file="${OUT}/weinre.jar"/>
-
-        <!-- ant's zip task doesn't preserve permission bits -->
-        <exec executable="zip" dir="${OUT}/files">
-            <arg value="-q"/>
-            <arg value="-r"/>
-            <arg value="../archives/weinre-jar-${BUILD_NUMBER}.zip"/>
-            <arg value="weinre-jar"/>
-        </exec>
-
-        <!-- =================================== -->
-        <delete dir="${OUT}/files/weinre-mac"/>
-        <mkdir  dir="${OUT}/files/weinre-mac"/>
-        <copy todir="${OUT}/files/weinre-mac" file="${OUT}/build-info.txt" />
-        <copy todir="${OUT}/files/weinre-mac">
-            <fileset dir="${OUT}/applications/mac"/>
+        <delete dir="${OUT}/files/weinre-node"/>
+        <mkdir  dir="${OUT}/files/weinre-node"/>
+        <copy todir="${OUT}/files/weinre-node" file="${OUT}/build-info.txt"/>
+        <copy todir="${OUT}/files/weinre-node" file="../LICENSE"/>
+        <copy todir="${OUT}/files/weinre-node" file="../NOTICE"/>
+        <copy todir="${OUT}/files/weinre-node">
+            <fileset dir="../${PROJECT_SERVER}"/>
         </copy>
-        <chmod file="${OUT}/files/weinre-mac/weinre.app/Contents/MacOS/launcher" perm="+x"/>
 
         <!-- ant's zip task doesn't preserve permission bits -->
         <exec executable="zip" dir="${OUT}/files">
             <arg value="-q"/>
             <arg value="-r"/>
-            <arg value="../archives/weinre-mac-${BUILD_NUMBER}.zip"/>
-            <arg value="weinre-mac"/>
+            <arg value="../archives/weinre-node-${BUILD_VERSION}.zip"/>
+            <arg value="weinre-node"/>
         </exec>
 
         <!-- =================================== -->
         <delete dir="${OUT}/files/weinre-doc"/>
         <mkdir  dir="${OUT}/files/weinre-doc"/>
         <copy todir="${OUT}/files/weinre-doc" file="${OUT}/build-info.txt" />
+        <copy todir="${OUT}/files/weinre-doc" file="../LICENSE"/>
+        <copy todir="${OUT}/files/weinre-doc" file="../NOTICE"/>
         <copy todir="${OUT}/files/weinre-doc">
-            <fileset dir="${OUT}/web/doc"/>
+            <fileset dir="${WEB}/doc"/>
         </copy>
 
         <!-- ant's zip task doesn't preserve permission bits -->
         <exec executable="zip" dir="${OUT}/files">
             <arg value="-q"/>
             <arg value="-r"/>
-            <arg value="../archives/weinre-doc-${BUILD_NUMBER}.zip"/>
+            <arg value="../archives/weinre-doc-${BUILD_VERSION}.zip"/>
             <arg value="weinre-doc"/>
         </exec>
 
         <!-- =================================== -->
         <delete dir="${OUT}/files/weinre-src"/>
         <mkdir  dir="${OUT}/files/weinre-src"/>
+        <exec executable="git" dir="..">
+            <arg value="archive"/>
+            <arg value="--format=zip"/>
+            <arg value="--prefix=weinre-src/"/>
+            <arg value="--output=${PROJECT_BUILD}/${TMP}/weinre-src.zip"/>
+            <arg value="HEAD"/>
+        </exec>
+
+        <exec executable="unzip" dir="${OUT}/files">
+            <arg value="-q"/>
+            <arg value="../../${TMP}/weinre-src.zip"/>
+        </exec>
+        
         <copy todir="${OUT}/files/weinre-src" file="${OUT}/build-info.txt" />
-        <copy todir="${OUT}/files/weinre-src/weinre.application"> <fileset dir="../weinre.application" excludes="**/bin/"/></copy>
-        <copy todir="${OUT}/files/weinre-src/weinre.build">       <fileset dir="../weinre.build"       excludes="**/bin/, **/out/, **/cached/, **/vendor/, **/tmp/, **/node_modules/"/></copy>
-        <copy todir="${OUT}/files/weinre-src/weinre.doc">         <fileset dir="../weinre.doc"         excludes="**/bin/"/></copy>
-        <copy todir="${OUT}/files/weinre-src/weinre.server">      <fileset dir="../weinre.server"      excludes="**/bin/"/></copy>
-        <copy todir="${OUT}/files/weinre-src/weinre.web">         <fileset dir="../weinre.web"         excludes="**/bin/"/></copy>
 
         <!-- ant's zip task doesn't preserve permission bits -->
         <exec executable="zip" dir="${OUT}/files">
             <arg value="-q"/>
             <arg value="-r"/>
-            <arg value="../archives/weinre-src-${BUILD_NUMBER}.zip"/>
+            <arg value="../archives/weinre-src-${BUILD_VERSION}.zip"/>
             <arg value="weinre-src"/>
         </exec>
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/debug.sh
----------------------------------------------------------------------
diff --git a/weinre.build/debug.sh b/weinre.build/debug.sh
deleted file mode 100755
index ba681ee..0000000
--- a/weinre.build/debug.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# ---
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ---
-
-CWD=`dirname $0`
-WEINRE=`dirname $CWD`
-CP=$WEINRE/weinre.server/bin:$WEINRE/weinre.build/out:$WEINRE/weinre.build/vendor/cli/commons-cli.jar:$WEINRE/weinre.build/vendor/jetty/jetty.jar:$WEINRE/weinre.build/vendor/json4j/json4j.jar:$WEINRE/weinre.build/vendor/jetty/servlet-api.jar
-PORT=8096
-DEBUG=jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:$PORT
-
-java \
-	-agentlib:$DEBUG \
-	-Dfile.encoding=UTF-8 \
-	-classpath $CP \
-	weinre.server.Main \
-	--deathTimeout 120

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/get-vendor.xml
----------------------------------------------------------------------
diff --git a/weinre.build/get-vendor.xml b/weinre.build/get-vendor.xml
deleted file mode 100644
index e420835..0000000
--- a/weinre.build/get-vendor.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="get-vendor" default="get-vendor" basedir=".">
-
-    <property file="personal.properties"/>
-    <property file="build.properties"/>
-    <property file="vendor.properties"/>
-
-    <!-- ============================================================ -->
-
-    <target name="get-vendor">
-        <echo>Go get some coffee, this is going to take a while</echo>
-
-        <delete dir="${TMP}"/>
-
-        <delete dir="${VENDOR}"/>
-        <mkdir  dir="${VENDOR}"/>
-
-        <antcall target="get-json2"/>
-        <antcall target="get-cli"/>
-        <antcall target="get-json4j"/>
-        <antcall target="get-jetty"/>
-        <antcall target="get-coffeescript"/>
-        <antcall target="get-modjewel"/>
-        <antcall target="get-web-inspector"/>
-        <antcall target="get-swt-mac"/>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-cli">
-        <delete dir="${VENDOR}/cli"/>
-        <mkdir  dir="${VENDOR}/cli"/>
-
-        <delete dir="${TMP}"/>
-        <mkdir  dir="${TMP}"/>
-
-        <get src="${CLI_URL}" dest="${TMP}/commons-cli.zip" verbose="false"/>
-        <unzip src="${TMP}/commons-cli.zip" dest="${TMP}">
-            <patternset>
-                <include name="${CLI_BASENAME}-sources.jar"/>
-                <include name="${CLI_BASENAME}.jar"/>
-            </patternset>
-        </unzip>
-
-
-        <copy file="${TMP}/${CLI_BASENAME}.jar"         tofile="${VENDOR}/cli/commons-cli.jar"/>
-        <copy file="${TMP}/${CLI_BASENAME}-sources.jar" tofile="${VENDOR}/cli/commons-cli-src.jar"/>
-
-        <delete dir="${TMP}"/>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-json4j">
-        <delete dir="${VENDOR}/json4j"/>
-        <mkdir  dir="${VENDOR}/json4j"/>
-
-        <delete dir="${TMP}"/>
-        <mkdir  dir="${TMP}"/>
-
-        <get src="${JSON4J_BIN_URL}" dest="${TMP}/json4j.zip" verbose="false"/>
-        <unzip src="${TMP}/json4j.zip" dest="${TMP}">
-            <patternset>
-                <include name="**/wink-json4j-${JSON4J_VERSION}.jar"/>
-            </patternset>
-        </unzip>
-
-        <copy file="${TMP}/apache-wink-${JSON4J_VERSION}/ext/wink-json4j-provider/lib/wink-json4j-${JSON4J_VERSION}.jar" tofile="${VENDOR}/json4j/json4j.jar"/>
-
-        <delete dir="${TMP}"/>
-        <mkdir  dir="${TMP}"/>
-        <get src="${JSON4J_SRC_URL}" dest="${TMP}/json4j-src.zip" verbose="false"/>
-        <unzip src="${TMP}/json4j-src.zip" dest="${TMP}/src">
-            <patternset>
-                <include name="**/wink-json4j/src/main/java/org/apache/wink/json4j/**/*"/>
-            </patternset>
-        </unzip>
-
-        <zip destfile="${VENDOR}/json4j/json4j-src.jar" basedir="${TMP}/src"/>
-
-        <delete dir="${TMP}"/>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-jetty">
-        <delete dir="${VENDOR}/jetty"/>
-        <mkdir  dir="${VENDOR}/jetty"/>
-
-        <get src="${JETTY_SRC_URL}"     dest="${VENDOR}/jetty/jetty-src.jar"   verbose="false"/>
-        <get src="${JETTY_BIN_URL}"     dest="${VENDOR}/jetty/jetty.jar"       verbose="false"/>
-        <get src="${JAVAX_SERVLET_URL}" dest="${VENDOR}/jetty/servlet-api.jar" verbose="false"/>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-coffeescript">
-        <echo message="coffee-script@${COFFEESCRIPT_VERSION}"/>
-        <exec executable="npm">
-            <arg value="install"/>
-            <arg value="coffee-script@${COFFEESCRIPT_VERSION}"/>
-        </exec>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-modjewel">
-        <delete dir="${VENDOR}/modjewel"/>
-        <mkdir  dir="${VENDOR}/modjewel"/>
-
-        <get src="${MODJEWEL_URL_PREFIX}/modjewel-require.js"  dest="${VENDOR}/modjewel/modjewel-require.js"  verbose="false"/>
-        <get src="${MODJEWEL_URL_PREFIX}/module2transportd.py" dest="${VENDOR}/modjewel/module2transportd.py" verbose="false"/>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-web-inspector">
-        <delete dir="${VENDOR}/webkit"/>
-        <mkdir  dir="${VENDOR}/webkit/WebCore"/>
-
-        <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
-            <arg value="--non-interactive"/>
-            <arg value="--trust-server-cert"/>
-            <arg value="export"/>
-            <arg value="-r"/>
-            <arg value="${WEBKIT_VERSION}"/>
-            <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/inspector"/>
-        </exec>
-
-        <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
-            <arg value="--non-interactive"/>
-            <arg value="--trust-server-cert"/>
-            <arg value="export"/>
-            <arg value="-r"/>
-            <arg value="${WEBKIT_VERSION}"/>
-            <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/English.lproj"/>
-        </exec>
-
-        <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
-            <arg value="--non-interactive"/>
-            <arg value="--trust-server-cert"/>
-            <arg value="export"/>
-            <arg value="-r"/>
-            <arg value="${WEBKIT_VERSION}"/>
-            <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/css/CSSPropertyNames.in"/>
-        </exec>
-
-        <exec executable="grep" outputproperty="gpl-grep-results" dir="${VENDOR}/webkit/WebCore">
-            <arg value="-r"/>
-            <arg value="GPL"/>
-            <arg value="."/>
-        </exec>
-
-        <condition property="found-no-gpl-files">
-            <equals arg1="" arg2="${gpl-grep-results}"/>
-        </condition>
-
-        <fail unless="found-no-gpl-files" message="The string GPL was found in the WebKit files"/>
-
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-swt-mac">
-        <delete dir="${VENDOR}/swt"/>
-        <mkdir  dir="${VENDOR}/swt"/>
-
-        <delete dir="${TMP}"/>
-        <mkdir dir="${TMP}"/>
-
-        <get src="${SWT_URL_PREFIX}/swt-${SWT_VERSION_MAJOR}-cocoa-macosx-x86_64.zip" dest="${TMP}/swt.zip" verbose="false"/>
-        <unzip src="${TMP}/swt.zip" dest="${TMP}"/>
-
-        <copy file="${TMP}/src.zip"       tofile="${VENDOR}/swt/cocoa-macosx-x86_64/swt-src.jar"/>
-        <copy file="${TMP}/swt-debug.jar" tofile="${VENDOR}/swt/cocoa-macosx-x86_64/swt.jar"/>
-
-        <delete dir="${TMP}"/>
-    </target>
-
-    <!-- ============================================================ -->
-
-    <target name="get-json2">
-        <delete dir="${VENDOR}/json2"/>
-        <mkdir  dir="${VENDOR}/json2"/>
-
-        <get src="${JSON2_URL_PREFIX}/json2.js"  dest="${VENDOR}/json2/json2.js"  verbose="false"/>
-    </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/new-release-notes.md
----------------------------------------------------------------------
diff --git a/weinre.build/new-release-notes.md b/weinre.build/new-release-notes.md
index 46f9a71..cbbbce6 100644
--- a/weinre.build/new-release-notes.md
+++ b/weinre.build/new-release-notes.md
@@ -24,62 +24,48 @@ steps to create a new release
 
 - update the `WEINRE_VERSION` variable in `weinre.build/build.properties` as appropriate
 
-- add changelog to `weinre.doc/ChangeLog.body.html`, built with
-
-    weinre.build/scripts/changelog.sh [previous-version]
+- add changelog to `weinre.doc/ChangeLog.body.html`
 
 - fix other doc as necessary
 
-- perform full build with one of:
+- perform full build with:
 
    - cd into `weinre.build` and run ant
 
-   - in Eclipse, select `weinre build.xml` from the External Tools menu
-
 - run the smoke test (see below) to ensure delicious smoky flavor
 
-- upload the `weinre-jar-x.y.z.zip` and `weinre-mac-x.y.z.zip` files
+- upload the `weinre-*-x.y.z.zip`
 
 - make sure you can download those zip files!
 
 - commit release changes:
    - `git add .`
-   - `git commit -m update for release x.y.z`
+   - `git commit -m "update for release x.y.z"`
 
 - merge branch onto master:
 
    - `git checkout master`
-   - `git merge --no-ff release-x.y.z`
+   - `git merge release-x.y.z`
    - `git push`
    - `git tag -a x.y.z`
    - `git push --tags`
 
-- merge branch onto develop:
-
-   - `git checkout develop`
-   - `git merge --no-ff release-x.y.z`
-   - `git push`
-   - `git branch -d release-x.y.z`
+- update apache cms pages:
 
-- update github pages:
+   - not sure how to do this yet
 
-   - `git checkout gh_pages`
-   - `cp -r ~/Projects/weinre/weinre.build/out/web/doc/* .` (or whatever)
-   - `git add .`
-   - `git commit -m update for release x.y.z`
-   - `git push`
+- prepare for blessed Apache version
 
-- announce to the world!
+   - not sure how to do this yet
 
 
 smoke test
 ===============================================================================
 
-The smoke test involves testing the three archives:
+The smoke test involves testing the archives:
 
 - `weinre-doc.zip`
-- `weinre-mac.zip`
-- `weinre-jar.zip`
+- `weinre-node.zip`
 
 
 smoke test - doc
@@ -89,28 +75,12 @@ smoke test - doc
 - browse all pages
 
 
-smoke test - mac
--------------------------------------------------------------------------------
-
-- unzip `weinre-mac.zip`
-- make sure `build-info.txt` looks right
-- launch the app
-- open a new browser on [http://localhost:8081/demo/weinre-demo.html](http://localhost:8081/demo/weinre-demo.html)
-- poke around the demo, make sure it works
-- close app
-- start server in eclipse
-- launch the app
-- should get error about port in use
-
-smoke test - jar
+smoke test - node
 -------------------------------------------------------------------------------
 
-- unzip `weinre-jar.zip`
+- unzip `weinre-node.zip`
 - make sure `build-info.txt` looks right
-- run `java -jar weinre.jar --help` make sure help works
-- run `java -jar weinre.jar` make sure help works
+- run `weinre --help` make sure help works
+- run `weinre` make sure help works
 - poke around the demo, make sure it works
-- kill server
-- start server in eclipse
-- run `java -jar weinre.jar` make sure help works
-- should get error about port in use
+- should add some variations on starting with used port, etc
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/package.json.template
----------------------------------------------------------------------
diff --git a/weinre.build/package.json.template b/weinre.build/package.json.template
new file mode 100644
index 0000000..e5d1406
--- /dev/null
+++ b/weinre.build/package.json.template
@@ -0,0 +1,42 @@
+{
+  "name":              "weinre",
+  "description":       "WEb INspector REmote",
+  "author":            "apache.org",
+  "version":           "@WEINRE_VERSION@",
+  "tags":              [ "debug"],
+  "licenses":
+    [
+      {
+        "type":        "Apache 2.0",
+         "url":        "http://www.apache.org/licenses/LICENSE-2.0"
+      }
+    ],
+  "engines":
+    {
+      "node":          ">=0.6.0"
+    },
+  "directories":
+    {
+      "lib" :          "./lib"
+    },
+  "dependencies":
+    {
+      "coffee-script": "1.2.0",
+      "express":       "2.5.7",
+      "nopt":          "1.0.10",
+      "underscore":    "1.3.1"
+    },
+  "main" :             "./lib/weinre",
+  "bin":
+    {
+      "weinre":        "./bin/weinre"
+    },
+  "homepage":          "http://incubator.apache.org/callback/",
+  "bugs":              "https://issues.apache.org/jira/browse/CB",
+  "repository":
+    {
+      "type":          "git",
+      "url":           "https://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre.git"
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/sample.personal.properties
----------------------------------------------------------------------
diff --git a/weinre.build/sample.personal.properties b/weinre.build/sample.personal.properties
index 73c2d6e..a0d1bf2 100644
--- a/weinre.build/sample.personal.properties
+++ b/weinre.build/sample.personal.properties
@@ -37,8 +37,3 @@ BUILDER:      Your Name in Lights
 #------------------------------------------------------------------------------
 USE_GROWL:    yup
 
-#------------------------------------------------------------------------------
-# Set to anything to enable compiling the Java code with Eclipse.
-# Delete or comment out to compile the Java code with javac.
-#------------------------------------------------------------------------------
-#USE_ECLIPSE:  yup

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/scripts/build-client-html.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/build-client-html.py b/weinre.build/scripts/build-client-html.py
index 86bb0ff..9cb3186 100644
--- a/weinre.build/scripts/build-client-html.py
+++ b/weinre.build/scripts/build-client-html.py
@@ -64,7 +64,7 @@ def createIndexFile(iFileName, oFileName, moduleDir):
                 '<title>weinre</title>\n',
                 '<script type="text/javascript" src="weinre/check-for-webkit.js"></script>\n',
                 '<script type="text/javascript" src="weinre/hacks.js"></script>\n',
-                '<script type="text/javascript" src="../modjewel-require.js"></script>\n',
+                '<script type="text/javascript" src="../modjewel.js"></script>\n',
                 '<script type="text/javascript">require("modjewel").warnOnRecursiveRequire(true)</script>\n',
             ])
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/scripts/build-target-scripts.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/build-target-scripts.py b/weinre.build/scripts/build-target-scripts.py
index 721ea26..71792b0 100644
--- a/weinre.build/scripts/build-target-scripts.py
+++ b/weinre.build/scripts/build-target-scripts.py
@@ -47,7 +47,7 @@ def main():
     scriptMin   = {}
 
     includedFiles = []
-    includedFiles.append("modjewel-require.js")
+    includedFiles.append("modjewel.js")
 
     entries = os.listdir(os.path.join(srcDirName, "weinre/common"))
     for entry in entries:
@@ -100,7 +100,7 @@ def writeMergedFile(oFileName, scripts, scriptNames, srcs, useEval):
             src = "%s\n//@ sourceURL=%s" % (src, srcName)
             lines.append(";eval(%s)" % json.dumps(src))
 
-        if srcName == "modjewel-require.js":
+        if srcName == "modjewel.js":
             lines.append("require('modjewel').warnOnRecursiveRequire(true);")
             if not useEval:
                 lines.append("")

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/scripts/changelog.sh
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/changelog.sh b/weinre.build/scripts/changelog.sh
deleted file mode 100755
index 8c7393a..0000000
--- a/weinre.build/scripts/changelog.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#/bin/sh
-
-# ---
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ---
-
-git log "--pretty=format:- %s" $1.. | \
-    sed 's/#\([0-9]*\)/\<a href="https:\/\/github.com\/phonegap\/weinre\/issues\/1"\>issue \1\<\/a\>./' |
-    sed 's/^-/\<li\>/'
-
-#    sed 's/#\([0-9]*\)/[issue \1](https:\/\/github.com\/pmuellr\/weinre\/issues\/1)./'

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/scripts/closed-issues.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/closed-issues.py b/weinre.build/scripts/closed-issues.py
deleted file mode 100755
index 4fe32de..0000000
--- a/weinre.build/scripts/closed-issues.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-
-# ---
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ---
-
-import os
-import sys
-import json
-import httplib
-
-if len(sys.argv) < 3:
-    print "expecting parameters <user> <project>"
-    sys.exit()
-
-user = sys.argv[1]
-proj = sys.argv[2]
-
-url = "/api/v2/json/issues/list/%s/%s/closed" % (user, proj)
-
-conn = httplib.HTTPConnection("github.com")
-conn.request("GET", url)
-resp = conn.getresponse()
-resp = json.loads(resp.read())
-conn.close()
-
-issues = resp["issues"]
-
-issues.sort(lambda x,y: cmp(x["number"], y["number"]))
-
-for issue in issues:
-    number = issue["number"]
-    title  = issue["title"]
-    date   = issue["closed_at"]
-
-    template = "<li><a href='https://github.com/%s/%s/issues/%d'>issue %d</a> %s - %s"
-    print template % (user, proj, number, number, date, title)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/scripts/module2amd.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/module2amd.py b/weinre.build/scripts/module2amd.py
new file mode 100644
index 0000000..c7e7cd3
--- /dev/null
+++ b/weinre.build/scripts/module2amd.py
@@ -0,0 +1,212 @@
+#!/usr/bin/env python
+
+# ---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ---
+
+import os
+import sys
+import optparse
+
+PROGRAM = os.path.basename(sys.argv[0])
+VERSION = "1.2.0"
+
+OutDir              = "."
+Quiet               = False
+AMDExtension        = ".amd.js"
+
+#-------------------------------------------------------------------------------
+#
+#-------------------------------------------------------------------------------
+def main():
+    global OutDir
+    global Quiet
+
+    usage        = "usage: %s [options] inDir inDir ..." % PROGRAM
+    version      = "%s %s" % (PROGRAM,VERSION)
+    description  = """
+Converts .js files in the inDir directories to AMD format.  See:
+http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition for more
+info.  Each inDir is considered a 'root' directory for generating
+relative module names.
+""".strip()
+    parser = optparse.OptionParser(usage=usage, version=version, description=description)
+
+    parser.add_option("-o", "--out", dest="dirName", metavar = "DIR",
+        help="generate AMD files in DIR (default: %default)"
+    )
+
+    parser.add_option("--htmlFile", dest="htmlFile", metavar = "FILE",
+        help="generate an test driver for HTML in FILE"
+    )
+
+    parser.add_option("--htmlMain", dest="htmlMain", metavar = "CODE",
+        help="a line of code to start the test driver for HTML"
+    )
+
+    parser.add_option("-q", "--quiet", dest="quiet", action="store_true", default=Quiet,
+        help="be quiet"
+    )
+
+    parser.set_defaults(dirName=OutDir)
+
+    (options, args) = parser.parse_args()
+
+    OutDir = options.dirName
+    Quiet  = options.quiet
+
+    help = False
+    if len(args) == 0:   help = True
+    elif args[0] == "?": help = True
+
+    if help:
+        parser.print_help()
+        sys.exit(0)
+
+    htmlFile = options.htmlFile
+    htmlMain = options.htmlMain
+
+    if htmlFile and not htmlMain: error("--htmlFile specified but not --htmlMain")
+    if htmlMain and not htmlFile: error("--htmlMain specified but not --htmlFile")
+
+    for dir in args:
+        modules = processDir(dir)
+
+    if not htmlFile and not htmlMain: return
+
+    contents = []
+
+    contents.append("<script src='modjewel.js'></script>")
+    contents.append("")
+
+    for module in modules:
+        contents.append("<script src='%s%s'></script>" % (module, AMDExtension))
+
+    contents.append("")
+    contents.append("<script>")
+    contents.append(htmlMain)
+    contents.append("</script>")
+    contents.append("")
+    contents.append("<h1>check the console for test results</h1>")
+
+    htmlFileName = os.path.join(OutDir, htmlFile)
+
+    htmlFile = file(htmlFileName, "w")
+    htmlFile.write("\n".join(contents))
+    htmlFile.close()
+
+    log("generated test driver: %s" % htmlFileName)
+
+#-------------------------------------------------------------------------------
+#
+#-------------------------------------------------------------------------------
+def processDir(dir, path=None, modules=None):
+    if path    is None: path = []
+    if modules is None: modules = []
+
+    if not os.path.exists(dir): error("directory does not exist: %s" % dir)
+    if not os.path.isdir(dir): error("path is not directory: %s" % dir)
+
+    entries = os.listdir(dir)
+
+    for entry in entries:
+        fullEntry = os.path.join(dir, entry)
+
+        if os.path.isdir(fullEntry):
+            processDir(fullEntry, path + [entry], modules)
+            continue
+
+        if not os.path.isfile(fullEntry):           continue
+        if     entry.endswith(AMDExtension):        continue
+        if not entry.endswith(".js"):               continue
+
+        baseName  = entry[:-3]
+        iFileName = fullEntry
+        oDir      = "/".join(path)
+        oFileName = os.path.join(OutDir, oDir, baseName)
+        oFileName = "%s%s" % (oFileName, AMDExtension)
+
+        if False:
+            print "processing:   %s" % fullEntry
+            print "   oFileName: %s" % oFileName
+            continue
+
+        iFile = file(iFileName)
+        contents = iFile.read()
+        iFile.close()
+
+        if contents.startswith("#!"): contents = "// " + contents
+
+        moduleName = "%s/%s" % ("/".join(path), baseName)
+        moduleName = moduleName.lstrip("/")
+
+        modules.append(moduleName)
+
+        header  = ';define("%s", function(require, exports, module) {' % moduleName
+        trailer = '});'
+
+        newContents = "%s %s\n%s\n" % (header, contents, trailer)
+
+
+        oDirName = os.path.dirname(oFileName)
+        if os.path.exists(oDirName):
+            if not os.path.isdir(oDirName):
+                error("trying to generate a file in '%s' which isn't a directory" % oDirName)
+
+        if not os.path.exists(oDirName):
+            try:
+                os.makedirs(oDirName)
+            except:
+                error("error creating output directory '%s'" % oDirName)
+
+        oFile = file(oFileName, "w")
+        oFile.write(newContents)
+        oFile.close()
+
+        log("generated: %s" % oFileName)
+
+    return modules
+
+#-------------------------------------------------------------------------------
+#
+#-------------------------------------------------------------------------------
+def log(message):
+    if Quiet: return
+    print "%s: %s" % (PROGRAM, message)
+
+#-------------------------------------------------------------------------------
+#
+#-------------------------------------------------------------------------------
+def error(message):
+    print "%s: %s" % (PROGRAM, message)
+    exit(1)
+
+#-------------------------------------------------------------------------------
+#
+#-------------------------------------------------------------------------------
+def errorException(message):
+    eType  = str(sys.exc_info()[0])
+    eValue = str(sys.exc_info()[1])
+
+    error("%s; exception: %s: %s" % (message, eType, eValue))
+
+#-------------------------------------------------------------------------------
+#
+#-------------------------------------------------------------------------------
+if __name__ == '__main__':
+    main()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/update-vendor.xml
----------------------------------------------------------------------
diff --git a/weinre.build/update-vendor.xml b/weinre.build/update-vendor.xml
new file mode 100644
index 0000000..a6981fb
--- /dev/null
+++ b/weinre.build/update-vendor.xml
@@ -0,0 +1,97 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<project name="update-vendor" default="update-vendor" basedir=".">
+
+    <property file="personal.properties"/>
+    <property file="build.properties"/>
+    <property file="vendor.properties"/>
+
+    <!-- ============================================================ -->
+
+    <target name="update-vendor">
+        <delete dir="${TMP}"/>
+
+        <delete dir="${VENDOR}"/>
+        <mkdir  dir="${VENDOR}"/>
+
+        <antcall target="get-coffeescript"/>
+        <antcall target="get-web-inspector"/>
+    </target>
+
+    <!-- ============================================================ -->
+
+    <target name="get-coffeescript">
+        <echo message="coffee-script@${COFFEESCRIPT_VERSION}"/>
+        <exec executable="npm" dir="${VENDOR}">
+            <arg value="install"/>
+            <arg value="coffee-script@${COFFEESCRIPT_VERSION}"/>
+        </exec>
+    </target>
+
+    <!-- ============================================================ -->
+
+    <target name="get-web-inspector">
+        <delete dir="${VENDOR}/webkit"/>
+        <mkdir  dir="${VENDOR}/webkit/WebCore"/>
+
+        <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
+            <arg value="--non-interactive"/>
+            <arg value="--trust-server-cert"/>
+            <arg value="export"/>
+            <arg value="-r"/>
+            <arg value="${WEBKIT_VERSION}"/>
+            <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/inspector"/>
+        </exec>
+
+        <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
+            <arg value="--non-interactive"/>
+            <arg value="--trust-server-cert"/>
+            <arg value="export"/>
+            <arg value="-r"/>
+            <arg value="${WEBKIT_VERSION}"/>
+            <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/English.lproj"/>
+        </exec>
+
+        <delete>
+            <fileset dir="${VENDOR}/webkit/WebCore/inspector">
+                <include name="**/*.cpp"/>
+                <include name="**/*.h"/>
+                <include name="**/*.pm"/>
+                <include name="**/*.pl"/>
+            </fileset>
+        </delete>
+
+        <exec executable="grep" outputproperty="gpl-grep-results" dir="${VENDOR}/webkit/WebCore">
+            <arg value="-r"/>
+            <arg value="GPL"/>
+            <arg value="."/>
+        </exec>
+
+        <condition property="found-no-gpl-files">
+            <equals arg1="" arg2="${gpl-grep-results}"/>
+        </condition>
+
+        <fail unless="found-no-gpl-files" message="The string GPL was found in the WebKit files"/>
+
+    </target>
+
+    <!-- ============================================================ -->
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor.properties
----------------------------------------------------------------------
diff --git a/weinre.build/vendor.properties b/weinre.build/vendor.properties
index f54545f..f5dce22 100644
--- a/weinre.build/vendor.properties
+++ b/weinre.build/vendor.properties
@@ -18,7 +18,7 @@
 # ---
 
 #-----------------------------------------------------------
-# location of WebKit Web Inspector
+# version / location of WebKit Web Inspector
 #-----------------------------------------------------------
 
 #WEBKIT_VERSION:         r67358
@@ -30,73 +30,7 @@ WEBKIT_VERSION:          r78584
 WEBKIT_URL_PREFIX:       https://svn.webkit.org/repository/webkit/trunk
 
 #-----------------------------------------------------------
-# location of Apache Commons CLI
-#-----------------------------------------------------------
-
-CLI_VERSION:    1.2
-CLI_URL_PREFIX: http://www.apache.org/dist/commons/cli/
-
-CLI_URL:        ${CLI_URL_PREFIX}/binaries/commons-cli-${CLI_VERSION}-bin.zip
-CLI_BASENAME:   commons-cli-${CLI_VERSION}/commons-cli-${CLI_VERSION}
-
-#-----------------------------------------------------------
-# location of JSON4J
-#-----------------------------------------------------------
-
-JSON4J_VERSION:    1.1.2-incubating
-JSON4J_URL_PREFIX: http://archive.apache.org/dist/incubator/wink/
-
-JSON4J_BIN_URL:    ${JSON4J_URL_PREFIX}/${JSON4J_VERSION}/apache-wink-${JSON4J_VERSION}.zip
-JSON4J_SRC_URL:    ${JSON4J_URL_PREFIX}/${JSON4J_VERSION}/apache-wink-${JSON4J_VERSION}-src.zip
-
-#-----------------------------------------------------------
-# location of Eclipse Jetty
-#-----------------------------------------------------------
-
-JETTY_VERSION:              7.1.6.v20100715
-JETTY_URL_PREFIX:           https://oss.sonatype.org/content/groups/jetty/org/eclipse/jetty/
-
-JETTY_SRC_JAR_NAME:         jetty-all-server-${JETTY_VERSION}-sources.jar
-JETTY_SRC_URL:              ${JETTY_URL_PREFIX}/aggregate/jetty-all-server/${JETTY_VERSION}/${JETTY_SRC_JAR_NAME}
-
-JETTY_BIN_JAR_NAME:         jetty-all-server-${JETTY_VERSION}.jar
-JETTY_BIN_URL:              ${JETTY_URL_PREFIX}/aggregate/jetty-all-server/${JETTY_VERSION}/${JETTY_BIN_JAR_NAME}
-
-#-----------------------------------------------------------
-# location of servlet API
-#-----------------------------------------------------------
-
-JAVAX_SERVLET_VERSION:      2.5-20110124
-JAVAX_SERVLET_VERSION_IMPL: 6.1H.8
-JAVAX_SERVLET_URL_PREFIX:   https://oss.sonatype.org/content/groups/jetty/org/mortbay/jetty/servlet-api/
-
-JAVAX_SERVLET_JAR_NAME:     servlet-api-${JAVAX_SERVLET_VERSION}.jar
-JAVAX_SERVLET_URL:          ${JAVAX_SERVLET_URL_PREFIX}/${JAVAX_SERVLET_VERSION}/${JAVAX_SERVLET_JAR_NAME}
-
-#-----------------------------------------------------------
-# location of Eclipse SWT
-#-----------------------------------------------------------
-
-SWT_VERSION_MAJOR: 3.6
-SWT_VERSION:       ${SWT_VERSION_MAJOR}-201006080911
-SWT_URL_PREFIX:    http://archive.eclipse.org/eclipse/downloads/drops/R-${SWT_VERSION}
-
-#-----------------------------------------------------------
-# location of CoffeeScript
+# version of CoffeeScript
 #-----------------------------------------------------------
 
 COFFEESCRIPT_VERSION:    1.1.2
-
-#-----------------------------------------------------------
-# location of json2
-#-----------------------------------------------------------
-
-JSON2_VERSION:    8e0b15cb492f63067a88ad786e4d5fc0fa89a241
-JSON2_URL_PREFIX: https://github.com/douglascrockford/JSON-js/raw/${JSON2_VERSION}
-
-#-----------------------------------------------------------
-# location of modjewel
-#-----------------------------------------------------------
-
-MODJEWEL_VERSION:    48f3eb797850e5ab3e2132b19a1db4797559efe7
-MODJEWEL_URL_PREFIX: https://github.com/pmuellr/modjewel/raw/${MODJEWEL_VERSION}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/node_modules/.bin/cake
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/node_modules/.bin/cake b/weinre.build/vendor/node_modules/.bin/cake
new file mode 120000
index 0000000..d95f32a
--- /dev/null
+++ b/weinre.build/vendor/node_modules/.bin/cake
@@ -0,0 +1 @@
+../coffee-script/bin/cake
\ No newline at end of file


Mime
View raw message