diff --git a/0001-Remove-usage-of-junit.awtui-and-junit.swingui.patch b/0001-Remove-usage-of-junit.awtui-and-junit.swingui.patch new file mode 100644 index 0000000..1947278 --- /dev/null +++ b/0001-Remove-usage-of-junit.awtui-and-junit.swingui.patch @@ -0,0 +1,64 @@ +From 665f967f23ffed9445e1a0d045ae3a9625db3e90 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 28 Apr 2014 16:25:41 +0200 +Subject: [PATCH] Remove usage of junit.awtui and junit.swingui + +--- + src/test/javassist/Bench.java | 5 ----- + src/test/javassist/bytecode/BytecodeTest.java | 6 ------ + src/test/javassist/compiler/CompTest.java | 6 ------ + 3 files changed, 17 deletions(-) + +diff --git a/src/test/javassist/Bench.java b/src/test/javassist/Bench.java +index 723fa19..b7b8b27 100644 +--- a/src/test/javassist/Bench.java ++++ b/src/test/javassist/Bench.java +@@ -153,11 +153,6 @@ public class Bench extends JvstTestRoot { + System.out.println("println: " + (t5 * 10) + " usec"); + } + +- public static void main(String[] args) { +- // junit.textui.TestRunner.run(suite()); +- junit.swingui.TestRunner.main(new String[] { "javassist.Bench" }); +- } +- + public static Test suite() { + TestSuite suite = new TestSuite("Benchmark Tests"); + suite.addTestSuite(Bench.class); +diff --git a/src/test/javassist/bytecode/BytecodeTest.java b/src/test/javassist/bytecode/BytecodeTest.java +index b918750..a53f030 100644 +--- a/src/test/javassist/bytecode/BytecodeTest.java ++++ b/src/test/javassist/bytecode/BytecodeTest.java +@@ -826,12 +826,6 @@ public class BytecodeTest extends TestCase { + assertEquals("(I)V", cPool2.getUtf8Info(cPool2.getMethodTypeInfo(mtIndex))); + } + +- public static void main(String[] args) { +- // junit.textui.TestRunner.run(suite()); +- junit.awtui.TestRunner.main(new String[] { +- "javassist.bytecode.BytecodeTest" }); +- } +- + public static Test suite() { + TestSuite suite = new TestSuite("Bytecode Tests"); + suite.addTestSuite(BytecodeTest.class); +diff --git a/src/test/javassist/compiler/CompTest.java b/src/test/javassist/compiler/CompTest.java +index 6a1d542..158552e 100644 +--- a/src/test/javassist/compiler/CompTest.java ++++ b/src/test/javassist/compiler/CompTest.java +@@ -113,12 +113,6 @@ public class CompTest extends TestCase { + assertEquals("(int,char[],String)", s); + } + +- public static void main(String[] args) { +- // junit.textui.TestRunner.run(suite()); +- junit.awtui.TestRunner.main(new String[] { +- "javassist.compiler.CompTest" }); +- } +- + public static Test suite() { + TestSuite suite = new TestSuite("Compiler Tests"); + suite.addTestSuite(CompTest.class); +-- +1.9.0 + diff --git a/javassist.spec b/javassist.spec new file mode 100644 index 0000000..e2ebf60 --- /dev/null +++ b/javassist.spec @@ -0,0 +1,56 @@ +%global tarball_version 3_18_1_ga + +Name: javassist +Version: 3.18.1 +Release: 10 +Summary: Java bytecode engineering toolkit +License: MPLv1.1 or LGPLv2+ or ASL 2.0 +URL: http://www.csg.is.titech.ac.jp/~chiba/%{name}/ +Source0: http://github.com/jboss-%{name}/%{name}/archive/rel_%{tarball_version}.tar.gz + +Patch0: 0001-Remove-usage-of-junit.awtui-and-junit.swingui.patch + +BuildArch: noarch +BuildRequires: maven-local mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(junit:junit) mvn(org.apache.maven.plugins:maven-source-plugin) +Requires: jpackage-utils + +Provides: %{name}-doc +Obsoletes: %{name}-doc + +%description +Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation simple. It is a +class library for editing bytecodes in Java; it enables Java programs to define a new class +at runtime and to modify a class file when the JVM loads it. Unlike other similar bytecode +editors, Javassist provides two levels of API: source level and bytecode level. If the users +use the source- level API, they can edit a class file without knowledge of the specifications +of the Java bytecode. The whole API is designed with only the vocabulary of the Java language. +You can even specify inserted bytecode in the form of source text; Javassist compiles it on +the fly. On the other hand, the bytecode-level API allows the users to directly edit a class +file as other editors. + +%prep +%autosetup -n %{name}-rel_%{tarball_version} -p1 +find . -name \*.jar -type f -delete +mkdir runtest + +%pom_xpath_remove "pom:profile[pom:id='default-tools']" +%pom_add_dep com.sun:tools + +%mvn_file : %{name} +%mvn_alias : %{name}:%{name} + +%build +%mvn_build -f + +%install +%mvn_install + +%files -f .mfiles +%license License.html +%doc Readme.html + +%changelog +* Sat Dec 14 2019 openEuler Buildteam - 3.18.1-10 +- Package init + diff --git a/rel_3_18_1_ga.tar.gz b/rel_3_18_1_ga.tar.gz new file mode 100644 index 0000000..6845239 Binary files /dev/null and b/rel_3_18_1_ga.tar.gz differ