Skip to content

Instantly share code, notes, and snippets.

@mkristian
mkristian / gist:e1b5d3435da0ad14e3becc8f88d06739
Created September 29, 2016 07:10
doppelte plz-ka paare
@@ -140,7 +140,7 @@
1458;1.32
1459;2.39
1462;2.39
-1465;1.32
+1465;2.39
1466;1.32
1468;1.32
1469;1.32
@@ -166,7 +166,7 @@
@mkristian
mkristian / pom-compass.xml
Last active August 2, 2016 14:28
using gem-maven-plugin to compass compile or execute sass. sass with gem dependency within plugin and compass with global compile dependency (which is also added to the java-classpath and not so nice)
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>example</artifactId>
<version>0.0.36</version>
source 'https://rubygems.org'
gem 'json', '1.8.3'
gem 'warbler', :group => 'development'
packaging :jrubyJar
gemfile
jarfile
# fixes some weird dependency problem
jar 'log4j:log4j:1.2.17'
resource :includes => ['myscript.rb']
@mkristian
mkristian / app.rb
Created March 15, 2016 14:46
jruby library with embeded ruby and embedded gems and jar dependencies for the ruby application
# loads embedded jars
require 'jars/setup'
org.slf4j.LoggerFactory.getLogger('ROOT').info("require colorize: #{require 'colorize'}" )
LoadError: load error: jopenssl/load -- java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/jruby/ext/openssl/SecurityHelper.verify(Ljava/security/cert/X509CRL;Ljava/security/PublicKey;Z)Z @206: invokevirtual
Reason:
Type 'org/bouncycastle/crypto/params/DSAPublicKeyParameters' (current frame, stack[1]) is not assignable to 'org/bouncycastle/crypto/params/AsymmetricKeyParameter'
Current Frame:
bci: @206
flags: { }
locals: { 'java/security/cert/X509CRL', 'java/security/PublicKey', integer, 'org/bouncycastle/operator/DefaultDigestAlgorithmIdentifierFinder', top, 'java/math/BigInteger', 'java/security/interfaces/DSAParams', 'org/bouncycastle/crypto/params/DSAParameters', 'org/bouncycastle/crypto/params/DSAPublicKeyParameters' }
@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
@mkristian
mkristian / gist:7115475
Created October 23, 2013 09:31
resty gwt - resource with query
Resource resource = new Resource(GWT.getModuleBaseURL(), new HashMap<String, String>());
resource = resource.addQueryParam("includeparam", "false");
try
{
resource.get().send( new RequestCallback() {
@Override
public void onResponseReceived( Request request, Response response )
{
// TODO Auto-generated method stub
@mkristian
mkristian / Mavenfile
Last active December 23, 2015 23:59
Mavenfile to use warbler to create the war file and replaces the maven artifact with that. the pom.xml is equivalent to the Mavenfile which got genreated by ruby-maven/tesla. This is a maven-like approach where are gems are declared as maven gem artifacts and maven installs the locally and executes warbler on the project specific gem-set. NOTE: …
gemfile
#parent 'parent.group:parent_artifact_id', '1.0'
#group_id 'my.group'
#artifact_id 'my_webapp'
#version '1.0.0'
# we want a war file
packaging :war