Last active
December 20, 2015 08:49
-
-
Save akiellor/6102781 to your computer and use it in GitHub Desktop.
Maven + JRuby + Pry Example
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
package com.example.pry; | |
import org.jruby.embed.ScriptingContainer; | |
public class Main { | |
public static void main(String... args){ | |
ScriptingContainer container = new ScriptingContainer(); | |
container.runScriptlet("require 'pry'; binding.pry"); | |
} | |
} |
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
<project> | |
<!-- .... --> | |
<repositories> | |
<repository> | |
<id>gemjars</id> | |
<url>http://deux.gemjars.org</url> | |
</repository> | |
</repositories> | |
<dependencies> | |
<dependency> | |
<groupId>org.jruby</groupId> | |
<artifactId>jruby-complete</artifactId> | |
<version>1.7.4</version> | |
<scope>compile</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.rubygems</groupId> | |
<artifactId>pry</artifactId> | |
<version>0.9.12.2</version> | |
<scope>compile</scope> | |
</dependency> | |
</dependencies> | |
<!-- ... --> | |
</project> |
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
<?xml version="1.0"?> | |
<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/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example.pry</groupId> | |
<artifactId>pry</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>pry</name> | |
</project> |
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
<project> | |
<!-- ... --> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>2.3.2</version> | |
<configuration> | |
<source>1.6</source> | |
<target>1.6</target> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>1.4</version> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
<configuration> | |
<shadedArtifactAttached>true</shadedArtifactAttached> | |
<transformers> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | |
<mainClass>com.example.pry.Main</mainClass> | |
</transformer> | |
</transformers> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<!-- ... --> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment