forked from ratpack/ratpack
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged pull request #12 from trashhalo/master.
Build distribution task
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env groovy | ||
def loader = this.class.classLoader.rootLoader | ||
def jardir = new File(new File(getClass().protectionDomain.codeSource.location.path).parentFile.parentFile,'lib') | ||
def jars = jardir.listFiles().findAll { it.name.endsWith('.jar') } | ||
jars.each { loader.addURL(it.toURI().toURL()) } | ||
|
||
def scriptFile = new File(args[0]) | ||
|
||
Class.forName('com.bleedingwolf.ratpack.RatpackRunner').newInstance().run(scriptFile) |