Skip to content

Instantly share code, notes, and snippets.

@sfilatov
Created March 15, 2012 13:05
Show Gist options
  • Save sfilatov/2044112 to your computer and use it in GitHub Desktop.
Save sfilatov/2044112 to your computer and use it in GitHub Desktop.
Netty example project
require 'buildr'
repositories.remote << 'http://repo2.maven.org/maven2/'
repositories.remote << 'https://repository.jboss.org/nexus/content/repositories/releases/'
define 'helloworld' do
project.group = 'example'
project.version = '1.0-SNAPSHOT'
compile.with "org.jboss.netty:netty:jar:3.2.7.Final"
test.with 'junit:junit:jar:3.8.1'
package :jar
end
# install curl
sudo apt-get install curl
# install rvm
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# reload bash profile
source ~/.bash_profile
# install jruby dependencies
sudo apt-get install g++ ant openjdk-6-jdk openjdk-6-jre-headless
# install jruby
rvm install jruby
# check ruby installed
ruby -v
# install buildr
gem install buildr
# run buildr
cd <project-dir>
ruby -S buildr
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>helloworld</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>helloworld</name>
<repositories>
<repository>
<id>repository.jboss.org</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>3.2.7.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment