Stephen on Software aka SOS

June 23, 2009

Ivy Problems

Filed under: Uncategorized — Tags: — sljm @ 9:55 pm

My build server using Cruise Control and Ivy to manage project dependencies encountered an error today. Our original Project (lets call it WEB) only had one dependency call DB, so we used IVY to managed the dependency.  Now WEB depends on another new library called FILE, and i started seeing errors  like “impossible to publish artifacts …. ivy destination already exists” whenever i publish a new version.

Our ivy settings file was like this.

<ivysettings>
  <settings defaultResolver="libraries"/>
  <resolvers>
    <filesystem name="libraries">
      <artifact pattern="D:/ivyrepository/libs/[artifact]/[artifact]-[revision].[ext]" />
    </filesystem>
  </resolvers>
</ivysettings>

The reason is that both FILE and DB are writing ivy.xml files to the same directory,D:/ivyrepository/libs/ivy. Seems like you need to seperate the ivy files for both modules into different directory.

I changed the settings file to below, note the new “<ivy pattern=” part, it now puts the respective ivy files in the correct directory under each module.

<ivysettings>
  <settings defaultResolver="libraries"/>
  <resolvers>
    <filesystem name="libraries">
	  <ivy pattern="D:/ivyrepository/libs/[module]/ivy/ivy-[revision].xml"/>
      <artifact pattern="D:/ivyrepository/libs/[artifact]/[artifact]-[revision].[ext]" />
    </filesystem>
  </resolvers>
</ivysettings>

Hope this helps those who are setting up their own private ivy repository.

June 10, 2009

Cross Domain boundaries – Silverlight

Filed under: Programming — Tags: — sljm @ 4:16 pm

Found this page on MSDN that shows you what you need to do to allow cross domain calls from Silverlight.

Probably will do a post on what I think about Silverlight in a few more weeks. Aim would be try to have a feel of how Silverlight, ASP.NET type of application would contrast with a Ajax (Ext.JS) frontend and Spring MVC kind of application.

Links:
Making a service available across Domain Boundaries

June 8, 2009

Installing Silverlight tools offline

Filed under: Tips — Tags: — sljm @ 9:14 am

Was trying to install Silverlight tools at work, but my development machine has no internet connection and silverlight_tools.exe just wont install. It seems like it was trying to download something which I later found out was the silverlight developer runtime.

Even if you already installed the developer runtime separately the installation will still attempt to download the latest version of it. Found this page from Tim Heur which documents how to install silverlight offline.

I personally think that Microsoft’s approach to distributing the Silverlight tools is wrong. It just makes it difficult for people to work. They should just bundle one copy of the developer runtime in and save a lot of people some time trying to google for the answer.

Links
Installing Silverlight offline

June 3, 2009

Hashmaps and JSTL

Filed under: Programming — Tags: , — sljm @ 2:43 pm

Learnt a few things about how to use HashMaps in JSTL.

To access a hashmap with a key in JSTL.

${map.key} or ${map[key]}

If your key is from some other variable or you need to set the key dynamically

//Create a variable call keyName and set the value to something
<c:set var="keyName" value="${someObject.id}"/>
<c:out value="${map[keyName].id}/>

June 1, 2009

SLIME, SBCL and Windows

Filed under: Programming, Tips — Tags: , — sljm @ 10:08 am

I was having lots of problems setting up SBCL 1.0.22 and the latest SLIME CVS in Emacs 22.3.1. I had lots of help from the SLIME mailing list and this is my final .emacs files.

I am assuming that you have installed/unzip everything into a directory called c:\lisp on your system. WIth SLIME in c:\lisp\slime and SBCL in c:\lisp\sbcl.

(add-to-list ‘load-path “C:/lisp/slime”);Your slime directory
(setq inferior-lisp-program “sbcl -core c:/list/sbcl/sbcl.core”); your lisp system
(require ’slime)
(eval-after-load “slime” (slime-setup ‘(slime-repl))) ;This is different from the documentation

Blog at WordPress.com.