From 7cb17e8be115d1c82c6f57aea37595d267c67da4 Mon Sep 17 00:00:00 2001 From: gil Date: Feb 09 2015 19:47:53 +0000 Subject: Update to 1.1 --- diff --git a/.gitignore b/.gitignore index 520cdda..f8e4fba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /commons-jci-1.0-src.tar.gz +/commons-jci-1.1-src.tar.gz diff --git a/apache-commons-jci-1.0-ExtendedDump.patch b/apache-commons-jci-1.0-ExtendedDump.patch deleted file mode 100644 index 9bb8dcb..0000000 --- a/apache-commons-jci-1.0-ExtendedDump.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- core/src/test/java/org/apache/commons/jci/classes/ExtendedDump.java 2007-06-14 22:23:11.000000000 +0200 -+++ core/src/test/java/org/apache/commons/jci/classes/ExtendedDump.java-gil 2009-01-18 19:13:48.000000000 +0100 -@@ -27,7 +27,7 @@ - - public static byte[] dump() throws Exception { - -- ClassWriter cw = new ClassWriter(true); -+ ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - MethodVisitor mv; - - cw.visit(V1_4, ACC_PUBLIC + ACC_SUPER, "jci/Extended", null, "jci/Simple", null); diff --git a/apache-commons-jci-1.0-SimpleDump.patch b/apache-commons-jci-1.0-SimpleDump.patch deleted file mode 100644 index 7891bf4..0000000 --- a/apache-commons-jci-1.0-SimpleDump.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- core/src/test/java/org/apache/commons/jci/classes/SimpleDump.java 2007-06-14 22:23:11.000000000 +0200 -+++ core/src/test/java/org/apache/commons/jci/classes/SimpleDump.java-gil 2012-04-06 22:07:38.417795033 +0200 -@@ -26,7 +26,7 @@ - - public static byte[] dump( final String to ) throws Exception { - -- ClassWriter cw = new ClassWriter(true); -+ ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - MethodVisitor mv; - - cw.visit(V1_4, ACC_PUBLIC + ACC_SUPER, "jci/Simple", null, "java/lang/Object", null); diff --git a/apache-commons-jci-1.0-depmap b/apache-commons-jci-1.0-depmap deleted file mode 100644 index 698a92c..0000000 --- a/apache-commons-jci-1.0-depmap +++ /dev/null @@ -1,26 +0,0 @@ - - - - - org.eclipse.jdt - core - 3.2.0.658 - - - JPP - ecj - 3.3.0-v_771 - - - \ No newline at end of file diff --git a/apache-commons-jci-1.0-ecj4.patch b/apache-commons-jci-1.0-ecj4.patch deleted file mode 100644 index e216fe4..0000000 --- a/apache-commons-jci-1.0-ecj4.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java 2007-06-14 22:23:17.000000000 +0200 -+++ compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java-gil 2012-12-12 06:34:28.805199451 +0100 -@@ -121,6 +121,14 @@ - public char[][] getPackageName() { - return packageName; - } -+ -+ /* (non-Javadoc) -+ * @see org.eclipse.jdt.internal.compiler.env.ICompilationUnit#ignoreOptionalProblems() -+ */ -+ public boolean ignoreOptionalProblems() { -+ // TODO: Auto-generated method stub -+ return false; -+ } - } - - diff --git a/apache-commons-jci-1.0-examples-pom.patch b/apache-commons-jci-1.0-examples-pom.patch deleted file mode 100644 index df2c4bb..0000000 --- a/apache-commons-jci-1.0-examples-pom.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- examples/pom.xml 2007-06-14 22:23:18.000000000 +0200 -+++ examples/pom.xml-gil 2012-12-12 06:20:00.734784769 +0100 -@@ -22,6 +22,7 @@ - org.apache.commons - commons-jci - 1.0 -+ ../pom.xml - - jar - commons-jci-examples -@@ -50,12 +51,12 @@ - 1.0 - - -- javax.servlet -- servlet-api -- 2.4 -+ org.apache.tomcat -+ tomcat-servlet-api -+ 7.0.27 - - -- -+ - diff --git a/apache-commons-jci-1.0-fixbuild.patch b/apache-commons-jci-1.0-fixbuild.patch deleted file mode 100644 index 134954c..0000000 --- a/apache-commons-jci-1.0-fixbuild.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff -Nru commons-jci-1.0-src/compilers/eclipse/pom.xml commons-jci-1.0-src-gil/compilers/eclipse/pom.xml ---- commons-jci-1.0-src/compilers/eclipse/pom.xml 2007-06-14 22:23:17.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/eclipse/pom.xml 2012-04-06 21:32:41.304745296 +0200 -@@ -22,6 +22,7 @@ - org.apache.commons - commons-jci - 1.0 -+ ../../pom.xml - - jar - commons-jci-eclipse -diff -Nru commons-jci-1.0-src/compilers/groovy/pom.xml commons-jci-1.0-src-gil/compilers/groovy/pom.xml ---- commons-jci-1.0-src/compilers/groovy/pom.xml 2007-06-14 22:23:17.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/groovy/pom.xml 2012-04-06 21:34:35.059747993 +0200 -@@ -22,6 +22,7 @@ - org.apache.commons - commons-jci - 1.0 -+ ../../pom.xml - - jar - commons-jci-groovy -@@ -50,9 +51,9 @@ - test - - -- groovy -- groovy-all -- 1.0-jsr-03 -+ org.codehaus.groovy -+ groovy -+ 1.8.6 - - - -diff -Nru commons-jci-1.0-src/compilers/janino/pom.xml commons-jci-1.0-src-gil/compilers/janino/pom.xml ---- commons-jci-1.0-src/compilers/janino/pom.xml 2007-06-14 22:23:18.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/janino/pom.xml 2012-04-06 21:35:48.373749732 +0200 -@@ -22,6 +22,7 @@ - org.apache.commons - commons-jci - 1.0 -+ ../../pom.xml - - jar - commons-jci-janino -@@ -50,9 +51,14 @@ - test - - -- janino -+ org.codehaus.janino - janino - 2.4.3 - -+ -+ org.codehaus.janino -+ commons-compiler -+ 2.4.3 -+ - - -diff -Nru commons-jci-1.0-src/compilers/javac/pom.xml commons-jci-1.0-src-gil/compilers/javac/pom.xml ---- commons-jci-1.0-src/compilers/javac/pom.xml 2007-06-14 22:23:17.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/javac/pom.xml 2012-04-06 21:36:21.952750528 +0200 -@@ -22,6 +22,7 @@ - org.apache.commons - commons-jci - 1.0 -+ ../../pom.xml - - jar - commons-jci-javac -diff -Nru commons-jci-1.0-src/compilers/rhino/pom.xml commons-jci-1.0-src-gil/compilers/rhino/pom.xml ---- commons-jci-1.0-src/compilers/rhino/pom.xml 2007-06-14 22:23:16.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/rhino/pom.xml 2012-04-06 21:37:22.780751971 +0200 -@@ -22,6 +22,7 @@ - org.apache.commons - commons-jci - 1.0 -+ ../../pom.xml - - jar - commons-jci-rhino -diff -Nru commons-jci-1.0-src/pom.xml commons-jci-1.0-src-gil/pom.xml ---- commons-jci-1.0-src/pom.xml 2007-06-14 22:23:18.000000000 +0200 -+++ commons-jci-1.0-src-gil/pom.xml 2012-04-06 21:40:11.741755978 +0200 -@@ -128,7 +128,7 @@ - cobertura-maven-plugin - 2.0 - -- -+ - - org.apache.maven.plugins - maven-surefire-report-plugin diff --git a/apache-commons-jci-1.0-janino26.patch b/apache-commons-jci-1.0-janino26.patch deleted file mode 100644 index 90cc136..0000000 --- a/apache-commons-jci-1.0-janino26.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -Nru commons-jci-1.0-src/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java commons-jci-1.0-src-gil/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java ---- commons-jci-1.0-src/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java 2007-06-14 22:23:18.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java 2012-06-13 11:57:32.778432297 +0200 -@@ -18,8 +18,8 @@ - package org.apache.commons.jci.compilers; - - import org.apache.commons.jci.problems.CompilationProblem; --import org.codehaus.janino.Location; --import org.codehaus.janino.Scanner.LocatedException; -+import org.codehaus.commons.compiler.Location; -+import org.codehaus.commons.compiler.LocatedException; - - /** - * Janino version of a CompilationProblem -diff -Nru commons-jci-1.0-src/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java commons-jci-1.0-src-gil/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java ---- commons-jci-1.0-src/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java 2007-06-14 22:23:18.000000000 +0200 -+++ commons-jci-1.0-src-gil/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java 2012-06-13 12:57:53.097609355 +0200 -@@ -34,18 +34,18 @@ - import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; - import org.codehaus.janino.ClassLoaderIClassLoader; --import org.codehaus.janino.CompileException; --import org.codehaus.janino.DebuggingInformation; -+import org.codehaus.commons.compiler.CompileException; -+//import org.codehaus.janino.DebuggingInformation; - import org.codehaus.janino.Descriptor; - import org.codehaus.janino.IClass; - import org.codehaus.janino.IClassLoader; - import org.codehaus.janino.Java; --import org.codehaus.janino.Location; -+import org.codehaus.commons.compiler.Location; - import org.codehaus.janino.Parser; - import org.codehaus.janino.Scanner; - import org.codehaus.janino.UnitCompiler; - import org.codehaus.janino.WarningHandler; --import org.codehaus.janino.Scanner.LocatedException; -+import org.codehaus.commons.compiler.LocatedException; - import org.codehaus.janino.UnitCompiler.ErrorHandler; - import org.codehaus.janino.util.ClassFile; - -@@ -112,7 +112,7 @@ - } - }); - log.debug("compile " + className); -- final ClassFile[] classFiles = uc.compileUnit(DebuggingInformation.ALL); -+ final ClassFile[] classFiles = uc.compileUnit(true, true, true); - for (int i = 0; i < classFiles.length; i++) { - log.debug("compiled " + classFiles[i].getThisClassName()); - classes.put(classFiles[i].getThisClassName(), classFiles[i].toByteArray()); -@@ -148,7 +148,11 @@ - final CompilingIClassLoader icl = new CompilingIClassLoader(pResourceReader, classFilesByName, pClassLoader); - for (int i = 0; i < pSourceNames.length; i++) { - log.debug("compiling " + pSourceNames[i]); -- icl.loadIClass(Descriptor.fromClassName(ConversionUtils.convertResourceToClassName(pSourceNames[i]))); -+ try { -+ icl.loadIClass(Descriptor.fromClassName(ConversionUtils.convertResourceToClassName(pSourceNames[i]))); -+ } catch (ClassNotFoundException e) { -+ log.error(e); -+ } - } - - // Store all fully compiled classes diff --git a/apache-commons-jci-1.1-janino27.patch b/apache-commons-jci-1.1-janino27.patch new file mode 100644 index 0000000..7a151e9 --- /dev/null +++ b/apache-commons-jci-1.1-janino27.patch @@ -0,0 +1,19 @@ +diff -Nru commons-jci-1.1-src/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java commons-jci-1.1-src.janino/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java +--- commons-jci-1.1-src/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java 2013-08-18 23:14:52.000000000 +0200 ++++ commons-jci-1.1-src.janino/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java 2015-02-09 20:21:47.934668187 +0100 +@@ -31,13 +31,13 @@ + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; + import org.codehaus.commons.compiler.CompileException; ++import org.codehaus.commons.compiler.ErrorHandler; + import org.codehaus.commons.compiler.LocatedException; + import org.codehaus.commons.compiler.Location; ++import org.codehaus.commons.compiler.WarningHandler; + import org.codehaus.janino.ClassLoaderIClassLoader; + import org.codehaus.janino.Compiler; + import org.codehaus.janino.FilterWarningHandler; +-import org.codehaus.janino.UnitCompiler.ErrorHandler; +-import org.codehaus.janino.WarningHandler; + import org.codehaus.janino.util.StringPattern; + import org.codehaus.janino.util.resource.Resource; + import org.codehaus.janino.util.resource.ResourceCreator; diff --git a/apache-commons-jci.spec b/apache-commons-jci.spec index 72d3178..a8288a1 100644 --- a/apache-commons-jci.spec +++ b/apache-commons-jci.spec @@ -4,53 +4,33 @@ %global namedversion %{version}%{?namedreltag} Name: apache-commons-jci -Version: 1.0 -Release: 14%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: Commons Java Compiler Interface License: ASL 2.0 URL: http://commons.apache.org/jci/ -Source0: ftp://ftp.gbnet.net/pub/apache/dist/commons/%{base_name}/source/%{short_name}-%{namedversion}-src.tar.gz -# force ecj 4.x use -Source1: %{name}-%{namedversion}-depmap -# fix parent relative path -# fix groovy gId and aId -# add org.codehaus.janino commons-compiler -# remove org.codehaus.mojo findbugs-maven-plugin 1.0.0 -Patch0: %{name}-%{namedversion}-fixbuild.patch -# asm 3 test build -Patch1: %{name}-%{namedversion}-ExtendedDump.patch -Patch2: %{name}-%{namedversion}-SimpleDump.patch -# fix parent relative path -# remove jetty-maven-plugin -# use tomcat 7.x apis -Patch3: %{name}-%{namedversion}-examples-pom.patch - -Patch4: %{name}-%{namedversion}-janino26.patch - -Patch5: %{name}-%{namedversion}-ecj4.patch +Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{namedversion}-src.tar.gz +Patch0: %{name}-1.1-janino27.patch BuildRequires: maven-local BuildRequires: maven-antrun-plugin BuildRequires: maven-plugin-bundle -BuildRequires: maven-plugin-cobertura -BuildRequires: maven-site-plugin BuildRequires: ecj >= 3.4.2-13 -BuildRequires: mvn(commons-logging:commons-logging-api) +BuildRequires: mvn(commons-logging:commons-logging) BuildRequires: mvn(commons-io:commons-io) +BuildRequires: mvn(org.apache.commons:commons-parent:pom:) BuildRequires: mvn(org.codehaus.groovy:groovy) -BuildRequires: mvn(org.codehaus.janino:commons-compiler) BuildRequires: mvn(org.codehaus.janino:janino) BuildRequires: mvn(rhino:js) # test deps -BuildRequires: mvn(commons-lang:commons-lang) BuildRequires: mvn(junit:junit) BuildRequires: objectweb-asm3 +BuildRequires: mvn(org.apache.commons:commons-lang3) Requires: %{name}-core = %{version}-%{release} BuildArch: noarch -#* javac Commons JCI compiler implementation for the javac compiler (up to JDK 1.5). #* jsr199 Commons JCI compiler implementation for JDK 1.6 and up. %description @@ -115,23 +95,25 @@ find . -name "*.class" -delete find . -name "*.jar" -delete %patch0 -p1 -%patch1 -p0 -%patch2 -p0 -%patch3 -p0 -%patch4 -p1 -%patch5 -p0 # require old version of jdependency -%pom_disable_module compilers/javac %pom_disable_module examples %pom_xpath_remove "pom:build/pom:extensions" -sed -i "s|1.4<|1.5<|" pom.xml -sed -i "s|1.4<|1.5<|" pom.xml +%pom_xpath_set "pom:properties/pom:maven.compiler.source" 1.6 +%pom_xpath_set "pom:properties/pom:maven.compiler.target" 1.6 -# Fix installation directory +%pom_remove_plugin :cobertura-maven-plugin +%pom_remove_plugin :maven-assembly-plugin +%pom_remove_plugin :maven-site-plugin + +%pom_xpath_set "pom:dependencyManagement/pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:artifactId" groovy +%pom_xpath_set "pom:dependencyManagement/pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:version" 1.8.9 +%pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:artifactId" groovy compilers/groovy +%pom_xpath_inject "pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']" "1.8.9" compilers/groovy +# Fix installation directory %mvn_file :%{short_name}-core %{short_name}/%{short_name}-core %mvn_file :%{short_name}-fam %{short_name}/%{short_name}-fam %mvn_file :%{short_name}-eclipse %{short_name}/%{short_name}-eclipse @@ -142,7 +124,7 @@ sed -i "s|1.4<|1.5<|" pom.xml %build # random tests failures -%mvn_build -s -- -Dmaven.test.failure.ignore=true -Dmaven.local.depmap.file="%{SOURCE1}" +%mvn_build -s -- -Dmaven.test.failure.ignore=true %install %mvn_install @@ -168,6 +150,9 @@ sed -i "s|1.4<|1.5<|" pom.xml %files rhino -f .mfiles-%{short_name}-rhino %changelog +* Mon Feb 09 2015 gil cattaneo 1.1-1 +- Update to 1.1 + * Thu Jan 29 2015 gil cattaneo 1.0-14 - introduce license macro diff --git a/sources b/sources index 3c8caf7..dc1071f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -969ca083b61d300e694c5300ad18107c commons-jci-1.0-src.tar.gz +7594bbc110e92ac7cdd20013364dbbbb commons-jci-1.1-src.tar.gz