Skip to content

Instantly share code, notes, and snippets.

@mkristian
mkristian / gist:1226056
Created September 19, 2011 06:32
for tesla
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 3b2e993..5b18af2 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -138,8 +138,10 @@
<artifact>org.sonatype.gossip:gossip-core</artifact>
<artifact>org.sonatype.gossip:gossip-slf4j</artifact>
<artifact>org.slf4j:slf4j-api</artifact>
+<!--
<artifact>org.eclipse.tesla:tesla-snapshot-purger</artifact>
@mkristian
mkristian / Error compiling asset application.js
Created June 10, 2011 12:59
rails-3.1.0.rcX with jruby
[INFO] Error compiling asset application.js:
[INFO] NameError: uninitialized constant JavaLang
[INFO] (in /home/kristian/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/javascripts/users.js.coffee)
[INFO] Served asset /application.js - 500 Internal Server Error
$ mvn gem:exec -Dgem.supportNative=true -Dexec.script='p require "rubygems"; p require "typhoeus";p require "typhoeus/native";' -Djruby.verbose
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building typhoeus-test 0.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gem-maven-plugin:0.27.1-SNAPSHOT:exec (default-cli) @ typhoeus-test >>>
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ typhoeus-test ---
jvm 1 | 2011-04-27 20:11:02 WARN [@qtp-12318634-0] - o.s.g.b.r.NamedClass - Error injecting: org.sonatype.nexus.plugins.ruby.shadow.Maven2RubyGemShadowRepository
jvm 1 | com.google.inject.ProvisionException: Guice provision errors:
jvm 1 |
jvm 1 | 1) No implementation for org.codehaus.plexus.PlexusContainer was bound.
jvm 1 | at ClassRealm[org.sonatype.nexus.plugins:nexus-ruby-plugin:1.0.0-SNAPSHOT, parent: ClassRealm[plexus.core, parent: null]]
jvm 1 | while locating org.sonatype.nexus.plugins.ruby.shadow.Maven2RubyGemShadowRepositoryConfigurator
jvm 1 | while locating org.sonatype.nexus.plugins.ruby.shadow.Maven2RubyGemShadowRepository
jvm 1 |
jvm 1 | 1 error
jvm 1 | at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:977)
@mkristian
mkristian / config_initializers_test.rb
Created April 26, 2011 06:27
rails with jar deps on classpath
require 'java'
logger = org.slf4j.LoggerFactory.getLogger("world")
logger.info("hello")
require 'rubygems'
require 'dm-core'
require 'dm-migrations'
require 'dm-sqlite-adapter'
class T
include DataMapper::Resource
property :id, Serial
$ mvn de.saumya.mojo:gemify-maven-plugin:0.26.0-SNAPSHOT:gemify -Dgemify.gemname=mvn:de.saumya.mojo:jruby-maven-plugin -Dgemify.version=0.12.0
$ jruby -S gem install -l target/*.gem --ignore-dependencies
Successfully installed mvn:ant:ant-1.6.2-java
. . .
Successfully installed mvn:xml-apis:xml-apis-1.3.03-java
59 gems installed
$ jruby -S gem install -l target/*.gem
Successfully installed mvn:ant:ant-1.6.2-java
package tk.mkristian;
import org.jruby.embed.ScriptingContainer;
/**
* Hello world!
*
*/
public class App
{
@mkristian
mkristian / PizzaController.java
Created January 17, 2011 20:48
PizzaControllerNG.java
@Path("/pizzas")
public interface PizzaController extends RestService {
@GET
void index(MethodCallback<List<Pizza>> callback);
@GET @Path("/{id}")
void show(@PathParam("id") int id, MethodCallback<Pizza> callback);
@POST
require 'rubygems'
require 'dm-core'
require 'dm-sqlite-adapter'
class A
include DataMapper::Resource