Skip to content

Instantly share code, notes, and snippets.

@lamdor
Created October 31, 2009 21:01
Show Gist options
  • Select an option

  • Save lamdor/223243 to your computer and use it in GitHub Desktop.

Select an option

Save lamdor/223243 to your computer and use it in GitHub Desktop.
# Drop this file as ~/.kick/mvn.rb and then run in your mvn directory as "kicker -r mvn"
def mvn(goal="test")
IO.popen "mvn #{goal}" do |io|
while line = io.gets
puts line
end
end
end
process do |files|
files.take_and_map do |file|
case file
when "pom.xml"
mvn
when %r{^src/}
mvn
end
true # needed so kicker doesn't complain that the file wasn't handled
end
end
mvn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment