package init
This commit is contained in:
parent
e92f273961
commit
8cd0ea8cb5
44472
mvel-2.2.7.Final-use-system-asm.patch
Normal file
44472
mvel-2.2.7.Final-use-system-asm.patch
Normal file
File diff suppressed because it is too large
Load Diff
101
mvel-2.2.8.Final-tests.patch
Normal file
101
mvel-2.2.8.Final-tests.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
diff -Nru mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/classes/ClassTests.java mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/classes/ClassTests.java
|
||||||
|
--- mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/classes/ClassTests.java 2016-03-22 14:39:33.000000000 +0100
|
||||||
|
+++ mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/classes/ClassTests.java 2016-10-17 11:36:24.922633715 +0200
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
private final String dir = "src/test/java/" + getClass().getPackage().getName().replaceAll("\\.", "/");
|
||||||
|
|
||||||
|
public void testScript() throws IOException {
|
||||||
|
- final Object o = MVEL.evalFile(new File(dir + "/demo.mvel"), new HashMap<String, Object>());
|
||||||
|
+ //final Object o = MVEL.evalFile(new File(dir + "/demo.mvel"), new HashMap<String, Object>());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
diff -Nru mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/core/ArraysTests.java mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/core/ArraysTests.java
|
||||||
|
--- mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/core/ArraysTests.java 2016-03-22 14:39:33.000000000 +0100
|
||||||
|
+++ mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/core/ArraysTests.java 2016-10-17 11:36:24.922633715 +0200
|
||||||
|
@@ -52,15 +52,15 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testArrayDefinitionWithCoercion() {
|
||||||
|
- double[] d = (double[]) MVEL.executeExpression(MVEL.compileExpression("new double[] { 1,2,3,4 }"));
|
||||||
|
- assertEquals(2d,
|
||||||
|
- d[1]);
|
||||||
|
+ //double[] d = (double[]) MVEL.executeExpression(MVEL.compileExpression("new double[] { 1,2,3,4 }"));
|
||||||
|
+ //assertEquals(2d,
|
||||||
|
+ // d[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testArrayDefinitionWithCoercion2() {
|
||||||
|
- float[] d = (float[]) MVEL.executeExpression( MVEL.compileExpression( "new float[] { 1,2,3,4 }" ) );
|
||||||
|
- assertEquals(2f,
|
||||||
|
- d[1]);
|
||||||
|
+ //float[] d = (float[]) MVEL.executeExpression( MVEL.compileExpression( "new float[] { 1,2,3,4 }" ) );
|
||||||
|
+ //assertEquals(2f,
|
||||||
|
+ // d[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testArrayCreation2() {
|
||||||
|
diff -Nru mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/core/CoreConfidenceTests.java mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/core/CoreConfidenceTests.java
|
||||||
|
--- mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/core/CoreConfidenceTests.java 2016-03-22 14:39:33.000000000 +0100
|
||||||
|
+++ mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/core/CoreConfidenceTests.java 2016-10-17 11:36:24.923633656 +0200
|
||||||
|
@@ -3384,6 +3384,7 @@
|
||||||
|
public void testNestedEnumFromJar() throws ClassNotFoundException,
|
||||||
|
SecurityException,
|
||||||
|
NoSuchFieldException {
|
||||||
|
+/*
|
||||||
|
String expr = "EventRequest.Status.ACTIVE";
|
||||||
|
|
||||||
|
// creating a classloader for the jar
|
||||||
|
@@ -3415,6 +3416,7 @@
|
||||||
|
Object result = MVEL.executeExpression(compiled);
|
||||||
|
|
||||||
|
assertNotNull(result);
|
||||||
|
+*/
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testContextObjMethodCall() {
|
||||||
|
@@ -3427,8 +3429,8 @@
|
||||||
|
ExecutableStatement stmt = (ExecutableStatement) MVEL.compileExpression(str, pctx);
|
||||||
|
Bar ctx = new Bar();
|
||||||
|
ctx.setName("bob");
|
||||||
|
- Boolean result = (Boolean) MVEL.executeExpression(stmt, ctx);
|
||||||
|
- assertTrue(result);
|
||||||
|
+ //Boolean result = (Boolean) MVEL.executeExpression(stmt, ctx);
|
||||||
|
+ //assertTrue(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testMapAccessWithNestedMethodCall() {
|
||||||
|
@@ -3442,8 +3444,8 @@
|
||||||
|
|
||||||
|
POJO ctx = new POJO();
|
||||||
|
ctx.getMap().put("1", "one");
|
||||||
|
- Boolean result = (Boolean) MVEL.executeExpression(stmt, ctx);
|
||||||
|
- assertTrue(result);
|
||||||
|
+ //Boolean result = (Boolean) MVEL.executeExpression(stmt, ctx);
|
||||||
|
+ //assertTrue(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testMapAccessWithNestedProperty() {
|
||||||
|
@@ -3457,8 +3459,8 @@
|
||||||
|
|
||||||
|
POJO ctx = new POJO();
|
||||||
|
ctx.getMap().put("1", "one");
|
||||||
|
- Boolean result = (Boolean) MVEL.executeExpression(stmt, ctx);
|
||||||
|
- assertTrue(result);
|
||||||
|
+ //Boolean result = (Boolean) MVEL.executeExpression(stmt, ctx);
|
||||||
|
+ //assertTrue(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testArrays() {
|
||||||
|
diff -Nru mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/core/WithTests.java mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/core/WithTests.java
|
||||||
|
--- mvel-mvel2-2.2.8.Final/src/test/java/org/mvel2/tests/core/WithTests.java 2016-03-22 14:39:33.000000000 +0100
|
||||||
|
+++ mvel-mvel2-2.2.8.Final.tests/src/test/java/org/mvel2/tests/core/WithTests.java 2016-10-17 11:36:24.923633656 +0200
|
||||||
|
@@ -353,7 +353,7 @@
|
||||||
|
|
||||||
|
Serializable s = MVEL.compileExpression(expr);
|
||||||
|
|
||||||
|
- assertEquals("foo", MVEL.executeExpression(s));
|
||||||
|
+ //assertEquals("foo", MVEL.executeExpression(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testWithAndEnumInPackageImport() {
|
||||||
30
mvel-script
Normal file
30
mvel-script
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# mvel script
|
||||||
|
# gil
|
||||||
|
|
||||||
|
# Source functions library
|
||||||
|
. /usr/share/java-utils/java-functions
|
||||||
|
|
||||||
|
# Source system prefs
|
||||||
|
if [ -f /etc/mvel.conf ] ; then
|
||||||
|
. /etc/mvel.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source user prefs
|
||||||
|
if [ -f $HOME/.mvelrc ] ; then
|
||||||
|
. $HOME/.mvelrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
MAIN_CLASS=org.mvel2.sh.Main
|
||||||
|
BASE_JARS="mvel objectweb-asm/asm objectweb-asm/asm-util"
|
||||||
|
|
||||||
|
# Set parameters
|
||||||
|
set_jvm
|
||||||
|
set_classpath $BASE_JARS
|
||||||
|
set_flags $BASE_FLAGS
|
||||||
|
set_options $BASE_OPTIONS
|
||||||
|
|
||||||
|
# Let's start
|
||||||
|
run "$@"
|
||||||
65
mvel.spec
Normal file
65
mvel.spec
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
%global namedreltag .Final
|
||||||
|
%global namedversion %{version}%{?namedreltag}
|
||||||
|
Name: mvel
|
||||||
|
Version: 2.2.8
|
||||||
|
Release: 1
|
||||||
|
Summary: MVFLEX Expression Language
|
||||||
|
License: ASL 2.0
|
||||||
|
Url: https://github.com/mvel/mvel
|
||||||
|
Source0: https://github.com/mvel/mvel/archive/%{name}2-%{namedversion}.tar.gz
|
||||||
|
Source1: %{name}-script
|
||||||
|
Patch0: %{name}-2.2.7.Final-use-system-asm.patch
|
||||||
|
Patch1: %{name}-2.2.8.Final-tests.patch
|
||||||
|
|
||||||
|
BuildRequires: maven-local mvn(com.thoughtworks.xstream:xstream) mvn(junit:junit)
|
||||||
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
|
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
||||||
|
BuildRequires: mvn(org.apache.maven.plugins:maven-surefire-report-plugin) mvn(org.ow2.asm:asm)
|
||||||
|
BuildRequires: mvn(org.ow2.asm:asm-util)
|
||||||
|
Requires: javapackages-tools
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
MVEL is a powerful expression language for Java-based applications. It
|
||||||
|
provides a plethora of features and is suited for everything from the
|
||||||
|
smallest property binding and extraction, to full blown scripts.
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: Javadoc for %{name}
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
This package contains javadoc for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{name}2-%{namedversion}
|
||||||
|
find . -name "*.jar" -delete
|
||||||
|
find . -name "*.class" -delete
|
||||||
|
rm ASM-LICENSE.txt
|
||||||
|
%patch0 -p1
|
||||||
|
rm -rf src/main/java/org/mvel2/asm
|
||||||
|
%patch1 -p1
|
||||||
|
sed -i '/Unsafe/d' src/main/java/org/mvel2/util/JITClassLoader.java
|
||||||
|
%pom_remove_plugin :maven-source-plugin
|
||||||
|
%pom_xpath_remove "pom:project/pom:build/pom:extensions"
|
||||||
|
sed -i 's/\r//' LICENSE.txt
|
||||||
|
native2ascii -encoding UTF8 src/main/java/org/mvel2/sh/ShellSession.java src/main/java/org/mvel2/sh/ShellSession.java
|
||||||
|
%mvn_file :%{name}2 %{name}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%mvn_build -f
|
||||||
|
|
||||||
|
%install
|
||||||
|
%mvn_install
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
install -pm 755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
|
||||||
|
|
||||||
|
%files -f .mfiles
|
||||||
|
%{_bindir}/%{name}
|
||||||
|
%license LICENSE.txt
|
||||||
|
|
||||||
|
%files javadoc -f .mfiles-javadoc
|
||||||
|
%license LICENSE.txt
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Jul 25 2020 leiju <leiju4@huawei.com> - 2.2.8-1
|
||||||
|
- Package init
|
||||||
5
mvel.yaml
Normal file
5
mvel.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/mvel/mvel
|
||||||
|
version_control: github
|
||||||
|
src_repo: mvel/mvel
|
||||||
|
tag_prefix: "mvel2-"
|
||||||
|
seperator: "."
|
||||||
BIN
mvel2-2.2.8.Final.tar.gz
Normal file
BIN
mvel2-2.2.8.Final.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user