[rhq] pom.xml
by ips
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit cc100b6f0791bd5dec07c9d5cadf119cf744a8d2
Author: Ian Springer <ispringer(a)apptegic.com>
Date: Mon Mar 25 12:35:29 2013 -0400
update required jdk and maven versions to match what's on https://docs.jboss.org/author/display/RHQ/Building+RHQ
diff --git a/pom.xml b/pom.xml
index 136cd73..0d6a847 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1193,10 +1193,10 @@
<configuration>
<rules>
<requireMavenVersion>
- <version>2.1.0</version>
+ <version>3.0</version>
</requireMavenVersion>
<requireJavaVersion>
- <version>[1.6,1.8)</version> <!-- 1.6.x, 1.7.x -->
+ <version>[1.7,1.8)</version> <!-- 1.7.x -->
</requireJavaVersion>
</rules>
</configuration>
11 years, 2 months
[rhq] modules/core
by mazz
modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/PluginContainerClassEnhancer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 08d1940f310b9bf4089c59b4582039a2c4ade939
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Mar 25 12:01:29 2013 -0400
provide cause when this error happens
diff --git a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/PluginContainerClassEnhancer.java b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/PluginContainerClassEnhancer.java
index 82e64bb..aefad84 100644
--- a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/PluginContainerClassEnhancer.java
+++ b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/PluginContainerClassEnhancer.java
@@ -66,7 +66,7 @@ public class PluginContainerClassEnhancer {
pcClass.toClass(cl, null);
} catch (Exception e) {
- throw new IllegalStateException("Could not enhance the PluginContaier class");
+ throw new IllegalStateException("Could not enhance the PluginContainer class", e);
} finally {
initialized = true;
}
11 years, 2 months
[rhq] modules/helpers
by Heiko W. Rupp
modules/helpers/rest-docs-generator/pom.xml | 65 ++++++++++++++++------------
1 file changed, 39 insertions(+), 26 deletions(-)
New commits:
commit 93fe7c6c3d209598480d4bb06d1b537c1309d575
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Mar 25 11:24:15 2013 +0100
Use the maven compiler plugin instead of the (outdated) bsc annotation processor
diff --git a/modules/helpers/rest-docs-generator/pom.xml b/modules/helpers/rest-docs-generator/pom.xml
index 208d40b..1dff5bd 100644
--- a/modules/helpers/rest-docs-generator/pom.xml
+++ b/modules/helpers/rest-docs-generator/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ RHQ Management Platform
- ~ Copyright (C) 2005-2012 Red Hat, Inc.
+ ~ Copyright (C) 2005-2013 Red Hat, Inc.
~ All rights reserved.
~
~ This program is free software; you can redistribute it and/or modify
@@ -14,8 +14,8 @@
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
- ~ along with this program; if not, write to the Free Software
- ~ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ~ along with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -49,43 +49,56 @@
<plugins>
<plugin>
- <groupId>org.bsc.maven</groupId>
- <artifactId>maven-processor-plugin</artifactId>
- <version>2.0.6-redhat</version>
- <configuration>
- <processors>
- <processor>org.rhq.helpers.rest_docs_generator.ClassLevelProcessor</processor>
- </processors>
- <compilerArguments>-AtargetDirectory=${project.build.directory}/docs/xml</compilerArguments>
- <!-- comment in next line to get the xml on stdout for debugging -->
- <!--<compilerArguments>-Averbose=true</compilerArguments>-->
- </configuration>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
<executions>
<execution>
- <id>create-rest-api-report</id>
- <phase>process-classes</phase>
+ <!-- Compile the sources i.e. the processor plugin-->
+ <id>compile-processor</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <proc>none</proc>
+ <verbose>false</verbose>
+ </configuration>
+ </execution>
+ <execution>
+ <!-- Execute the compiled plugin on the test sources -->
+ <id>create-rest-api-reports</id>
+ <phase>process-test-classes</phase>
<goals>
<!-- We want to process the classes in test/ -->
- <goal>process-test</goal>
+ <goal>testCompile</goal>
</goals>
+ <configuration>
+ <annotationProcessors>
+ <processor>org.rhq.helpers.rest_docs_generator.ClassLevelProcessor</processor>
+ </annotationProcessors>
+ <proc>only</proc>
+ <compilerArguments>
+ <AtargetDirectory>${project.build.directory}/docs/xml</AtargetDirectory>
+ <AmodelPkg>org.rhq.helpers.rest_docs_generator.test</AmodelPkg>
+ <!-- enable the next line to have the output of the processor shown on console -->
+ <!--<Averbose>true</Averbose>-->
+ </compilerArguments>
+ <!-- set the next to true to enable verbose output of the compiler plugin; default from the evn is true, but this is too noisy -->
+ <verbose>false</verbose>
+ </configuration>
+
</execution>
</executions>
</plugin>
- <!-- Disable annotation processors during normal compilation -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <compilerArgument>-proc:none</compilerArgument>
- </configuration>
- </plugin>
+
<!-- now xml translate the output from above to html -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
- <phase>process-classes</phase>
+ <phase>process-test-classes</phase>
<goals>
<goal>transform</goal>
</goals>
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - modules/core
by mazz
modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java | 28 +
modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/IgnoreTypesInventoryManagerTest.java | 263 ++++++++++
2 files changed, 291 insertions(+)
New commits:
commit 086ce6d1e6bf8db3f9ece62b8d6ed60de00379e5
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sun Mar 24 00:32:48 2013 -0400
BZ 535289 - integration test of agent-side discovery/inventory when resource types are ignored then unignored
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java b/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java
index eb3b97d..b0a5315 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java
@@ -24,6 +24,7 @@ package org.rhq.core.domain.discovery;
import java.io.Serializable;
import java.util.Collection;
+import java.util.HashSet;
import javax.persistence.Column;
import javax.persistence.Entity;
@@ -39,6 +40,7 @@ import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.rhq.core.domain.resource.InventoryStatus;
+import org.rhq.core.domain.resource.Resource;
/**
* @author Ian Springer
@@ -103,4 +105,30 @@ public class ResourceSyncInfo implements Serializable {
return childSyncInfos;
}
+ public static ResourceSyncInfo buildResourceSyncInfo(Resource resource) {
+ Collection<ResourceSyncInfo> children;
+
+ if (resource.getChildResources() != null) {
+ children = new HashSet<ResourceSyncInfo>(resource.getChildResources().size());
+ for (Resource child : resource.getChildResources()) {
+ children.add(buildResourceSyncInfo(child));
+ }
+ } else {
+ children = new HashSet<ResourceSyncInfo>(0);
+ }
+
+ ResourceSyncInfo syncInfo = new ResourceSyncInfo(resource.getId(), resource.getUuid(), resource.getMtime(),
+ resource.getInventoryStatus(), children);
+
+ return syncInfo;
+ }
+
+ private ResourceSyncInfo(int id, String uuid, long mtime, InventoryStatus istatus,
+ Collection<ResourceSyncInfo> children) {
+ this.id = id;
+ this.uuid = uuid;
+ this.mtime = mtime;
+ this.inventoryStatus = istatus;
+ this.childSyncInfos = children;
+ }
}
diff --git a/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/IgnoreTypesInventoryManagerTest.java b/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/IgnoreTypesInventoryManagerTest.java
new file mode 100644
index 0000000..682b63a
--- /dev/null
+++ b/modules/core/plugin-container-itest/src/test/java/org/rhq/core/pc/inventory/IgnoreTypesInventoryManagerTest.java
@@ -0,0 +1,263 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.core.pc.inventory;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.TargetsContainer;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.arquillian.testng.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+
+import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.discovery.MergeInventoryReportResults;
+import org.rhq.core.domain.discovery.ResourceSyncInfo;
+import org.rhq.core.domain.resource.InventoryStatus;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.inventory.testplugin.ManualAddDiscoveryComponent;
+import org.rhq.core.pc.inventory.testplugin.TestResourceComponent;
+import org.rhq.core.pc.inventory.testplugin.TestResourceDiscoveryComponent;
+import org.rhq.test.arquillian.AfterDiscovery;
+import org.rhq.test.arquillian.BeforeDiscovery;
+import org.rhq.test.arquillian.MockingServerServices;
+import org.rhq.test.arquillian.RunDiscovery;
+import org.rhq.test.shrinkwrap.RhqAgentPluginArchive;
+
+/**
+ * Test the server ignoring resource types and notifying the {@link InventoryManager} about it.
+ *
+ * @author John Mazzitelli
+ */
+@RunDiscovery
+public class IgnoreTypesInventoryManagerTest extends Arquillian {
+
+ @Deployment(name = "test")
+ @TargetsContainer("pc")
+ public static RhqAgentPluginArchive getTestPlugin() {
+ RhqAgentPluginArchive pluginJar = ShrinkWrap.create(RhqAgentPluginArchive.class, "test-plugin.jar");
+ return pluginJar.setPluginDescriptor("test-great-grandchild-discovery-plugin.xml").addClasses(
+ TestResourceDiscoveryComponent.class, TestResourceComponent.class, ManualAddDiscoveryComponent.class);
+ }
+
+ @ArquillianResource
+ private MockingServerServices serverServices;
+
+ @ArquillianResource
+ private PluginContainerConfiguration pluginContainerConfiguration;
+
+ @ArquillianResource
+ private PluginContainer pluginContainer;
+
+ private Resource platform;
+ private HashMap<String, Resource> simulatedInventory; // key == UUID
+
+ private Collection<ResourceType> ignoredTypes;
+
+ private CountDownLatch gotIgnoredTypeFromAgent;
+
+ @BeforeDiscovery
+ public void resetServerServices() throws Exception {
+ platform = null;
+ simulatedInventory = new HashMap<String, Resource>();
+ gotIgnoredTypeFromAgent = new CountDownLatch(1); // will be open once we know agent discovered types we want ignored
+
+ ignoredTypes = new HashSet<ResourceType>();
+ ignoredTypes.add(new ResourceType("Test Service GrandChild", "test", null, null));
+ ignoredTypes.add(new ResourceType("Manual Add Server", "test", null, null));
+
+ serverServices.resetMocks();
+
+ when(serverServices.getDiscoveryServerService().mergeInventoryReport(any(InventoryReport.class))).then(
+ mergeInventoryReport());
+ }
+
+ @AfterDiscovery
+ public void afterDiscovery() throws Exception {
+ // wait for agent discovery to start getting ignored types
+ // actually, I don't think this latch will ever count down - if I did this right,
+ // the first inventory report will tell the agent about the ignored types - before the agent
+ // even attempted to discover resources of that type. Therefore, the agent will probably never
+ // send up resources of the ignored types. But we have to wait anyway for the few inventory reports
+ // that have to be received (which includes the resources of the unignored types).
+ gotIgnoredTypeFromAgent.await(20L, TimeUnit.SECONDS);
+ }
+
+ @Test
+ public void testIgnoreTypes() throws Exception {
+ // make sure the agent inventory does not have any resources of the ignored types
+ validatePartiallyIgnoredInventory();
+
+ // simulate the unignoring of all types (i.e. don't ignore any types anymore)
+ ignoredTypes.clear();
+
+ // Now execute a full discovery again, this time, we should see the full inventory come in
+ System.out.println("Executing full discovery...");
+ InventoryManager inventoryManager = pluginContainer.getInventoryManager();
+ InventoryReport report = inventoryManager.executeServerScanImmediately();
+ inventoryManager.handleReport(report);
+ report = inventoryManager.executeServiceScanImmediately();
+ inventoryManager.handleReport(report);
+ waitForFullInventory();
+ validateFullInventory();
+ }
+
+ private void waitForFullInventory() throws Exception {
+ long start = System.currentTimeMillis();
+ while (getInventoryDepth(platform) < 5) {
+ Thread.sleep(1000);
+ if (System.currentTimeMillis() - start > 30000L) {
+ break; // this should never take longer than 30s
+ }
+ }
+ return;
+ }
+
+ private int getInventoryDepth(Resource root) {
+ if (root == null) {
+ return 0;
+ }
+ int maxDepth = 0;
+ for (Resource c : root.getChildResources()) {
+ int childDepth = getInventoryDepth(c);
+ if (maxDepth < childDepth) {
+ maxDepth = childDepth;
+ }
+ }
+ return maxDepth + 1;
+ }
+
+ private Answer<MergeInventoryReportResults> mergeInventoryReport() {
+ return new Answer<MergeInventoryReportResults>() {
+ @Override
+ public MergeInventoryReportResults answer(InvocationOnMock invocation) throws Throwable {
+ InventoryReport inventoryReport = (InventoryReport) invocation.getArguments()[0];
+ return simulateInventoryReportServerProcessing(inventoryReport);
+ }
+ };
+ }
+
+ private MergeInventoryReportResults simulateInventoryReportServerProcessing(InventoryReport inventoryReport) {
+ ResourceSyncInfo syncInfo = null;
+ if (inventoryReport.getAddedRoots() != null && !inventoryReport.getAddedRoots().isEmpty()) {
+ for (Resource res : inventoryReport.getAddedRoots()) {
+ persistInSimulatedInventory(res);
+ }
+ syncInfo = ResourceSyncInfo.buildResourceSyncInfo(platform);
+ }
+ return new MergeInventoryReportResults(syncInfo, ignoredTypes);
+ }
+
+ private void persistInSimulatedInventory(Resource res) {
+ if (!ignoredTypes.contains(res.getResourceType())) {
+ if (!simulatedInventory.containsKey(res.getUuid())) {
+ Resource persisted = new Resource(res.getResourceKey(), res.getName(), res.getResourceType());
+ persisted.setUuid(res.getUuid());
+ persisted.setInventoryStatus(InventoryStatus.COMMITTED);
+ simulatedInventory.put(persisted.getUuid(), persisted);
+ if (res.getParentResource() == Resource.ROOT) {
+ platform = persisted;
+ } else {
+ Resource parent = simulatedInventory.get(res.getParentResource().getUuid());
+ parent.addChildResource(persisted);
+ }
+ }
+ for (Resource child : res.getChildResources()) {
+ persistInSimulatedInventory(child);
+ }
+ } else {
+ gotIgnoredTypeFromAgent.countDown();
+ }
+ return;
+ }
+
+ private void validateFullInventory() {
+ System.out.println("Validating full inventory...");
+
+ // get platform
+ Resource platform = pluginContainer.getInventoryManager().getPlatform();
+ Assert.assertNotNull(platform);
+ Assert.assertEquals(platform.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // get top server
+ Assert.assertEquals(platform.getChildResources().size(), 1, "plat children: " + platform.getChildResources());
+ Resource server = platform.getChildResources().iterator().next();
+ Assert.assertNotNull(server);
+ Assert.assertEquals(server.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // get top server's immediate child service
+ Assert.assertEquals(server.getChildResources().size(), 1, "srv children: " + server.getChildResources());
+ Resource service = server.getChildResources().iterator().next();
+ Assert.assertNotNull(service);
+ Assert.assertEquals(service.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // get top server's grandchild service
+ Assert.assertEquals(service.getChildResources().size(), 1, "svc children: " + service.getChildResources());
+ Resource grandchild = service.getChildResources().iterator().next();
+ Assert.assertNotNull(grandchild);
+ Assert.assertEquals(grandchild.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // get top server's great-grandchild service
+ Assert.assertEquals(grandchild.getChildResources().size(), 1, "svc grandch: " + grandchild.getChildResources());
+ Resource greatgrandchild = grandchild.getChildResources().iterator().next();
+ Assert.assertNotNull(greatgrandchild);
+ Assert.assertEquals(greatgrandchild.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ assert greatgrandchild.getChildResources().isEmpty() : "great grandchild should have no children";
+ }
+
+ private void validatePartiallyIgnoredInventory() {
+ System.out.println("Validating partially ignored inventory...");
+
+ // get platform
+ Resource platform = pluginContainer.getInventoryManager().getPlatform();
+ Assert.assertNotNull(platform);
+ Assert.assertEquals(platform.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // get top server
+ Assert.assertEquals(platform.getChildResources().size(), 1, "plat children: " + platform.getChildResources());
+ Resource server = platform.getChildResources().iterator().next();
+ Assert.assertNotNull(server);
+ Assert.assertEquals(server.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // get top server's immediate child service
+ Assert.assertEquals(server.getChildResources().size(), 1, "srv children: " + server.getChildResources());
+ Resource service = server.getChildResources().iterator().next();
+ Assert.assertNotNull(service);
+ Assert.assertEquals(service.getInventoryStatus(), InventoryStatus.COMMITTED);
+
+ // the grandchild service type is ignored, we should have no children from here on down
+ assert service.getChildResources().isEmpty() : "grandchild should have been ignored";
+ }
+}
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - 3 commits - modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 1920039d8044dab0e404048024ed75311cc407d0
Merge: 68cff96 946eb10
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sat Mar 23 00:25:00 2013 -0400
Merge remote-tracking branch 'origin/master' into bug/rhq-1
Conflicts:
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
commit 946eb10aae312260595d5c03d3a1989497b73dc8
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sat Mar 23 00:05:21 2013 -0400
revert this change - it broke several tests.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index 5003a7f..ba5fd3d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -76,7 +76,6 @@ import org.rhq.enterprise.server.authz.PermissionException;
import org.rhq.enterprise.server.content.ContentManagerHelper;
import org.rhq.enterprise.server.content.ContentManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
-import org.rhq.enterprise.server.rest.ResourceHandlerBean;
/**
* Bean to handle interaction with the resource factory subsystem of the plugin container. !! Warning, the factory
@@ -685,11 +684,9 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
DeleteResourceRequest request = new DeleteResourceRequest(persistedHistory.getId(), resourceId);
try {
- if (agent.getName() == null || !agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
- AgentClient agentClient = agentManager.getAgentClient(agent);
- ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
- resourceFactoryAgentService.deleteResource(request);
- }
+ AgentClient agentClient = agentManager.getAgentClient(agent);
+ ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
+ resourceFactoryAgentService.deleteResource(request);
return persistedHistory;
} catch (CannotConnectException e) {
commit 23cbdd1dca3dbe69daae924c5d931e18ddb3dda4
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Mar 22 21:36:33 2013 -0400
get the tests to pass
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index b1d0f3a..5003a7f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -685,7 +685,7 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
DeleteResourceRequest request = new DeleteResourceRequest(persistedHistory.getId(), resourceId);
try {
- if (!agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
+ if (agent.getName() == null || !agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
AgentClient agentClient = agentManager.getAgentClient(agent);
ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
resourceFactoryAgentService.deleteResource(request);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d375b16..e6a9333 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -404,11 +404,13 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
// but not if this is a synthetic agent that was created in the REST-api
// See org.rhq.enterprise.server.rest.ResourceHandlerBean.createPlatformInternal()
// See also https://docs.jboss.org/author/display/RHQ/Virtual+platforms+and+synthetic...
- if (agentClient != null && !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
- try {
- agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
- } catch (Exception e) {
- log.warn(" Unable to inform agent of inventory removal for resource [" + resourceId + "]", e);
+ if (agentClient != null) {
+ if (agentClient.getAgent() == null || agentClient.getAgent().getName() == null || !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
+ try {
+ agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
+ } catch (Exception e) {
+ log.warn(" Unable to inform agent of inventory removal for resource [" + resourceId + "]", e);
+ }
}
}
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java | 2 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 12 +++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 68cff96410cbc296eb360ee89825b34c2f8765a5
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Mar 22 21:36:33 2013 -0400
get the tests to pass
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index b1d0f3a..5003a7f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -685,7 +685,7 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
DeleteResourceRequest request = new DeleteResourceRequest(persistedHistory.getId(), resourceId);
try {
- if (!agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
+ if (agent.getName() == null || !agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
AgentClient agentClient = agentManager.getAgentClient(agent);
ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
resourceFactoryAgentService.deleteResource(request);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d02290f..a608d0e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -424,11 +424,13 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
// but not if this is a synthetic agent that was created in the REST-api
// See org.rhq.enterprise.server.rest.ResourceHandlerBean.createPlatformInternal()
// See also https://docs.jboss.org/author/display/RHQ/Virtual+platforms+and+synthetic...
- if (agentClient != null && !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
- try {
- agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
- } catch (Exception e) {
- log.warn(" Unable to inform agent of inventory removal for resource [" + resourceId + "]", e);
+ if (agentClient != null) {
+ if (agentClient.getAgent() == null || agentClient.getAgent().getName() == null || !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
+ try {
+ agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
+ } catch (Exception e) {
+ log.warn(" Unable to inform agent of inventory removal for resource [" + resourceId + "]", e);
+ }
}
}
11 years, 2 months
[rhq] modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 946eb10aae312260595d5c03d3a1989497b73dc8
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sat Mar 23 00:05:21 2013 -0400
revert this change - it broke several tests.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index 5003a7f..ba5fd3d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -76,7 +76,6 @@ import org.rhq.enterprise.server.authz.PermissionException;
import org.rhq.enterprise.server.content.ContentManagerHelper;
import org.rhq.enterprise.server.content.ContentManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
-import org.rhq.enterprise.server.rest.ResourceHandlerBean;
/**
* Bean to handle interaction with the resource factory subsystem of the plugin container. !! Warning, the factory
@@ -685,11 +684,9 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
DeleteResourceRequest request = new DeleteResourceRequest(persistedHistory.getId(), resourceId);
try {
- if (agent.getName() == null || !agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
- AgentClient agentClient = agentManager.getAgentClient(agent);
- ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
- resourceFactoryAgentService.deleteResource(request);
- }
+ AgentClient agentClient = agentManager.getAgentClient(agent);
+ ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
+ resourceFactoryAgentService.deleteResource(request);
return persistedHistory;
} catch (CannotConnectException e) {
11 years, 2 months
[rhq] Branch 'bug/rhq-1' - 8 commits - etc/augeas-utils modules/cli-tests modules/common modules/core modules/enterprise modules/helpers modules/integration-tests modules/plugins modules/test-utils pom.xml
by mazz
etc/augeas-utils/pom.xml | 5
modules/cli-tests/pom.xml | 3
modules/common/ant-bundle/pom.xml | 3
modules/common/drift/pom.xml | 1
modules/common/jboss-as/pom.xml | 2
modules/core/arquillian-integration/container/pom.xml | 3
modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/DiscoveryResultsTestEnricher.java | 9
modules/core/client-api/pom.xml | 1
modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/PluginMetadataManager.java | 107 ++-
modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/ResourceTypeNotEnabledException.java | 65 +
modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/MetadataManagerDisabledTypesTest.java | 32
modules/core/dbutils/pom.xml | 3
modules/core/domain/pom.xml | 19
modules/core/gui/pom.xml | 1
modules/core/native-system/pom.xml | 1
modules/core/plugin-api/pom.xml | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceComponent.java | 48 -
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceDiscoveryComponent.java | 42 -
modules/core/plugin-container/pom.xml | 1
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/AutoDiscoveryExecutor.java | 3
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java | 69 +-
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/RuntimeDiscoveryExecutor.java | 6
modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginComponentFactory.java | 9
modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java | 7
modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginValidator.java | 23
modules/core/plugin-container/src/main/java/org/rhq/core/pc/upgrade/ResourceUpgradeDelegate.java | 11
modules/core/plugin-test-api/pom.xml | 2
modules/core/plugin-test-util/pom.xml | 1
modules/core/plugin-validator/pom.xml | 1
modules/core/plugindoc/pom.xml | 2
modules/core/util/pom.xml | 1
modules/enterprise/agent/pom.xml | 3
modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/promptcmd/DiscoveryPromptCommand.java | 3
modules/enterprise/agentupdate/pom.xml | 2
modules/enterprise/binding/pom.xml | 4
modules/enterprise/comm/pom.xml | 1
modules/enterprise/gui/content_http-war/pom.xml | 13
modules/enterprise/gui/portal-war/pom.xml | 7
modules/enterprise/gui/remoting-war/pom.xml | 1
modules/enterprise/gui/rest-examples-war/pom.xml | 1
modules/enterprise/gui/rest-war/pom.xml | 1
modules/enterprise/remoting/cli/pom.xml | 1
modules/enterprise/remoting/client-api/pom.xml | 2
modules/enterprise/remoting/client-deps/pom.xml | 47 -
modules/enterprise/scripting/api/pom.xml | 1
modules/enterprise/scripting/javascript/pom.xml | 1
modules/enterprise/scripting/python/pom.xml | 1
modules/enterprise/server/appserver/pom.xml | 1
modules/enterprise/server/client-api/pom.xml | 2
modules/enterprise/server/ear/pom.xml | 1
modules/enterprise/server/installer/pom.xml | 1
modules/enterprise/server/itests-2/pom.xml | 4
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java | 10
modules/enterprise/server/jar/pom.xml | 11
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java | 9
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 12
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java | 1
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java | 36 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ContentHandlerBean.java | 169 +++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java | 212 +++++-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceTypeHandlerBean.java | 97 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AvailabilitySummary.java | 221 ++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/CreateCBRresourceRequest.java | 56 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceTypeRest.java | 98 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/LinkSerializer.java | 5
modules/enterprise/server/plugins/alert-operations/pom.xml | 1
modules/enterprise/server/plugins/ant-bundle/pom.xml | 2
modules/enterprise/server/plugins/disk/pom.xml | 2
modules/enterprise/server/plugins/drift-mongodb/pom.xml | 1
modules/enterprise/server/plugins/groovy-script/pom.xml | 14
modules/enterprise/server/plugins/jboss-software/pom.xml | 2
modules/enterprise/server/plugins/url/pom.xml | 1
modules/enterprise/server/sars/agent-sar/pom.xml | 4
modules/enterprise/server/sars/services-sar/pom.xml | 19
modules/enterprise/server/xml-schemas/pom.xml | 1
modules/helpers/bundleGen/pom.xml | 2
modules/helpers/inventory-serializer/pom.xml | 1
modules/helpers/perftest-support/pom.xml | 2
modules/helpers/pluginGen/pom.xml | 2
modules/helpers/rest-docs-generator/pom.xml | 1
modules/helpers/rtfilter/pom.xml | 1
modules/integration-tests/jndi-access/jndi-access-test/pom.xml | 1
modules/integration-tests/jndi-access/remote-server/pom.xml | 1
modules/integration-tests/mod_cluster-plugin-test/pom.xml | 1
modules/integration-tests/rest-api/pom.xml | 1
modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java | 4
modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java | 13
modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java | 333 ++++++++++
modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java | 218 +++++-
modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/CreateCBRRequest.java | 49 +
modules/integration-tests/rest-api/src/test/resources/test-simple.war |binary
modules/plugins/aliases/pom.xml | 1
modules/plugins/ant-bundle/pom.xml | 2
modules/plugins/apache/pom.xml | 2
modules/plugins/augeas/pom.xml | 3
modules/plugins/cassandra/pom.xml | 1
modules/plugins/cobbler/pom.xml | 3
modules/plugins/cron/pom.xml | 1
modules/plugins/grub/pom.xml | 1
modules/plugins/hadoop/pom.xml | 1
modules/plugins/hosts/pom.xml | 1
modules/plugins/irc/pom.xml | 1
modules/plugins/jboss-as-5/pom.xml | 4
modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/test/AbstractResourceTest.java | 8
modules/plugins/jboss-as-5/testsuite/pom.xml | 1
modules/plugins/jboss-as-7/pom.xml | 2
modules/plugins/jboss-as/pom.xml | 4
modules/plugins/mod-cluster/pom.xml | 1
modules/plugins/netservices/pom.xml | 3
modules/plugins/pattern-generator/pom.xml | 1
modules/plugins/perftest/pom.xml | 1
modules/plugins/postfix/pom.xml | 1
modules/plugins/raw-config-test/pom.xml | 9
modules/plugins/samba/pom.xml | 1
modules/plugins/snmptrapd/pom.xml | 1
modules/plugins/sshd/pom.xml | 1
modules/plugins/sudoers/pom.xml | 1
modules/plugins/tomcat/pom.xml | 2
modules/plugins/twitter/pom.xml | 1
modules/test-utils/pom.xml | 3
pom.xml | 206 +++++-
122 files changed, 1953 insertions(+), 516 deletions(-)
New commits:
commit 9e3b1e1dc281fcf4202190a961d392a3803ff503
Merge: 5e7ab82 896e6c6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Mar 22 21:37:24 2013 -0400
Merge remote-tracking branch 'origin/master' into bug/rhq-1
Conflicts:
pom.xml
commit 5e7ab82c6d032d944edcaae00d28c0b96b17aa3c
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Mar 22 18:44:51 2013 -0400
BZ 535289 agent-side ignore of resource types
diff --git a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/DiscoveryResultsTestEnricher.java b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/DiscoveryResultsTestEnricher.java
index 7b06bba..52bb15b 100644
--- a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/DiscoveryResultsTestEnricher.java
+++ b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/DiscoveryResultsTestEnricher.java
@@ -11,6 +11,7 @@ import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.test.spi.annotation.TestScoped;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pc.PluginContainer;
@@ -183,7 +184,13 @@ public class DiscoveryResultsTestEnricher implements PostPrepareEnricher {
private Class<?> getResourceComponentClass(ResourceType resourceType) {
PluginMetadataManager pmm = getPluginContainer().getPluginManager().getMetadataManager();
- String componentClassName = pmm.getComponentClass(resourceType);
+ String componentClassName;
+ try {
+ componentClassName = pmm.getComponentClass(resourceType);
+ } catch (ResourceTypeNotEnabledException rtne) {
+ throw new RuntimeException(rtne);
+ }
+
try {
return Class.forName(componentClassName);
} catch (ClassNotFoundException e) {
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/PluginMetadataManager.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/PluginMetadataManager.java
index c091125..e75b7df 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/PluginMetadataManager.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/PluginMetadataManager.java
@@ -23,6 +23,7 @@
package org.rhq.core.clientapi.agent.metadata;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
@@ -74,10 +75,12 @@ public class PluginMetadataManager {
private Map<String, PluginDescriptor> descriptorsByPlugin = new HashMap<String, PluginDescriptor>();
+ // "disabled" types are disabled entirely at initialization time and will be disable for the lifetime of this manager.
+ // "ignored" types are ignored but can be unignored at a later time.
private List<String> disabledResourceTypesAsStrings = null;
private Map<ResourceType, String> disabledResourceTypes = null;
- private String disabledDiscoveryComponentClassName = null;
- private String disabledResourceComponentClassName = null;
+ private Set<ResourceType> ignoredResourceTypes = null;
+ private Object disabledIgnoredTypesLock = new Object(); // used when accessing disabled and ignored collections
public PluginMetadataManager() {
}
@@ -143,17 +146,19 @@ public class PluginMetadataManager {
return (parser != null) ? parser.getPluginLifecycleListenerClass() : null;
}
- public String getDiscoveryClass(ResourceType resourceType) {
- if (isDisabledResourceType(resourceType)) {
- return this.disabledDiscoveryComponentClassName;
+ public String getDiscoveryClass(ResourceType resourceType) throws ResourceTypeNotEnabledException {
+ if (isDisabledOrIgnoredResourceType(resourceType)) {
+ log.debug("resource type is disabled - rejecting request for discovery class name: " + resourceType);
+ throw new ResourceTypeNotEnabledException(resourceType);
}
PluginMetadataParser parser = this.parsersByPlugin.get(resourceType.getPlugin());
return (parser != null) ? parser.getDiscoveryComponentClass(resourceType) : null;
}
- public String getComponentClass(ResourceType resourceType) {
- if (isDisabledResourceType(resourceType)) {
- return this.disabledResourceComponentClassName;
+ public String getComponentClass(ResourceType resourceType) throws ResourceTypeNotEnabledException {
+ if (isDisabledOrIgnoredResourceType(resourceType)) {
+ log.debug("resource type is disabled - rejecting request for component class name: " + resourceType);
+ throw new ResourceTypeNotEnabledException(resourceType);
}
PluginMetadataParser parser = this.parsersByPlugin.get(resourceType.getPlugin());
return (parser != null) ? parser.getComponentClass(resourceType) : null;
@@ -194,7 +199,9 @@ public class PluginMetadataManager {
}
}
- findDisabledResourceTypesInAllPlugins();
+ synchronized (disabledIgnoredTypesLock) {
+ findDisabledResourceTypesInAllPlugins();
+ }
Set<ResourceType> rootTypes = parser.getRootResourceTypes();
return rootTypes;
@@ -365,42 +372,81 @@ public class PluginMetadataManager {
}
/**
- * This will define resource types that will be disabled - and by that it means
- * the discovery and resource components will not do anything (it is assumed
- * the classnames for the component classes will not do anything).
+ * This will set the given resource types to be the set of types that are to be ignored.
+ *
+ * @param ignoredTypes all the types to now ignore - overrides any set of types that previously were ignored
+ */
+ public void setIgnoredResourceTypes(Collection<ResourceType> ignoredTypes) {
+ synchronized (disabledIgnoredTypesLock) {
+ if (ignoredTypes == null || ignoredTypes.isEmpty()) {
+ this.ignoredResourceTypes = null;
+ } else {
+ if (this.ignoredResourceTypes == null) {
+ this.ignoredResourceTypes = new HashSet<ResourceType>(ignoredTypes);
+ } else {
+ this.ignoredResourceTypes.clear();
+ this.ignoredResourceTypes.addAll(ignoredTypes);
+ }
+ }
+ }
+ }
+
+ /**
+ * This will define resource types that will be disabled.
*
* Owners of this metadata manager need to set this during initialization prior to
- * loading any plugins.
+ * loading any plugins. Calling this after this manager has been initialized will have no effect.
*
* @param disabledTypesAsStrings list of types, in the form "pluginName>parentType>childType"
- * @param disabledDiscoveryComponentClassName the name of the discovery component class of all disable types
- * @param disabledResourceComponentClassName the name of the resource component class of all disable types
*/
- public void setDisabledResourceTypes(List<String> disabledTypesAsStrings,
- String disabledDiscoveryComponentClassName, String disabledResourceComponentClassName) {
-
- if (disabledTypesAsStrings != null && !disabledTypesAsStrings.isEmpty()) {
- this.disabledDiscoveryComponentClassName = disabledDiscoveryComponentClassName;
- this.disabledResourceComponentClassName = disabledResourceComponentClassName;
- this.disabledResourceTypesAsStrings = new ArrayList<String>(disabledTypesAsStrings);
- log.info("Will disable the following resource types: " + this.disabledResourceTypesAsStrings);
- } else {
- this.disabledDiscoveryComponentClassName = null;
- this.disabledResourceComponentClassName = null;
- this.disabledResourceTypesAsStrings = null;
+ public void setDisabledResourceTypes(List<String> disabledTypesAsStrings) {
+
+ synchronized (disabledIgnoredTypesLock) {
+ if (disabledTypesAsStrings != null && !disabledTypesAsStrings.isEmpty()) {
+ this.disabledResourceTypesAsStrings = new ArrayList<String>(disabledTypesAsStrings);
+ log.info("Will disable the following resource types: " + this.disabledResourceTypesAsStrings);
+ } else {
+ this.disabledResourceTypesAsStrings = null;
+ }
}
return;
}
- private boolean isDisabledResourceType(ResourceType resourceType) {
- if (this.disabledResourceTypes == null) {
+ /**
+ * Returns true if the given resource type was either disabled at initialization time
+ * or subsequently ignored. Both have the same effect, a disabled or ignored resource type
+ * means there should not be resources of that type in inventory.
+ *
+ * @param resourceType the type to check
+ * @return true if no resources of this type should be in inventory; if resourceType is null
+ * then false is returned
+ */
+ public boolean isDisabledOrIgnoredResourceType(ResourceType resourceType) {
+ if (resourceType == null) {
return false;
}
- return this.disabledResourceTypes.containsKey(resourceType);
+
+ synchronized (disabledIgnoredTypesLock) {
+ // is it ignored?
+ if (this.ignoredResourceTypes != null) {
+ if (this.ignoredResourceTypes.contains(resourceType)) {
+ return true;
+ }
+ }
+ // is it disabled?
+ if (this.disabledResourceTypes != null) {
+ if (this.disabledResourceTypes.containsKey(resourceType)) {
+ return true;
+ }
+ }
+ }
+ // its neither disabled nor ignored
+ return false;
}
// finds if type or its children are disabled and if so adds them to the map with their string representation
private void findDisabledResourceTypes(String parentHierarchy, ResourceType type,
+ // NOTE: we don't synchronize on disabledTypesLock because we ensured our calling context already has the lock
HashMap<ResourceType, String> disabledTypes) {
// this is the current level we are at in the type hierarchy, as written in string form ("plugin>type>type...")
String typeHierarchy = parentHierarchy + '>' + type.getName();
@@ -423,6 +469,7 @@ public class PluginMetadataManager {
}
private void findDisabledResourceTypesInAllPlugins() {
+ // NOTE: we don't synchronize on disabledTypesLock because we ensured our calling context already has the lock
if (this.disabledResourceTypesAsStrings != null) {
int totalToBeDisabled = this.disabledResourceTypesAsStrings.size();
// we have to do it all over again over all plugins because we need to support the injection extension model
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/ResourceTypeNotEnabledException.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/ResourceTypeNotEnabledException.java
new file mode 100644
index 0000000..22cc53d
--- /dev/null
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/ResourceTypeNotEnabledException.java
@@ -0,0 +1,65 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.core.clientapi.agent.metadata;
+
+import org.rhq.core.domain.resource.ResourceType;
+
+/**
+ * Indicates a specific resource type is not enabled and no resources should be instantiated
+ * that are of this type.
+ *
+ * @author John Mazzitelli
+ */
+public class ResourceTypeNotEnabledException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private final ResourceType resourceType;
+
+ public ResourceTypeNotEnabledException() {
+ this((ResourceType) null);
+ }
+
+ public ResourceTypeNotEnabledException(ResourceType rt) {
+ super();
+ this.resourceType = rt;
+ }
+
+ public ResourceTypeNotEnabledException(String message) {
+ this(message, null);
+ }
+
+ public ResourceTypeNotEnabledException(String message, ResourceType rt) {
+ super(message);
+ this.resourceType = rt;
+ }
+
+ /**
+ * @return the resource type that was not enabled.
+ */
+ public ResourceType getResourceType() {
+ return this.resourceType;
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " [" + this.resourceType + "]";
+ }
+}
diff --git a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/MetadataManagerDisabledTypesTest.java b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/MetadataManagerDisabledTypesTest.java
index d95f099..42d188c 100644
--- a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/MetadataManagerDisabledTypesTest.java
+++ b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/MetadataManagerDisabledTypesTest.java
@@ -35,6 +35,7 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.clientapi.descriptor.DescriptorPackages;
import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
import org.rhq.core.domain.resource.ResourceCategory;
@@ -51,8 +52,6 @@ public class MetadataManagerDisabledTypesTest {
private static final String DESCRIPTOR_FILENAME_TEST3 = "metadata-manager-test-3.xml";
private PluginMetadataManager metadataManager;
- private final String disabledDiscoveryClazz = "org.rhq.test.DisabledDiscoveryClazzName";
- private final String disabledComponentClazz = "org.rhq.test.DisabledResourceClazzName";
@BeforeClass
public void beforeClass() {
@@ -66,8 +65,7 @@ public class MetadataManagerDisabledTypesTest {
disabledTypes.add("Test2>Extension Server B>Service D"); // from DESCRIPTOR_FILENAME_TEST2
disabledTypes.add("Test1>Server A>Injection D To Server A"); // from DESCRIPTOR_FILENAME_TEST3
disabledTypes.add("Test2>Extension Server B>Injection C To Server A"); // from DESCRIPTOR_FILENAME_TEST3
- this.metadataManager
- .setDisabledResourceTypes(disabledTypes, disabledDiscoveryClazz, disabledComponentClazz);
+ this.metadataManager.setDisabledResourceTypes(disabledTypes);
} catch (Throwable t) {
// Catch RuntimeExceptions and Errors and dump their stack trace, because Surefire will completely swallow them
@@ -191,13 +189,31 @@ public class MetadataManagerDisabledTypesTest {
}
private void assertIsDisabledType(ResourceType type) {
- assert metadataManager.getDiscoveryClass(type).equals(this.disabledDiscoveryClazz);
- assert metadataManager.getComponentClass(type).equals(this.disabledComponentClazz);
+ try {
+ metadataManager.getDiscoveryClass(type);
+ assert false : "Discovery: should have been disabled: " + type;
+ } catch (ResourceTypeNotEnabledException ok) {
+ }
+
+ try {
+ metadataManager.getComponentClass(type);
+ assert false : "Component: should have been disabled: " + type;
+ } catch (ResourceTypeNotEnabledException ok) {
+ }
}
private void assertIsNOTDisabledType(ResourceType type) {
- assert !metadataManager.getDiscoveryClass(type).equals(this.disabledDiscoveryClazz);
- assert !metadataManager.getComponentClass(type).equals(this.disabledComponentClazz);
+ try {
+ metadataManager.getDiscoveryClass(type);
+ } catch (ResourceTypeNotEnabledException ok) {
+ assert false : "Discovery: should not have been disabled: " + type;
+ }
+
+ try {
+ metadataManager.getComponentClass(type);
+ } catch (ResourceTypeNotEnabledException ok) {
+ assert false : "Component: should not have been disabled: " + type;
+ }
}
private ResourceType getResourceType(ResourceType typeToGet) {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceComponent.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceComponent.java
deleted file mode 100644
index ddb9094..0000000
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceComponent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2013 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.pluginapi.inventory;
-
-import org.rhq.core.domain.measurement.AvailabilityType;
-
-/**
- * This is used when a resource type is disabled. It simply will do no work
- * and {@link #getAvailability()} will never show UP.
- *
- * @author John Mazzitelli
- */
-@SuppressWarnings("rawtypes")
-public class DisabledResourceComponent implements ResourceComponent {
-
- @Override
- public AvailabilityType getAvailability() {
- return AvailabilityType.DOWN;
- }
-
- @Override
- public void start(ResourceContext context) throws InvalidPluginConfigurationException, Exception {
- }
-
- @Override
- public void stop() {
- }
-}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceDiscoveryComponent.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceDiscoveryComponent.java
deleted file mode 100644
index 17ca66a..0000000
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/DisabledResourceDiscoveryComponent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2013 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.pluginapi.inventory;
-
-import java.util.Collections;
-import java.util.Set;
-
-/**
- * This is used when a resource type is disabled. When this discovery component is used for a type,
- * it will simply not return any discovered resources.
- *
- * @author John Mazzitelli
- */
-@SuppressWarnings("rawtypes")
-public class DisabledResourceDiscoveryComponent implements ResourceDiscoveryComponent {
-
- @Override
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
- throws InvalidPluginConfigurationException, Exception {
- return Collections.emptySet();
- }
-}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/AutoDiscoveryExecutor.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/AutoDiscoveryExecutor.java
index 6ae4d53..3e852b3 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/AutoDiscoveryExecutor.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/AutoDiscoveryExecutor.java
@@ -37,6 +37,7 @@ import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;
import org.rhq.core.clientapi.agent.PluginContainerException;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.clientapi.server.discovery.AutoDiscoveryRequest;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
import org.rhq.core.domain.resource.InventoryStatus;
@@ -204,6 +205,8 @@ public class AutoDiscoveryExecutor implements Runnable, Callable<InventoryReport
}
}
}
+ } catch (ResourceTypeNotEnabledException rtne) {
+ // skipping all ignored resources
} catch (Throwable e) {
report.getErrors().add(new ExceptionPackage(Severity.Severe, e));
log.error("Error in auto discovery", e);
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index e66cb86..3e998b3 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -58,6 +58,7 @@ import org.rhq.core.clientapi.agent.configuration.ConfigurationUtility;
import org.rhq.core.clientapi.agent.discovery.DiscoveryAgentService;
import org.rhq.core.clientapi.agent.discovery.InvalidPluginConfigurationClientException;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.clientapi.agent.upgrade.ResourceUpgradeRequest;
import org.rhq.core.clientapi.agent.upgrade.ResourceUpgradeResponse;
import org.rhq.core.clientapi.server.discovery.DiscoveryServerService;
@@ -1096,6 +1097,18 @@ public class InventoryManager extends AgentService implements ContainerService,
return false;
}
+ // tell our metadata manager what resource types are to be ignored
+ PluginMetadataManager metadataMgr = this.pluginManager.getMetadataManager();
+ if (ignoredTypes != null && !ignoredTypes.isEmpty()) {
+ Collection<ResourceType> ignoredSet = new HashSet<ResourceType>(ignoredTypes.size());
+ for (ResourceTypeFlyweight ignoredType : ignoredTypes) {
+ ignoredSet.add(new ResourceType(ignoredType.getName(), ignoredType.getPlugin(), null, null));
+ }
+ metadataMgr.setIgnoredResourceTypes(ignoredSet);
+ } else {
+ metadataMgr.setIgnoredResourceTypes(null);
+ }
+
//sync info can be null if the server hasn't received a full inventory report
//from us yet. This can happen if this method is being invoked from inside the
//resource upgrade executor to sync up with the server side inventory *JUST AFTER*
@@ -1105,7 +1118,7 @@ public class InventoryManager extends AgentService implements ContainerService,
//would change.
//In either case, let's sync up with the server - if it's got nothing, neither should the agent.
if (syncInfo != null) {
- synchInventory(syncInfo, ignoredTypes);
+ synchInventory(syncInfo);
} else {
purgeObsoleteResources(Collections.<String> emptySet());
@@ -1121,11 +1134,9 @@ public class InventoryManager extends AgentService implements ContainerService,
* This assumes the resource sync infos passed in represent the full inventory tree.
*
* @param syncInfo information on all resources in the entire inventory tree
- * @param ignoredTypes if non-null, a collection of resource type flyweights that tell
- * you what types of resources should be ignored.
*/
- private void synchInventory(ResourceSyncInfo syncInfo, Collection<ResourceTypeFlyweight> ignoredTypes) {
- synchInventory(syncInfo, false, ignoredTypes);
+ private void synchInventory(ResourceSyncInfo syncInfo) {
+ synchInventory(syncInfo, false);
}
/**
@@ -1134,11 +1145,8 @@ public class InventoryManager extends AgentService implements ContainerService,
* @param syncInfo the resources' sync data
* @param partialInventory if true, syncInfo represents only a partial inventory.
* if false, syncInfo represents the full inventory tree of all resources
- * @param ignoredTypes if non-null, a collection of resource type flyweights that tell
- * you what types of resources should be ignored.
*/
- private void synchInventory(ResourceSyncInfo syncInfo, boolean partialInventory,
- Collection<ResourceTypeFlyweight> ignoredTypes) {
+ private void synchInventory(ResourceSyncInfo syncInfo, boolean partialInventory) {
log.info("Syncing local inventory with Server inventory...");
long startTime = System.currentTimeMillis();
Set<Resource> syncedResources = new LinkedHashSet<Resource>();
@@ -1158,7 +1166,7 @@ public class InventoryManager extends AgentService implements ContainerService,
}
log.debug("Processing Server sync info...");
- processSyncInfo(syncInfo, ignoredTypes, syncedResources, unknownResourceSyncInfos, modifiedResourceIds,
+ processSyncInfo(syncInfo, syncedResources, unknownResourceSyncInfos, modifiedResourceIds,
deletedResourceIds, newlyCommittedResources);
if (log.isDebugEnabled()) {
log.debug(String.format("DONE Processing sync info - took [%d] ms - synced [%d] Resources "
@@ -1604,7 +1612,6 @@ public class InventoryManager extends AgentService implements ContainerService,
private ResourceContainer initResourceContainer(Resource resource) {
ResourceContainer resourceContainer = getResourceContainer(resource);
if (resourceContainer == null) {
- PluginComponentFactory factory = PluginContainer.getInstance().getPluginComponentFactory();
ClassLoader classLoader = getResourceClassLoader(resource);
resourceContainer = new ResourceContainer(resource, classLoader);
if (!this.configuration.isInsideAgent()) {
@@ -1655,6 +1662,11 @@ public class InventoryManager extends AgentService implements ContainerService,
ResourceContainer container, boolean forceReinitialization) throws InvalidPluginConfigurationException,
PluginContainerException {
+ // don't bother doing anything if this resource is of a disabled/ignored type
+ if (this.pluginManager.getMetadataManager().isDisabledOrIgnoredResourceType(resource.getResourceType())) {
+ return false;
+ }
+
if (resourceUpgradeDelegate.hasUpgradeFailed(resource)) {
if (log.isTraceEnabled()) {
log.trace("Skipping activation of " + resource + " - it has failed to upgrade.");
@@ -1728,6 +1740,7 @@ public class InventoryManager extends AgentService implements ContainerService,
log.debug("Creating component for [" + resource + "]...");
}
try {
+ // should not throw ResourceTypeNotEnabledException because we checked for that above - if it does, just handle it as an error
component = PluginContainer.getInstance().getPluginComponentFactory().buildResourceComponent(resource);
} catch (Throwable e) {
throw new PluginContainerException("Could not build component for Resource [" + resource + "]", e);
@@ -1743,11 +1756,12 @@ public class InventoryManager extends AgentService implements ContainerService,
if (isParentStarted) {
PluginComponentFactory factory = PluginContainer.getInstance().getPluginComponentFactory();
ResourceType type = resource.getResourceType();
- ResourceDiscoveryComponent discoveryComponent = factory
- .getDiscoveryComponent(type, parentResourceContainer);
// wrap the discovery component in a proxy to allow us to timeout discovery invocations
+ ResourceDiscoveryComponent discoveryComponent;
try {
+ // should not throw ResourceTypeNotEnabledException because we checked for that above - if it does, just handle it as an error
+ discoveryComponent = factory.getDiscoveryComponent(type, parentResourceContainer);
discoveryComponent = this.discoveryComponentProxyFactory.getDiscoveryComponentProxy(type,
discoveryComponent, getDiscoveryComponentTimeout(type), parentResourceContainer);
} catch (Exception e) {
@@ -2144,10 +2158,9 @@ public class InventoryManager extends AgentService implements ContainerService,
* @return The discovered platform (which might be a dummy in case of testing)
*/
private Resource discoverPlatform() {
- PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
PluginComponentFactory componentFactory = PluginContainer.getInstance().getPluginComponentFactory();
SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
- Set<ResourceType> platformTypes = pluginManager.getMetadataManager().getTypesForCategory(
+ Set<ResourceType> platformTypes = this.pluginManager.getMetadataManager().getTypesForCategory(
ResourceCategory.PLATFORM);
// This should only ever have 1 or, at most, 2 Resources
@@ -2182,6 +2195,8 @@ public class InventoryManager extends AgentService implements ContainerService,
if (discoveredResources != null) {
allDiscoveredPlatforms.addAll(discoveredResources);
}
+ } catch (ResourceTypeNotEnabledException rtne) {
+ log.debug("Skipping platform discovery - its type is disabled: " + platformType);
} catch (Throwable e) {
log.error("Error in platform discovery", e);
}
@@ -2234,7 +2249,7 @@ public class InventoryManager extends AgentService implements ContainerService,
* @return A dummy platform for testing purposes only.
*/
private Resource getTestPlatform() {
- ResourceType type = PluginContainer.getInstance().getPluginManager().getMetadataManager().addTestPlatformType();
+ ResourceType type = this.pluginManager.getMetadataManager().addTestPlatformType();
if (this.platform != null && this.platform.getResourceType() == type) {
return this.platform;
}
@@ -2253,7 +2268,7 @@ public class InventoryManager extends AgentService implements ContainerService,
+ "] and its descendants...");
// Get the latest resource data rooted at the given id.
- synchInventory(syncInfo, true, null); // this method assumes we only get a single resource and its children (BZ 887411)
+ synchInventory(syncInfo, true); // this method assumes we only get a single resource and its children (BZ 887411)
performServiceScan(syncInfo.getId()); // NOTE: This will block (the initial scan blocks).
}
@@ -2315,7 +2330,7 @@ public class InventoryManager extends AgentService implements ContainerService,
}
private boolean supportsDriftManagement(Resource r) {
- PluginMetadataManager metaDataMgr = PluginContainer.getInstance().getPluginManager().getMetadataManager();
+ PluginMetadataManager metaDataMgr = this.pluginManager.getMetadataManager();
ResourceType type = metaDataMgr.getType(r.getResourceType());
return type != null && type.getDriftDefinitionTemplates() != null
&& !type.getDriftDefinitionTemplates().isEmpty();
@@ -2779,9 +2794,10 @@ public class InventoryManager extends AgentService implements ContainerService,
return versionUpdated;
}
- private void processSyncInfo(ResourceSyncInfo syncInfo, Collection<ResourceTypeFlyweight> ignoredTypes,
- Set<Resource> syncedResources, Set<ResourceSyncInfo> unknownResourceSyncInfos,
- Set<Integer> modifiedResourceIds, Set<Integer> deletedResourceIds, Set<Resource> newlyCommittedResources) {
+ private void processSyncInfo(ResourceSyncInfo syncInfo, Set<Resource> syncedResources,
+ Set<ResourceSyncInfo> unknownResourceSyncInfos, Set<Integer> modifiedResourceIds,
+ Set<Integer> deletedResourceIds, Set<Resource> newlyCommittedResources) {
+
if (InventoryStatus.DELETED == syncInfo.getInventoryStatus()) {
// A previously deleted resource still being reported by the server. Support for this option can
// be removed if the server is ever modified to not report deleted resources. It is happening currently
@@ -2789,7 +2805,7 @@ public class InventoryManager extends AgentService implements ContainerService,
// in the PC inventory, and so must be handled separately, and not as unknown resources.
deletedResourceIds.add(syncInfo.getId());
} else {
- ResourceContainer container = this.resourceContainers.get(syncInfo.getUuid());
+ ResourceContainer container = getResourceContainer(syncInfo.getUuid());
if (container == null) {
// Either a manually added Resource or just something we haven't discovered.
// If this unknown resource is to be ignored, then don't bother to do anything.
@@ -2811,8 +2827,11 @@ public class InventoryManager extends AgentService implements ContainerService,
+ ", mtime=" + syncInfo.getMtime());
}
- if (InventoryStatus.IGNORED == syncInfo.getInventoryStatus()) {
- // a resource has been tagged to be ignored - we need to remove it from our inventory
+ final boolean ignoreResource = (InventoryStatus.IGNORED == syncInfo.getInventoryStatus());
+ final boolean ignoreResourceType = this.pluginManager.getMetadataManager()
+ .isDisabledOrIgnoredResourceType(resource.getResourceType());
+ if (ignoreResource || ignoreResourceType) {
+ // a resource or its type has been tagged to be ignored - we need to remove it from our inventory
deletedResourceIds.add(syncInfo.getId());
} else {
if (resource.getInventoryStatus() != InventoryStatus.COMMITTED
@@ -2848,7 +2867,7 @@ public class InventoryManager extends AgentService implements ContainerService,
// Recurse...
for (ResourceSyncInfo childSyncInfo : syncInfo.getChildSyncInfos()) {
- processSyncInfo(childSyncInfo, ignoredTypes, syncedResources, unknownResourceSyncInfos,
+ processSyncInfo(childSyncInfo, syncedResources, unknownResourceSyncInfos,
modifiedResourceIds, deletedResourceIds, newlyCommittedResources);
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/RuntimeDiscoveryExecutor.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/RuntimeDiscoveryExecutor.java
index 978083a..8c663b4 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/RuntimeDiscoveryExecutor.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/RuntimeDiscoveryExecutor.java
@@ -35,6 +35,7 @@ import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;
import org.rhq.core.clientapi.agent.PluginContainerException;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.AvailabilityType;
@@ -259,6 +260,11 @@ public class RuntimeDiscoveryExecutor implements Runnable, Callable<InventoryRep
ResourceDiscoveryComponent discoveryComponent = null;
try {
discoveryComponent = factory.getDiscoveryComponent(childResourceType, parentContainer);
+ } catch (ResourceTypeNotEnabledException rtne) {
+ if (log.isDebugEnabled()) {
+ log.debug("Resource not discoverable, type is disabled: " + childResourceType);
+ }
+ continue; // do not discovery anything for this component
} catch (PluginContainerException pce) {
log.error("Unable to obtain discovery component for [" + childResourceType + "]", pce);
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginComponentFactory.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginComponentFactory.java
index 9866a64..1f3fcd7 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginComponentFactory.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginComponentFactory.java
@@ -31,6 +31,7 @@ import org.apache.commons.logging.LogFactory;
import org.rhq.core.clientapi.agent.PluginContainerException;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
@@ -71,9 +72,10 @@ public class PluginComponentFactory implements ContainerService {
* type
*
* @throws PluginContainerException if failed to create the discovery component instance
+ * @throws ResourceTypeNotEnabledException if the resource type has been disabled or ignored - no management of the resource is allowed
*/
public ResourceDiscoveryComponent getDiscoveryComponent(ResourceType resourceType,
- ResourceContainer parentResourceContainer) throws PluginContainerException {
+ ResourceContainer parentResourceContainer) throws PluginContainerException, ResourceTypeNotEnabledException {
// This is an exception for PC unit tests which use a fake platform type.
if (resourceType.equals(PluginMetadataManager.TEST_PLATFORM_TYPE)) {
@@ -136,8 +138,11 @@ public class PluginComponentFactory implements ContainerService {
* @return a new resource component loaded in the proper plugin classloader
*
* @throws PluginContainerException if failed to create the component instance
+ * @throws ResourceTypeNotEnabledException if the resource type has been disabled or ignored - no management of the resource is allowed
*/
- public ResourceComponent buildResourceComponent(Resource resource) throws PluginContainerException {
+ public ResourceComponent buildResourceComponent(Resource resource) throws PluginContainerException,
+ ResourceTypeNotEnabledException {
+
ResourceType resourceType = resource.getResourceType();
if (PluginMetadataManager.TEST_PLATFORM_TYPE.equals(resourceType)) {
return new ResourceComponent() {
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java
index 17d1565..b2e878b 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java
@@ -45,8 +45,6 @@ import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.pc.ContainerService;
import org.rhq.core.pc.PluginContainerConfiguration;
-import org.rhq.core.pluginapi.inventory.DisabledResourceComponent;
-import org.rhq.core.pluginapi.inventory.DisabledResourceDiscoveryComponent;
import org.rhq.core.pluginapi.plugin.PluginContext;
import org.rhq.core.pluginapi.plugin.PluginLifecycleListener;
import org.rhq.core.system.SystemInfo;
@@ -75,8 +73,6 @@ public class PluginManager implements ContainerService {
}
private static final Log log = LogFactory.getLog(PluginManager.class);
- private static String DISABLED_DISCOVERY_COMPONENT_CLASS = DisabledResourceDiscoveryComponent.class.getName();
- private static String DISABLED_RESOURCE_COMPONENT_CLASS = DisabledResourceComponent.class.getName();
/**
* The map of all plugins keyed on plugin name.
@@ -107,8 +103,7 @@ public class PluginManager implements ContainerService {
loadedPlugins = new ArrayList<Plugin>();
metadataManager = new PluginMetadataManager();
- metadataManager.setDisabledResourceTypes(configuration.getDisabledResourceTypes(),
- DISABLED_DISCOVERY_COMPONENT_CLASS, DISABLED_RESOURCE_COMPONENT_CLASS);
+ metadataManager.setDisabledResourceTypes(configuration.getDisabledResourceTypes());
initUpdateLoadedPluginsCallback();
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginValidator.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginValidator.java
index 73da44f..42edebf 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginValidator.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginValidator.java
@@ -32,6 +32,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pluginapi.bundle.BundleFacet;
@@ -153,7 +154,16 @@ public class PluginValidator {
private static boolean validateResourceComponentClass(PluginMetadataManager metadataManager,
ResourceType resourceType, PluginEnvironment pluginEnvironment) {
boolean success = true;
- String componentClass = metadataManager.getComponentClass(resourceType);
+
+ String componentClass;
+ try {
+ componentClass = metadataManager.getComponentClass(resourceType);
+ } catch (ResourceTypeNotEnabledException rtne) {
+ componentClass = null;
+ success = false;
+ errorLog(rtne.toString());
+ }
+
if (componentClass == null) {
success = false;
errorLog("Missing component class in resource type [" + resourceType.getName() + "] from plugin ["
@@ -231,7 +241,16 @@ public class PluginValidator {
private static boolean validateResourceDiscoveryComponentClass(PluginMetadataManager metadataManager,
ResourceType resourceType, PluginEnvironment pluginEnvironment) {
boolean success = true;
- String discoveryClass = metadataManager.getDiscoveryClass(resourceType);
+
+ String discoveryClass;
+ try {
+ discoveryClass = metadataManager.getDiscoveryClass(resourceType);
+ } catch (ResourceTypeNotEnabledException rtne) {
+ discoveryClass = null;
+ success = false;
+ errorLog(rtne.toString());
+ }
+
if (discoveryClass != null) {
try {
Class discoveryClazz = Class.forName(discoveryClass, false, pluginEnvironment.getPluginClassLoader());
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/upgrade/ResourceUpgradeDelegate.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/upgrade/ResourceUpgradeDelegate.java
index ffd2065..503db49 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/upgrade/ResourceUpgradeDelegate.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/upgrade/ResourceUpgradeDelegate.java
@@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.clientapi.agent.PluginContainerException;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.clientapi.agent.upgrade.ResourceUpgradeRequest;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
@@ -258,8 +259,14 @@ public class ResourceUpgradeDelegate {
Resource resource = resourceContainer.getResource();
- ResourceDiscoveryComponent<ResourceComponent<T>> discoveryComponent = PluginContainer.getInstance()
- .getPluginComponentFactory().getDiscoveryComponent(resource.getResourceType(), parentResourceContainer);
+ ResourceDiscoveryComponent<ResourceComponent<T>> discoveryComponent;
+ try {
+ discoveryComponent = PluginContainer.getInstance().getPluginComponentFactory()
+ .getDiscoveryComponent(resource.getResourceType(), parentResourceContainer);
+ } catch (ResourceTypeNotEnabledException rtne) {
+ // no point in continuing if the resource is unmanageable because its type has been disabled
+ return true;
+ }
if (!(discoveryComponent instanceof ResourceUpgradeFacet)) {
//well, there's no point in continuing if the resource doesn't support the facet
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/promptcmd/DiscoveryPromptCommand.java b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/promptcmd/DiscoveryPromptCommand.java
index f8c64c9..42db9c2 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/promptcmd/DiscoveryPromptCommand.java
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/promptcmd/DiscoveryPromptCommand.java
@@ -35,6 +35,7 @@ import java.util.TreeSet;
import mazz.i18n.Msg;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.Property;
@@ -383,6 +384,8 @@ public class DiscoveryPromptCommand implements AgentPromptCommand {
}
}
}
+ } catch (ResourceTypeNotEnabledException rtne) {
+ // we are to ignore this type of resource, just skip it
} catch (Throwable t) {
out.println(ThrowableUtil.getAllMessages(t));
}
diff --git a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/test/AbstractResourceTest.java b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/test/AbstractResourceTest.java
index d295af2..b78b522 100644
--- a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/test/AbstractResourceTest.java
+++ b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/test/AbstractResourceTest.java
@@ -31,6 +31,7 @@ import java.util.TreeSet;
import org.rhq.core.clientapi.agent.configuration.ConfigurationUpdateRequest;
import org.rhq.core.clientapi.agent.inventory.CreateResourceRequest;
import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.agent.metadata.ResourceTypeNotEnabledException;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.measurement.DataType;
@@ -301,7 +302,12 @@ public abstract class AbstractResourceTest extends AbstractPluginTest {
private boolean supportsFacet(Class<?> facetInterface) {
PluginMetadataManager manager = PluginContainer.getInstance().getPluginManager().getMetadataManager();
- String componentClass = manager.getComponentClass(getResourceType());
+ String componentClass;
+ try {
+ componentClass = manager.getComponentClass(getResourceType());
+ } catch (ResourceTypeNotEnabledException rtne) {
+ throw new RuntimeException(rtne);
+ }
try {
return facetInterface.isAssignableFrom(Class.forName(componentClass));
commit 4854a143c18020c630feaeb2d0013c3bf9e5ccfe
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Mar 21 22:25:51 2013 -0400
Bug 832398
RFE: Enable DynaGroups to be created based on the contents of another group
Add a test and small fix for detecting duplicate memberof expressions.
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java
index 92919c5..3745d16 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java
@@ -801,6 +801,16 @@ public class ExpressionEvaluatorTest extends AbstractEJB3Test {
});
}
+ @Test(expectedExceptions = InvalidExpressionException.class, expectedExceptionsMessageRegExp = "Redundant.*")
+ public void doNotAllowDuplicateMemberOfExpressions() throws Exception {
+ evaluateExpressions(new ExpressionGenerator() {
+ @Override
+ public String[] getExpressions() {
+ return new String[] { "memberof = foo", "memberof = foo" };
+ }
+ });
+ }
+
private String cleanUp(String result) {
return result.replaceAll("\\s+", " ").trim();
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java
index 363a663..2c2c4c2 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java
@@ -1271,6 +1271,7 @@ public class ExpressionEvaluator implements Iterable<ExpressionEvaluator.Result>
throw new InvalidExpressionException("Redundant 'memberof' expression[" + normalizedSubExpression
+ "] - these expressions must be unique");
}
+ memberSubExpressions.add(normalizedSubExpression);
} else {
if (groupedSubExpressions.contains(normalizedSubExpression)) {
throw new InvalidExpressionException(
commit c55418bb87718a1ed40c956fbe08a4704b61e034
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Mar 21 15:26:52 2013 -0500
[BZ 923458] Maven dependency version cleanup.
(cherry picked from commit 98a076a4b1ab258efbf3e367a2f4fe65b9d5bc7a)
(cherry picked from commit fb84b4e89772479851ce4c6403d7cce6a170d761)
(cherry picked from commit 1308cc9399c63b7f68c89c62619e9f91014c8ed8)
(cherry picked from commit 6dd80cae4df923b2118936951d6fdbb0006b8294)
diff --git a/etc/augeas-utils/pom.xml b/etc/augeas-utils/pom.xml
index 8355748..ca5c540 100644
--- a/etc/augeas-utils/pom.xml
+++ b/etc/augeas-utils/pom.xml
@@ -28,10 +28,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
+ <version>2.3.2</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
</configuration>
</plugin>
</plugins>
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index 394dc13..c4dadc9 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -31,19 +31,16 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 111b6f0..4cf6703 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -48,7 +48,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
@@ -73,7 +72,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
<scope>runtime</scope> <!-- needs to be runtime otherwise it will not be included by assembly plugin -->
<exclusions>
<exclusion>
@@ -86,7 +84,6 @@
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
- <version>1.9.5</version>
</dependency>
</dependencies>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 190bc89..9d7a132 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 17e5433..d3bf151 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -23,7 +23,6 @@
<dependency>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</dependency>
<dependency>
@@ -72,7 +71,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/core/arquillian-integration/container/pom.xml b/modules/core/arquillian-integration/container/pom.xml
index 50e0fed..9dc7a99 100644
--- a/modules/core/arquillian-integration/container/pom.xml
+++ b/modules/core/arquillian-integration/container/pom.xml
@@ -112,13 +112,11 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
</dependency>
<!-- test -->
@@ -133,7 +131,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.1</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index a4f4b9e..c03f268 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -60,7 +60,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 735e784..2cf8f41 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -55,7 +55,6 @@
<dependency>
<groupId>i18nlog</groupId>
<artifactId>i18nlog</artifactId>
- <version>${i18nlog.version}</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
@@ -80,7 +79,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
@@ -452,7 +450,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
</plugin>
</plugins>
</build>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index ef7c906..f14157e 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -152,21 +152,18 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
<scope>test</scope>
</dependency>
@@ -194,7 +191,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -472,7 +468,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 9f1b724..365535a 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -57,7 +57,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope>
<!-- by JBossAS -->
<!-- transitive dependency needed for JspC -->
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 21f1c48..04be12b 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -47,7 +47,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.9.0</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index 4b828f7..a24c330 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -46,14 +46,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 8bff199..06395a2 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -82,7 +82,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
diff --git a/modules/core/plugin-test-api/pom.xml b/modules/core/plugin-test-api/pom.xml
index f7abec9..9c91bc0 100644
--- a/modules/core/plugin-test-api/pom.xml
+++ b/modules/core/plugin-test-api/pom.xml
@@ -39,13 +39,11 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugin-test-util/pom.xml b/modules/core/plugin-test-util/pom.xml
index dbb97fe..c75dcbc 100644
--- a/modules/core/plugin-test-util/pom.xml
+++ b/modules/core/plugin-test-util/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index fc8ff80..d05b721 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -36,7 +36,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 4528810..c3c7175 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -48,7 +48,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
@@ -119,7 +118,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
<executions>
<execution>
<id>attach-installed-file-for-deployment</id>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index ff2a247..b799891 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -42,7 +42,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 8e7d819..d1200f6 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -224,7 +224,6 @@ Build-Number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
@@ -243,7 +242,6 @@ Build-Number=${buildNumber}
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
<executions>
<execution>
<id>attach-installed-file-for-deployment</id>
@@ -285,7 +283,6 @@ Build-Number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index ba0d852..3b66b92 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -135,7 +135,6 @@ rhq-agent.latest.build-number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
@@ -204,7 +203,6 @@ rhq-agent.latest.build-number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index a0cab6f..a41fb6c 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -182,14 +182,12 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
<scope>test</scope>
</dependency>
@@ -206,14 +204,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index 4adb84e..822d405 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -156,7 +156,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
</reporting>
diff --git a/modules/enterprise/gui/content_http-war/pom.xml b/modules/enterprise/gui/content_http-war/pom.xml
index 61abd3a..19208e8 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -54,20 +54,11 @@
<artifactId>hibernate-entitymanager</artifactId>
<scope>provided</scope>
</dependency>
-
- <!--
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.2</version>
- </dependency>
- -->
<!-- adding to pick up javax.servlet.http.HttpServlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -84,7 +75,6 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
@@ -96,7 +86,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -109,7 +98,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -122,7 +110,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index 9795f49..6c12259 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -70,7 +70,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
</dependency>
<dependency>
@@ -94,7 +93,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -107,14 +105,12 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
- <version>1.1.4</version>
</dependency>
<!-- used by a test JSP -->
@@ -141,7 +137,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -186,7 +181,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.2</version>
</dependency>
<dependency>
@@ -282,7 +276,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
diff --git a/modules/enterprise/gui/remoting-war/pom.xml b/modules/enterprise/gui/remoting-war/pom.xml
index c4b63bf..9570336 100644
--- a/modules/enterprise/gui/remoting-war/pom.xml
+++ b/modules/enterprise/gui/remoting-war/pom.xml
@@ -39,7 +39,6 @@
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/gui/rest-examples-war/pom.xml b/modules/enterprise/gui/rest-examples-war/pom.xml
index 87354d1..2a5091c 100644
--- a/modules/enterprise/gui/rest-examples-war/pom.xml
+++ b/modules/enterprise/gui/rest-examples-war/pom.xml
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/gui/rest-war/pom.xml b/modules/enterprise/gui/rest-war/pom.xml
index 1b5349c..0797145 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -59,7 +59,6 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index ee672e2..fc164c9 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -77,7 +77,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/modules/enterprise/remoting/client-api/pom.xml b/modules/enterprise/remoting/client-api/pom.xml
index f5fbe0c..2c7b6f9 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -90,14 +90,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/remoting/client-deps/pom.xml b/modules/enterprise/remoting/client-deps/pom.xml
index 006a9a6..61b7c19 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -18,19 +18,19 @@
<groupId>${project.groupId}</groupId>
<artifactId>rhq-remoting-client-api</artifactId>
<version>${project.version}</version>
- <exclusions>
+ <exclusions>
<exclusion>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- </exclusion>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ </exclusion>
<exclusion>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
<exclusion>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr</artifactId>
@@ -50,21 +50,20 @@
<artifactId>concurrent</artifactId>
<version>1.3.4-jboss-update1</version>
</dependency>
- <dependency>
- <groupId>i18nlog</groupId>
- <artifactId>i18nlog</artifactId>
- <version>1.0.10</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>i18nlog</groupId>
+ <artifactId>i18nlog</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ </dependencies>
</project>
diff --git a/modules/enterprise/scripting/api/pom.xml b/modules/enterprise/scripting/api/pom.xml
index 5fdffe3..07768cd 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -41,7 +41,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/scripting/javascript/pom.xml b/modules/enterprise/scripting/javascript/pom.xml
index 208076a..b1d6553 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -87,7 +87,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/scripting/python/pom.xml b/modules/enterprise/scripting/python/pom.xml
index ab12edf..8e7ff39 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -86,7 +86,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/server/appserver/pom.xml b/modules/enterprise/server/appserver/pom.xml
index 2ffdc7c..dc6bbb3 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -67,7 +67,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.3</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/client-api/pom.xml b/modules/enterprise/server/client-api/pom.xml
index ac92aec..c645073 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -53,14 +53,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index a6cc2c7..939f107 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -169,7 +169,6 @@
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
- <version>${quartz.version}</version>
</dependency>
<dependency>
diff --git a/modules/enterprise/server/installer/pom.xml b/modules/enterprise/server/installer/pom.xml
index 83b8977..5e5cdd1 100644
--- a/modules/enterprise/server/installer/pom.xml
+++ b/modules/enterprise/server/installer/pom.xml
@@ -83,7 +83,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.9.0</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/itests-2/pom.xml b/modules/enterprise/server/itests-2/pom.xml
index cf6aa8d..24fb17b 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -559,7 +559,6 @@
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
- <version>${jboss.javaee6.spec.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
@@ -567,7 +566,6 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
- <version>${jboss.version}</version>
<scope>test</scope>
</dependency>
@@ -677,14 +675,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index b7621c5..b86af52 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -123,7 +123,6 @@
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
- <version>${jboss.javaee6.spec.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
@@ -169,7 +168,6 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>${infinispan.version}</version>
<scope>provided</scope>
</dependency>
@@ -185,26 +183,22 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<!-- Required by a couple APL classes - TODO: Remove this once APL has been removed. -->
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
- <version>1.1.4</version>
</dependency>
<dependency>
@@ -279,7 +273,6 @@
<dependency>
<groupId>org.jboss.jbossts</groupId>
<artifactId>jbossjts</artifactId>
- <version>${jboss-jts.version}</version>
<scope>provided</scope>
</dependency>
@@ -407,14 +400,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
@@ -449,7 +440,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
- <version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<generateClient>true</generateClient>
@@ -574,7 +564,6 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
- <version>3.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 3b08f01..24813ad 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -29,7 +29,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<!-- Generate tokens.xml file -->
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index 6f636d5..4226e21 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -94,13 +94,11 @@
<artifactItem>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
</artifactItem>
<artifactItem>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
- <version>1.9.5</version>
</artifactItem>
</artifactItems>
diff --git a/modules/enterprise/server/plugins/disk/pom.xml b/modules/enterprise/server/plugins/disk/pom.xml
index 5ecb7a9..c111bcc 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -27,14 +27,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index ed72fd0..39d7127 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -74,7 +74,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml b/modules/enterprise/server/plugins/groovy-script/pom.xml
index e844a56..ea20099 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -4,14 +4,14 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Groovy Script Plugin</name>
@@ -19,7 +19,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@@ -27,9 +26,8 @@
<version>1.7.1</version>
</dependency>
<dependency>
- <groupId>quartz</groupId>
+ <groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
- <version>1.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -54,6 +52,10 @@
<artifactId>reflections</artifactId>
<version>0.9.5-RC2</version>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -97,7 +99,6 @@
<artifactItem>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
- <version>${javassist.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
@@ -109,7 +110,6 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
<executions>
<execution>
<goals>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml b/modules/enterprise/server/plugins/jboss-software/pom.xml
index 3d31342..33a11a1 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope>
</dependency>
@@ -40,7 +39,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/enterprise/server/plugins/url/pom.xml b/modules/enterprise/server/plugins/url/pom.xml
index f677d6a..5660473 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -43,7 +43,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml
index 05cd715..6f2cc2e 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -31,21 +31,17 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<!-- make sure you match that which is used by standalone agent! -->
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<!-- make sure you match that which is used by standalone agent! -->
- <version>1.2.14</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <!-- make sure you match that which is used by standalone agent! -->
- <version>2.0.2</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/sars/services-sar/pom.xml b/modules/enterprise/server/sars/services-sar/pom.xml
index 413c681..4586a8b 100644
--- a/modules/enterprise/server/sars/services-sar/pom.xml
+++ b/modules/enterprise/server/sars/services-sar/pom.xml
@@ -21,25 +21,6 @@
<build>
<finalName>rhq-enterprise-server-services-sar</finalName>
-
- <!-- we don't need this right now - only if we need deps stored in the sar META-INF/lib/ will we need this -->
- <!-- NOTE: extensions=true below allows Maven to grok the jboss-sar packaging type -->
- <!--
- <plugins>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>1.9.99</version>
- <extensions>true</extensions>
- <configuration>
- <libDirectory>${sarDirectory}/META-INF/lib</libDirectory>
- </configuration>
- </plugin>
-
- </plugins>
- -->
-
<resources>
<resource>
<directory>src/main/resources</directory>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index 9c1bfdd..98783f1 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -44,7 +44,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 1c570fc..82fabfc 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -17,7 +17,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
<configuration>
<archive>
<manifest>
@@ -58,7 +57,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
diff --git a/modules/helpers/inventory-serializer/pom.xml b/modules/helpers/inventory-serializer/pom.xml
index a42effa..993250b 100644
--- a/modules/helpers/inventory-serializer/pom.xml
+++ b/modules/helpers/inventory-serializer/pom.xml
@@ -36,7 +36,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index ceb5377..4136b47 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -42,12 +42,10 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index f7f04ba..372c627 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -24,7 +24,6 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
<configuration>
<archive>
<manifest>
@@ -72,7 +71,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
diff --git a/modules/helpers/rest-docs-generator/pom.xml b/modules/helpers/rest-docs-generator/pom.xml
index 0996c3b..208d40b 100644
--- a/modules/helpers/rest-docs-generator/pom.xml
+++ b/modules/helpers/rest-docs-generator/pom.xml
@@ -147,7 +147,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 98b8667..da9cf66 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -25,7 +25,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.3</version>
<scope>provided</scope> <!-- by servlet container -->
</dependency>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
index e574631..9469947 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -181,7 +181,6 @@
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
- <version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml b/modules/integration-tests/jndi-access/remote-server/pom.xml
index fd7e312..b28b9bf 100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -38,7 +38,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
</dependency>
</dependencies>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index ad8df87..b3370a3 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -75,7 +75,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/integration-tests/rest-api/pom.xml b/modules/integration-tests/rest-api/pom.xml
index cea2a5c..6061752 100644
--- a/modules/integration-tests/rest-api/pom.xml
+++ b/modules/integration-tests/rest-api/pom.xml
@@ -50,7 +50,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index a7a4469..14874eb 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 5390fcc..0c750b6 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -66,13 +66,11 @@
<artifactItem>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
</artifactItem>
<artifactItem>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
- <version>1.9.5</version>
</artifactItem>
</artifactItems>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 2ca9086..3f6bca5 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
@@ -63,7 +62,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 9a8acb4..4e663e6 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -39,13 +39,11 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
@@ -196,7 +194,6 @@
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/plugins/cassandra/pom.xml b/modules/plugins/cassandra/pom.xml
index ac3d8ff..9888aa0 100644
--- a/modules/plugins/cassandra/pom.xml
+++ b/modules/plugins/cassandra/pom.xml
@@ -17,7 +17,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 8321f4e..c01634b 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -25,7 +25,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
@@ -38,7 +37,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
@@ -271,7 +269,6 @@
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 6ed701b..27f290b 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index d77acf5..4a3ad1d 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 1a6c591..dd99a37 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -110,7 +110,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 467397e..9ca39d3 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index fc69a41..875e82f 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -128,7 +128,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index f2a81a1..3eb65a7 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -64,7 +64,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
@@ -144,14 +143,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
@@ -188,7 +185,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
<artifactItem>
<groupId>ant</groupId>
diff --git a/modules/plugins/jboss-as-5/testsuite/pom.xml b/modules/plugins/jboss-as-5/testsuite/pom.xml
index dd1949e..ca6399a 100644
--- a/modules/plugins/jboss-as-5/testsuite/pom.xml
+++ b/modules/plugins/jboss-as-5/testsuite/pom.xml
@@ -74,7 +74,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope>
<!-- by JBossAS -->
</dependency>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 1f63c91..1a5f119 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -71,7 +71,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
@@ -83,7 +82,6 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
</dependency>
<!-- === Test Deps === -->
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index d1f4c74..8a5b6c9 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -74,14 +74,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
@@ -124,7 +122,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
<artifactItem>
<groupId>ant</groupId>
@@ -152,7 +149,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
<artifactItem>
<groupId>ant</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 804b04a..62ffc81 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -40,7 +40,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 03a4cbd..22db736 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -25,12 +25,10 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
</dependency>
<!-- Test dependencies -->
@@ -141,7 +139,6 @@
<artifactItem>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</artifactItem>
<artifactItem>
<groupId>commons-codec</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index 7fe46e5..1d40834 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -122,7 +122,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>${rhq.groupId}</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 7ccffa7..593a70b 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -33,7 +33,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 69a3b7d..6ee7474 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index 80bf531..c615a39 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -6,7 +6,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.plugins</groupId>
@@ -28,13 +28,11 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
</dependency>
</dependencies>
@@ -43,7 +41,6 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
<executions>
<execution>
<goals>
@@ -68,7 +65,6 @@
<artifactItem>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.0</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.ant</groupId>
@@ -83,17 +79,14 @@
<artifactItem>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
</artifactItem>
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
</artifactItem>
<artifactItem>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</artifactItem>
<artifactItem>
<groupId>commons-logging</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index a392c58..23dadb6 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 4805c8f..ae92638 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -164,7 +164,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 92e76ef..93856c9 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 053fac0..d10ef73 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 9ded2f5..8cdd836 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -27,14 +27,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 6f00f3f..52e155c 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -120,7 +120,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index ee5bbfd..07e3aa1 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -27,7 +27,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -84,7 +83,7 @@
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils-testng</artifactId>
- <version>3.1</version>
+ <version>3.1</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
diff --git a/pom.xml b/pom.xml
index 9510607..b849d13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@
<!-- Start: JBoss AS Dependency Versions
The dependency versions below are declared together as the versions of each are dependent on the
overall JBoss AS Server version. Meaning, the AS provides these libs. When the Server
- version is changed the versions of each of these should be validated and updated as needed.
+ version is changed the versions of each of these should be validated and updated as needed.
-->
<jboss.version>7.1.1.Final</jboss.version>
<jboss.javaee6.spec.version>3.0.0.Final</jboss.javaee6.spec.version>
@@ -78,7 +78,7 @@
<antlr.version>2.7.7</antlr.version>
<hibernate.version>4.0.1.Final</hibernate.version>
<hibernate-annotations.version>3.5.6-Final</hibernate-annotations.version>
- <hibernate-jpa-2.0-api.version>1.0.1.Final</hibernate-jpa-2.0-api.version>
+ <hibernate-jpa-2.0-api.version>1.0.1.Final</hibernate-jpa-2.0-api.version>
<infinispan.version>5.1.2.FINAL</infinispan.version>
<javax.annotation.api.version>1.0.1.Final</javax.annotation.api.version>
<javax.ejb.api.version>1.0.2.Final</javax.ejb.api.version>
@@ -95,23 +95,23 @@
<jboss-remotingjmx.version>1.0.2.Final</jboss-remotingjmx.version>
<jboss-transaction-api.version>1.0.0.Final</jboss-transaction-api.version>
<picketbox.version>4.0.7.Final</picketbox.version>
- <resteasy.version>2.3.4.Final</resteasy.version>
+ <resteasy.version>2.3.4.Final</resteasy.version>
<jboss-staxmapper.version>1.1.0.Final</jboss-staxmapper.version>
<jboss-modules.version>1.1.1.GA</jboss-modules.version>
<jboss-dmr.version>1.1.1.Final</jboss-dmr.version>
<jboss-msc.version>1.0.2.GA</jboss-msc.version>
<!-- Not Provided - some of these are needed by the agent -->
- <jboss-annotations.version>4.2.3.GA</jboss-annotations.version>
+ <jboss-annotations.version>4.2.3.GA</jboss-annotations.version>
<jboss-cache.version>1.4.1.SP9</jboss-cache.version>
- <jboss-jmx.version>4.2.3.GA</jboss-jmx.version>
- <jboss-common.version>1.2.1.GA</jboss-common.version> <!-- note this is the old commons we used, not the newer commons-core -->
+ <jboss-jmx.version>4.2.3.GA</jboss-jmx.version>
+ <jboss-common.version>1.2.1.GA</jboss-common.version> <!-- note this is the old commons we used, not the newer commons-core -->
<jboss-remoting.version>2.5.4.SP4</jboss-remoting.version>
<jboss-serialization.version>1.0.3.GA</jboss-serialization.version>
- <jboss-system.version>4.2.3.GA</jboss-system.version>
+ <jboss-system.version>4.2.3.GA</jboss-system.version>
<jbosssx.version>4.2.3.GA</jbosssx.version>
-
-
+
+
<!-- End: JBoss AS Dependency Versions -->
<commons-logging.version>1.1.0.jboss</commons-logging.version>
@@ -121,7 +121,7 @@
<i18nlog.version>1.0.10</i18nlog.version>
<jsf-api.version>1.2_14</jsf-api.version>
<jsf-impl.version>1.2_14</jsf-impl.version>
- <log4j.version>1.2.16</log4j.version>
+ <log4j.version>1.2.14</log4j.version>
<ojdbc6.version>11.2.0.3.0</ojdbc6.version>
<ems.version>1.3</ems.version>
<postgresql.version>9.2-1002.jdbc4</postgresql.version>
@@ -148,9 +148,22 @@
<arquillian.jboss.container.version>7.1.1.Final</arquillian.jboss.container.version>
<shrinkwrap-resolver.version>2.0.0-alpha-7</shrinkwrap-resolver.version>
<xercesImpl.version>2.9.1-jbossas-2</xercesImpl.version> <!-- see BZ-820629 and CVE-2009-2625 -->
- <opencsv.version>1.8</opencsv.version>
+ <opencsv.version>1.8</opencsv.version>
<commons-httpclient.version>3.0.1</commons-httpclient.version>
-
+ <commons-io.version>1.4</commons-io.version>
+ <commons-lang.version>2.4</commons-lang.version>
+ <commons-codec.version>1.4</commons-codec.version>
+ <commons-validator.version>1.1.4</commons-validator.version>
+ <commons-collections.version>3.2.1</commons-collections.version>
+ <commons-configuration.version>1.6</commons-configuration.version>
+
+ <junit.version>4.8.2</junit.version>
+ <liquibase-core.version>1.9.5</liquibase-core.version>
+ <jbpm.version>3.1.1</jbpm.version>
+ <servlet-api.version>2.4</servlet-api.version>
+
+ <mockito-core.version>1.9.0</mockito-core.version>
+
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -233,7 +246,7 @@
<jacoco.version>0.6.0.201210061924</jacoco.version>
<jacoco-arquillian-extension.version>1.0.0.Alpha5</jacoco-arquillian-extension.version>
</properties>
-
+
<dependencyManagement>
@@ -243,7 +256,7 @@
The dependencies below are declared together as the versions of each are dependent on the
overall JBoss AS Server version. Meaning, the AS provides these libs. When the Server
version is changed the versions of each of these should be validated and updated as needed. -->
-
+
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
@@ -275,18 +288,18 @@
<version>${javax.annotation.api.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<version>${javax.ejb.api.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
<version>${javax.jms.api.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
@@ -371,6 +384,12 @@
<version>${jboss-msc.version}</version>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>${jbpm.version}</version>
+ </dependency>
+
<!-- see BZ-820629 and CVE-2009-2625 for why this is needed -->
<dependency>
<groupId>xerces</groupId>
@@ -386,6 +405,48 @@
<version>${commons-logging.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>${commons-io.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>${commons-codec.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>${commons-validator.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>${commons-collections.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>${commons-configuration.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${commons-httpclient.version}</version>
+ </dependency>
+
<!-- GNU GetOpt (any modules that need to do command-line argument parsing should use this) -->
<dependency>
<groupId>gnu-getopt</groupId>
@@ -606,7 +667,7 @@
<artifactId>jboss-javaee-6.0</artifactId>
<version>${jboss.javaee6.spec.version}</version>
<type>pom</type>
- <scope>import</scope>
+ <scope>import,provided</scope>
</dependency>
<!-- We want the shrinkwrap dependency resolver to be newer than that included in the Arquillian BOM.
@@ -617,7 +678,7 @@
<version>${shrinkwrap-resolver.version}</version>
<scope>import</scope>
<type>pom</type>
- </dependency>
+ </dependency>
<!-- This will pull in the compatible versions of shrinkwrap deps too. Note that we want to use an explicit
version for the shrinkwrap resolver, which revs more often and has bugfixes. -->
<dependency>
@@ -645,6 +706,54 @@
<artifactId>org.jacoco.core</artifactId>
<version>${jacoco.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ <version>${liquibase-core.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>${mockito-core.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-testng</artifactId>
+ <version>${powermock.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>${powermock.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${servlet-api.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testng.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -705,7 +814,7 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
+ <version>${ant.contrib.version}</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
@@ -821,7 +930,11 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1</version>
- </plugin>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
<!-- === Codehaus Mojo Plugins === -->
<plugin>
@@ -839,7 +952,7 @@
<artifactId>exec-maven-plugin</artifactId>
<!-- NOTE: Version 1.2 of this plugin appears to be broken, so do not
upgrade to that version. -->
- <version>1.1</version>
+ <version>1.2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -867,11 +980,17 @@
<version>${clirr.version}</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
-
+
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+
<plugin>
<groupId>com.googlecode.maven-overview-plugin</groupId>
<artifactId>maven-overview-plugin</artifactId>
@@ -898,7 +1017,19 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
- </plugins>
+
+ <plugin>
+ <groupId>com.sun.tools.xjc.maven2</groupId>
+ <artifactId>maven-jaxb-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr3-maven-plugin</artifactId>
+ <version>3.2</version>
+ </plugin>
+ </plugins>
</pluginManagement>
@@ -1353,21 +1484,21 @@
<name>code-coverage</name>
</property>
</activation>
-
+
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-jacoco</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
-
+
<build>
<plugins>
<!-- This definition creates the 2 independent coverage reports -
@@ -1786,8 +1917,13 @@
<reportSets>
<reportSet>
</reportSet>
- </reportSets>
- </plugin>
+ </reportSets>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
<!--
<plugin>
commit 896e6c6a922e7d7bbe3feebee64dd868b81d3644
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Mar 22 12:51:14 2013 -0500
[BZ 923458] Fixing build errors due to bad scope added in root pom, dependency management section.
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index f14157e..91e83ff 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -100,13 +100,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>net.sourceforge.jtds</groupId>
- <artifactId>jtds</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
- <scope>test</scope>
- </dependency>
-
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
@@ -182,13 +175,6 @@
</dependency>
<dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <version>1.0.2</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<scope>test</scope>
diff --git a/pom.xml b/pom.xml
index b849d13..136cd73 100644
--- a/pom.xml
+++ b/pom.xml
@@ -667,7 +667,6 @@
<artifactId>jboss-javaee-6.0</artifactId>
<version>${jboss.javaee6.spec.version}</version>
<type>pom</type>
- <scope>import,provided</scope>
</dependency>
<!-- We want the shrinkwrap dependency resolver to be newer than that included in the Arquillian BOM.
@@ -679,6 +678,11 @@
<scope>import</scope>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap.resolver</groupId>
+ <artifactId>shrinkwrap-resolver-depchain</artifactId>
+ <version>${shrinkwrap-resolver.version}</version>
+ </dependency>
<!-- This will pull in the compatible versions of shrinkwrap deps too. Note that we want to use an explicit
version for the shrinkwrap resolver, which revs more often and has bugfixes. -->
<dependency>
@@ -690,6 +694,12 @@
</dependency>
<dependency>
+ <groupId>org.jboss.arquillian.testng</groupId>
+ <artifactId>arquillian-testng-container</artifactId>
+ <version>${arquillian.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-jacoco</artifactId>
<version>${jacoco-arquillian-extension.version}</version>
commit ed813bd93929d0f5b81b0a877b3d0b17b10786ab
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Mar 22 17:38:12 2013 +0100
More work on the rest-api. It is now possible to create content-based resources.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index ba5fd3d..b1d0f3a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -76,6 +76,7 @@ import org.rhq.enterprise.server.authz.PermissionException;
import org.rhq.enterprise.server.content.ContentManagerHelper;
import org.rhq.enterprise.server.content.ContentManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.rest.ResourceHandlerBean;
/**
* Bean to handle interaction with the resource factory subsystem of the plugin container. !! Warning, the factory
@@ -684,9 +685,11 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
DeleteResourceRequest request = new DeleteResourceRequest(persistedHistory.getId(), resourceId);
try {
- AgentClient agentClient = agentManager.getAgentClient(agent);
- ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
- resourceFactoryAgentService.deleteResource(request);
+ if (!agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
+ AgentClient agentClient = agentManager.getAgentClient(agent);
+ ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
+ resourceFactoryAgentService.deleteResource(request);
+ }
return persistedHistory;
} catch (CannotConnectException e) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 6c46172..d375b16 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -127,6 +127,7 @@ import org.rhq.enterprise.server.resource.disambiguation.DisambiguationUpdateStr
import org.rhq.enterprise.server.resource.disambiguation.Disambiguator;
import org.rhq.enterprise.server.resource.group.ResourceGroupDeleteException;
import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
+import org.rhq.enterprise.server.rest.ResourceHandlerBean;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
import org.rhq.enterprise.server.util.QueryUtility;
@@ -333,7 +334,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
+ "]. Unable to inform agent of inventory removal (this may be ok): " + t);
}
- // since we delete the resource asynchronously, make sure we remove things that would cause system
+ // since we delete the resource asynchronously, make sure we remove things that would cause system
// side effects after markForDeletion completed but before the resource is actually removed from the DB
// delete the resource and all its children
@@ -362,7 +363,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
log.debug("== Bounds " + i + ", " + j);
}
- // refresh overlord session for each batch to avoid session timeout
+ // refresh overlord session for each batch to avoid session timeout
overlord = subjectManager.getOverlord();
boolean hasErrors = uninventoryResourcesBulkDelete(overlord, idsToDelete);
if (hasErrors) {
@@ -400,7 +401,10 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
}
// still need to tell the agent about the removed resources so it stops avail reports
- if (agentClient != null) {
+ // but not if this is a synthetic agent that was created in the REST-api
+ // See org.rhq.enterprise.server.rest.ResourceHandlerBean.createPlatformInternal()
+ // See also https://docs.jboss.org/author/display/RHQ/Virtual+platforms+and+synthetic...
+ if (agentClient != null && !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
try {
agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
} catch (Exception e) {
@@ -2692,7 +2696,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
List<Integer> disableResourceIds = new ArrayList<Integer>();
- // one report for each agent, keyed by agent name
+ // one report for each agent, keyed by agent name
Map<Agent, AvailabilityReport> reports = resourceManager.getDisableResourcesReportInNewTransaction(subject,
resourceIds, disableResourceIds);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
index 0e337a7..2746823 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
@@ -35,13 +35,14 @@ import java.util.Set;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
import freemarker.cache.ClassTemplateLoader;
import freemarker.cache.MultiTemplateLoader;
import freemarker.cache.TemplateLoader;
-import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
@@ -51,6 +52,8 @@ import org.infinispan.Cache;
import org.infinispan.manager.CacheContainer;
import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.MeasurementSchedule;
@@ -110,7 +113,7 @@ public class AbstractRestBean {
*/
protected String renderTemplate(String templateName, Object objectToRender) {
try {
- freemarker.template.Configuration config = new Configuration();
+ freemarker.template.Configuration config = new freemarker.template.Configuration();
// XXX fall-over to ClassTL after failure in FTL seems not to work
// FileTemplateLoader ftl = new FileTemplateLoader(new File("src/main/resources"));
@@ -379,6 +382,10 @@ public class AbstractRestBean {
uriBuilder.path("/resource/{id}/children");
uri = uriBuilder.build(res.getId());
link = new Link("children", uri.toString());
+ uriBuilder = uriInfo.getBaseUriBuilder();
+ uriBuilder.path("/resource/{id}/alerts");
+ uri = uriBuilder.build(res.getId());
+ link = new Link("alerts", uri.toString());
rwt.addLink(link);
if (parent != null) {
uriBuilder = uriInfo.getBaseUriBuilder();
@@ -519,6 +526,31 @@ public class AbstractRestBean {
return ms;
}
+ Configuration mapToConfiguration(Map<String,Object> in) {
+ Configuration config = new Configuration();
+ for (Map.Entry<String,Object> entry : in.entrySet()) {
+ config.put(new PropertySimple(entry.getKey(),entry.getValue())); // TODO honor more types
+ }
+
+ return config;
+
+ }
+
+ /**
+ * Set the caching header on the response
+ * @param builder Response builder to put the caching header on
+ * @param maxAgeSecs Max retention time on the client. Only set if the value is > 0
+ */
+ protected void setCachingHeader(Response.ResponseBuilder builder, int maxAgeSecs) {
+ CacheControl cc = new CacheControl();
+ cc.setPrivate(false);
+ cc.setNoCache(false);
+ cc.setNoStore(false);
+ if (maxAgeSecs>-1)
+ cc.setMaxAge(maxAgeSecs);
+ builder.cacheControl(cc);
+ }
+
protected static class CacheKey {
private String namespace;
private int id;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ContentHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ContentHandlerBean.java
new file mode 100644
index 0000000..5a0c13a
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ContentHandlerBean.java
@@ -0,0 +1,169 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+import javax.ejb.Stateless;
+import javax.interceptor.Interceptors;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.UriInfo;
+
+import com.wordnik.swagger.annotations.Api;
+import com.wordnik.swagger.annotations.ApiOperation;
+
+import org.rhq.enterprise.server.rest.domain.IntegerValue;
+import org.rhq.enterprise.server.rest.domain.StringValue;
+
+/**
+ * Deal with content
+ * @author Heiko W. Rupp
+ */
+@Path("/content")
+@Api(value="Resource related", description = "This endpoint deals with individual resources, not resource groups")
+(a)Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
+(a)Interceptors(SetCallerInterceptor.class)
+@Stateless
+public class ContentHandlerBean extends AbstractRestBean {
+
+
+ @POST
+ @Path("/fresh")
+ @Consumes(MediaType.APPLICATION_OCTET_STREAM)
+ @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
+ @ApiOperation("Upload content to the server. This will return a handle that can be used later to retrieve the content")
+ public Response uploadContent(
+ InputStream contentStream,
+ @Context HttpHeaders headers,
+ @Context UriInfo uriInfo) throws IOException
+ {
+
+ String tmpDirName = System.getProperty("java.io.tmpdir");
+
+ File tmpDir = new File(tmpDirName);
+ File outFile = File.createTempFile("rhq-rest-",".bin",tmpDir);
+
+ FileOutputStream fos = new FileOutputStream(outFile);
+ BufferedOutputStream bos = new BufferedOutputStream(fos);
+
+ BufferedInputStream bis = new BufferedInputStream(contentStream);
+
+ byte[] buf = new byte[32768]; // 32k
+
+ int data;
+ int off=0;
+ while ((data=bis.read(buf))!=-1) {
+ bos.write(buf,off,data);
+ off+=data;
+ }
+
+ bos.flush();
+ bos.close();
+ bis.close();
+
+ String fileHandle = outFile.getName();
+ StringValue sv = new StringValue(fileHandle);
+
+ System.out.println("Uploaded content to " + outFile.getAbsolutePath());
+
+ UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
+ uriBuilder.path("/content/{handle}");
+ URI uri = uriBuilder.build(fileHandle);
+
+
+ MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
+
+ Response.ResponseBuilder builder = Response.created(uri);
+ builder.entity(sv);
+ builder.type(mediaType);
+
+ return builder.build();
+ }
+
+ @GET
+ @Path("/{handle}/info")
+ public IntegerValue getInfo(
+ @PathParam("handle") String handle
+ )
+ {
+
+ File content = getFileForHandle(handle);
+
+ if (!content.exists() || !content.canRead())
+ throw new StuffNotFoundException("Content with handle " + handle);
+
+ long len = content.length();
+
+ IntegerValue iv = new IntegerValue((int)len); // TODO
+
+ return iv;
+ }
+
+
+ @DELETE
+ @Path("/{handle}")
+ public Response removeUploadedContent(
+ @PathParam("handle") String handle
+ )
+ {
+ File content = getFileForHandle(handle);
+
+ Response.ResponseBuilder builder;
+ if (!content.exists())
+ builder = Response.noContent();
+
+ else {
+ boolean deleted = content.delete();
+ if (deleted)
+ builder = Response.noContent();
+ else {
+ builder = Response.serverError();
+ System.err.println("Deletion of " + content.getAbsolutePath() + " failed");
+ }
+ }
+ return builder.build();
+ }
+
+ private File getFileForHandle(String handle) {
+ String tmpDirName = System.getProperty("java.io.tmpdir");
+
+ File tmpDir = new File(tmpDirName);
+ return new File(tmpDir,handle);
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
index a94b81c..ccfed9f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
@@ -289,10 +289,8 @@ public class OperationsHandlerBean extends AbstractRestBean {
// submit
- Configuration parameters = new Configuration();
- for (Map.Entry<String,Object> entry : operation.getParams().entrySet()) {
- parameters.put(new PropertySimple(entry.getKey(),entry.getValue())); // TODO honor more types
- }
+ Configuration parameters = mapToConfiguration(operation.getParams());
+
ResourceOperationSchedule sched = opsManager.scheduleResourceOperation(caller,operation.getResourceId(),operation.getName(),0,0,0,-1,
parameters,"Test");
JobId jobId = new JobId(sched.getJobName(),sched.getJobGroup());
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
index 88a585f..1c2b516 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
@@ -22,6 +22,10 @@
*/
package org.rhq.enterprise.server.rest;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Date;
@@ -30,11 +34,13 @@ import java.util.Set;
import java.util.UUID;
import javax.ejb.EJB;
+import javax.ejb.EJBTransactionRolledbackException;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.interceptor.Interceptors;
import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
@@ -66,6 +72,7 @@ import org.jboss.resteasy.links.AddLinks;
import org.jboss.resteasy.links.LinkResource;
import org.rhq.core.domain.alert.Alert;
+import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.AlertCriteria;
import org.rhq.core.domain.criteria.AvailabilityCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
@@ -76,10 +83,13 @@ import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.MeasurementSchedule;
import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.resource.CreateResourceHistory;
+import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.PageOrdering;
@@ -87,10 +97,12 @@ import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.alert.AlertManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.measurement.AvailabilityManagerLocal;
-import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal;
import org.rhq.enterprise.server.resource.ResourceAlreadyExistsException;
+import org.rhq.enterprise.server.resource.ResourceFactoryManagerLocal;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.rest.domain.AvailabilityRest;
+import org.rhq.enterprise.server.rest.domain.AvailabilitySummary;
+import org.rhq.enterprise.server.rest.domain.CreateCBRresourceRequest;
import org.rhq.enterprise.server.rest.domain.Link;
import org.rhq.enterprise.server.rest.domain.MetricSchedule;
import org.rhq.enterprise.server.rest.domain.ResourceWithChildren;
@@ -109,17 +121,21 @@ import org.rhq.enterprise.server.rest.domain.StringValue;
public class ResourceHandlerBean extends AbstractRestBean {
private static final String NO_RESOURCE_FOR_ID = "If no resource with the passed id exists";
+ private static final String DEFAULT_PACKAGE = "default.rest.package";
+
+ // Name prefix for synthetic/dummy agents created with the rest api. See #createPlatformInternal
+ public static final String DUMMY_AGENT_NAME_PREFIX = "dummy-agent:name";
@EJB
AvailabilityManagerLocal availMgr;
@EJB
- MeasurementScheduleManagerLocal scheduleManager;
- @EJB
AlertManagerLocal alertManager;
@EJB
ResourceTypeManagerLocal resourceTypeManager;
@EJB
AgentManagerLocal agentMgr;
+ @EJB
+ ResourceFactoryManagerLocal resourceFactory;
@PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
private EntityManager entityManager;
@@ -209,7 +225,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
* @param uriInfo Uri from the request
* @param resources List of resources
* @param page Page of pageSize. If null, paging is ignored
- * @param pageSize numer of elements on a page
+ * @param pageSize number of elements on a page
* @return An initialized ResponseBuilder
*/
private Response.ResponseBuilder getResponseBuilderForResourceList(HttpHeaders headers, UriInfo uriInfo,
@@ -332,7 +348,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
criteria.addFilterResourceId(resourceId);
criteria.addSortStartTime(PageOrdering.DESC);
- List<Availability> points = availMgr.findAvailabilityByCriteria(caller,criteria);
+ List<Availability> points = availMgr.findAvailabilityByCriteria(caller, criteria);
List<AvailabilityRest> ret = new ArrayList<AvailabilityRest>(points.size());
for (Availability avail : points) {
AvailabilityRest availabilityRest;
@@ -360,6 +376,26 @@ public class ResourceHandlerBean extends AbstractRestBean {
}
+ @GET
+ @Path("/{id}/availability/summary")
+ @ApiError(code = 404, reason = NO_RESOURCE_FOR_ID)
+ @ApiOperation(value = "Return the availability history for the passed resource", responseClass = "AvailabilitySummary", multiValueResponse = false)
+ public Response getAvailabilitySummary(
+ @ApiParam("Id of the resource to query") @PathParam("id") int resourceId,
+ @Context HttpHeaders headers) {
+
+ fetchResource(resourceId);
+ ResourceAvailabilitySummary summary = resMgr.getAvailabilitySummary(caller,resourceId);
+ AvailabilitySummary as = new AvailabilitySummary(resourceId,summary);
+
+ Response.ResponseBuilder builder = Response.ok(as);
+
+ MediaType type = headers.getAcceptableMediaTypes().get(0);
+ builder.type(type);
+
+ return builder.build();
+
+ }
@PUT
@Path("/{id}/availability")
@@ -487,7 +523,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
}
private Resource obtainResource(int resourceId) {
- Resource resource = resMgr.getResource(caller,resourceId);
+ Resource resource = resMgr.getResource(caller, resourceId);
if (resource == null) {
resource = resMgr.getResource(caller, resourceId);
if (resource != null)
@@ -546,7 +582,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
String typeName = resource.getTypeName();
String resourceName = resource.getResourceName();
- return createPlatformInternal(resourceName,typeName,uriInfo);
+ return createPlatformInternal(resourceName, typeName, uriInfo);
}
@@ -575,8 +611,9 @@ public class ResourceHandlerBean extends AbstractRestBean {
}
// Create a dummy agent per platform - otherwise we can't delete the platform later
+ // See also https://docs.jboss.org/author/display/RHQ/Virtual+platforms+and+synthetic...
Agent agent ;
- agent = new Agent("dummy-agent:name"+name,"-dummy-p:"+name,12345,"http://foo.com/p:name/"+name,"abc-"+name);
+ agent = new Agent(DUMMY_AGENT_NAME_PREFIX +name,"-dummy-p:"+name,12345,"http://foo.com/p:name/"+name,"abc-"+name);
agentMgr.createAgent(agent);
Resource platform = new Resource(resourceKey,name,type);
@@ -627,12 +664,19 @@ public class ResourceHandlerBean extends AbstractRestBean {
@POST
@Path("/")
- @ApiOperation("Create a new resource as a child of an existing resource<A1>")
+ @ApiOperation("Create a new resource as a child of an existing resource. If a handle is given, a content based resource is created.")
public Response createResource(
- @ApiParam("The info about the resource. You need to supply resource name, resource type name, plugin name, id of the parent") ResourceWithType resource,
- @Context UriInfo uriInfo)
+ @ApiParam("The info about the resource. You need to supply resource name, resource type name, plugin name, id of the parent") CreateCBRresourceRequest resource,
+ @Context HttpHeaders headers,
+ @QueryParam("handle") String handle,
+ @Context UriInfo uriInfo) throws IOException
{
- return createResourceInternal(resource.getResourceName(),resource.getPluginName(),resource.getParentId(),resource.getTypeName(),uriInfo);
+
+ if (handle!=null) {
+ return createContentBackedResource(resource,handle,headers,uriInfo);
+ } else {
+ return createResourceInternal(resource.getResourceName(),resource.getPluginName(),resource.getParentId(),resource.getTypeName(),uriInfo);
+ }
}
private Response createResourceInternal(String name, String plugin, int parentId, String typeName,
@@ -687,14 +731,154 @@ public class ResourceHandlerBean extends AbstractRestBean {
}
}
+ private Response createContentBackedResource(CreateCBRresourceRequest request, String handle, HttpHeaders headers, UriInfo uriInfo) throws IOException
+ {
+ int parentId = request.getParentId();
+ String typeName = request.getTypeName();
+ String plugin = request.getPluginName();
+ String name = request.getResourceName();
+
+ String tmpDirName = System.getProperty("java.io.tmpdir");
+
+ File tmpDir = new File(tmpDirName);
+ File content = new File(tmpDir,handle);
+
+ if (!content.exists() || !content.canRead())
+ throw new StuffNotFoundException("Content for handle " + handle);
+
+ BufferedInputStream resourceBits = new BufferedInputStream(new FileInputStream(content));
+
+ // Check for valid parent
+ fetchResource(parentId);
+
+ ResourceType resType = resourceTypeManager.getResourceTypeByNameAndPlugin(typeName,plugin);
+ if (resType==null)
+ throw new StuffNotFoundException("ResourceType with name [" + typeName + "] and plugin [" + plugin + "]");
+
+ Configuration pluginConfig = mapToConfiguration(request.getPluginConfig());
+ Configuration deployConfig = mapToConfiguration(request.getResourceConfig());
+
+ String packageName = DEFAULT_PACKAGE;
+
+ CreateResourceHistory history = resourceFactory.createResource(caller,parentId, resType.getId(),name,pluginConfig,
+ packageName, null,null,deployConfig,resourceBits);
+
+ CreateResourceStatus status = history.getStatus();
+
+
+ MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
+
+ Response.ResponseBuilder builder;
+
+ if ( status == CreateResourceStatus.SUCCESS) {
+
+ ResourceWithType rwt = findCreatedResource(history.getParentResource().getId(),history.getCreatedResourceName(),uriInfo);
+
+ builder = Response.ok();
+ builder.entity(rwt);
+ }
+ else if (status==CreateResourceStatus.IN_PROGRESS) {
+
+ try {
+ Thread.sleep(2000L); // give the agent time to do the work
+ } catch (InterruptedException e) {
+ ; // nothing
+ }
+
+ UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
+ uriBuilder.path("/resource/creationStatus/{id}");
+ URI uri = uriBuilder.build(history.getId());
+ builder = Response.status(302);
+ builder.location(uri); // redirect to self
+
+ }
+ else { // All kinds of failures
+ builder = Response.serverError();
+ builder.entity(new StringValue(history.getErrorMessage()));
+ }
+ builder.type(mediaType);
+
+ return builder.build();
+
+
+ }
+
+ @GET
+ @Path("/creationStatus/{id}")
+ @ApiOperation("Get the status of a resource creation for content based resources.")
+ public Response getHistoryItem(@PathParam("id") int historyId, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+
+ CreateResourceHistory history;
+ try {
+ history = resourceFactory.getCreateHistoryItem(historyId);
+ } catch (EJBTransactionRolledbackException e) {
+ if (e.getCause() instanceof NoResultException)
+ throw new StuffNotFoundException("Resource creation status with id " + historyId);
+ else
+ return Response.serverError().entity(e.getMessage()).build();
+ }
+
+ CreateResourceStatus status = history.getStatus();
+
+ Response.ResponseBuilder builder;
+ try {
+ Thread.sleep(2000L); // give the agent time to do the work
+ } catch (InterruptedException e) {
+ ; // nothing
+ }
+ if (status== CreateResourceStatus.SUCCESS) {
+
+ ResourceWithType rwt = findCreatedResource(history.getParentResource().getId(),history.getCreatedResourceName(),uriInfo);
+
+ builder = Response.ok();
+ setCachingHeader(builder, 600);
+ builder.entity(rwt);
+
+ }
+ else if (status==CreateResourceStatus.IN_PROGRESS) {
+
+
+ UriBuilder uriBuilder = uriInfo.getRequestUriBuilder();
+ URI uri = uriBuilder.build();
+ builder = Response.status(302);
+ builder.location(uri); // redirect to self
+ }
+ else {
+ builder = Response.serverError();
+ }
+
+ MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
+ builder.type(mediaType);
+
+ return builder.build();
+
+ }
+
+ private ResourceWithType findCreatedResource(int parentId, String name, UriInfo uriInfo) {
+ ResourceCriteria criteria = new ResourceCriteria();
+ criteria.setStrict(true);
+ criteria.addFilterParentResourceId(parentId);
+ criteria.addFilterName(name);
+ criteria.addFilterInventoryStatus(InventoryStatus.COMMITTED);
+ List<Resource> resources = resMgr.findResourcesByCriteria(caller,criteria);
+ Resource res = resources.get(0);
+ return fillRWT(res,uriInfo);
+ }
+
+
@DELETE
@Path("/{id}")
@ApiOperation("Remove a resource from inventory")
public Response uninventoryOrDeleteResource(
@PathParam("id") int resourceId
- /*,@DefaultValue("false") @QueryParam("physical") boolean delete*/) {
+ ,@DefaultValue("false") @QueryParam("physical") boolean delete) {
- resMgr.uninventoryResource(caller,resourceId);
+ if (delete==false) {
+ resMgr.uninventoryResource(caller,resourceId);
+ }
+ else {
+ resourceFactory.deleteResource(caller,resourceId);
+ }
return Response.status(Response.Status.NO_CONTENT).build();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceTypeHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceTypeHandlerBean.java
new file mode 100644
index 0000000..ad1fc3e
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceTypeHandlerBean.java
@@ -0,0 +1,97 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+import javax.interceptor.Interceptors;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import com.wordnik.swagger.annotations.Api;
+import com.wordnik.swagger.annotations.ApiError;
+import com.wordnik.swagger.annotations.ApiOperation;
+
+import org.jboss.resteasy.annotations.cache.Cache;
+
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceTypeNotFoundException;
+import org.rhq.enterprise.server.rest.domain.ResourceTypeRest;
+
+/**
+ * Deal with resource types
+ * @author Heiko W. Rupp
+ */
+(a)Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
+@Path("/resource/type")
+@Api(value="Resource type related", description = "This endpoint deals with resource types")
+(a)Interceptors(SetCallerInterceptor.class)
+@Stateless
+
+public class ResourceTypeHandlerBean extends AbstractRestBean {
+
+
+ @EJB
+ ResourceTypeManagerLocal typeManager;
+
+
+ @Cache(maxAge = 600)
+ @GET
+ @Path("{id}")
+ @ApiOperation(value = "Return information about the resource type with the passed id",responseClass = "ResourceTypeRest")
+ @ApiError(code = 404, reason = "There is no type with the passed id")
+ public Response getTypeById(
+ @PathParam("id") int resourceTypeId,
+ @Context HttpHeaders headers,
+ @Context UriInfo uriInfo) {
+
+
+ ResourceType type;
+ try {
+ type = typeManager.getResourceTypeById(caller,resourceTypeId);
+ } catch (ResourceTypeNotFoundException e) {
+ throw new StuffNotFoundException("Resource type with id " + resourceTypeId);
+ }
+
+ ResourceTypeRest rtr = new ResourceTypeRest();
+ rtr.setId(resourceTypeId);
+ rtr.setName(type.getName());
+ rtr.setPluginName(type.getPlugin());
+ rtr.setCreatePolicy(type.getCreateDeletePolicy());
+ rtr.setDataType(type.getCreationDataType());
+
+ MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
+
+ Response.ResponseBuilder builder = Response.ok();
+ builder.type(mediaType);
+ builder.entity(rtr);
+ return builder.build();
+
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AvailabilitySummary.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AvailabilitySummary.java
new file mode 100644
index 0000000..deb4f4d
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AvailabilitySummary.java
@@ -0,0 +1,221 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import com.wordnik.swagger.annotations.ApiClass;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary;
+
+/**
+ * Reports the summary of the availability for a resource
+ * @author Heiko W. Rupp
+ */
+@ApiClass("Describes the availability summary for a resource")
+@XmlRootElement
+public class AvailabilitySummary {
+
+ private long currentTime; // set to the current time when this object was created
+ private long upTime;
+ private long downTime;
+ private long disabledTime;
+ private long unknownTime;
+ private int failures;
+ private int disabled;
+ private long lastChange;
+ private AvailabilityType current;
+ private int resourceId;
+ private double disabledPercentage;
+ private double upPercentage;
+ private long knownTime;
+ private long mtbf;
+ private long mttr;
+ private double downPercentage;
+
+
+ List<Link> links = new ArrayList<Link>();
+
+ public AvailabilitySummary() {
+
+ }
+
+ public AvailabilitySummary(int resourceId, ResourceAvailabilitySummary ras) {
+
+ this.resourceId = resourceId;
+ currentTime = ras.getCurrentTime();
+ upTime = ras.getUpTime();
+ downTime = ras.getDownTime();
+ disabledTime = ras.getDisabledTime();
+ unknownTime = ras.getUnknownTime();
+ failures = ras.getFailures();
+ disabled = ras.getDisabled();
+ lastChange = ras.getLastChange().getTime();
+ current = ras.getCurrent();
+
+ disabledPercentage = ras.getDisabledPercentage();
+ downPercentage = ras.getDownPercentage();
+ upPercentage = ras.getUpPercentage();
+ knownTime = ras.getKnownTime();
+ unknownTime = ras.getUnknownTime();
+ mtbf = ras.getMTBF();
+ mttr = ras.getMTTR();
+ }
+
+ public AvailabilityType getCurrent() {
+ return current;
+ }
+
+ public void setCurrent(AvailabilityType current) {
+ this.current = current;
+ }
+
+ public int getDisabled() {
+ return disabled;
+ }
+
+ public void setDisabled(int disabled) {
+ this.disabled = disabled;
+ }
+
+ public long getDisabledTime() {
+ return disabledTime;
+ }
+
+ public void setDisabledTime(long disabledTime) {
+ this.disabledTime = disabledTime;
+ }
+
+ public long getDownTime() {
+ return downTime;
+ }
+
+ public void setDownTime(long downTime) {
+ this.downTime = downTime;
+ }
+
+ public int getFailures() {
+ return failures;
+ }
+
+ public void setFailures(int failures) {
+ this.failures = failures;
+ }
+
+ public long getLastChange() {
+ return lastChange;
+ }
+
+ public void setLastChange(long lastChange) {
+ this.lastChange = lastChange;
+ }
+
+ public List<Link> getLinks() {
+ return links;
+ }
+
+ public void setLinks(List<Link> links) {
+ this.links = links;
+ }
+
+ public long getCurrentTime() {
+ return currentTime;
+ }
+
+ public void setCurrentTime(long currentTime) {
+ this.currentTime = currentTime;
+ }
+
+ public int getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(int resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public long getUnknownTime() {
+ return unknownTime;
+ }
+
+ public void setUnknownTime(long unknownTime) {
+ this.unknownTime = unknownTime;
+ }
+
+ public long getUpTime() {
+ return upTime;
+ }
+
+ public void setUpTime(long upTime) {
+ this.upTime = upTime;
+ }
+
+ public double getDisabledPercentage() {
+ return disabledPercentage;
+ }
+
+ public void setDisabledPercentage(double disabledPercentage) {
+ this.disabledPercentage = disabledPercentage;
+ }
+
+ public double getDownPercentage() {
+ return downPercentage;
+ }
+
+ public void setDownPercentage(double downPercentage) {
+ this.downPercentage = downPercentage;
+ }
+
+ public long getKnownTime() {
+ return knownTime;
+ }
+
+ public void setKnownTime(long knownTime) {
+ this.knownTime = knownTime;
+ }
+
+ public long getMtbf() {
+ return mtbf;
+ }
+
+ public void setMtbf(long mtbf) {
+ this.mtbf = mtbf;
+ }
+
+ public long getMttr() {
+ return mttr;
+ }
+
+ public void setMttr(long mttr) {
+ this.mttr = mttr;
+ }
+
+ public double getUpPercentage() {
+ return upPercentage;
+ }
+
+ public void setUpPercentage(double upPercentage) {
+ this.upPercentage = upPercentage;
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/CreateCBRresourceRequest.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/CreateCBRresourceRequest.java
new file mode 100644
index 0000000..aa1679a
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/CreateCBRresourceRequest.java
@@ -0,0 +1,56 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest.domain;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.wordnik.swagger.annotations.ApiClass;
+import com.wordnik.swagger.annotations.ApiProperty;
+
+/**
+ * Request to create a content based resource
+ * @author Heiko W. Rupp
+ */
+@ApiClass("A request to create a content-based resource. For this to work, it is required that the content to be deployed is already uploaded to the server.")
+public class CreateCBRresourceRequest extends ResourceWithType {
+
+ Map<String,Object> pluginConfig = new HashMap<String, Object>();
+ Map<String,Object> resourceConfig = new HashMap<String, Object>();
+
+ @ApiProperty("The configuration of the connection properties")
+ public Map<String, Object> getPluginConfig() {
+ return pluginConfig;
+ }
+
+ public void setPluginConfig(Map<String, Object> pluginConfig) {
+ this.pluginConfig = pluginConfig;
+ }
+
+ @ApiProperty("The configuration of the resource to be created")
+ public Map<String, Object> getResourceConfig() {
+ return resourceConfig;
+ }
+
+ public void setResourceConfig(Map<String, Object> resourceConfig) {
+ this.resourceConfig = resourceConfig;
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceTypeRest.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceTypeRest.java
new file mode 100644
index 0000000..88988a0
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceTypeRest.java
@@ -0,0 +1,98 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import com.wordnik.swagger.annotations.ApiClass;
+
+import org.rhq.core.domain.resource.CreateDeletePolicy;
+import org.rhq.core.domain.resource.ResourceCreationDataType;
+
+/**
+ * A resource type
+ * @author Heiko W. Rupp
+ */
+@ApiClass("A resource type")
+@XmlRootElement(name = "resourceType")
+public class ResourceTypeRest {
+
+ int id;
+ String name;
+ String pluginName;
+ CreateDeletePolicy createPolicy;
+ ResourceCreationDataType dataType;
+
+ List<Link> links = new ArrayList<Link>();
+
+ public ResourceTypeRest() {
+ }
+
+ public CreateDeletePolicy getCreatePolicy() {
+ return createPolicy;
+ }
+
+ public void setCreatePolicy(CreateDeletePolicy createPolicy) {
+ this.createPolicy = createPolicy;
+ }
+
+ public ResourceCreationDataType getDataType() {
+ return dataType;
+ }
+
+ public void setDataType(ResourceCreationDataType dataType) {
+ this.dataType = dataType;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public List<Link> getLinks() {
+ return links;
+ }
+
+ public void setLinks(List<Link> links) {
+ this.links = links;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getPluginName() {
+ return pluginName;
+ }
+
+ public void setPluginName(String pluginName) {
+ this.pluginName = pluginName;
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/LinkSerializer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/LinkSerializer.java
index 2863745..a58efd3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/LinkSerializer.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/LinkSerializer.java
@@ -51,9 +51,4 @@ public class LinkSerializer extends JsonSerializer<Link> {
jsonGenerator.writeEndObject();
}
-
- @Override
- public Class<Link> handledType() {
- return Link.class;
- }
}
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
index 6a0c0a1..9f6a02b 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
@@ -23,19 +23,15 @@ import java.util.Map;
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.http.ContentType;
-import com.jayway.restassured.mapper.factory.DefaultJackson1ObjectMapperFactory;
import com.jayway.restassured.response.Header;
-import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
-import org.junit.BeforeClass;
import org.rhq.modules.integrationTests.restApi.d.Resource;
import static com.jayway.restassured.RestAssured.basic;
import static com.jayway.restassured.RestAssured.given;
-import static com.jayway.restassured.RestAssured.objectMapper;
/**
* Common setup for the tests
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
index 96935f1..3d9f735 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
@@ -34,7 +34,9 @@ import org.rhq.modules.integrationTests.restApi.d.Group;
import static com.jayway.restassured.RestAssured.delete;
import static com.jayway.restassured.RestAssured.expect;
import static com.jayway.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.emptyIterable;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.iterableWithSize;
@@ -1473,6 +1475,17 @@ public class AlertTest extends AbstractBase {
.get("/alert/{id}/notifications");
+ // See if the resource has an alert recorded
+ given()
+ .header(acceptJson)
+ .pathParam("resourceId",_platformId)
+ .expect()
+ .statusCode(200)
+ .log().ifError()
+ .body("",not(emptyIterable()))
+ .when()
+ .get("/resource/{resourceId}/alerts");
+
}
finally {
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
new file mode 100644
index 0000000..5532b13
--- /dev/null
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
@@ -0,0 +1,333 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.modules.integrationTests.restApi;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+import com.jayway.restassured.http.ContentType;
+import com.jayway.restassured.response.Response;
+
+import org.junit.Test;
+
+import org.rhq.modules.integrationTests.restApi.d.CreateCBRRequest;
+
+import static com.jayway.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.isOneOf;
+
+/**
+ * Test content upload and creation of content based resources
+ * @author Heiko W. Rupp
+ */
+public class ContentTest extends AbstractBase {
+
+ @Test
+ public void testUpload() throws Exception {
+
+ InputStream in =
+ getClass().getClassLoader().getResourceAsStream("test-simple.war");
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ int data;
+ while ((data = in.read())!=-1) {
+ baos.write(data);
+ }
+
+ byte[] bytes = baos.toByteArray();
+
+ given()
+ .auth().preemptive().basic("rhqadmin", "rhqadmin")
+ .body(bytes)
+ .contentType(ContentType.BINARY)
+ .header(acceptJson)
+ .log().everything()
+ .expect()
+ .statusCode(isOneOf(200, 201))
+ .body("value", startsWith("rhq-rest-"))
+ .body("value",endsWith(".bin"))
+ .log().ifError()
+ .when()
+ .post("/content/fresh");
+
+
+ }
+ @Test
+ public void testUploadAndDelete() throws Exception {
+
+ InputStream in =
+ getClass().getClassLoader().getResourceAsStream("test-simple.war");
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ int data;
+ while ((data = in.read())!=-1) {
+ baos.write(data);
+ }
+
+ byte[] bytes = baos.toByteArray();
+ int size = bytes.length;
+
+ String handle =
+ given()
+ .auth().preemptive().basic("rhqadmin", "rhqadmin")
+ .body(bytes)
+ .contentType(ContentType.BINARY)
+ .header(acceptJson)
+ .expect()
+ .body("value", startsWith("rhq-rest-"))
+ .body("value", endsWith(".bin"))
+ .statusCode(isOneOf(200, 201))
+ .when()
+ .post("/content/fresh")
+ .jsonPath()
+ .getString("value");
+
+ Integer uploadedSize =
+ given()
+ .pathParam("handle", handle)
+ .header(acceptJson)
+ .expect()
+ .statusCode(200)
+ .when()
+ .get("/content/{handle}/info")
+ .jsonPath().getInt("value");
+
+ assert uploadedSize!=null;
+ assert uploadedSize==size;
+
+ given()
+ .pathParam("handle",handle)
+ .header(acceptJson)
+ .expect()
+ .statusCode(204)
+ .log().ifError()
+ .when()
+ .delete("/content/{handle}");
+
+ }
+
+ @Test
+ public void testDeleteUnknownContent() throws Exception {
+
+ given()
+ .pathParam("handle","Frobnitz")
+ .header(acceptJson)
+ .expect()
+ .statusCode(204)
+ .log().ifError()
+ .when()
+ .delete("/content/{handle}");
+
+ }
+
+ @Test
+ public void testCreatePackageBasedResource() throws Exception {
+
+ InputStream in =
+ getClass().getClassLoader().getResourceAsStream("test-simple.war");
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ int data;
+ while ((data = in.read())!=-1) {
+ baos.write(data);
+ }
+
+ byte[] bytes = baos.toByteArray();
+
+ // Upload content
+ String handle =
+ given()
+ .auth().preemptive().basic("rhqadmin", "rhqadmin")
+ .body(bytes)
+ .contentType(ContentType.BINARY)
+ .header(acceptJson)
+ .expect()
+ .body("value",startsWith("rhq-rest-"))
+ .body("value",endsWith(".bin"))
+ .statusCode(isOneOf(200, 201))
+ .when()
+ .post("/content/fresh")
+ .jsonPath()
+ .getString("value");
+
+ // Find an EAP 6 server
+ List<Map<String,Object>> resources =
+ given()
+ .header(acceptJson)
+ .queryParam("q","EAP (127.0.0.1:9990)") // TODO fragile -- better search for it?
+ .queryParam("category","SERVER")
+ .expect()
+ .statusCode(200)
+ .log().ifError()
+ .when()
+ .get("/resource")
+ .jsonPath().getList("$");
+
+ assert resources.size()>0;
+
+ int as7Id = Integer.valueOf((String)resources.get(0).get("resourceId"));
+
+ // create child of eap6 as deployment
+ try {
+ CreateCBRRequest resource = new CreateCBRRequest();
+ resource.setParentId(as7Id);
+ resource.setResourceName("test-simple.war");
+
+
+ // type of the new resource
+ resource.setTypeName("Deployment");
+ resource.setPluginName("JBossAS7");
+
+ // set plugin config (path) and deploy config (runtime-name)
+ resource.getPluginConfig().put("path","deployment");
+ resource.getResourceConfig().put("runtimeName","test-simple.war");
+
+ Response response =
+ given()
+ .body(resource) // Type of new resource
+ .queryParam("handle", handle)
+ .contentType(ContentType.JSON)
+ .header(acceptJson)
+ .log().everything()
+ .expect()
+ .statusCode(isOneOf(200, 201, 302))
+ .log().everything()
+ .when()
+ .post("/resource");
+
+ System.out.println("after post");
+ System.out.flush();
+
+ int status = response.getStatusCode();
+ String location = response.getHeader("Location");
+
+ System.out.println("Location " + location + "\n\n");
+ assert location!=null;
+
+ // We need to check what we got. A 302 means the deploy is still
+ // in progress, so we need to wait a little longer
+ while (status==302) {
+
+ status =
+ given()
+ .header(acceptJson)
+ .log().everything()
+ .expect()
+ .statusCode(isOneOf(200,201,302))
+ .log().everything()
+ .when()
+ .get(location)
+ .getStatusCode();
+ }
+
+ } finally {
+
+ // Remove the uploaded content
+ given()
+ .pathParam("handle",handle)
+ .header(acceptJson)
+ .expect()
+ .statusCode(204)
+ .log().ifError()
+ .when()
+ .delete("/content/{handle}");
+
+
+ // try to remove the created resource
+ Response response =
+ given()
+ .queryParam("q", "test-simple.war")
+ .header(acceptJson)
+ .expect()
+ .log().everything()
+ .when()
+ .get("/resource");
+
+ List links = response.body().jsonPath().getList("links");
+
+ System.out.println(links);
+ assert links!=null;
+
+ if (links.size()>0) {
+
+ String link = null;
+ @SuppressWarnings("unchecked")
+ List<Map<String,Map<String,String>>> listOfMaps = (List<Map<String, Map<String, String>>>) links.get(0);
+
+ for (Map<String,Map<String,String>> map : listOfMaps) {
+ if (map.containsKey("self")) {
+ link = map.get("self").get("href");
+ break;
+ }
+ }
+
+ assert link != null;
+
+ System.out.println("Link: " + link);
+
+ given()
+ .header(acceptJson)
+ .queryParam("physical","true") // Also remove target on the EAP instance
+ .expect()
+ .log().everything()
+ .when()
+ .delete(link);
+ }
+
+ }
+
+ }
+
+ @Test
+ public void testCreateCBRBadHandle() throws Exception {
+
+ CreateCBRRequest resource = new CreateCBRRequest();
+ resource.setParentId(123);
+ resource.setResourceName("test-simple.war");
+
+
+ // type of the new resource
+ resource.setTypeName("Deployment");
+ resource.setPluginName("JBossAS7");
+
+ // set plugin config (path) and deploy config (runtime-name)
+ resource.getPluginConfig().put("path","deployment");
+ resource.getResourceConfig().put("runtimeName","test-simple.war");
+
+ Response response =
+ given()
+ .body(resource) // Type of new resource
+ .queryParam("handle", "This is a joke")
+ .contentType(ContentType.JSON)
+ .header(acceptJson)
+ .log().everything()
+ .expect()
+ .statusCode(404)
+ .log().everything()
+ .when()
+ .post("/resource");
+
+ }
+}
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
index 40bf342..1dee0f1 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
@@ -23,8 +23,6 @@
package org.rhq.modules.integrationTests.restApi;
-import java.util.List;
-import java.util.Map;
import com.jayway.restassured.http.ContentType;
import com.jayway.restassured.path.json.JsonPath;
@@ -33,7 +31,6 @@ import com.jayway.restassured.path.xml.element.Node;
import com.jayway.restassured.response.Response;
import org.apache.http.HttpStatus;
-import org.hamcrest.CoreMatchers;
import org.junit.Test;
import org.rhq.modules.integrationTests.restApi.d.Availability;
@@ -44,8 +41,8 @@ import static com.jayway.restassured.RestAssured.get;
import static com.jayway.restassured.RestAssured.given;
import static com.jayway.restassured.RestAssured.with;
import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.hasItem;
-import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
/**
@@ -80,6 +77,40 @@ public class ResourcesTest extends AbstractBase {
}
@Test
+ public void testGetPlatformAndTypeJson() {
+
+ Integer typeId =
+ given()
+ .header("Accept","application/json")
+ .pathParam("id",_platformId)
+ .expect()
+ .statusCode(200)
+ .contentType(ContentType.JSON)
+ .log().ifError()
+ .body("links.self", notNullValue())
+ .when()
+ .get("/resource/{id}")
+ .jsonPath().getInt("typeId");
+
+ assert typeId!=null;
+ assert typeId>0;
+
+ given()
+ .header(acceptJson)
+ .pathParam("typeId",typeId)
+ .log().everything()
+ .expect()
+ .statusCode(200)
+ .body("id",is(typeId))
+ .body("name",is("Linux"))
+ .body("pluginName",is("Platforms"))
+ .log().everything()
+ .when()
+ .get("/resource/type/{typeId}");
+
+ }
+
+ @Test
public void testGetPlatformUILink() {
Response response =
@@ -163,7 +194,7 @@ public class ResourcesTest extends AbstractBase {
given()
.header("Accept", "application/xml")
- .pathParam("id",_platformId)
+ .pathParam("id", _platformId)
.expect()
.statusCode(200)
.contentType(ContentType.XML)
@@ -224,6 +255,25 @@ public class ResourcesTest extends AbstractBase {
}
@Test
+ public void testCreatePlatformWithBadType() throws Exception {
+
+ Resource resource = new Resource();
+ resource.setResourceName("dummy-test");
+ resource.setTypeName("myGreatestOS");
+
+ given()
+ .header(acceptXml)
+ .contentType(ContentType.JSON)
+ .body(resource)
+ .expect()
+ .statusCode(404)
+ .log().ifError()
+ .when()
+ .post("/resource/platforms");
+
+ }
+
+ @Test
public void testCreatePlatformAndRemove() throws Exception {
Resource resource = new Resource();
@@ -339,17 +389,16 @@ public class ResourcesTest extends AbstractBase {
String platformId = response.jsonPath().getString("resourceId");
try {
- Response child =
- with().body("{\"value\":\"CPU\"}") // Type of new resource
- .header("Content-Type", "application/json")
- .header("Accept", "application/json")
- .pathParam("name", "test")
- .queryParam("plugin", "Platforms")
- .queryParam("parentId", platformId)
- .expect()
- .statusCode(201)
- .log().ifError()
- .when().post("/resource/{name}").andReturn();
+ with().body("{\"value\":\"CPU\"}") // Type of new resource
+ .header("Content-Type", "application/json")
+ .header("Accept", "application/json")
+ .pathParam("name", "test")
+ .queryParam("plugin", "Platforms")
+ .queryParam("parentId", platformId)
+ .expect()
+ .statusCode(201)
+ .log().ifError()
+ .when().post("/resource/{name}").andReturn();
}
finally {
given().pathParam("id",platformId)
@@ -419,29 +468,27 @@ public class ResourcesTest extends AbstractBase {
String platformId = response.jsonPath().getString("resourceId");
try {
- Response child =
- with().body("{\"value\":\"CPU\"}") // Type of new resource
- .header("Content-Type", "application/json")
- .header("Accept", "application/json")
- .pathParam("name", "test")
- .queryParam("plugin", "Platforms")
- .queryParam("parentId", platformId)
- .expect()
- .statusCode(201)
- .log().ifError()
- .when().post("/resource/{name}").andReturn();
-
- child =
- with().body("{\"value\":\"CPU\"}") // Type of new resource
- .header("Content-Type", "application/json")
- .header("Accept", "application/json")
- .pathParam("name", "test")
- .queryParam("plugin", "Platforms")
- .queryParam("parentId", platformId)
- .expect()
- .statusCode(201)
- .log().ifError()
- .when().post("/resource/{name}").andReturn();
+ with().body("{\"value\":\"CPU\"}") // Type of new resource
+ .header("Content-Type", "application/json")
+ .header("Accept", "application/json")
+ .pathParam("name", "test")
+ .queryParam("plugin", "Platforms")
+ .queryParam("parentId", platformId)
+ .expect()
+ .statusCode(201)
+ .log().ifError()
+ .when().post("/resource/{name}");
+
+ with().body("{\"value\":\"CPU\"}") // Type of new resource
+ .header("Content-Type", "application/json")
+ .header("Accept", "application/json")
+ .pathParam("name", "test")
+ .queryParam("plugin", "Platforms")
+ .queryParam("parentId", platformId)
+ .expect()
+ .statusCode(201)
+ .log().ifError()
+ .when().post("/resource/{name}");
}
finally {
given().pathParam("id",platformId)
@@ -474,9 +521,9 @@ public class ResourcesTest extends AbstractBase {
}
@Test
- public void testAvailabilityForResource() throws Exception {
+ public void testAvailabilityForResourceJson() throws Exception {
given()
- .header("Accept", "application/json")
+ .header(acceptJson)
.pathParam("id", _platformId)
.expect()
.statusCode(200)
@@ -485,9 +532,20 @@ public class ResourcesTest extends AbstractBase {
}
@Test
- public void testAvailabilityHistoryForResource() throws Exception {
+ public void testAvailabilityForResourceXml() throws Exception {
given()
- .header("Accept", "application/json")
+ .header(acceptXml)
+ .pathParam("id", _platformId)
+ .expect()
+ .statusCode(200)
+ .when()
+ .get("/resource/{id}/availability");
+ }
+
+ @Test
+ public void testAvailabilityHistoryForResourceJson() throws Exception {
+ given()
+ .header(acceptJson)
.pathParam("id", _platformId)
.expect()
.statusCode(200)
@@ -496,6 +554,48 @@ public class ResourcesTest extends AbstractBase {
}
@Test
+ public void testAvailabilityHistoryForResourceXml() throws Exception {
+ given()
+ .header(acceptXml)
+ .pathParam("id", _platformId)
+ .expect()
+ .statusCode(200)
+ .when()
+ .get("/resource/{id}/availability/history");
+ }
+
+ @Test
+ public void testAvailabilitySummaryForResourceJson() throws Exception {
+ given()
+ .header(acceptJson)
+ .pathParam("id", _platformId)
+ .expect()
+ .statusCode(200)
+ .log().everything()
+ .body("currentTime", instanceOf(Long.class))
+ .body("failures", instanceOf(Integer.class))
+ .body("current", containsString("UNKNOWN"))
+ .body("upPercentage", instanceOf(Float.class))
+ .when()
+ .get("/resource/{id}/availability/summary");
+ }
+
+ @Test
+ public void testAvailabilitySummaryForResourceXml() throws Exception {
+
+ given()
+ .header(acceptXml)
+ .pathParam("id", _platformId)
+ .expect()
+ .statusCode(200)
+ .log().ifError()
+ .body("availabilitySummary.current", containsString("UNKNOWN"))
+ .when()
+ .get("/resource/{id}/availability/summary");
+
+ }
+
+ @Test
public void testUpdateAvailability() throws Exception {
Response response =
@@ -552,7 +652,7 @@ public class ResourcesTest extends AbstractBase {
@Test
public void testNoDisabledForPlatforms() throws Exception {
- // Platforms should not be set to DISABLED according ot JSHAUGHN
+ // Platforms should not be set to DISABLED according to JSHAUGHN
long now = System.currentTimeMillis()-100;
Availability avail = new Availability(_platformId,now,"DISABLED");
@@ -569,4 +669,32 @@ public class ResourcesTest extends AbstractBase {
.put("/resource/{id}/availability");
}
+
+ @Test
+ public void testGetUnknownType() throws Exception {
+
+
+ given()
+ .header(acceptJson)
+ .pathParam("typeId",123)
+ .expect()
+ .statusCode(404)
+ .log().ifError()
+ .when()
+ .get("/resource/type/{typeId}");
+
+ }
+
+ @Test
+ public void testUnknownCreateResourceStatusId() throws Exception {
+
+ given()
+ .pathParam("id",123)
+ .expect()
+ .statusCode(404)
+ .when()
+ .get("/resource/creationStatus/{id}");
+
+
+ }
}
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/CreateCBRRequest.java b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/CreateCBRRequest.java
new file mode 100644
index 0000000..2b26025
--- /dev/null
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/CreateCBRRequest.java
@@ -0,0 +1,49 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.modules.integrationTests.restApi.d;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A request to create a content based resource via REST api
+ * @author Heiko W. Rupp
+ */
+public class CreateCBRRequest extends Resource {
+
+ Map<String,Object> pluginConfig = new HashMap<String, Object>();
+ Map<String,Object> resourceConfig = new HashMap<String, Object>();
+
+ public Map<String, Object> getPluginConfig() {
+ return pluginConfig;
+ }
+
+ public void setPluginConfig(Map<String, Object> pluginConfig) {
+ this.pluginConfig = pluginConfig;
+ }
+
+ public Map<String, Object> getResourceConfig() {
+ return resourceConfig;
+ }
+
+ public void setResourceConfig(Map<String, Object> resourceConfig) {
+ this.resourceConfig = resourceConfig;
+ }
+}
diff --git a/modules/integration-tests/rest-api/src/test/resources/test-simple.war b/modules/integration-tests/rest-api/src/test/resources/test-simple.war
new file mode 100644
index 0000000..bd427b1
Binary files /dev/null and b/modules/integration-tests/rest-api/src/test/resources/test-simple.war differ
commit 6e6361c5425a245bc6afe6030afb6351d6604d30
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Mar 21 22:25:51 2013 -0400
Bug 832398
RFE: Enable DynaGroups to be created based on the contents of another group
Add a test and small fix for detecting duplicate memberof expressions.
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java
index 92919c5..3745d16 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/group/definition/framework/test/ExpressionEvaluatorTest.java
@@ -801,6 +801,16 @@ public class ExpressionEvaluatorTest extends AbstractEJB3Test {
});
}
+ @Test(expectedExceptions = InvalidExpressionException.class, expectedExceptionsMessageRegExp = "Redundant.*")
+ public void doNotAllowDuplicateMemberOfExpressions() throws Exception {
+ evaluateExpressions(new ExpressionGenerator() {
+ @Override
+ public String[] getExpressions() {
+ return new String[] { "memberof = foo", "memberof = foo" };
+ }
+ });
+ }
+
private String cleanUp(String result) {
return result.replaceAll("\\s+", " ").trim();
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java
index 363a663..2c2c4c2 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/definition/framework/ExpressionEvaluator.java
@@ -1271,6 +1271,7 @@ public class ExpressionEvaluator implements Iterable<ExpressionEvaluator.Result>
throw new InvalidExpressionException("Redundant 'memberof' expression[" + normalizedSubExpression
+ "] - these expressions must be unique");
}
+ memberSubExpressions.add(normalizedSubExpression);
} else {
if (groupedSubExpressions.contains(normalizedSubExpression)) {
throw new InvalidExpressionException(
commit 28cdcb1c56aeb7f66d608d300d74152e510c3249
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Mar 21 15:26:52 2013 -0500
[BZ 923458] Maven dependency version cleanup.
(cherry picked from commit 98a076a4b1ab258efbf3e367a2f4fe65b9d5bc7a)
(cherry picked from commit fb84b4e89772479851ce4c6403d7cce6a170d761)
(cherry picked from commit 1308cc9399c63b7f68c89c62619e9f91014c8ed8)
(cherry picked from commit 6dd80cae4df923b2118936951d6fdbb0006b8294)
diff --git a/etc/augeas-utils/pom.xml b/etc/augeas-utils/pom.xml
index 8355748..ca5c540 100644
--- a/etc/augeas-utils/pom.xml
+++ b/etc/augeas-utils/pom.xml
@@ -28,10 +28,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
+ <version>2.3.2</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
</configuration>
</plugin>
</plugins>
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index 394dc13..c4dadc9 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -31,19 +31,16 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 111b6f0..4cf6703 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -48,7 +48,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
@@ -73,7 +72,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
<scope>runtime</scope> <!-- needs to be runtime otherwise it will not be included by assembly plugin -->
<exclusions>
<exclusion>
@@ -86,7 +84,6 @@
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
- <version>1.9.5</version>
</dependency>
</dependencies>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 190bc89..9d7a132 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 17e5433..d3bf151 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -23,7 +23,6 @@
<dependency>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</dependency>
<dependency>
@@ -72,7 +71,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/core/arquillian-integration/container/pom.xml b/modules/core/arquillian-integration/container/pom.xml
index 50e0fed..9dc7a99 100644
--- a/modules/core/arquillian-integration/container/pom.xml
+++ b/modules/core/arquillian-integration/container/pom.xml
@@ -112,13 +112,11 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
</dependency>
<!-- test -->
@@ -133,7 +131,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.1</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index a4f4b9e..c03f268 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -60,7 +60,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index a48f2a4..41351ed 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -55,7 +55,6 @@
<dependency>
<groupId>i18nlog</groupId>
<artifactId>i18nlog</artifactId>
- <version>${i18nlog.version}</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
@@ -80,7 +79,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
@@ -452,7 +450,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
</plugin>
</plugins>
</build>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index ef7c906..f14157e 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -152,21 +152,18 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
<scope>test</scope>
</dependency>
@@ -194,7 +191,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -472,7 +468,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 9f1b724..365535a 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -57,7 +57,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope>
<!-- by JBossAS -->
<!-- transitive dependency needed for JspC -->
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 21f1c48..04be12b 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -47,7 +47,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.9.0</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index 4b828f7..a24c330 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -46,14 +46,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 8bff199..06395a2 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -82,7 +82,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
diff --git a/modules/core/plugin-test-api/pom.xml b/modules/core/plugin-test-api/pom.xml
index f7abec9..9c91bc0 100644
--- a/modules/core/plugin-test-api/pom.xml
+++ b/modules/core/plugin-test-api/pom.xml
@@ -39,13 +39,11 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugin-test-util/pom.xml b/modules/core/plugin-test-util/pom.xml
index dbb97fe..c75dcbc 100644
--- a/modules/core/plugin-test-util/pom.xml
+++ b/modules/core/plugin-test-util/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index fc8ff80..d05b721 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -36,7 +36,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 4528810..c3c7175 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -48,7 +48,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
@@ -119,7 +118,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
<executions>
<execution>
<id>attach-installed-file-for-deployment</id>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index ff2a247..b799891 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -42,7 +42,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 8e7d819..d1200f6 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -224,7 +224,6 @@ Build-Number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
@@ -243,7 +242,6 @@ Build-Number=${buildNumber}
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
<executions>
<execution>
<id>attach-installed-file-for-deployment</id>
@@ -285,7 +283,6 @@ Build-Number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index ba0d852..3b66b92 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -135,7 +135,6 @@ rhq-agent.latest.build-number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
@@ -204,7 +203,6 @@ rhq-agent.latest.build-number=${buildNumber}
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index a0cab6f..a41fb6c 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -182,14 +182,12 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
<scope>test</scope>
</dependency>
@@ -206,14 +204,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index 4adb84e..822d405 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -156,7 +156,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.6</version>
</plugin>
</plugins>
</reporting>
diff --git a/modules/enterprise/gui/content_http-war/pom.xml b/modules/enterprise/gui/content_http-war/pom.xml
index 61abd3a..19208e8 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -54,20 +54,11 @@
<artifactId>hibernate-entitymanager</artifactId>
<scope>provided</scope>
</dependency>
-
- <!--
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.2</version>
- </dependency>
- -->
<!-- adding to pick up javax.servlet.http.HttpServlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -84,7 +75,6 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
@@ -96,7 +86,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -109,7 +98,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -122,7 +110,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index 9795f49..6c12259 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -70,7 +70,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
</dependency>
<dependency>
@@ -94,7 +93,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -107,14 +105,12 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
- <version>1.1.4</version>
</dependency>
<!-- used by a test JSP -->
@@ -141,7 +137,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
@@ -186,7 +181,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.2</version>
</dependency>
<dependency>
@@ -282,7 +276,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
diff --git a/modules/enterprise/gui/remoting-war/pom.xml b/modules/enterprise/gui/remoting-war/pom.xml
index c4b63bf..9570336 100644
--- a/modules/enterprise/gui/remoting-war/pom.xml
+++ b/modules/enterprise/gui/remoting-war/pom.xml
@@ -39,7 +39,6 @@
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/gui/rest-examples-war/pom.xml b/modules/enterprise/gui/rest-examples-war/pom.xml
index 87354d1..2a5091c 100644
--- a/modules/enterprise/gui/rest-examples-war/pom.xml
+++ b/modules/enterprise/gui/rest-examples-war/pom.xml
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/gui/rest-war/pom.xml b/modules/enterprise/gui/rest-war/pom.xml
index 1b5349c..0797145 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -59,7 +59,6 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index ee672e2..fc164c9 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -77,7 +77,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/modules/enterprise/remoting/client-api/pom.xml b/modules/enterprise/remoting/client-api/pom.xml
index f5fbe0c..2c7b6f9 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -90,14 +90,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/remoting/client-deps/pom.xml b/modules/enterprise/remoting/client-deps/pom.xml
index 006a9a6..61b7c19 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -18,19 +18,19 @@
<groupId>${project.groupId}</groupId>
<artifactId>rhq-remoting-client-api</artifactId>
<version>${project.version}</version>
- <exclusions>
+ <exclusions>
<exclusion>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- </exclusion>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ </exclusion>
<exclusion>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
<exclusion>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr</artifactId>
@@ -50,21 +50,20 @@
<artifactId>concurrent</artifactId>
<version>1.3.4-jboss-update1</version>
</dependency>
- <dependency>
- <groupId>i18nlog</groupId>
- <artifactId>i18nlog</artifactId>
- <version>1.0.10</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>i18nlog</groupId>
+ <artifactId>i18nlog</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ </dependencies>
</project>
diff --git a/modules/enterprise/scripting/api/pom.xml b/modules/enterprise/scripting/api/pom.xml
index 5fdffe3..07768cd 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -41,7 +41,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/scripting/javascript/pom.xml b/modules/enterprise/scripting/javascript/pom.xml
index 208076a..b1d6553 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -87,7 +87,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/scripting/python/pom.xml b/modules/enterprise/scripting/python/pom.xml
index ab12edf..8e7ff39 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -86,7 +86,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
diff --git a/modules/enterprise/server/appserver/pom.xml b/modules/enterprise/server/appserver/pom.xml
index 2ffdc7c..dc6bbb3 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -67,7 +67,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.3</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/client-api/pom.xml b/modules/enterprise/server/client-api/pom.xml
index ac92aec..c645073 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -53,14 +53,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index a6cc2c7..939f107 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -169,7 +169,6 @@
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
- <version>${quartz.version}</version>
</dependency>
<dependency>
diff --git a/modules/enterprise/server/installer/pom.xml b/modules/enterprise/server/installer/pom.xml
index 83b8977..5e5cdd1 100644
--- a/modules/enterprise/server/installer/pom.xml
+++ b/modules/enterprise/server/installer/pom.xml
@@ -83,7 +83,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.9.0</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/itests-2/pom.xml b/modules/enterprise/server/itests-2/pom.xml
index cf6aa8d..24fb17b 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -559,7 +559,6 @@
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
- <version>${jboss.javaee6.spec.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
@@ -567,7 +566,6 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
- <version>${jboss.version}</version>
<scope>test</scope>
</dependency>
@@ -677,14 +675,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index b7621c5..b86af52 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -123,7 +123,6 @@
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
- <version>${jboss.javaee6.spec.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
@@ -169,7 +168,6 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>${infinispan.version}</version>
<scope>provided</scope>
</dependency>
@@ -185,26 +183,22 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<!-- Required by a couple APL classes - TODO: Remove this once APL has been removed. -->
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
- <version>1.1.4</version>
</dependency>
<dependency>
@@ -279,7 +273,6 @@
<dependency>
<groupId>org.jboss.jbossts</groupId>
<artifactId>jbossjts</artifactId>
- <version>${jboss-jts.version}</version>
<scope>provided</scope>
</dependency>
@@ -407,14 +400,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
@@ -449,7 +440,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
- <version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<generateClient>true</generateClient>
@@ -574,7 +564,6 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
- <version>3.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 3b08f01..24813ad 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -29,7 +29,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<!-- Generate tokens.xml file -->
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index 6f636d5..4226e21 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -94,13 +94,11 @@
<artifactItem>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
</artifactItem>
<artifactItem>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
- <version>1.9.5</version>
</artifactItem>
</artifactItems>
diff --git a/modules/enterprise/server/plugins/disk/pom.xml b/modules/enterprise/server/plugins/disk/pom.xml
index 5ecb7a9..c111bcc 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -27,14 +27,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index ed72fd0..39d7127 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -74,7 +74,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml b/modules/enterprise/server/plugins/groovy-script/pom.xml
index e844a56..ea20099 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -4,14 +4,14 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.5.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Groovy Script Plugin</name>
@@ -19,7 +19,6 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@@ -27,9 +26,8 @@
<version>1.7.1</version>
</dependency>
<dependency>
- <groupId>quartz</groupId>
+ <groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
- <version>1.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -54,6 +52,10 @@
<artifactId>reflections</artifactId>
<version>0.9.5-RC2</version>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -97,7 +99,6 @@
<artifactItem>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
- <version>${javassist.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
@@ -109,7 +110,6 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
<executions>
<execution>
<goals>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml b/modules/enterprise/server/plugins/jboss-software/pom.xml
index 3d31342..33a11a1 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<scope>provided</scope>
</dependency>
@@ -40,7 +39,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/enterprise/server/plugins/url/pom.xml b/modules/enterprise/server/plugins/url/pom.xml
index f677d6a..5660473 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -43,7 +43,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml
index 05cd715..6f2cc2e 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -31,21 +31,17 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<!-- make sure you match that which is used by standalone agent! -->
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<!-- make sure you match that which is used by standalone agent! -->
- <version>1.2.14</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <!-- make sure you match that which is used by standalone agent! -->
- <version>2.0.2</version>
</dependency>
</dependencies>
diff --git a/modules/enterprise/server/sars/services-sar/pom.xml b/modules/enterprise/server/sars/services-sar/pom.xml
index 413c681..4586a8b 100644
--- a/modules/enterprise/server/sars/services-sar/pom.xml
+++ b/modules/enterprise/server/sars/services-sar/pom.xml
@@ -21,25 +21,6 @@
<build>
<finalName>rhq-enterprise-server-services-sar</finalName>
-
- <!-- we don't need this right now - only if we need deps stored in the sar META-INF/lib/ will we need this -->
- <!-- NOTE: extensions=true below allows Maven to grok the jboss-sar packaging type -->
- <!--
- <plugins>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>1.9.99</version>
- <extensions>true</extensions>
- <configuration>
- <libDirectory>${sarDirectory}/META-INF/lib</libDirectory>
- </configuration>
- </plugin>
-
- </plugins>
- -->
-
<resources>
<resource>
<directory>src/main/resources</directory>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index 9c1bfdd..98783f1 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -44,7 +44,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 1c570fc..82fabfc 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -17,7 +17,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
<configuration>
<archive>
<manifest>
@@ -58,7 +57,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
diff --git a/modules/helpers/inventory-serializer/pom.xml b/modules/helpers/inventory-serializer/pom.xml
index a42effa..993250b 100644
--- a/modules/helpers/inventory-serializer/pom.xml
+++ b/modules/helpers/inventory-serializer/pom.xml
@@ -36,7 +36,6 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index ceb5377..4136b47 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -42,12 +42,10 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index f7f04ba..372c627 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -24,7 +24,6 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
<configuration>
<archive>
<manifest>
@@ -72,7 +71,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
diff --git a/modules/helpers/rest-docs-generator/pom.xml b/modules/helpers/rest-docs-generator/pom.xml
index 0996c3b..208d40b 100644
--- a/modules/helpers/rest-docs-generator/pom.xml
+++ b/modules/helpers/rest-docs-generator/pom.xml
@@ -147,7 +147,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 98b8667..da9cf66 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -25,7 +25,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.3</version>
<scope>provided</scope> <!-- by servlet container -->
</dependency>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
index e574631..9469947 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -181,7 +181,6 @@
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
- <version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml b/modules/integration-tests/jndi-access/remote-server/pom.xml
index fd7e312..b28b9bf 100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -38,7 +38,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
</dependency>
</dependencies>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index ad8df87..b3370a3 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -75,7 +75,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/integration-tests/rest-api/pom.xml b/modules/integration-tests/rest-api/pom.xml
index cea2a5c..6061752 100644
--- a/modules/integration-tests/rest-api/pom.xml
+++ b/modules/integration-tests/rest-api/pom.xml
@@ -50,7 +50,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index a7a4469..14874eb 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 5390fcc..0c750b6 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -66,13 +66,11 @@
<artifactItem>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
</artifactItem>
<artifactItem>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
- <version>1.9.5</version>
</artifactItem>
</artifactItems>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 2ca9086..3f6bca5 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
@@ -63,7 +62,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>${xercesImpl.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 9a8acb4..4e663e6 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -39,13 +39,11 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
</dependency>
<dependency>
@@ -196,7 +194,6 @@
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/plugins/cassandra/pom.xml b/modules/plugins/cassandra/pom.xml
index ac3d8ff..9888aa0 100644
--- a/modules/plugins/cassandra/pom.xml
+++ b/modules/plugins/cassandra/pom.xml
@@ -17,7 +17,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 8321f4e..c01634b 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -25,7 +25,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
@@ -38,7 +37,6 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</dependency>
</dependencies>
@@ -271,7 +269,6 @@
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 6ed701b..27f290b 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index d77acf5..4a3ad1d 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 1a6c591..dd99a37 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -110,7 +110,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 467397e..9ca39d3 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -26,7 +26,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index fc69a41..875e82f 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -128,7 +128,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index f2a81a1..3eb65a7 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -64,7 +64,6 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
@@ -144,14 +143,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
@@ -188,7 +185,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
<artifactItem>
<groupId>ant</groupId>
diff --git a/modules/plugins/jboss-as-5/testsuite/pom.xml b/modules/plugins/jboss-as-5/testsuite/pom.xml
index dd1949e..ca6399a 100644
--- a/modules/plugins/jboss-as-5/testsuite/pom.xml
+++ b/modules/plugins/jboss-as-5/testsuite/pom.xml
@@ -74,7 +74,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
<scope>provided</scope>
<!-- by JBossAS -->
</dependency>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 1f63c91..1a5f119 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -71,7 +71,6 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
@@ -83,7 +82,6 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
</dependency>
<!-- === Test Deps === -->
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index d1f4c74..8a5b6c9 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -74,14 +74,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
@@ -124,7 +122,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
<artifactItem>
<groupId>ant</groupId>
@@ -152,7 +149,6 @@
<artifactItem>
<groupId>jboss</groupId>
<artifactId>jbpm</artifactId>
- <version>3.1.1</version>
</artifactItem>
<artifactItem>
<groupId>ant</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 804b04a..62ffc81 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -40,7 +40,6 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 03a4cbd..22db736 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -25,12 +25,10 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
</dependency>
<!-- Test dependencies -->
@@ -141,7 +139,6 @@
<artifactItem>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
</artifactItem>
<artifactItem>
<groupId>commons-codec</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index 7fe46e5..1d40834 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -122,7 +122,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>${rhq.groupId}</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 7ccffa7..593a70b 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -33,7 +33,6 @@
<plugin>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
<goals>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 69a3b7d..6ee7474 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index 80bf531..c615a39 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -6,7 +6,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.7.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.plugins</groupId>
@@ -28,13 +28,11 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
</dependency>
</dependencies>
@@ -43,7 +41,6 @@
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
<executions>
<execution>
<goals>
@@ -68,7 +65,6 @@
<artifactItem>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>1.7.0</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.ant</groupId>
@@ -83,17 +79,14 @@
<artifactItem>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.6</version>
</artifactItem>
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
</artifactItem>
<artifactItem>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
</artifactItem>
<artifactItem>
<groupId>commons-logging</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index a392c58..23dadb6 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 4805c8f..ae92638 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -164,7 +164,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 92e76ef..93856c9 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 053fac0..d10ef73 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -24,7 +24,6 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>${ant.contrib.version}</version>
<scope>provided</scope>
</dependency>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 9ded2f5..8cdd836 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -27,14 +27,12 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
- <version>${powermock.version}</version>
<scope>test</scope>
</dependency>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 6f00f3f..52e155c 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -120,7 +120,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index ee5bbfd..07e3aa1 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -27,7 +27,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -84,7 +83,7 @@
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils-testng</artifactId>
- <version>3.1</version>
+ <version>3.1</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
diff --git a/pom.xml b/pom.xml
index 9510607..b849d13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@
<!-- Start: JBoss AS Dependency Versions
The dependency versions below are declared together as the versions of each are dependent on the
overall JBoss AS Server version. Meaning, the AS provides these libs. When the Server
- version is changed the versions of each of these should be validated and updated as needed.
+ version is changed the versions of each of these should be validated and updated as needed.
-->
<jboss.version>7.1.1.Final</jboss.version>
<jboss.javaee6.spec.version>3.0.0.Final</jboss.javaee6.spec.version>
@@ -78,7 +78,7 @@
<antlr.version>2.7.7</antlr.version>
<hibernate.version>4.0.1.Final</hibernate.version>
<hibernate-annotations.version>3.5.6-Final</hibernate-annotations.version>
- <hibernate-jpa-2.0-api.version>1.0.1.Final</hibernate-jpa-2.0-api.version>
+ <hibernate-jpa-2.0-api.version>1.0.1.Final</hibernate-jpa-2.0-api.version>
<infinispan.version>5.1.2.FINAL</infinispan.version>
<javax.annotation.api.version>1.0.1.Final</javax.annotation.api.version>
<javax.ejb.api.version>1.0.2.Final</javax.ejb.api.version>
@@ -95,23 +95,23 @@
<jboss-remotingjmx.version>1.0.2.Final</jboss-remotingjmx.version>
<jboss-transaction-api.version>1.0.0.Final</jboss-transaction-api.version>
<picketbox.version>4.0.7.Final</picketbox.version>
- <resteasy.version>2.3.4.Final</resteasy.version>
+ <resteasy.version>2.3.4.Final</resteasy.version>
<jboss-staxmapper.version>1.1.0.Final</jboss-staxmapper.version>
<jboss-modules.version>1.1.1.GA</jboss-modules.version>
<jboss-dmr.version>1.1.1.Final</jboss-dmr.version>
<jboss-msc.version>1.0.2.GA</jboss-msc.version>
<!-- Not Provided - some of these are needed by the agent -->
- <jboss-annotations.version>4.2.3.GA</jboss-annotations.version>
+ <jboss-annotations.version>4.2.3.GA</jboss-annotations.version>
<jboss-cache.version>1.4.1.SP9</jboss-cache.version>
- <jboss-jmx.version>4.2.3.GA</jboss-jmx.version>
- <jboss-common.version>1.2.1.GA</jboss-common.version> <!-- note this is the old commons we used, not the newer commons-core -->
+ <jboss-jmx.version>4.2.3.GA</jboss-jmx.version>
+ <jboss-common.version>1.2.1.GA</jboss-common.version> <!-- note this is the old commons we used, not the newer commons-core -->
<jboss-remoting.version>2.5.4.SP4</jboss-remoting.version>
<jboss-serialization.version>1.0.3.GA</jboss-serialization.version>
- <jboss-system.version>4.2.3.GA</jboss-system.version>
+ <jboss-system.version>4.2.3.GA</jboss-system.version>
<jbosssx.version>4.2.3.GA</jbosssx.version>
-
-
+
+
<!-- End: JBoss AS Dependency Versions -->
<commons-logging.version>1.1.0.jboss</commons-logging.version>
@@ -121,7 +121,7 @@
<i18nlog.version>1.0.10</i18nlog.version>
<jsf-api.version>1.2_14</jsf-api.version>
<jsf-impl.version>1.2_14</jsf-impl.version>
- <log4j.version>1.2.16</log4j.version>
+ <log4j.version>1.2.14</log4j.version>
<ojdbc6.version>11.2.0.3.0</ojdbc6.version>
<ems.version>1.3</ems.version>
<postgresql.version>9.2-1002.jdbc4</postgresql.version>
@@ -148,9 +148,22 @@
<arquillian.jboss.container.version>7.1.1.Final</arquillian.jboss.container.version>
<shrinkwrap-resolver.version>2.0.0-alpha-7</shrinkwrap-resolver.version>
<xercesImpl.version>2.9.1-jbossas-2</xercesImpl.version> <!-- see BZ-820629 and CVE-2009-2625 -->
- <opencsv.version>1.8</opencsv.version>
+ <opencsv.version>1.8</opencsv.version>
<commons-httpclient.version>3.0.1</commons-httpclient.version>
-
+ <commons-io.version>1.4</commons-io.version>
+ <commons-lang.version>2.4</commons-lang.version>
+ <commons-codec.version>1.4</commons-codec.version>
+ <commons-validator.version>1.1.4</commons-validator.version>
+ <commons-collections.version>3.2.1</commons-collections.version>
+ <commons-configuration.version>1.6</commons-configuration.version>
+
+ <junit.version>4.8.2</junit.version>
+ <liquibase-core.version>1.9.5</liquibase-core.version>
+ <jbpm.version>3.1.1</jbpm.version>
+ <servlet-api.version>2.4</servlet-api.version>
+
+ <mockito-core.version>1.9.0</mockito-core.version>
+
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -233,7 +246,7 @@
<jacoco.version>0.6.0.201210061924</jacoco.version>
<jacoco-arquillian-extension.version>1.0.0.Alpha5</jacoco-arquillian-extension.version>
</properties>
-
+
<dependencyManagement>
@@ -243,7 +256,7 @@
The dependencies below are declared together as the versions of each are dependent on the
overall JBoss AS Server version. Meaning, the AS provides these libs. When the Server
version is changed the versions of each of these should be validated and updated as needed. -->
-
+
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
@@ -275,18 +288,18 @@
<version>${javax.annotation.api.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<version>${javax.ejb.api.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
<version>${javax.jms.api.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
@@ -371,6 +384,12 @@
<version>${jboss-msc.version}</version>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>${jbpm.version}</version>
+ </dependency>
+
<!-- see BZ-820629 and CVE-2009-2625 for why this is needed -->
<dependency>
<groupId>xerces</groupId>
@@ -386,6 +405,48 @@
<version>${commons-logging.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>${commons-io.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>${commons-codec.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>${commons-validator.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>${commons-collections.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>${commons-configuration.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${commons-httpclient.version}</version>
+ </dependency>
+
<!-- GNU GetOpt (any modules that need to do command-line argument parsing should use this) -->
<dependency>
<groupId>gnu-getopt</groupId>
@@ -606,7 +667,7 @@
<artifactId>jboss-javaee-6.0</artifactId>
<version>${jboss.javaee6.spec.version}</version>
<type>pom</type>
- <scope>import</scope>
+ <scope>import,provided</scope>
</dependency>
<!-- We want the shrinkwrap dependency resolver to be newer than that included in the Arquillian BOM.
@@ -617,7 +678,7 @@
<version>${shrinkwrap-resolver.version}</version>
<scope>import</scope>
<type>pom</type>
- </dependency>
+ </dependency>
<!-- This will pull in the compatible versions of shrinkwrap deps too. Note that we want to use an explicit
version for the shrinkwrap resolver, which revs more often and has bugfixes. -->
<dependency>
@@ -645,6 +706,54 @@
<artifactId>org.jacoco.core</artifactId>
<version>${jacoco.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ <version>${liquibase-core.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>${mockito-core.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-testng</artifactId>
+ <version>${powermock.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>${powermock.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${servlet-api.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testng.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -705,7 +814,7 @@
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
+ <version>${ant.contrib.version}</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
@@ -821,7 +930,11 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1</version>
- </plugin>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
<!-- === Codehaus Mojo Plugins === -->
<plugin>
@@ -839,7 +952,7 @@
<artifactId>exec-maven-plugin</artifactId>
<!-- NOTE: Version 1.2 of this plugin appears to be broken, so do not
upgrade to that version. -->
- <version>1.1</version>
+ <version>1.2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -867,11 +980,17 @@
<version>${clirr.version}</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
-
+
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+
<plugin>
<groupId>com.googlecode.maven-overview-plugin</groupId>
<artifactId>maven-overview-plugin</artifactId>
@@ -898,7 +1017,19 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
- </plugins>
+
+ <plugin>
+ <groupId>com.sun.tools.xjc.maven2</groupId>
+ <artifactId>maven-jaxb-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr3-maven-plugin</artifactId>
+ <version>3.2</version>
+ </plugin>
+ </plugins>
</pluginManagement>
@@ -1353,21 +1484,21 @@
<name>code-coverage</name>
</property>
</activation>
-
+
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-jacoco</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
-
+
<build>
<plugins>
<!-- This definition creates the 2 independent coverage reports -
@@ -1786,8 +1917,13 @@
<reportSets>
<reportSet>
</reportSet>
- </reportSets>
- </plugin>
+ </reportSets>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
<!--
<plugin>
11 years, 2 months
[rhq] modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java | 2 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 12 +++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 23cbdd1dca3dbe69daae924c5d931e18ddb3dda4
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Mar 22 21:36:33 2013 -0400
get the tests to pass
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index b1d0f3a..5003a7f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -685,7 +685,7 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
DeleteResourceRequest request = new DeleteResourceRequest(persistedHistory.getId(), resourceId);
try {
- if (!agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
+ if (agent.getName() == null || !agent.getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // synthetic agent? We can't do anything at the moment
AgentClient agentClient = agentManager.getAgentClient(agent);
ResourceFactoryAgentService resourceFactoryAgentService = agentClient.getResourceFactoryAgentService();
resourceFactoryAgentService.deleteResource(request);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d375b16..e6a9333 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -404,11 +404,13 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
// but not if this is a synthetic agent that was created in the REST-api
// See org.rhq.enterprise.server.rest.ResourceHandlerBean.createPlatformInternal()
// See also https://docs.jboss.org/author/display/RHQ/Virtual+platforms+and+synthetic...
- if (agentClient != null && !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
- try {
- agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
- } catch (Exception e) {
- log.warn(" Unable to inform agent of inventory removal for resource [" + resourceId + "]", e);
+ if (agentClient != null) {
+ if (agentClient.getAgent() == null || agentClient.getAgent().getName() == null || !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
+ try {
+ agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
+ } catch (Exception e) {
+ log.warn(" Unable to inform agent of inventory removal for resource [" + resourceId + "]", e);
+ }
}
}
11 years, 2 months
[rhq] Changes to 'mtho11/small-charts'
by mike thompson
New branch 'mtho11/small-charts' available with the following commits:
commit f6a08c79dc24844a98631c9bce17d4ce3b633ca2
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Wed Mar 20 15:45:31 2013 -0700
[BZ 921022] - Small Width Dashboard charts overflow.
11 years, 2 months