On 28/03/2011 23:43, Martin Hawksey wrote:
I'm new to the list so apologies if I'm doing this all wrong. I was
interested to see if I could run a wookie server from a usb stick (thought
this would be useful for dissemination/workshops etc).

Hi Martin,

Thanks for bringing this to the list where the community can see it and we can talk properly (Martin and I had a brief exchange about this via Twitter).

It would be brilliant if you can do this. As it happens I'm working on a VirtualBox image of a development environment right now. I also thought about a virtualBox image of a server too.

Having it on a stick would be even better since there would be no need to install anything. The disadvantage would be that it will only run on the platform it's built for (I assume), but that's not the end of the world. It at least provides options.

Here's the basic recipe I'm using

Downloading ant 1.7.1 and extracting to usb drive root e.g. f:\ant

Downloading wookie extracting to usb drive root e.g. f:\wookie

What do you mean "downloaded and extracted"? We don't have any binaries yet. There is a release candidate - do you mean that?

I'd suggest it would make more sense to checkout from SVN if you intend this to be useful in workshops. We will want people working with the latest code so that they can show them ow to submit patches.

Furthermore, as you will read below, I had to make a change to the code to solve the issue with IVY.

Copying a version of my local JAVA JDK to usb drive root f:\Java



In ant.bat adding:

set pathDrive=%cd:~0,2%

set JAVA_HOME=%pathDrive%\Java



after

:checkJava

set _JAVACMD=%JAVACMD%



And creating a .bat file in [wookie] with:

@echo off

set pathDrive=%cd:~0,2%

cd %pathDrive%\ant\bin

call ant.bat -buildfile %pathDrive%\wookie\build.xml run





This all appears to work fine except in compile I noticed that ivy is been
written to c: (see snippet below).  I'm not familiar enough with ant/ivy to
know if/where the destination path can be changed. Also I'm not familiar
enough with wookie to tell if really is running portably.

Ivy is downloaded and installed by ant. It is stored in a location relative to an ant property called "ivy.home" which is set to ${user.home}/.ant in the /ant/ivy-common.xml

I just committed a change that allows this value to be overridden.

You need to either pass the following command line switch to the ant script:

-Divy.home=%pathDrive%\ivy

This will then use your pendrive as the home for Ivy. Note that all dependencies will be checked out to the pendrive as well. This is a good thing as it means we won't need network connection to run Wookie from the stick.

I therefore suggest you also add the following property to prevent Ivy looking for updates:

-Doffline=true

Welcome any feedback. Does the recipe work?

I don't know how the pendrive thing works, so no comment on your approach. The easiest way to test it is simply point your browser at http://localhost:8080/wookie and play around with some of the widgets in the widget gallery (the first link on the home page).

They should all work.

Ross

Is it possible to configure ivy
to be written on the stick? And any suggestions on if/how to take this
forward



Regards,

Martin

For info I'm testing on Win7 32bit



[snippet]

download-ivy:

       [get] Getting:
<http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0-rc2/>
http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0-rc2/

ivy-2.1.0-rc2.jar

       [get] To: C:\Users\MartinHa\.ant\lib\ivy.jar

       [get] Not modified - so not downloaded





Reply via email to