Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't shade jruby/jython/groovy artifacts - only for native packages …
- Loading branch information
1 parent
a528334
commit 6e57b38
Showing
12 changed files
with
25 additions
and
26 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1 @@ | |||
cucumber-groovy.jar | cucumber-groovy-shaded.jar | ||
|
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1,4 @@ | |||
scriptDir = new File(getClass().protectionDomain.codeSource.location.path).getParent(); | #!/usr/bin/env groovy | ||
if (this.class.classLoader.rootLoader) this.class.classLoader.rootLoader.addURL(new File(scriptDir, "cucumber-groovy.jar").toURL()) | __directory = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath()).getParent(); | ||
this.class.classLoader.loadClass("cucumber.api.cli.Main").main(args) | this.class.classLoader.addURL(new File(__directory, "cucumber-groovy-shaded.jar").toURL()) | ||
this.class.classLoader.loadClass("cucumber.api.cli.Main").main(args) |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,10 @@ | |||
#!/usr/bin/env jruby | #!/usr/bin/env jruby | ||
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib') | $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib') | ||
|
|
||
require 'cucumber-jruby.jar' | require 'cucumber-jruby-shaded.jar' | ||
|
|
||
begin | begin | ||
Java::CucumberApiCli::Main.main(ARGV) | Java::CucumberApiCli::Main.main(ARGV) | ||
rescue NativeException => e | rescue NativeException => e | ||
e.cause.printStackTrace | e.cause.printStackTrace | ||
end | end |
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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1 @@ | |||
cucumber-jython.jar | cucumber-jython-shaded.jar | ||
|
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,20 +1,15 @@ | |||
#!/usr/bin/env jython | #!/usr/bin/env jython | ||
import sys, inspect, os | import sys, inspect, os | ||
|
|
||
cucumber_jython_path = os.path.dirname(inspect.getfile(inspect.currentframe())) + "/cucumber-jython.jar" | cucumber_jython_shaded_path = os.path.dirname(inspect.getfile(inspect.currentframe())) + "/cucumber-jython-shaded.jar" | ||
sys.path.append(cucumber_jython_path) | sys.path.append(cucumber_jython_shaded_path) | ||
|
|
||
from java.io import File | from java.io import File | ||
from java.net import URLClassLoader | from java.net import URLClassLoader | ||
from cucumber.api.cli import Main | from cucumber.api.cli import Main | ||
from cucumber.runtime import Runtime | from cucumber.runtime import Runtime | ||
from cucumber.runtime.jython import JythonBackend | from cucumber.runtime.jython import JythonBackend | ||
|
|
||
cl = URLClassLoader([File(cucumber_jython_path).toURL()], Main.getClassLoader()) | cl = URLClassLoader([File(cucumber_jython_shaded_path).toURL()], Main.getClassLoader()) | ||
|
|||
def createRuntime(resourceLoader, gluePaths, classLoader, dryRun): | |||
# TODO - pass in current jython runtime - PythonInterpreter | |||
jythonBackend = JythonBackend(resourceLoader) | |||
return Runtime(resourceLoader, gluePaths, classLoader, [jythonBackend], dryRun) | |||
|
|
||
Main.run(sys.argv[1:], cl) | Main.run(sys.argv[1:], cl) |
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