Skip to content

Instantly share code, notes, and snippets.

naaman / gist:1053217
Created Jun 29, 2011
Hot Swapping With Maven, Jetty and IntelliJ
View gist:1053217

Hot Swapping With Maven, Jetty and IntelliJ

Based on Configuring Jetty, Maven, and Eclipse together with Hot Swap

I've always been a bit jealous when it comes to the Play! framework and the great dev mode they have for hot swapping classes at runtime. Jetty has a configuration setting, scanIntervalSeconds, that mimics this when working with a more traditional WAR, but does so by looking for changes to a file and restarting the server.

Fortunately, Jetty also provides the ability to rapidly test code with hot swapping. No more server restarts. The trick to getting hot swapping to work is to attach a remote debugger to your Jetty process. The following instructions outline how to do this in IntelliJ (tested with IDEA 10.5 CE).

Modify your jetty-maven-plugin to ignore the scan interval

  1. Open your pom and locate the plugins section
naaman /
Last active Mar 5, 2021
[WARNING THIS WILL HARD DELETE YOUR APPS. YOU COULD LOSE DATA. MAKE SURE YOU KNOW WHAT YOURE DOING!!!!!!!!!!] Delete all heroku apps from bash terminal -- no script file required
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done
naaman / .gitignore
Created Dec 20, 2011
UTF-8 Character in Play View
View .gitignore
naaman /
Created Feb 21, 2012
UserInfo call
package models;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import javax.xml.bind.annotation.XmlRootElement;
* TODO: Javadoc
naaman /
Created May 11, 2012
Open iTerm2 Pane and Execute a Command
pane() {
local currentDir=$(pwd)
osascript <<EOD
tell application "iTerm"
tell application "System Events" to keystroke "d" using command down
tell current session of current terminal
write text "cd $currentDir"
write text "$@"
end tell
end tell
#!/usr/bin/env bash
mkdir vim
curl --location --silent | tar xz -C vim
export PATH=$PATH:/app/vim/bin

Updated JDK Support

Heroku now offers beta support for OpenJDK 7, as well as an updated version of OpenJDK 6. Support for both JDKs are available in a new buildpack. OpenJDK 6 is still the default, but the version has been increased to u25 from u20 -- changes for u20-u25 can be found on Oracle's changelist blog. OpenJDK 7 can be enabled by configuring your pom.xml. Currently, only maven builds are supported with this update.

This update has no impact on any running applications. If you choose not to use this buildpack, your applications will continue to use OpenJDK 6u20.


~/dev/bb[master] ★ heroku create
Creating shrouded-wave-4655... done, stack is cedar |
Git remote heroku added
~/dev/bb[master] ★ git push heroku master 
Counting objects: 25, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (25/25), 2.83 KiB, done.
public class SecurityListings {
public static void main(String[] args) {
for (Provider provider : Security.getProviders()) {
System.out.println("Provider: " + provider.getName());
for (Provider.Service service : provider.getServices()) {
System.out.println(" Algorithm: " + service.getAlgorithm());
naaman / gist:4993390
Created Feb 20, 2013
jdk dyno scratch
View gist:4993390
1 ls -lah
2 curl -O
3 tar xvzf icedtea-2.1.5.tar.gz
4 cd icedtea-2.1.5
5 ./configure --with-parallel-jobs=2 --disable-docs --disable-bootstrap --with-jdk-home=/usr/lib/jvm/java-6-openjdk
6 cd ..
7 curl -O
8 tar xf apache-ant-1.8.4-bin.tar.gz
9 ls -lah
10 ls -lah apache-ant-1.8.4