Skip to content

Instantly share code, notes, and snippets.

@leandrosilva
Created March 3, 2011 17:44
Show Gist options
  • Select an option

  • Save leandrosilva/853164 to your computer and use it in GitHub Desktop.

Select an option

Save leandrosilva/853164 to your computer and use it in GitHub Desktop.
Ivy and Iron Hammer on Mac OS X
To use Ivy and Iron Hammer on Mac OS X follow these steps:
1. Download and extract Ivy to /opt/ivy (or other place you want)
2. Clone my fork of IronHammer repository at Github:
$ git clone https://github.com/leandrosilva/Iron-Hammer.git
3. Create a .settings directory (or some other name you prefer) with a layout like this:
.settings
|
-- iron_hammer
| |
| -- rakefile.rb
| -- setup.sh
|
-- ivy
|
-- ivysettings.xml
WARNING: you need to get related files from here (this gist!) and customize with your environment
"real paths".
4. Create an iron_hammerizer alias on your .bash_profile (or some other place you prefer):
alias iron_hammerizer="source /Users/YOU_GUY/.settings/iron_hammer/setup.sh"
5. Put /opt/ivy/lib/jsch-0.1.31.jar in JVM endorsed libraries directory (I suggest a symbolic link)
$ sudo ln -s /opt/ivy/lib/jsch-0.1.31.jar jsch-0.1.31.jar
6. Enable it:
$ iron_hammerizer
Yay! Now your environment is ready to make use of Ivy and Iron Hammer. But, sure, I don't know if
it's a big deal.
<ivysettings>
<settings defaultResolver="default" />
<caches defaultCacheDir="/Users/YOU_GUY/.settings/ivy/cache"/>
<resolvers>
<ssh userPassword="user" name="default">
<ivy pattern="ssh://user:user@SERVER_IP/home/user/.ivy/Repository/[organisation]/[module]/ivys/ivy-[revision].xml"/>
<artifact pattern="ssh://user:user@SERVER_IP/home/user/.ivy/Repository/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</ssh>
</resolvers>
</ivysettings>
require 'rubygems'
require 'iron_hammer/tasks'
#!/bin/sh
#
# Iron Hammer
#
rvm ree@iron_hammer
IRON_HAMMER_HOME=/Users/YOU_GUY/.settings/iron_hammer
export IRON_HAMMER_HOME
#
# Ivy
#
# Organisation
IVY_ORGANISATION=Locaweb
export IVY_ORGANISATION
# Ivy
IVY_PATH=/opt/ivy
IVY_JAR=$IVY_PATH/ivy-2.2.0.jar
IVY_CLASSPATH=$IVY_JAR
# Dependencies
IVY_LIB_PATH=$IVY_PATH/lib
IVY_CLASSPATH=$IVY_CLASSPATH:$IVY_LIB_PATH/commons-codec-1.2.jar
IVY_CLASSPATH=$IVY_CLASSPATH:$IVY_LIB_PATH/commons-httpclient-3.0.jar
IVY_CLASSPATH=$IVY_CLASSPATH:$IVY_LIB_PATH/commons-logging-1.0.4.jar
IVY_CLASSPATH=$IVY_CLASSPATH:$IVY_LIB_PATH/commons-vfs-1.0.jar
IVY_CLASSPATH=$IVY_CLASSPATH:$IVY_LIB_PATH/jsch-0.1.31.jar
IVY_CLASSPATH=$IVY_CLASSPATH:$IVY_LIB_PATH/oro-2.0.8.jar
CLASSPATH=.
CLASSPATH=$CLASSPATH:$IVY_CLASSPATH
export CLASSPATH IVY_PATH IVY_JAR
# Settings
IVY_SETTINGS=/Users/YOU_GUY/.settings/ivy/ivysettings.xml
export IVY_SETTINGS
#
# Verbose
#
if [ "$1" = "--verbose" ]; then
echo
echo :: Iron Hammer settings ::
echo
echo IRON_HAMMER_HOME = $IRON_HAMMER_HOME
echo RVM_GEMSET = `rvm gemset dir`
echo
echo :: Ivy settings ::
echo
echo IVY_ORGANISATION = $IVY_ORGANISATION
echo IVY_PATH = $IVY_PATH
echo IVY_JAR = $IVY_JAR
echo IVY_LIB_PATH = $IVY_LIB_PATH
echo IVY_CLASSPATH = $IVY_CLASSPATH
echo
echo CLASSPATH = $CLASSPATH
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment