Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Build System: libraries upgrade

  • Loading branch information...
commit 1a447ebf6b3830d0e7e19d3845285e0a22843ecf 1 parent cbf5e41
@eskatos eskatos authored
View
82 core/runtime/src/test/java/org/qi4j/test/ASMTest.java
@@ -14,88 +14,42 @@
package org.qi4j.test;
+import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
+import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
-import org.objectweb.asm.util.ASMifierClassVisitor;
+import org.objectweb.asm.util.ASMifier;
+import org.objectweb.asm.util.TraceClassVisitor;
import org.qi4j.api.composite.CompositeInvoker;
import org.qi4j.runtime.composite.FragmentClassLoader;
+import org.qi4j.runtime.composite.QI256Test;
-import static org.objectweb.asm.Opcodes.AASTORE;
-import static org.objectweb.asm.Opcodes.ACC_PRIVATE;
-import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
-import static org.objectweb.asm.Opcodes.ACC_STATIC;
-import static org.objectweb.asm.Opcodes.ACC_SUPER;
-import static org.objectweb.asm.Opcodes.ACONST_NULL;
-import static org.objectweb.asm.Opcodes.ALOAD;
-import static org.objectweb.asm.Opcodes.ANEWARRAY;
-import static org.objectweb.asm.Opcodes.ARETURN;
-import static org.objectweb.asm.Opcodes.ASTORE;
-import static org.objectweb.asm.Opcodes.ATHROW;
-import static org.objectweb.asm.Opcodes.BIPUSH;
-import static org.objectweb.asm.Opcodes.CHECKCAST;
-import static org.objectweb.asm.Opcodes.DLOAD;
-import static org.objectweb.asm.Opcodes.DUP;
-import static org.objectweb.asm.Opcodes.FLOAD;
-import static org.objectweb.asm.Opcodes.GETFIELD;
-import static org.objectweb.asm.Opcodes.GETSTATIC;
-import static org.objectweb.asm.Opcodes.GOTO;
-import static org.objectweb.asm.Opcodes.ICONST_0;
-import static org.objectweb.asm.Opcodes.ICONST_1;
-import static org.objectweb.asm.Opcodes.ICONST_2;
-import static org.objectweb.asm.Opcodes.ICONST_3;
-import static org.objectweb.asm.Opcodes.ICONST_4;
-import static org.objectweb.asm.Opcodes.ICONST_5;
-import static org.objectweb.asm.Opcodes.ILOAD;
-import static org.objectweb.asm.Opcodes.INVOKEINTERFACE;
-import static org.objectweb.asm.Opcodes.INVOKESPECIAL;
-import static org.objectweb.asm.Opcodes.INVOKESTATIC;
-import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL;
-import static org.objectweb.asm.Opcodes.IRETURN;
-import static org.objectweb.asm.Opcodes.LLOAD;
-import static org.objectweb.asm.Opcodes.NEW;
-import static org.objectweb.asm.Opcodes.POP;
-import static org.objectweb.asm.Opcodes.PUTSTATIC;
-import static org.objectweb.asm.Opcodes.RETURN;
-import static org.objectweb.asm.Opcodes.V1_6;
+import static org.objectweb.asm.Opcodes.*;
-/**
- * JAVADOC
- */
public class ASMTest
{
@Test
public void generateASM()
throws Exception
{
- ASMifierClassVisitor.main( new String[]{ SomeMixin_Stubx.class.getName() } );
+ ASMifier.main( new String[]{ SomeMixin_Stubx.class.getName() } );
}
@Test
-// @Ignore
public void createClass()
throws Exception
{
-/*
- byte[] asm = generateClass();
-
- byte[] cl = FragmentClassLoader.generateClass( QI256Test.TestTransient.TestTransientMixin.class.getName() + "_Stub", QI256Test.TestTransient.TestTransientMixin.class );
-
- ClassReader cr = new ClassReader( cl );
- cr.accept( new ASMifierClassVisitor( new PrintWriter( System.out, true ) ),
- ASMifierClassVisitor.getDefaultAttributes(),
- 0 );
-*/
-
- // Assert.assertArrayEquals( asm, cl );
FragmentClassLoader classLoader = new FragmentClassLoader( SomeMixin.class.getClassLoader() );
@@ -188,9 +142,23 @@ public Object invokeComposite( Method method, Object[] args )
System.out.println( instance.testConcern() );
}
- // This is the code generated from the manual stub
+ @Test
+ @Ignore( "This was dead commented code, ~70% of this source file ... What should we do about this!?!" )
+ public void fragmentClassLoaderGenerateClassTest()
+ throws Exception
+ {
+ byte[] asm = generateClass();
+ byte[] cl = FragmentClassLoader.generateClass(
+ QI256Test.TestTransient.TestTransientMixin.class.getName() + "_Stub",
+ QI256Test.TestTransient.TestTransientMixin.class );
+
+ new ClassReader( cl ).accept( new TraceClassVisitor( new PrintWriter( System.out, true ) ), 0 );
- public static byte[] generateClass()
+ Assert.assertArrayEquals( asm, cl );
+ }
+
+ // This is the code generated from the manual stub
+ private static byte[] generateClass()
{
ClassWriter cw = new ClassWriter( 0 );
FieldVisitor fv;
View
51 libraries.gradle
@@ -1,5 +1,5 @@
// Versions of Dependencies;
-def asmVersion = '3.3.1'
+def asmVersion = '4.1'
def beanshellVersion = '2.0b4'
def bonecpVersion = '0.7.1.RELEASE'
def bouncyVersion = '1.46'
@@ -11,33 +11,33 @@ def commonsLangVersion = '2.6'
def cxfVersion = '2.5.6' // 2.7.0 - Unable to resolve dependencies!
def derbyVersion = '10.9.1.0'
def dnsJavaVersion = '2.1.1'
-def ehcacheVersion = '2.6.2'
-def elasticsearchVersion = '0.20.1'
+def ehcacheVersion = '2.6.3'
+def elasticsearchVersion = '0.20.5'
def freemarkerVersion = '2.3.19'
-def gaeVersion = '1.7.3'
-def groovyVersion = '2.0.5'
+def gaeVersion = '1.7.5'
+def groovyVersion = '2.1.0'
def guavaVersion = '13.0.1'
-def h2Version = '1.3.168'
-def hazelcastVersion = '2.4'
+def h2Version = '1.3.170'
+def hazelcastVersion = '2.5'
def httpClientVersion = '4.1.3' // 4.2.2 Fails to do HTTP basic auth in tests!
def javascriptVersion = '1.7R4'
def javasqlgeneratorVersion = '0.3.2'
-def jcloudsVersion = '1.5.3'
+def jcloudsVersion = '1.5.7'
def jdbmVersion = '2.0.1'
def jdomVersion = '2.0.2'
def jedisVersion = '2.1.0'
-ext.jettyVersion = '8.1.8.v20121106' // 9.0.0.M2 exists
+ext.jettyVersion = '8.1.9.v20130131' // 9.0.0.M5 exists
def jgoodiesLooksVersion = '2.5.2'
def jodaTimeVersion = '2.1'
-def jrubyVersion = '1.7.0'
+def jrubyVersion = '1.7.2'
def jtaVersion = '1.1'
-def leveldbVersion = '0.4'
-def leveldbJniVersion = '1.4.1'
+def leveldbVersion = '0.5'
+def leveldbJniVersion = '1.6'
def liquibaseVersion = '2.0.5'
def log4jVersion = '1.2.17'
-def logbackVersion = '1.0.7'
-def mongodbVersion = '2.9.3'
-def mysqlVersion = '5.1.21'
+def logbackVersion = '1.0.9'
+def mongodbVersion = '2.10.1'
+def mysqlVersion = '5.1.23'
def neoVersion = '1.3' // 1.8 exists
def neoIndexVersion = '1.3-1.3.M01' // Do not exist anymore!
def orgJsonVersion = '20130213'
@@ -46,9 +46,9 @@ def pdfboxVersion = '1.7.1'
def postgresqlVersion = '9.1-901-1.jdbc4'
def prefuseVersion = '0.21'
def rdfVersion = '2.6.6' // 2.6.9 - Application assembly fails, missing method Repository.isInitalized().
-def restletVersion = '2.0.15'
-def riakVersion = '1.0.6'
-def scalaVersion = '2.9.2'
+def restletVersion = '2.0.15' // HTTP(S) connectors in 2.1.x serie are buggy, see https://github.com/restlet/restlet-framework-java/issues/620
+def riakVersion = '1.0.7'
+def scalaVersion = '2.10.0'
ext.servletVersion = '3.0.1'
def shiroVersion = '1.2.1'
def skedVersion = '1.2'
@@ -57,22 +57,22 @@ def slf4jVersion = '1.7.2'
def solrVersion = "1.4.1" // 4.0.0 - Fails to compile!
def springVersion = '3.1.2.RELEASE'
def sqliteVersion = '3.7.2'
-def strutsVersion = '2.3.7'
+def strutsVersion = '2.3.8'
def velocityVersion = '1.7'
def voldemortVersion = '0.81' // Taken from Clojars maven repository, 0.96 not in any repository?
def wicketVersion = '1.5.8' // 6.3.0 - Samples fails to compile!
def wicketStatelessVersion = '1.5.0'
def woodstoxVersion = '4.1.4'
def wsdl4jVersion = '1.6.2'
-def yammerMetricsVersion = '2.1.5'
+def yammerMetricsVersion = '2.2.0'
def antVersion = '1.8.4'
def junitVersion = '4.11'
def testNgVersion = '6.8'
-def jmockVersion = '2.5.1'
+def jmockVersion = '2.6.0'
def mockitoVersion = '1.9.5'
def easyMockVersion = '3.1'
-def xmlunitVersion = '1.3'
+def xmlunitVersion = '1.4'
// build a map of the dependency artifacts to use. Allows centralized definition of the version of artifacts to
// use. In that respect it serves a role similar to <dependencyManagement> in Maven
@@ -84,9 +84,9 @@ rootProject.ext {
ant_junit: "org.apache.ant:ant-junit:$antVersion",
// ASM
- asm: "asm:asm:$asmVersion",
- asm_util: "asm:asm-util:$asmVersion",
- asm_commons: "asm:asm-commons:$asmVersion",
+ asm: "org.ow2.asm:asm:$asmVersion",
+ asm_util: "org.ow2.asm:asm-util:$asmVersion",
+ asm_commons: "org.ow2.asm:asm-commons:$asmVersion",
// OSGi
osgi_core: "org.osgi:org.osgi.core:$osgiVersion",
@@ -108,6 +108,7 @@ rootProject.ext {
// Restlet
restlet: [
"org.restlet.jee:org.restlet:$restletVersion",
+ "org.restlet.jee:org.restlet.ext.ssl:$restletVersion",
"org.restlet.jee:org.restlet.ext.atom:$restletVersion",
"org.restlet.jee:org.restlet.ext.servlet:$restletVersion",
"org.restlet.jee:org.restlet.ext.slf4j:$restletVersion"
Please sign in to comment.
Something went wrong with that request. Please try again.