Repository: tomee Updated Branches: refs/heads/master 5ed406623 -> 569e604a1
TOMEE-2019 ensure you can use mvn in classpath attribute of resources Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/569e604a Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/569e604a Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/569e604a Branch: refs/heads/master Commit: 569e604a12cc0922962808534211d12bf48de348 Parents: 5ed4066 Author: rmannibucau <[email protected]> Authored: Thu Mar 9 08:24:44 2017 +0100 Committer: rmannibucau <[email protected]> Committed: Thu Mar 9 08:25:01 2017 +0100 ---------------------------------------------------------------------- .../java/org/apache/openejb/config/ConfigurationFactory.java | 2 +- .../openejb/resource/jdbc/driver/AlternateDriverJarTest.java | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/569e604a/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java index 9a2b8b4..8334912 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java @@ -1376,7 +1376,7 @@ public class ConfigurationFactory implements OpenEjbConfigurationFactory { public static URI[] resolveClasspath(final String rawstring) throws IOException { final FileUtils base = SystemInstance.get().getBase(); - final String[] strings = rawstring.split(File.pathSeparator); + final String[] strings = rawstring.contains("mvn:") ? rawstring.split(";") : rawstring.split(File.pathSeparator); final Collection<URI> classpath = new LinkedList<>(); for (final String string : strings) { http://git-wip-us.apache.org/repos/asf/tomee/blob/569e604a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/driver/AlternateDriverJarTest.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/driver/AlternateDriverJarTest.java b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/driver/AlternateDriverJarTest.java index caee9e5..f455bb6 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/driver/AlternateDriverJarTest.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/resource/jdbc/driver/AlternateDriverJarTest.java @@ -51,18 +51,14 @@ public class AlternateDriverJarTest { final Properties p = new Properties(); p.put("openejb.jdbc.datasource-creator", "dbcp-alternative"); - File file = new File(drivers, "derby-10.10.1.1.jar"); - Assert.assertTrue("Failed to find: " + file, file.exists()); - - p.put("JdbcOne", "new://Resource?type=DataSource&classpath=" - + file.getAbsolutePath().replace("\\", "/")); + p.put("JdbcOne", "new://Resource?type=DataSource&classpath=mvn:org.apache.derby:derby:10.10.1.1"); p.put("JdbcOne.JdbcDriver", "org.apache.derby.jdbc.EmbeddedDriver"); p.put("JdbcOne.JdbcUrl", "jdbc:derby:memory:JdbcOne;create=true"); p.put("JdbcOne.UserName", USER); p.put("JdbcOne.Password", PASSWORD); p.put("JdbcOne.JtaManaged", "false"); - file = new File(drivers, "derby-10.9.1.0.jar"); + final File file = new File(drivers, "derby-10.9.1.0.jar"); Assert.assertTrue("Failed to find: " + file, file.exists()); p.put("JdbcTwo", "new://Resource?type=DataSource&classpath="
