Skip to content

Instantly share code, notes, and snippets.

@mkristian
mkristian / gist:1c59196ae9b442046d62
Last active August 29, 2015 14:18
ruby dsl blog2

Ruby DSL with Maven

first create a file .mvn/extensions.xml

<?xml version="1.0" encoding="UTF-8"?>
<extensions>
  <extension>
    <groupId>io.takari.polyglot</groupId>
    <artifactId>polyglot-ruby</artifactId>

0.1.7

diff --git a/testsuite/modern-testsuite/src/test/java/org/sonatype/nexus/testsuite/ruby/GemLifecycleIT.java b/testsuite/modern-testsuite/src/test/java/org/sonatype/nexus/testsuite/ruby/GemLifecycleIT.java
index f0128e7..c644193 100644
--- a/testsuite/modern-testsuite/src/test/java/org/sonatype/nexus/testsuite/ruby/GemLifecycleIT.java
+++ b/testsuite/modern-testsuite/src/test/java/org/sonatype/nexus/testsuite/ruby/GemLifecycleIT.java
@@ -70,7 +70,7 @@ public class GemLifecycleIT
assertGem(repoId, nexusGem.getName());
// now we have one remote gem
- gemRunner().clearCache();
+ cleanup();
@mkristian
mkristian / gist:c74968d4298547f27a8c
Created November 25, 2014 10:13
nexus wrapper.log
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2014-11-25 10:04:57,667+0000 INFO [WrapperListener_start_runner] *SYSTEM org.sonatype.nexus.bootstrap.jsw.JswLauncher - Starting with arguments: [./conf/jetty.xml, ./conf/jetty-requestlog.xml]
jvm 1 | 2014-11-25 10:04:57,680+0000 INFO [WrapperListener_start_runner] *SYSTEM org.sonatype.nexus.bootstrap.jsw.JswLauncher - JVM ID: 1, JVM PID: 26698, Wrapper PID: 26696, User: christian
jvm 1 | 2014-11-25 10:04:57,709+0000 INFO [WrapperListener_start_runner] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - Properties:
jvm 1 | 2014-11-25 10:04:57,710+0000 INFO [WrapperListener_start_runner] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-conf='/home/christian/projects/active/sonatype/nexus-ruby-support/nexus-ruby-plugin-its/target
@mkristian
mkristian / example.gemspec
Last active August 29, 2015 14:08
gem build example.gemspec
#-*- mode: ruby -*-
Gem::Specification.new do |s|
s.name = 'example'
s.version = "2.0.0"
s.author = 'example person'
s.email = [ 'mail@example.com' ]
s.summary = 'example'
# s.files << Dir[ '*file' ]
---
:sources:
- http://localhost:8081/nexus/content/repositories/gemsproxy/
- http://localhost:8081/nexus/content/repositories/gemshosted/
@mkristian
mkristian / gist:c416de119d8b3a4bab99
Created August 22, 2014 10:11
jetty scanning probelm with truffle-0.4.jar
[INFO] MultiException[java.lang.RuntimeException: Error scanning entry com/oracle/nfi/NativeFunctionInterfaceRuntime.class from jar file:/home/travis/build/jruby/jruby/maven/jruby/target/local-repo/com/oracle/truffle/0.4/truffle-0.4.jar, java.lang.RuntimeException: Error scanning entry com/oracle/nfi/api/NativeLibraryHandle.class from jar file:/home/travis/build/jruby/jruby/maven/jruby/target/local-repo/com/oracle/truffle/0.4/truffle-0.4.jar, java.lang.RuntimeException: Error scanning entry com/oracle/nfi/api/NativeFunctionInterface.class from jar file:/home/travis/build/jruby/jruby/maven/jruby/target/local-repo/com/oracle/truffle/0.4/truffle-0.4.jar, java.lang.RuntimeException: Error scanning entry com/oracle/nfi/api/NativeFunctionPointer.class from jar file:/home/travis/build/jruby/jruby/maven/jruby/target/local-repo/com/oracle/truffle/0.4/truffle-0.4.jar, java.lang.RuntimeException: Error scanning entry com/oracle/nfi/api/NativeFunctionHandle.class from jar file:/home/travis/build/jruby/jruby/maven/jruby/t
@mkristian
mkristian / test_classpath.rb
Last active August 29, 2015 13:57
installed gems are jruby-openssl-0.9.4.gem and bouncy-castle-java-1.5.0147.gem in /work/rubygems
gem 'jruby-openssl'
require 'openssl'
puts "JRuby version: #{JRUBY_VERSION}"
puts
puts 'Class path:'
$CLASSPATH.each{|path| puts path}
puts
puts "Loaded gems:"
@mkristian
mkristian / test_classpath.rb
Last active August 29, 2015 13:57
installed gems are jruby-openssl-0.9.4.gem and bouncy-castle-java-1.5.0147.gem in /work/rubygems
require 'openssl'
puts "JRuby version: #{JRUBY_VERSION}"
puts
puts 'Class path:'
$CLASSPATH.each{|path| puts path}
puts
puts "Loaded gems:"
Gem.loaded_specs.each do |k,v|
@mkristian
mkristian / Gemfile
Last active January 3, 2016 20:59
building vtd_xml with ruby-maven
source 'https://rubygems.org'
# Specify your gem's dependencies in vtd-xml.gemspec
gemspec
# needed to build the gem but fails when it is part of the gems
gem "ruby-maven", '~> 3.1.1.0'
@mkristian
mkristian / gist:7680803
Created November 27, 2013 18:32
embedded maven launched with jruby
[main] WARN org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver - Failed to retrieve plugin descriptor for de.saumya.mojo:jruby-maven-plugin:${version.jruby-maven-plugins}: Plugin de.saumya.mojo:jruby-maven-plugin:${version.jruby-maven-plugins} or one of its dependencies could not be resolved: Failed to read artifact descriptor for de.saumya.mojo:jruby-maven-plugin:jar:${version.jruby-maven-plugins}
Downloading: http://localhost:8181/nexus/content/repositories/central/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://localhost:8181/nexus/content/repositories/central/org/codehaus/mojo/maven-metadata.xml
[WARNING] Checksum validation failed, expected 3f41698a3e7488a90fa617bbb154f7a8e179a286 but is aea03ca2346d203601e09d3ef7f36d55788f4960 for http://localhost:8181/nexus/content/repositories/central/org/codehaus/mojo/maven-metadata.xml
[WARNING] Checksum validation failed, expected 1bc5dd85f20630f722793529a4e82f82c5e6dcc4 but is 81878905c5467b20cb377f2e0e24ca7dbfa5ac57 for http://loc