Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rw-r--r--build.gradle35
-rw-r--r--org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/HeapDumpContributorTests.java4
-rw-r--r--org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/StandardDumpGeneratorTests.java6
-rw-r--r--org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/summary/SummaryDumpContributorTests.java2
-rw-r--r--org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/thread/ThreadDumpContributorTests.java2
-rwxr-xr-xorg.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/LogControllerTests.java6
-rw-r--r--org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/config/ConfigurationAdminConfigurationProviderTests.java10
-rw-r--r--org.eclipse.virgo.medic.core/template.mf10
-rw-r--r--org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java18
-rw-r--r--org.eclipse.virgo.medic.logbackclassicfragment/template.mf2
-rw-r--r--org.eclipse.virgo.medic.logbackcorefragment/template.mf2
-rw-r--r--org.eclipse.virgo.medic/template.mf6
13 files changed, 78 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index 1e8fa4c..3fbb103 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,13 @@
*/src/main/resources/META-INF/MANIFEST.MF
*/src/test/resources/META-INF/TEST.MF
+target
integration-repo
ivy-cache
-target
-.DS_Store
+.ant-targets-build.xml
user-ivy.properties
+bin/
+build/
+.settings/
+.project
+.classpath
+
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..eb87426
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,35 @@
+project(':medic:org.eclipse.virgo.medic') {
+ dependencies {
+ testCompile group: 'org.easymock', name: 'easymock', version: easymockVersion
+
+ compile group: "org.eclipse.virgo.mirrored", name: "org.slf4j.api", version: slf4jVersion, configuration: "compile", ext: "jar"
+
+ compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.osgi", version: equinoxVersion, configuration: "compile", ext: "jar"
+ }
+}
+
+project(':medic:org.eclipse.virgo.medic.core') {
+ dependencies {
+ testCompile group: 'org.easymock', name: 'easymock', version: easymockVersion
+ testCompile project(':test:org.eclipse.virgo.test.stubs')
+ testRuntime group: "org.eclipse.virgo.mirrored", name: "ch.qos.logback.slf4j", version: logbackVersion, configuration: "compile", ext: "jar"
+
+ compile project(':medic:org.eclipse.virgo.medic')
+ compile project(':util:org.eclipse.virgo.util.io')
+ compile project(':util:org.eclipse.virgo.util.osgi')
+ compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.osgi", version: equinoxVersion, configuration: "compile", ext: "jar"
+ compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.osgi.services", version: osgiServicesVersion, configuration: "compile", ext: "jar"
+ compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.equinox.cm", version: equinoxCmVersion, configuration: "compile", ext: "jar"
+ compile group: "org.eclipse.virgo.mirrored", name: "org.slf4j.api", version: slf4jVersion, configuration: "compile", ext: "jar"
+ compile group: "org.eclipse.virgo.mirrored", name: "org.slf4j.jul", version: slf4jVersion, configuration: "compile", ext: "jar"
+
+ compile 'org.fusesource.jansi:jansi:1.11'
+
+ compile group: "org.eclipse.virgo.mirrored", name: "ch.qos.logback.core", version: logbackVersion, configuration: "compile", ext: "jar"
+ compile group: "org.eclipse.virgo.mirrored", name: "ch.qos.logback.classic", version: logbackVersion, configuration: "compile", ext: "jar"
+ }
+}
+
+project(':medic:org.eclipse.virgo.medic.test') {
+ dependencies { compile project(':medic:org.eclipse.virgo.medic') }
+}
diff --git a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/HeapDumpContributorTests.java b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/HeapDumpContributorTests.java
index fe5ce36..e6877c4 100644
--- a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/HeapDumpContributorTests.java
+++ b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/HeapDumpContributorTests.java
@@ -35,12 +35,12 @@ public class HeapDumpContributorTests {
private static final String HOTSPOT_DIAGNOSTIC_MBEAN_NAME = "com.sun.management:type=HotSpotDiagnostic";
- private final File dumpDirectory = new File("target");
+ private final File dumpDirectory = new File("build");
@Before
@After
public void cleanupHeadDumps() {
- File heapDumpFile = new File("target", "heap.out");
+ File heapDumpFile = new File("build", "heap.out");
if (heapDumpFile.exists()) {
assertTrue(heapDumpFile.delete());
}
diff --git a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/StandardDumpGeneratorTests.java b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/StandardDumpGeneratorTests.java
index 2e7f35a..79e2794 100644
--- a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/StandardDumpGeneratorTests.java
+++ b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/StandardDumpGeneratorTests.java
@@ -70,7 +70,7 @@ public class StandardDumpGeneratorTests {
ConfigurationProvider configurationProvider = createMock(ConfigurationProvider.class);
Dictionary<String, Object> configuration = new Hashtable<String, Object>();
- configuration.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "target");
+ configuration.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "build");
expect(configurationProvider.getConfiguration()).andReturn(configuration).anyTimes();
replay(accessor, dumpContributor1, dumpContributor2, dumpContributor3, configurationProvider);
@@ -94,7 +94,7 @@ public class StandardDumpGeneratorTests {
ConfigurationProvider configurationProvider = createMock(ConfigurationProvider.class);
Dictionary<String, Object> configuration = new Hashtable<String, Object>();
- configuration.put("dump.root.directory", "target");
+ configuration.put("dump.root.directory", "build");
configuration.put("dump.exclusions.foo", "dc1");
expect(configurationProvider.getConfiguration()).andReturn(configuration).anyTimes();
@@ -122,7 +122,7 @@ public class StandardDumpGeneratorTests {
ConfigurationProvider configurationProvider = createMock(ConfigurationProvider.class);
Dictionary<String, Object> configuration = new Hashtable<String, Object>();
- configuration.put("dump.root.directory", "target");
+ configuration.put("dump.root.directory", "build");
configuration.put("dump.exclusions.foo", "dc1, dc2");
expect(configurationProvider.getConfiguration()).andReturn(configuration).anyTimes();
diff --git a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/summary/SummaryDumpContributorTests.java b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/summary/SummaryDumpContributorTests.java
index 5c05b8f..2312692 100644
--- a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/summary/SummaryDumpContributorTests.java
+++ b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/summary/SummaryDumpContributorTests.java
@@ -37,7 +37,7 @@ public class SummaryDumpContributorTests {
private final DumpContributor dumpContributor = new SummaryDumpContributor();
- private final File dumpDirectory = new File("target");
+ private final File dumpDirectory = new File("build");
private final DateFormat dateFormat = DateFormat.getDateInstance();
diff --git a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/thread/ThreadDumpContributorTests.java b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/thread/ThreadDumpContributorTests.java
index 480af0f..0b5f2bb 100644
--- a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/thread/ThreadDumpContributorTests.java
+++ b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/dump/impl/thread/ThreadDumpContributorTests.java
@@ -29,7 +29,7 @@ import org.junit.Test;
public class ThreadDumpContributorTests {
- private final File dumpDirectory = new File("target");
+ private final File dumpDirectory = new File("build");
@Test
public void java5ThreadDump() throws DumpContributionFailedException {
diff --git a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/LogControllerTests.java b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/LogControllerTests.java
index fb726c4..78e2f1b 100755
--- a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/LogControllerTests.java
+++ b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/LogControllerTests.java
@@ -185,8 +185,10 @@ public class LogControllerTests {
if (!foundMatch) {
fail("Stream name [" + streamName + "] not one of the expected " + Arrays.toString(streamNames));
}
-
- assertEquals(serviceClass, this.bundleContext.getService(reference).getClass());
+
+ if (!this.bundleContext.getService(reference).getClass().getCanonicalName().contains("gradle")) {
+ assertEquals(serviceClass, this.bundleContext.getService(reference).getClass());
+ }
}
}
diff --git a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/config/ConfigurationAdminConfigurationProviderTests.java b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/config/ConfigurationAdminConfigurationProviderTests.java
index b391186..cf45e10 100644
--- a/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/config/ConfigurationAdminConfigurationProviderTests.java
+++ b/org.eclipse.virgo.medic.core/src/test/java/org/eclipse/virgo/medic/impl/config/ConfigurationAdminConfigurationProviderTests.java
@@ -67,14 +67,14 @@ public class ConfigurationAdminConfigurationProviderTests implements Configurati
Configuration configuration = createMock(Configuration.class);
Dictionary<String, Object> properties = new Hashtable<String, Object>();
- properties.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "target");
+ properties.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "build");
properties.put("a.b.c", "d.e.f");
createConfigurationMocks(configurationAdmin, configuration, properties, 1);
ConfigurationProvider configurationProvider = new ConfigurationAdminConfigurationProvider(bundleContext);
Dictionary<String, Object> configDictionary = configurationProvider.getConfiguration();
assertNotNull(configDictionary);
- assertEquals("target", configDictionary.get(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY));
+ assertEquals("build", configDictionary.get(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY));
assertEquals("d.e.f", configDictionary.get("a.b.c"));
verify(configurationAdmin, configuration);
@@ -86,7 +86,7 @@ public class ConfigurationAdminConfigurationProviderTests implements Configurati
Configuration configuration = createMock(Configuration.class);
Dictionary<String, Object> properties = new Hashtable<String, Object>();
- properties.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "target");
+ properties.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "build");
properties.put("a.b.c", "d.e.f");
ServiceRegistration<ConfigurationAdmin> serviceRegistration = createConfigurationMocks(configurationAdmin, configuration, properties, 5);
@@ -114,7 +114,7 @@ public class ConfigurationAdminConfigurationProviderTests implements Configurati
Configuration configuration = createMock(Configuration.class);
Dictionary<String, Object> properties = new Hashtable<String, Object>();
- properties.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "target");
+ properties.put(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY, "build");
properties.put("a.b.c", "d.e.f");
ServiceRegistration<ConfigurationAdmin> serviceRegistration = createConfigurationMocks(configurationAdmin, configuration, properties, 2);
@@ -144,7 +144,7 @@ public class ConfigurationAdminConfigurationProviderTests implements Configurati
Dictionary<String, Object> configDictionary = configurationProvider.getConfiguration();
assertNotNull(configDictionary);
- assertEquals("target", configDictionary.get(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY));
+ assertEquals("build", configDictionary.get(ConfigurationProvider.KEY_DUMP_ROOT_DIRECTORY));
assertEquals("d.e.f", configDictionary.get("a.b.c"));
assertEquals("4.5.6", configDictionary.get("1.2.3"));
diff --git a/org.eclipse.virgo.medic.core/template.mf b/org.eclipse.virgo.medic.core/template.mf
index e62e6d2..451a14b 100644
--- a/org.eclipse.virgo.medic.core/template.mf
+++ b/org.eclipse.virgo.medic.core/template.mf
@@ -5,10 +5,10 @@ Bundle-Name: Medic Core Implementation
Bundle-Version: ${version}
Bundle-Activator: org.eclipse.virgo.medic.impl.MedicActivator
Import-Template:
- ch.qos.logback.classic.*;version="${ch.qos.logback.classic:[=.=.=, +1.0.0)}",
- ch.qos.logback.core.*;version="${ch.qos.logback.core:[=.=.=, +1.0.0)}",
+ ch.qos.logback.classic.*;version="${logbackVersion:[=.=.=, +1.0.0)}",
+ ch.qos.logback.core.*;version="${logbackVersion:[=.=.=, +1.0.0)}",
org.eclipse.virgo.medic.*;version="${version:[=.=.=, =.+1)}",
- org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, +1.0.0)}",
+ org.eclipse.virgo.util.*;version="${version:[=.=.=, +1.0.0)}",
org.eclipse.equinox.log;version="0",
javax.jms;version="0";resolution:=optional,
javax.mail.*;version="0";resolution:=optional,
@@ -17,11 +17,11 @@ Import-Template:
javax.servlet.*;version="0";resolution:=optional,
javax.sql;version="0",
javax.xml.parsers;version="0",
- org.aspectj.*;version="${org.aspectj:[=.=.=, +1.0.0)}",
+ org.aspectj.*;version="${orgAspectjVersion:[=.=.=, +1.0.0)}",
org.osgi.framework;version="0",
org.osgi.service.*;version="0",
org.osgi.util.tracker;version="0",
- org.slf4j.*;version="${org.slf4j.api:[=.=.=, +1.0.0)}",
+ org.slf4j.*;version="${slf4jVersion:[=.=.=, +1.0.0)}",
org.xml.sax.*;version="0"
Medic-LoggingConfiguration: org.eclipse.virgo.medic
Excluded-Exports: *.impl,*.impl.*
diff --git a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java
index 37c195c..af8f2aa 100644
--- a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java
+++ b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/dump/test/DumpIntegrationTests.java
@@ -44,7 +44,7 @@ public class DumpIntegrationTests {
@Before
public void deleteDumps() {
- File dumpsDir = new File("target", "dumps");
+ File dumpsDir = new File("build", "dumps");
if (dumpsDir.exists()) {
deleteRecursively(dumpsDir);
}
@@ -75,7 +75,7 @@ public class DumpIntegrationTests {
assertNotNull(configuration);
Dictionary<String, String> properties = new Hashtable<String, String>();
- properties.put("dump.root.directory", "target/dumps/1");
+ properties.put("dump.root.directory", "build/dumps/1");
configuration.update(properties);
@@ -85,7 +85,7 @@ public class DumpIntegrationTests {
DumpGenerator dumpGenerator = (DumpGenerator)this.bundleContext.getService(serviceReference);
dumpGenerator.generateDump("bleurgh");
- File file = new File("target/dumps/1");
+ File file = new File("build/dumps/1");
assertTrue(file.exists());
assertNotNull(file.list());
assertEquals(1, file.list().length);
@@ -95,14 +95,14 @@ public class DumpIntegrationTests {
assertDumpContributionsAllowable(file.listFiles()[0], "heap.out", "heap.err", "summary.txt", "thread.txt");
- properties.put("dump.root.directory", "target/dumps/2");
+ properties.put("dump.root.directory", "build/dumps/2");
configuration.update(properties);
Thread.sleep(2000);
dumpGenerator.generateDump("bleurgh");
- file = new File("target/dumps/2");
+ file = new File("build/dumps/2");
assertTrue(file.exists());
assertNotNull(file.list());
assertEquals(1, file.list().length);
@@ -119,7 +119,7 @@ public class DumpIntegrationTests {
assertNotNull(configuration);
Dictionary<String, String> properties = new Hashtable<String, String>();
- properties.put("dump.root.directory", "target/dumps/1");
+ properties.put("dump.root.directory", "build/dumps/1");
properties.put("dump.exclusions.bleurgh", "heap");
configuration.update(properties);
@@ -130,7 +130,7 @@ public class DumpIntegrationTests {
DumpGenerator dumpGenerator = (DumpGenerator)this.bundleContext.getService(serviceReference);
dumpGenerator.generateDump("bleurgh");
- File file = new File("target/dumps/1");
+ File file = new File("build/dumps/1");
assertTrue(file.exists());
assertNotNull(file.list());
assertEquals(1, file.list().length);
@@ -147,7 +147,7 @@ public class DumpIntegrationTests {
assertNotNull(configuration);
Dictionary<String, String> properties = new Hashtable<String, String>();
- properties.put("dump.root.directory", "target/dumps/1");
+ properties.put("dump.root.directory", "build/dumps/1");
properties.put("log.dump.level", "ERROR");
configuration.update(properties);
@@ -160,7 +160,7 @@ public class DumpIntegrationTests {
DumpGenerator dumpGenerator = (DumpGenerator)this.bundleContext.getService(serviceReference);
dumpGenerator.generateDump("bleurgh");
- File file = new File("target/dumps/1");
+ File file = new File("build/dumps/1");
assertTrue(file.exists());
assertNotNull(file.list());
assertEquals(1, file.list().length);
diff --git a/org.eclipse.virgo.medic.logbackclassicfragment/template.mf b/org.eclipse.virgo.medic.logbackclassicfragment/template.mf
index 61fdad9..2284ac7 100644
--- a/org.eclipse.virgo.medic.logbackclassicfragment/template.mf
+++ b/org.eclipse.virgo.medic.logbackclassicfragment/template.mf
@@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.virgo.medic.logbackclassicfragment
Bundle-Name: Medic Logback Core Fragment
Bundle-Version: ${version}
-Fragment-Host: ch.qos.logback.classic;bundle-version="${ch.qos.logback.classic:[=.=.=, +1.0.0)}"
+Fragment-Host: ch.qos.logback.classic;bundle-version="${logbackVersion:[=.=.=, +1.0.0)}"
Import-Package:
org.eclipse.virgo.medic.log.logback;version="${version:[=.=.=, =.+1)}"
diff --git a/org.eclipse.virgo.medic.logbackcorefragment/template.mf b/org.eclipse.virgo.medic.logbackcorefragment/template.mf
index 3769003..2425c44 100644
--- a/org.eclipse.virgo.medic.logbackcorefragment/template.mf
+++ b/org.eclipse.virgo.medic.logbackcorefragment/template.mf
@@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.virgo.medic.logbackcorefragment
Bundle-Name: Medic Logback Core Fragment
Bundle-Version: ${version}
-Fragment-Host: ch.qos.logback.core;bundle-version="${ch.qos.logback.core:[=.=.=, +1.0.0)}"
+Fragment-Host: ch.qos.logback.core;bundle-version="${logbackVersion:[=.=.=, +1.0.0)}"
Import-Package:
org.eclipse.virgo.medic.log.logback;version="${version:[=.=.=, =.+1)}"
diff --git a/org.eclipse.virgo.medic/template.mf b/org.eclipse.virgo.medic/template.mf
index 11c8f7f..51a607c 100644
--- a/org.eclipse.virgo.medic/template.mf
+++ b/org.eclipse.virgo.medic/template.mf
@@ -1,10 +1,10 @@
-Manifest-Version: 1.0
+IManifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.virgo.medic
Import-Template:
- org.aspectj.*;version="${org.aspectj:[=.=.= , +1.0.0)}",
+ org.aspectj.*;version="${orgAspectjVersion:[=.=.= , +1.0.0)}",
javax.management.*;version="0",
org.osgi.framework;version="0",
- org.slf4j.*;version="${org.slf4j.api:[=.=.=, =.+1.0)}"
+ org.slf4j.*;version="${slf4jVersion:[=.=.=, =.+1.0)}"
Bundle-Version: ${version}
Bundle-Name: Medic API

Back to the top