Fix Springframework library

Also reactivate test-app 'spring-capability-tests'
diff --git a/build.gradle b/build.gradle
index 14bcf82..193d62c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -134,7 +134,7 @@
 
             // test-apps
             project(':web:test-apps:osgi-webapp'),
-    ]
+            project(':web:test-apps:spring-capability-tests'),    ]
 
     aspectjProjects = [
             // these projects contain aspects
diff --git a/packaging/build.gradle b/packaging/build.gradle
index 5d29fb9..bc20250 100644
--- a/packaging/build.gradle
+++ b/packaging/build.gradle
@@ -107,7 +107,7 @@
         repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.jms_${springframeworkVersion}.jar")
         repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.orm_${springframeworkVersion}.jar")
         repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.oxm_${springframeworkVersion}.jar")
-        repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.tx_${springframeworkVersion}.jar")
+        repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.transaction_${springframeworkVersion}.jar")
         repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.web_${springframeworkVersion}.jar")
         repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.webflux_${springframeworkVersion}.jar")
         repositoryExt files("../../3rd-party/build/plugins/oevm.org.springframework.webmvc_${springframeworkVersion}.jar")
diff --git a/packaging/tomcat-server/src/main/filtered/repository/ext/org.springframework.spring-library.libd b/packaging/tomcat-server/src/main/filtered/repository/ext/org.springframework.spring-library.libd
index 7982560..961299b 100644
--- a/packaging/tomcat-server/src/main/filtered/repository/ext/org.springframework.spring-library.libd
+++ b/packaging/tomcat-server/src/main/filtered/repository/ext/org.springframework.spring-library.libd
@@ -2,21 +2,20 @@
 Library-Version: @SPRING.VERSION@
 Library-Name: Spring Framework
 Import-Bundle: 
- org.springframework.aop;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.aspects;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.beans;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.context;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.context.support;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.core;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.expression;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.jdbc;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.jms;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.orm;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.oxm;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.transaction;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.web;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.webflux;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.webmvc;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- org.springframework.websocket;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
- oevm.org.aopalliance;version="[1.0.0, 1.0.0]",
- javax.jms;version="[1,2)"
+ oevm.org.springframework.aop;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.aspects;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.beans;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.context;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.context.support;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.core;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.expression;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.jdbc;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.jms;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.orm;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.oxm;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.transaction;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.web;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.webflux;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.webmvc;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ oevm.org.springframework.websocket;version="[@SPRING.VERSION@, @SPRING.VERSION@]",
+ javax.jms;version="[1.1,2)"
diff --git a/run_virgo_for_apache_tomcat.sh b/run_virgo_for_apache_tomcat.sh
index a6eb993..b4e703c 100755
--- a/run_virgo_for_apache_tomcat.sh
+++ b/run_virgo_for_apache_tomcat.sh
@@ -7,6 +7,9 @@
 ./gradlew -Dskip.normalize.bundles=true -Dskip.compress.bundles=true -Dskip.local.signing=true -Dci.build.signjars=false web:test-apps:osgi-webapp:jar
 cp web/test-apps/osgi-webapp/build/libs/osgi-webapp-3.8.0.BUILD-SNAPSHOT.jar packaging/tomcat-server/build/install/virgo-tomcat-server/pickup
 
+./gradlew -Dskip.normalize.bundles=true -Dskip.compress.bundles=true -Dskip.local.signing=true -Dci.build.signjars=false web:test-apps:spring-capability-tests:jar
+cp web/test-apps/spring-capability-tests/build/libs/spring-capability-tests-3.8.0.BUILD-SNAPSHOT.jar packaging/tomcat-server/build/install/virgo-tomcat-server/pickup
+
 #./gradlew -Dskip.normalize.bundles=true -Dskip.compress.bundles=true -Dskip.local.signing=true -Dci.build.signjars=false web:test-apps:classpath-context-config-locations:war
 #cp web/test-apps/classpath-context-config-locations/build/libs/classpath-context-config-locations-3.8.0.BUILD-SNAPSHOT.war packaging/tomcat-server/build/install/virgo-tomcat-server/pickup
 
diff --git a/settings.gradle b/settings.gradle
index cdce096..706c8ca 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -101,6 +101,7 @@
 include ':web:org.eclipse.virgo.web.enterprise.openejb.tomcat.factory'
 
 include ':web:test-apps:osgi-webapp'
+include ':web:test-apps:spring-capability-tests'
 
 // 3rd party bundles
 include ':3rd-party'
diff --git a/web/build.gradle b/web/build.gradle
deleted file mode 100644
index e69de29..0000000
--- a/web/build.gradle
+++ /dev/null
diff --git a/web/test-apps/spring-capability-tests/build.gradle b/web/test-apps/spring-capability-tests/build.gradle
new file mode 100644
index 0000000..a1e77d1
--- /dev/null
+++ b/web/test-apps/spring-capability-tests/build.gradle
@@ -0,0 +1,10 @@
+jar.manifest.attributes(
+        '-wab': 'src/main/webapp'
+)
+
+dependencies {
+    compileOnly 'javax.servlet:javax.servlet-api'
+
+    compileOnly 'org.springframework:spring-context'
+    compileOnly 'org.springframework:spring-web'
+}
diff --git a/web/test-apps/spring-capability-tests/build.properties b/web/test-apps/spring-capability-tests/build.properties
deleted file mode 100644
index 657c9ee..0000000
--- a/web/test-apps/spring-capability-tests/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-version=2.0.0
-release.type=integration
-ivy.cache.dir=${basedir}/../../ivy-cache
-integration.repo.dir=${basedir}/../../integration-repo
-disable.bundlor=true
diff --git a/web/test-apps/spring-capability-tests/build.xml b/web/test-apps/spring-capability-tests/build.xml
deleted file mode 100644
index 19d7e62..0000000
--- a/web/test-apps/spring-capability-tests/build.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="spring.capability.tests">
-	
-	<property file="${basedir}/build.properties"/>
-    <property file="${basedir}/../../build.versions"/>
-	<property name="war.output.dir" value="${basedir}/../../org.eclipse.virgo.web.test/src/test/apps"/>
-    <import file="${basedir}/../../virgo-build/war/default.xml" />
-
-</project>
diff --git a/web/test-apps/spring-capability-tests/bundle.bnd b/web/test-apps/spring-capability-tests/bundle.bnd
new file mode 100644
index 0000000..13ab3d6
--- /dev/null
+++ b/web/test-apps/spring-capability-tests/bundle.bnd
@@ -0,0 +1,5 @@
+Bundle-ManifestVersion: 2
+Bundle-Name: Virgo Web Test-App spring-capability-tests
+Bundle-SymbolicName: org.eclipse.virgo.web.test.spring-capability-tests
+Web-ContextPath: /spring-capability-tests
+Import-Library: org.springframework.spring
diff --git a/web/test-apps/spring-capability-tests/ivy.xml b/web/test-apps/spring-capability-tests/ivy.xml
deleted file mode 100644
index fbf4ef6..0000000
--- a/web/test-apps/spring-capability-tests/ivy.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
-<ivy-module
-		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
-		version="1.3">
-
-	<info organisation="org.eclipse.virgo.web.test" module="${ant.project.name}"/>
-
-	<configurations>
-		<include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
-	</configurations>
-
-	<publications>
-	</publications>
-
-	<dependencies>
-		<dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->compile"/>
-		<dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->runtime"/>
-		<dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->runtime"/>
-		<dependency org="org.springframework" name="org.springframework.web" rev="${org.springframework}" conf="provided->runtime"/>
-		<dependency org="org.springframework" name="org.springframework.web.servlet" rev="${org.springframework}" conf="provided->runtime"/>
-	</dependencies>
-
-</ivy-module>
diff --git a/web/test-apps/spring-capability-tests/src/main/java/sct/ApplicationContextNamespaceTestServlet.java b/web/test-apps/spring-capability-tests/src/main/java/sct/ApplicationContextNamespaceTestServlet.java
index 4ff45b2..c533fe7 100644
--- a/web/test-apps/spring-capability-tests/src/main/java/sct/ApplicationContextNamespaceTestServlet.java
+++ b/web/test-apps/spring-capability-tests/src/main/java/sct/ApplicationContextNamespaceTestServlet.java
@@ -11,32 +11,35 @@
 
 package sct;
 
-import java.io.IOException;
-import java.io.PrintWriter;
+import org.springframework.web.context.support.XmlWebApplicationContext;
 
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.web.context.support.XmlWebApplicationContext;
+import java.io.IOException;
+import java.io.PrintWriter;
 
 public class ApplicationContextNamespaceTestServlet extends HttpServlet {
 
     private static final long serialVersionUID = -3223361902099778097L;
 
     @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        XmlWebApplicationContext ctx = new XmlWebApplicationContext();
-        ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        ctx.setClassLoader(loader);
-        ctx.setConfigLocation("classpath:sct/namespace.xml");
-        ctx.refresh();
-        Object bean = ctx.getBean("someBean");
-        if (bean != null) {
-            PrintWriter writer = resp.getWriter();
-            writer.write("OK");
-            writer.flush();
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        try (XmlWebApplicationContext ctx = new XmlWebApplicationContext()) {
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            ctx.setClassLoader(loader);
+            ctx.setConfigLocation("classpath:sct/namespace.xml");
+            ctx.refresh();
+            Object bean = ctx.getBean("someBean");
+            if (bean != null) {
+                PrintWriter writer = resp.getWriter();
+                writer.write("OK");
+                writer.flush();
+            } else {
+                PrintWriter writer = resp.getWriter();
+                writer.write("Not found!");
+                writer.flush();
+            }
         }
     }
 
diff --git a/web/test-apps/spring-capability-tests/src/main/resources/.gitignore b/web/test-apps/spring-capability-tests/src/main/resources/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/web/test-apps/spring-capability-tests/src/main/resources/.gitignore
+++ /dev/null
diff --git a/web/test-apps/spring-capability-tests/src/main/java/sct/namespace.xml b/web/test-apps/spring-capability-tests/src/main/resources/sct/namespace.xml
similarity index 100%
rename from web/test-apps/spring-capability-tests/src/main/java/sct/namespace.xml
rename to web/test-apps/spring-capability-tests/src/main/resources/sct/namespace.xml
diff --git a/web/test-apps/spring-capability-tests/src/main/webapp/META-INF/MANIFEST.MF b/web/test-apps/spring-capability-tests/src/main/webapp/META-INF/MANIFEST.MF
deleted file mode 100644
index 922654a..0000000
--- a/web/test-apps/spring-capability-tests/src/main/webapp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1
-Bundle-SymbolicName: spring.capability.tests
-Bundle-Version: 1.0
-Web-ContextPath: /sct
-Import-Library: org.springframework.spring