code-coverage/pom.xml
| 205 +++++++
etc/apt/pom.xml
| 4
etc/greasemonkey/RHQ_login_monkey.user.js
| 31 +
etc/guiperftests/pom.xml
| 2
modules/cli-tests/pom.xml
| 83 ---
modules/common/ant-bundle/pom.xml
| 86 ---
modules/common/drift/pom.xml
| 84 ---
modules/common/filetemplate-bundle/pom.xml
| 86 ---
modules/common/jboss-as/pom.xml
| 93 ---
modules/core/arquillian-integration/container/pom.xml
| 4
modules/core/client-api/pom.xml
| 85 ---
modules/core/dbutils/pom.xml
| 84 ---
modules/core/domain/pom.xml
| 84 ---
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
| 3
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/composite/ServerWithAgentCountComposite.java
| 14
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionMap.java
| 114 +++-
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/PartitionEventCriteria.java
| 78 ++
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
| 2
modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
| 9
modules/core/gui/src/main/java/org/rhq/core/gui/configuration/ConfigRenderer.java
| 2
modules/core/native-system/pom.xml
| 89 ---
modules/core/plugin-api/pom.xml
| 86 ---
modules/core/plugin-container/pom.xml
| 92 ---
modules/core/pom.xml
| 8
modules/core/util/pom.xml
| 84 ---
modules/enterprise/agent/pom.xml
| 83 ---
modules/enterprise/agentupdate/pom.xml
| 83 ---
modules/enterprise/binding/pom.xml
| 95 ---
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
| 2
modules/enterprise/comm/pom.xml
| 85 ---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
| 42 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
| 206 +++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
| 170 ++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
| 81 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
| 114 ++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
| 169 ++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasourceField.java
| 83 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
| 156 +++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasourceField.java
| 75 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
| 257 +++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
| 33 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
| 223 ++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
| 260 +++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
| 166 ++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasourceField.java
| 83 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
| 42 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/AggregateConfigurationBuilder.java
| 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
| 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
| 73 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
| 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
| 62 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
| 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
| 35 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
| 124 ++++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
| 33 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
| 35 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
| 31 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
| 31 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
| 31 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
| 31 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
| 31 +
modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
| 8
modules/enterprise/gui/portal-war/pom.xml
| 87 ---
modules/enterprise/gui/rest-war/pom.xml
| 88 ---
modules/enterprise/pom.xml
| 8
modules/enterprise/remoting/cli/pom.xml
| 86 ---
modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
| 3
modules/enterprise/remoting/webservices/pom.xml
| 2
modules/enterprise/scripting/api/pom.xml
| 91 ---
modules/enterprise/scripting/javascript/pom.xml
| 102 ---
modules/enterprise/scripting/python/pom.xml
| 93 ---
modules/enterprise/scripting/python/src/test/java/org/rhq/scripting/python/PythonScriptEngineInitializerTest.java
| 7
modules/enterprise/server/client-api/pom.xml
| 91 ---
modules/enterprise/server/container/pom.xml
| 100 ---
modules/enterprise/server/itests/pom.xml
| 2
modules/enterprise/server/jar/pom.xml
| 91 ---
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
| 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerRemote.java
| 90 +++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerBean.java
| 12
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerLocal.java
| 12
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
| 1
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
| 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
| 19
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/RemoteAPIValidator.java
| 2
modules/enterprise/server/plugins/alert-cli/pom.xml
| 93 ---
modules/enterprise/server/plugins/alert-email/pom.xml
| 88 ---
modules/enterprise/server/plugins/alert-irc/pom.xml
| 88 ---
modules/enterprise/server/plugins/alert-log4j/pom.xml
| 88 ---
modules/enterprise/server/plugins/alert-microblog/pom.xml
| 88 ---
modules/enterprise/server/plugins/alert-mobicents/pom.xml
| 87 ---
modules/enterprise/server/plugins/alert-operations/pom.xml
| 86 ---
modules/enterprise/server/plugins/alert-roles/pom.xml
| 89 ---
modules/enterprise/server/plugins/alert-scriptlang/pom.xml
| 83 ---
modules/enterprise/server/plugins/alert-sms/pom.xml
| 86 ---
modules/enterprise/server/plugins/alert-snmp/pom.xml
| 88 ---
modules/enterprise/server/plugins/alert-subject/pom.xml
| 87 ---
modules/enterprise/server/plugins/ant-bundle/pom.xml
| 85 ---
modules/enterprise/server/plugins/cloud/pom.xml
| 2
modules/enterprise/server/plugins/cobbler/pom.xml
| 85 ---
modules/enterprise/server/plugins/disk/pom.xml
| 87 ---
modules/enterprise/server/plugins/drift-mongodb/pom.xml
| 87 ---
modules/enterprise/server/plugins/drift-rhq/pom.xml
| 85 ---
modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
| 85 ---
modules/enterprise/server/plugins/groovy-script/pom.xml
| 85 ---
modules/enterprise/server/plugins/jboss-software/pom.xml
| 86 ---
modules/enterprise/server/plugins/packagetype-cli/pom.xml
| 87 ---
modules/enterprise/server/plugins/url/pom.xml
| 88 ---
modules/enterprise/server/plugins/yum/pom.xml
| 88 ---
modules/enterprise/server/safe-invoker/pom.xml
| 84 ---
modules/enterprise/server/sars/agent-sar/pom.xml
| 83 ---
modules/enterprise/server/xml-schemas/pom.xml
| 85 ---
modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ConfigurationInstanceDescriptorUtil.java
| 4
modules/helpers/bundleGen/pom.xml
| 86 ---
modules/helpers/perftest-support/pom.xml
| 86 ---
modules/helpers/pluginGen/pom.xml
| 85 ---
modules/helpers/pom.xml
| 10
modules/helpers/rtfilter/pom.xml
| 84 ---
modules/integration-tests/apache-plugin-test/pom.xml
| 2
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
| 7
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
| 52 +
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
| 17
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
| 8
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
| 11
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
| 20
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
| 20
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
| 22
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
| 22
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
| 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
| 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
| 8
modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
| 2
modules/integration-tests/jndi-access/jndi-access-test/pom.xml
| 2
modules/integration-tests/mod_cluster-plugin-test/pom.xml
| 2
modules/integration-tests/pom.xml
| 27
modules/plugins/JBossOSGi/pom.xml
| 83 ---
modules/plugins/aliases/pom.xml
| 86 ---
modules/plugins/ant-bundle/pom.xml
| 88 ---
modules/plugins/apache/pom.xml
| 87 ---
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMap.java
| 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMapIndex.java
| 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingParamPerMap.java
| 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMap.java
| 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMapIndex.java
| 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasParamPerMap.java
| 2
modules/plugins/augeas/pom.xml
| 85 ---
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
| 4
modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/AugeasToConfigurationSimple.java
| 2
modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/ConfigurationToAugeasSimple.java
| 2
modules/plugins/byteman/pom.xml
| 88 ---
modules/plugins/cobbler/pom.xml
| 85 ---
modules/plugins/cron/pom.xml
| 85 ---
modules/plugins/database/pom.xml
| 84 ---
modules/plugins/filetemplate-bundle/pom.xml
| 88 ---
modules/plugins/grub/pom.xml
| 86 ---
modules/plugins/hadoop/pom.xml
| 84 ---
modules/plugins/hardware/pom.xml
| 85 ---
modules/plugins/hibernate/pom.xml
| 88 ---
modules/plugins/hosts/pom.xml
| 86 ---
modules/plugins/hudson/pom.xml
| 86 ---
modules/plugins/iis/pom.xml
| 88 ---
modules/plugins/iptables/pom.xml
| 4
modules/plugins/irc/pom.xml
| 83 ---
modules/plugins/jboss-as-5/pom.xml
| 97 ---
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/PropertyMapToCompositeValueSupportAdapter.java
| 2
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/custom/JMSSecurityConfigAdapter.java
| 2
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/util/ConversionUtils.java
| 7
modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
| 6
modules/plugins/jboss-as-7/pom.xml
| 5
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
| 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
| 2
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
| 8
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
| 2
modules/plugins/jboss-as/pom.xml
| 89 ---
modules/plugins/jboss-cache-v3/pom.xml
| 90 ---
modules/plugins/jboss-cache/pom.xml
| 88 ---
modules/plugins/jdbctrace/pom.xml
| 87 ---
modules/plugins/jira/pom.xml
| 88 ---
modules/plugins/jmx/pom.xml
| 89 ---
modules/plugins/kickstart/pom.xml
| 83 ---
modules/plugins/lsof/pom.xml
| 87 ---
modules/plugins/mod-cluster/pom.xml
| 2
modules/plugins/mysql/pom.xml
| 87 ---
modules/plugins/netservices/pom.xml
| 87 ---
modules/plugins/nss/pom.xml
| 83 ---
modules/plugins/onewire/pom.xml
| 83 ---
modules/plugins/oracle/pom.xml
| 86 ---
modules/plugins/perftest/pom.xml
| 90 ---
modules/plugins/platform/pom.xml
| 87 ---
modules/plugins/postfix/pom.xml
| 85 ---
modules/plugins/postgres/pom.xml
| 87 ---
modules/plugins/rhq-agent/pom.xml
| 85 ---
modules/plugins/rhq-server/pom.xml
| 85 ---
modules/plugins/samba/pom.xml
| 86 ---
modules/plugins/script/pom.xml
| 88 ---
modules/plugins/script2/pom.xml
| 83 ---
modules/plugins/services/pom.xml
| 83 ---
modules/plugins/snmptrapd/pom.xml
| 83 ---
modules/plugins/sshd/pom.xml
| 85 ---
modules/plugins/sudoers/pom.xml
| 85 ---
modules/plugins/tomcat/pom.xml
| 88 ---
modules/plugins/twitter/pom.xml
| 84 ---
modules/plugins/virt/pom.xml
| 87 ---
modules/pom.xml
| 17
modules/test-utils/pom.xml
| 98 ---
pom.xml
| 275 ++++++++--
release.sh
| 37 -
206 files changed, 3797 insertions(+), 9239 deletions(-)
New commits:
commit ac812c4cc41e7aa7f5e2882c853c2e77859054a5
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Fri Nov 30 13:53:45 2012 +0100
partition event table, datasource and finder for PartitionEvent by criteria have been
added
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/PartitionEventCriteria.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/PartitionEventCriteria.java
new file mode 100644
index 0000000..dd9910e
--- /dev/null
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/PartitionEventCriteria.java
@@ -0,0 +1,78 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.domain.criteria;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+
+import org.rhq.core.domain.cloud.PartitionEvent;
+import org.rhq.core.domain.content.Package;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * Criteria object for querying {@link PartitionEvent}s.
+ *
+ * @author Jiri Kremser
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@SuppressWarnings("unused")
+public class PartitionEventCriteria extends Criteria {
+
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private String filterEventType;
+ private String filterExecutionStatus;
+ private String filterEventDetail;
+
+ private PageOrdering sortCtime;
+
+ public PartitionEventCriteria() {
+ // filterOverrides.put("packageTypeId", "packageType.id = ?
");
+ // filterOverrides.put("repoId", "id IN (" +
+ // "SELECT rpv.packageVersion.generalPackage.id FROM
RepoPackageVersion rpv WHERE rpv.repo.id = ?" +
+ // ")");
+ }
+
+ public Class<?> getPersistentClass() {
+ return Package.class;
+ }
+
+ public void addFilterId(Integer id) {
+ this.filterId = id;
+ }
+
+ public void addFilterEventType(String eventType) {
+ this.filterEventType = eventType;
+ }
+
+ public void addFilterExecutionStatus(String executionStatus) {
+ this.filterExecutionStatus = executionStatus;
+ }
+
+ public void addFilterEventDetail(String eventDetail) {
+ this.filterEventDetail = eventDetail;
+ }
+
+ public void addSortCtime(PageOrdering sort) {
+ addSortField("ctime");
+ this.sortCtime = sort;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
index e96e1d3..1cf41b6 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
@@ -222,7 +222,7 @@ public class Agent implements Serializable {
/**
* Creates a new instance of Agent
*/
- protected Agent() {
+ public Agent() {
}
/**
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 189da3f..e969a70 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -188,13 +188,20 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
MSG.view_adminTopology_agents() + " (GWT)", null);
}
}, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
+
+ NavigationItem partitionEventsGwt = new NavigationItem(ServerTableView.VIEW_ID,
new ViewFactory() {
+ public Canvas createView() {
+ return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()),
+ MSG.view_adminTopology_servers() + " (GWT)", null);
+ }
+ }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
NavigationSection topologyRegion = null;
if (isRHQ) {
topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
agentsItem,
- affinityGroupsItem, partitionEventsItem, serversItemGwt, agentsItemGwt,
remoteAgentInstallItem);
+ affinityGroupsItem, partitionEventsItem, serversItemGwt, agentsItemGwt,
partitionEventsGwt, remoteAgentInstallItem);
} else {
- topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
agentsItem,
+ topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
partitionEventsGwt, agentsItem,
affinityGroupsItem, partitionEventsItem, serversItemGwt, agentsItemGwt);
}
return topologyRegion;
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
index d4e758a..96bce3c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
@@ -144,7 +144,7 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
@Override
public Agent copyValues(Record from) {
- throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ throw new
UnsupportedOperationException("AgentNodeDatasource.copyValues(Record from)");
}
@Override
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
index 0e21356..fc5f3a5 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
@@ -82,7 +82,7 @@ public class FailoverListItemDatasource extends
ServerDatasource<FailoverListDet
fields.add(FIELD_ORDINAL.getListGridField("55"));
fields.add(FIELD_NAME.getListGridField("*"));
fields.add(FIELD_OPERATION_MODE.getListGridField("90"));
- fields.add(FIELD_ADDRESS.getListGridField("110"));
+ fields.add(FIELD_ADDRESS.getListGridField("120"));
fields.add(FIELD_PORT.getListGridField("90"));
fields.add(FIELD_SECURE_PORT.getListGridField("75"));
@@ -142,7 +142,7 @@ public class FailoverListItemDatasource extends
ServerDatasource<FailoverListDet
@Override
public FailoverListDetails copyValues(Record from) {
- throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ throw new
UnsupportedOperationException("FailoverListItemDatasource.copyValues(Record
from)");
}
@Override
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
new file mode 100644
index 0000000..96f06c6
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
@@ -0,0 +1,156 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.PartitionEventDatasourceField.FIELD_CTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.PartitionEventDatasourceField.FIELD_EVENT_DETAIL;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.PartitionEventDatasourceField.FIELD_EVENT_TYPE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.PartitionEventDatasourceField.FIELD_EXECUTION_STATUS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.PartitionEventDatasourceField.FIELD_ID;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.PartitionEventDatasourceField.FIELD_SUBJECT_NAME;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceIntegerField;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.cloud.PartitionEvent;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public class PartitionEventDatasource extends RPCDataSource<PartitionEvent,
PartitionEventCriteria> {
+
+ public PartitionEventDatasource() {
+ super();
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+ DataSourceField idField = new DataSourceIntegerField(FIELD_ID.propertyName(),
FIELD_ID.title(), 50);
+ idField.setPrimaryKey(true);
+ idField.setHidden(true);
+ fields.add(idField);
+ return fields;
+ }
+
+ public List<ListGridField> getListGridFields() {
+ List<ListGridField> fields = new ArrayList<ListGridField>();
+
+ ListGridField idField = FIELD_ID.getListGridField();
+ idField.setHidden(true);
+ fields.add(idField);
+ ListGridField executionTimeField =
FIELD_CTIME.getListGridField("120");
+ TimestampCellFormatter.prepareDateField(executionTimeField);
+ fields.add(executionTimeField);
+ fields.add(FIELD_EVENT_TYPE.getListGridField("140"));
+ fields.add(FIELD_EVENT_DETAIL.getListGridField("165"));
+ fields.add(FIELD_SUBJECT_NAME.getListGridField("90"));
+ fields.add(FIELD_EXECUTION_STATUS.getListGridField("90"));
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response,
PartitionEventCriteria criteria) {
+ final PageControl pc = getPageControl(request);
+
+ // TODO: call find by criteria method on PartitionEventManagerBean
+ GWTServiceLookup.getCloudService().findPartitionEventsByCriteria(criteria, new
AsyncCallback<PageList<PartitionEvent>>() {
+ public void onSuccess(PageList<PartitionEvent> result) {
+// response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+
+ /**
+ * Returns a prepopulated PageControl based on the provided DSRequest. This will set
sort fields,
+ * pagination, but *not* filter fields.
+ *
+ * @param request the request to turn into a page control
+ * @return the page control for passing to criteria and other queries
+ */
+ protected PageControl getPageControl(DSRequest request) {
+ // Initialize paging.
+ PageControl pageControl = new PageControl(0, getDataPageSize());
+
+ // Initialize sorting.
+ String sortBy = request.getAttribute("sortBy");
+ if (sortBy != null) {
+ String[] sorts = sortBy.split(",");
+ for (String sort : sorts) {
+ PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
+ String columnName = (ordering == PageOrdering.DESC) ? sort.substring(1) :
sort;
+ pageControl.addDefaultOrderingField(columnName, ordering);
+ }
+ }
+
+ return pageControl;
+ }
+
+ @Override
+ public PartitionEvent copyValues(Record from) {
+ throw new
UnsupportedOperationException("PartitionEventDatasource.copyValues(Record
from)");
+ }
+
+ @Override
+ public ListGridRecord copyValues(PartitionEvent from) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute(FIELD_ID.propertyName(), from.getId());
+ record.setAttribute(FIELD_CTIME.propertyName(), from.getCtime());
+ record.setAttribute(FIELD_EVENT_TYPE.propertyName(), from.getEventType());
+ record.setAttribute(FIELD_EVENT_DETAIL.propertyName(), from.getEventDetail());
+ record.setAttribute(FIELD_SUBJECT_NAME.propertyName(), from.getSubjectName());
+ record.setAttribute(FIELD_EXECUTION_STATUS.propertyName(),
from.getExecutionStatus());
+ return record;
+ }
+
+ @Override
+ protected PartitionEventCriteria getFetchCriteria(DSRequest request) {
+ // we don't use criteria for this datasource, just return null
+ return new PartitionEventCriteria();
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasourceField.java
new file mode 100644
index 0000000..c8fc5c5
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasourceField.java
@@ -0,0 +1,75 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public enum PartitionEventDatasourceField {
+
+ FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
+
+ FIELD_CTIME("ctime", "i18n ex time"),
+
+ FIELD_EVENT_TYPE("eventType", "i18n ev type"),
+
+ FIELD_EVENT_DETAIL("eventDetail", "i18n ev detail"),
+
+ FIELD_SUBJECT_NAME("subjectName", "i18n by"),
+
+ FIELD_EXECUTION_STATUS("executionStatus", "i18n ex status");
+
+ /**
+ * Corresponds to a property name of Server (e.g. operationMode).
+ */
+ private String propertyName;
+
+ /**
+ * The table header for the field or property (e.g. Mode).
+ */
+ private String title;
+
+ private PartitionEventDatasourceField(String propertyName, String title) {
+ this.propertyName = propertyName;
+ this.title = title;
+ }
+
+ public String propertyName() {
+ return propertyName;
+ }
+
+ public String title() {
+ return title;
+ }
+
+ public ListGridField getListGridField() {
+ return new ListGridField(propertyName, title);
+ }
+
+ public ListGridField getListGridField(String width) {
+ ListGridField field = new ListGridField(propertyName, title);
+ field.setWidth(width);
+ return field;
+ }
+}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
new file mode 100644
index 0000000..3e7a05d
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
@@ -0,0 +1,257 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_ORDINAL;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.types.SortDirection;
+import com.smartgwt.client.util.BooleanCallback;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.CellFormatter;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.IconEnum;
+import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
+import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.view.HasViewName;
+import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
+
+/**
+ * @author Jiri Kremser
+ *
+ */
+public class PartitionEventTableView extends TableSection<PartitionEventDatasource>
implements HasViewName {
+
+ public static final ViewName VIEW_ID = new ViewName("PartitionEvents(GWT)",
"Partition Events(GWT)",
+ IconEnum.SERVERS);
+
+ public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ + AdministrationView.SECTION_TOPOLOGY_VIEW_ID + "/" + VIEW_ID;
+
+ private final boolean showActions = true;
+
+ public PartitionEventTableView(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
+ setHeight100();
+ setWidth100();
+ setDataSource(new PartitionEventDatasource());
+ }
+
+ @Override
+ protected void configureTable() {
+ super.configureTable();
+ List<ListGridField> fields = getDataSource().getListGridFields();
+ ListGrid listGrid = getListGrid();
+ listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
+ if (showActions) {
+ listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+ showActions();
+ } else {
+ // sorting by order field
+ listGrid.sort(FIELD_ORDINAL.propertyName(), SortDirection.ASCENDING);
+ }
+ for (ListGridField field : fields) {
+ // adding the cell formatter for name field (clickable link)
+ if (field.getName() == FIELD_NAME) {
+ field.setCellFormatter(new CellFormatter() {
+ @Override
+ public String format(Object value, ListGridRecord record, int rowNum,
int colNum) {
+ if (value == null) {
+ return "";
+ }
+ String detailsUrl = "#" + VIEW_PATH + "/" +
record.getAttributeAsString(FIELD_ID);
+ String formattedValue =
StringUtility.escapeHtml(value.toString());
+ return SeleniumUtility.getLocatableHref(detailsUrl,
formattedValue, null);
+
+ }
+ });
+ }
+ // TODO: adding the cell formatter for affinity group (clickable link)
+ }
+ }
+
+ @Override
+ public Canvas getDetailsView(Integer id) {
+ return new ServerDetailView(extendLocatorId("detailsView"), id);
+ }
+
+ private void showActions() {
+ addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(),
+ MSG.common_msg_areYouSure(), new AuthorizedTableAction(this,
TableActionEnablement.ANY,
+ Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ List<String> selectedNames = getSelectedNames(selections);
+ // TODO: msg
+ // String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
+ String message = "Really? Normal? For all I've done for you?
" + selectedNames;
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
+
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
+ Server.OperationMode.NORMAL, new
AsyncCallback<Void>() {
+ public void onSuccess(Void arg0) {
+ // TODO: msg
+ Message msg = new Message(MSG
+
.view_admin_plugins_disabledServerPlugins("sdf"), Message.Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ // TODO: msg
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
+
+ addTableAction(extendLocatorId("setMaintenance"),
MSG.view_adminTopology_server_setMaintenance(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ List<String> selectedNames = getSelectedNames(selections);
+ // TODO: msg
+ // String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
+ String message = "Really? Maitenance? For all I've done for
you? " + selectedNames;
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
+
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
+ Server.OperationMode.MAINTENANCE, new
AsyncCallback<Void>() {
+ public void onSuccess(Void arg0) {
+ // TODO: msg
+ Message msg = new Message(MSG
+
.view_admin_plugins_disabledServerPlugins("sdf"), Message.Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ // TODO: msg
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
+
+ addTableAction(extendLocatorId("removeSelected"),
MSG.view_adminTopology_server_removeSelected(),
+ MSG.common_msg_areYouSure(), new AuthorizedTableAction(this,
TableActionEnablement.ANY,
+ Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ List<String> selectedNames = getSelectedNames(selections);
+ String message = "Really? Delete? For all I've done for you?
" + selectedNames;
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
+
GWTServiceLookup.getCloudService().deleteServers(selectedIds,
+ new AsyncCallback<Void>() {
+ public void onSuccess(Void arg0) {
+ // TODO: msg
+ Message msg = new Message(MSG
+
.view_admin_plugins_disabledServerPlugins("sdf"), Message.Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ // TODO: msg
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
+ }
+
+ private int[] getSelectedIds(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new int[0];
+ }
+ int[] ids = new int[selections.length];
+ int i = 0;
+ for (ListGridRecord selection : selections) {
+ ids[i++] = selection.getAttributeAsInt(FIELD_ID);
+ }
+ return ids;
+ }
+
+ private List<String> getSelectedNames(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new ArrayList<String>(0);
+ }
+ List<String> ids = new ArrayList<String>(selections.length);
+ for (ListGridRecord selection : selections) {
+ ids.add(selection.getAttributeAsString(FIELD_NAME));
+ }
+ return ids;
+ }
+
+ @Override
+ public ViewName getViewName() {
+ return VIEW_ID;
+ }
+
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
index 916f891..a9f9613 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
@@ -82,7 +82,7 @@ public class ServerWithAgentCountDatasource extends
ServerDatasource<ServerWithA
fields.add(FIELD_PORT.getListGridField("90"));
fields.add(FIELD_SECURE_PORT.getListGridField("75"));
- ListGridField lastUpdateTimeField =
FIELD_MTIME.getListGridField("110");
+ ListGridField lastUpdateTimeField =
FIELD_MTIME.getListGridField("120");
TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
fields.add(lastUpdateTimeField);
@@ -139,7 +139,7 @@ public class ServerWithAgentCountDatasource extends
ServerDatasource<ServerWithA
@Override
public ServerWithAgentCountComposite copyValues(Record from) {
- throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ throw new
UnsupportedOperationException("ServerWithAgentCountDatasource.copyValues(Record
from)");
}
@Override
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
index e1c695b..dbfbfbf 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
@@ -27,10 +27,13 @@ import java.util.List;
import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.cloud.FailoverListDetails;
+import org.rhq.core.domain.cloud.PartitionEvent;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
/**
* @author Jiri Kremser
@@ -52,6 +55,8 @@ public interface CloudGWTService extends RemoteService {
void updateServerMode(int[] serverIds, Server.OperationMode mode) throws
RuntimeException;
- List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc);
+ List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc) throws RuntimeException;;
+
+ PageList<PartitionEvent> findPartitionEventsByCriteria(PartitionEventCriteria
criteria) throws RuntimeException;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
index 0e5fd88..84a87b8 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
@@ -28,15 +28,18 @@ import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.rhq.core.domain.cloud.FailoverListDetails;
+import org.rhq.core.domain.cloud.PartitionEvent;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.cloud.Server.OperationMode;
import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.CloudGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
import org.rhq.enterprise.server.cloud.CloudManagerLocal;
+import org.rhq.enterprise.server.cloud.PartitionEventManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -47,6 +50,8 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
private static final long serialVersionUID = 1L;
private CloudManagerLocal cloudManager = LookupUtil.getCloudManager();
+
+ private PartitionEventManagerLocal partitionEventManager =
LookupUtil.getPartitionEventManager();
@Override
public PageList<ServerWithAgentCountComposite> getServers(PageControl pc)
throws RuntimeException {
@@ -97,7 +102,7 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
}
@Override
- public List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc) {
+ public List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc) throws RuntimeException {
try {
return
SerialUtility.prepare(cloudManager.getFailoverListDetailsByAgentId(agentId, pc),
"CloudGWTServiceImpl.getFailoverListDetailsByAgentId");
@@ -106,4 +111,14 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
}
}
+ @Override
+ public PageList<PartitionEvent>
findPartitionEventsByCriteria(PartitionEventCriteria criteria) throws RuntimeException {
+ try {
+ return
SerialUtility.prepare(partitionEventManager.findPartitionEventsByCriteria(getSessionSubject(),
criteria),
+ "CloudGWTServiceImpl.findPartitionEventsByCriteria");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
}
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerBean.java
index 147dbc0..24fc0c7 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerBean.java
@@ -38,10 +38,11 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.cloud.FailoverList;
import org.rhq.core.domain.cloud.PartitionEvent;
+import org.rhq.core.domain.cloud.PartitionEvent.ExecutionStatus;
import org.rhq.core.domain.cloud.PartitionEventDetails;
import org.rhq.core.domain.cloud.PartitionEventType;
-import org.rhq.core.domain.cloud.PartitionEvent.ExecutionStatus;
import org.rhq.core.domain.cloud.composite.FailoverListComposite;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.server.PersistenceUtility;
import org.rhq.core.domain.util.PageControl;
@@ -50,6 +51,8 @@ import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.authz.RequiredPermission;
import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
+import org.rhq.enterprise.server.util.CriteriaQueryRunner;
import org.rhq.enterprise.server.util.QueryUtility;
/**
@@ -247,4 +250,11 @@ public class PartitionEventManagerBean implements
PartitionEventManagerLocal {
return new PageList<PartitionEventDetails>(detailsList, (int) count,
pageControl);
}
+
+ @RequiredPermission(Permission.MANAGE_INVENTORY)
+ public PageList<PartitionEvent> findPartitionEventsByCriteria(Subject subject,
PartitionEventCriteria criteria) {
+ CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject,
criteria);
+ CriteriaQueryRunner<PartitionEvent> runner = new
CriteriaQueryRunner<PartitionEvent>(criteria, generator, entityManager);
+ return runner.execute();
+ }
}
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerLocal.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerLocal.java
index a86d82d..f0a1bf2 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerLocal.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerLocal.java
@@ -24,10 +24,11 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.cloud.PartitionEvent;
+import org.rhq.core.domain.cloud.PartitionEvent.ExecutionStatus;
import org.rhq.core.domain.cloud.PartitionEventDetails;
import org.rhq.core.domain.cloud.PartitionEventType;
-import org.rhq.core.domain.cloud.PartitionEvent.ExecutionStatus;
import org.rhq.core.domain.cloud.composite.FailoverListComposite;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
@@ -94,4 +95,13 @@ public interface PartitionEventManagerLocal {
PageList<PartitionEventDetails> getPartitionEventDetails(Subject subject, int
partitionEventId,
PageControl pageControl);
+
+ /**
+ * the subject needs to have MANAGE_INVENTORY permission.
+ *
+ * @param subject
+ * @param criteria
+ * @return list with partition events
+ */
+ PageList<PartitionEvent> findPartitionEventsByCriteria(Subject subject,
PartitionEventCriteria criteria);
}
commit 44101900b1e89c46571859092d1c79cba23f81a7
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Nov 27 16:40:44 2012 +0100
hyperlinks across table data and detail information rendered on detail pages are now
working
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
index 187eac9..1c0d1de 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
@@ -39,9 +39,11 @@ import com.smartgwt.client.widgets.layout.SectionStackSection;
import org.rhq.core.domain.resource.Agent;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
* Shows details of a server.
@@ -147,7 +149,7 @@ public class AgentDetailView extends LocatableVLayout {
form.setNumCols(2);
StaticTextItem nameItem = new StaticTextItem(FIELD_NAME.propertyName(),
FIELD_NAME.title());
- nameItem.setValue(agent.getName());
+ nameItem.setValue("<b>" + agent.getName() +
"</b>");
StaticTextItem addressItem = new StaticTextItem(FIELD_ADDRESS.propertyName(),
FIELD_ADDRESS.title());
addressItem.setValue(agent.getAddress());
@@ -164,13 +166,22 @@ public class AgentDetailView extends LocatableVLayout {
Long.valueOf(agent.getLastAvailabilityReport()),
TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM);
lastAvailabilityItem.setValue(lastReport);
+ // TODO: make clickable link
StaticTextItem affinityGroupItem = new
StaticTextItem(FIELD_AFFINITY_GROUP.propertyName(),
FIELD_AFFINITY_GROUP.title());
affinityGroupItem.setValue(agent.getAffinityGroup() == null ? "" :
agent.getAffinityGroup().getName());
- // TODO: create clickable link
StaticTextItem currentServerItem = new
StaticTextItem(FIELD_SERVER.propertyName(), FIELD_SERVER.title());
- currentServerItem.setValue(agent.getServer() == null ? "none" :
agent.getServer().getName());
+ String serverValue = null;
+ if (agent.getServer() == null) {
+ serverValue = "";
+ } else {
+ String detailsUrl = "#" + ServerTableView.VIEW_PATH + "/"
+ agent.getServer().getId();
+ String formattedValue =
StringUtility.escapeHtml(agent.getServer().getName());
+ serverValue = SeleniumUtility.getLocatableHref(detailsUrl, formattedValue,
null);
+ }
+ currentServerItem.setValue(serverValue);
+
// ButtonItem saveButton = new ButtonItem();
// saveButton.setOverflow(Overflow.VISIBLE);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
index 3bb0280..d4e758a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
@@ -25,6 +25,7 @@ import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeData
import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_NAME;
import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_PORT;
import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_SERVER;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_SERVER_ID;
import java.util.ArrayList;
import java.util.List;
@@ -52,8 +53,8 @@ import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
*
*/
public class AgentNodeDatasource extends RPCDataSource<Agent, Criteria> {
-
- private final Integer serverId;
+
+ private final Integer serverId;
public AgentNodeDatasource(Integer serverId) {
super();
@@ -78,12 +79,15 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
ListGridField idField = FIELD_ID.getListGridField();
idField.setHidden(true);
fields.add(idField);
-
fields.add(FIELD_NAME.getListGridField("*"));
fields.add(FIELD_SERVER.getListGridField("120"));
fields.add(FIELD_ADDRESS.getListGridField("110"));
+
+ ListGridField serverIdField = FIELD_SERVER_ID.getListGridField();
+ serverIdField.setHidden(true);
+ fields.add(serverIdField);
+
fields.add(FIELD_PORT.getListGridField("90"));
-
ListGridField lastAvailabilityReportField =
FIELD_LAST_AVAILABILITY_REPORT.getListGridField("120");
TimestampCellFormatter.prepareDateField(lastAvailabilityReportField);
fields.add(lastAvailabilityReportField);
@@ -150,7 +154,8 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
record.setAttribute(FIELD_NAME.propertyName(), from.getName());
record.setAttribute(FIELD_ADDRESS.propertyName(), from.getAddress());
record.setAttribute(FIELD_PORT.propertyName(), from.getPort());
- record.setAttribute(FIELD_SERVER.propertyName(), from.getServer() == null ?
"none" : from.getServer().getName());
+ record.setAttribute(FIELD_SERVER.propertyName(), from.getServer() == null ?
"" : from.getServer().getName());
+ record.setAttribute(FIELD_SERVER_ID.propertyName(), from.getServer() == null ?
"" : from.getServer().getId());
record.setAttribute(FIELD_LAST_AVAILABILITY_REPORT.propertyName(),
from.getLastAvailabilityReport());
record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(), from.getAffinityGroup()
== null ? "" : from
.getAffinityGroup().getName());
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
index 6872204..5873ab3 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
@@ -33,6 +33,8 @@ public enum AgentNodeDatasourceField {
FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
FIELD_SERVER("server",
CoreGUI.getMessages().view_adminTopology_agent_connectedServer()),
+
+ FIELD_SERVER_ID("serverId", "serverId"),
FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_agent_agentBindAddress()),
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
index ae4dc50..41d32be 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -18,27 +18,36 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.topology;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_SERVER;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_SERVER_ID;
+
import java.util.List;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.view.HasViewName;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
* @author Jiri Kremser
*/
-public class AgentTableView extends TableSection<AgentNodeDatasource> {
+public class AgentTableView extends TableSection<AgentNodeDatasource> implements
HasViewName {
public static final ViewName VIEW_ID = new ViewName("Agents(GWT)",
MSG.view_adminTopology_agents() + "(GWT)",
IconEnum.SERVERS);
+
public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
- + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
+ + AdministrationView.SECTION_TOPOLOGY_VIEW_ID + "/" + VIEW_ID;
public AgentTableView(String locatorId, String tableTitle, Integer serverId) {
super(locatorId, tableTitle);
@@ -49,12 +58,47 @@ public class AgentTableView extends
TableSection<AgentNodeDatasource> {
@Override
protected void configureTable() {
+ super.configureTable();
List<ListGridField> fields = getDataSource().getListGridFields();
ListGrid listGrid = getListGrid();
listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+
+ for (ListGridField field : fields) {
+ // adding the cell formatter for name field (clickable link)
+ if (field.getName() == FIELD_NAME) {
+ field.setCellFormatter(new CellFormatter() {
+ @Override
+ public String format(Object value, ListGridRecord record, int rowNum,
int colNum) {
+ if (value == null) {
+ return "";
+ }
+ String detailsUrl = "#" + VIEW_PATH + "/" +
record.getAttributeAsString(FIELD_ID);
+ String formattedValue =
StringUtility.escapeHtml(value.toString());
+ return SeleniumUtility.getLocatableHref(detailsUrl,
formattedValue, null);
- super.configureTable();
+ }
+ });
+ } else if (field.getName() == FIELD_SERVER.propertyName()) {
+ field.setCellFormatter(new CellFormatter() {
+ @Override
+ public String format(Object value, ListGridRecord record, int rowNum,
int colNum) {
+ if (value == null || value.toString().isEmpty()) {
+ return "";
+ }
+ String detailsUrl = "#" + ServerTableView.VIEW_PATH +
"/"
+ +
record.getAttributeAsString(FIELD_SERVER_ID.propertyName());
+ String formattedValue =
StringUtility.escapeHtml(value.toString());
+ return SeleniumUtility.getLocatableHref(detailsUrl,
formattedValue, null);
+
+ }
+ });
+ }
+ // TODO: adding the cell formatter for affinity group (clickable link)
+
+ }
+
+
}
@Override
@@ -62,27 +106,9 @@ public class AgentTableView extends
TableSection<AgentNodeDatasource> {
return new AgentDetailView(extendLocatorId("detailsView"), id);
}
-// private int[] getSelectedIds(ListGridRecord[] selections) {
-// if (selections == null) {
-// return new int[0];
-// }
-// int[] ids = new int[selections.length];
-// int i = 0;
-// for (ListGridRecord selection : selections) {
-// ids[i++] = selection.getAttributeAsInt(FIELD_ID);
-// }
-// return ids;
-// }
-//
-// private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
-// if (selections == null) {
-// return new ArrayList<String>(0);
-// }
-// ArrayList<String> ids = new ArrayList<String>(selections.length);
-// for (ListGridRecord selection : selections) {
-// ids.add(selection.getAttributeAsString(FIELD_NAME));
-// }
-// return ids;
-// }
+ @Override
+ public ViewName getViewName() {
+ return VIEW_ID;
+ }
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
index 1d9dc46..95cb869 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
@@ -44,8 +44,11 @@ import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import org.rhq.core.domain.cloud.Server;
+import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.Log;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
@@ -55,7 +58,7 @@ import
org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
*
* @author Jiri Kremser
*/
-public class ServerDetailView extends LocatableVLayout {
+public class ServerDetailView extends LocatableVLayout implements BookmarkableView {
// private final CloudGWTServiceAsync cloudManager =
GWTServiceLookup.getCloudService();
private final int serverId;
@@ -151,7 +154,7 @@ public class ServerDetailView extends LocatableVLayout {
section.setItems(agentsTable);
agentSection = section;
- ++initSectionCount;
+ initSectionCount++;
return;
}
@@ -163,7 +166,7 @@ public class ServerDetailView extends LocatableVLayout {
form.setNumCols(2);
StaticTextItem nameItem = new StaticTextItem(FIELD_NAME.propertyName(),
FIELD_NAME.title());
- nameItem.setValue(server.getName());
+ nameItem.setValue("<b>" + server.getName() +
"</b>");
TextItem addressItem = new TextItem(FIELD_ADDRESS.propertyName(),
FIELD_ADDRESS.title());
addressItem.setValue(server.getAddress());
@@ -179,9 +182,10 @@ public class ServerDetailView extends LocatableVLayout {
operationModeItem.setValueMap("NORMAL", "MAINTENANCE");
operationModeItem.setValue(server.getOperationMode());
+ // TODO: make clickable link
StaticTextItem affinityGroupItem = new
StaticTextItem(FIELD_AFFINITY_GROUP.propertyName(),
FIELD_AFFINITY_GROUP.title());
- affinityGroupItem.setValue(server.getAffinityGroup());
+ affinityGroupItem.setValue(server.getAffinityGroup() == null ? "" :
server.getAffinityGroup().getName());
StaticTextItem installationDateItem = new
StaticTextItem(FIELD_CTIME.propertyName(), FIELD_CTIME.title());
installationDateItem.setValue(TimestampCellFormatter.format(Long.valueOf(server.getCtime()),
@@ -209,6 +213,11 @@ public class ServerDetailView extends LocatableVLayout {
section.setItems(form);
detailsSection = section;
- ++initSectionCount;
+ initSectionCount++;
+ }
+
+ @Override
+ public void renderView(ViewPath viewPath) {
+ Log.debug("ServerDetailView: " + viewPath);
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
index 36c77ab..bcf2f49 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.coregui.client.admin.topology;
import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_ORDINAL;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -28,32 +29,39 @@ import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.util.BooleanCallback;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.criteria.Criteria;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.view.HasViewName;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
* @author Jiri Kremser
+ *
*/
-public class ServerTableView extends TableSection<ServerDatasource> {
+public class ServerTableView extends TableSection<ServerDatasource<? extends
Serializable, Criteria>> implements HasViewName {
public static final ViewName VIEW_ID = new ViewName("Servers(GWT)",
MSG.view_adminTopology_servers() + "(GWT)",
IconEnum.SERVERS);
+
public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
- + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
-
+ + AdministrationView.SECTION_TOPOLOGY_VIEW_ID + "/" + VIEW_ID;
+
private final boolean showActions;
public ServerTableView(String locatorId, String tableTitle, Integer agentId) {
@@ -66,6 +74,7 @@ public class ServerTableView extends
TableSection<ServerDatasource> {
@Override
protected void configureTable() {
+ super.configureTable();
List<ListGridField> fields = getDataSource().getListGridFields();
ListGrid listGrid = getListGrid();
listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
@@ -73,16 +82,34 @@ public class ServerTableView extends
TableSection<ServerDatasource> {
listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
showActions();
} else {
+ // sorting by order field
listGrid.sort(FIELD_ORDINAL.propertyName(), SortDirection.ASCENDING);
}
- super.configureTable();
+ for (ListGridField field : fields) {
+ // adding the cell formatter for name field (clickable link)
+ if (field.getName() == FIELD_NAME) {
+ field.setCellFormatter(new CellFormatter() {
+ @Override
+ public String format(Object value, ListGridRecord record, int rowNum,
int colNum) {
+ if (value == null) {
+ return "";
+ }
+ String detailsUrl = "#" + VIEW_PATH + "/" +
record.getAttributeAsString(FIELD_ID);
+ String formattedValue =
StringUtility.escapeHtml(value.toString());
+ return SeleniumUtility.getLocatableHref(detailsUrl,
formattedValue, null);
+
+ }
+ });
+ }
+ // TODO: adding the cell formatter for affinity group (clickable link)
+ }
}
@Override
public Canvas getDetailsView(Integer id) {
return new ServerDetailView(extendLocatorId("detailsView"), id);
}
-
+
private void showActions() {
addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(),
MSG.common_msg_areYouSure(), new AuthorizedTableAction(this,
TableActionEnablement.ANY,
@@ -97,8 +124,8 @@ public class ServerTableView extends
TableSection<ServerDatasource> {
if (confirmed) {
int[] selectedIds = getSelectedIds(selections);
SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
-
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
Server.OperationMode.NORMAL,
- new AsyncCallback<Void>() {
+
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
+ Server.OperationMode.NORMAL, new
AsyncCallback<Void>() {
public void onSuccess(Void arg0) {
// TODO: msg
Message msg = new Message(MSG
@@ -136,8 +163,8 @@ public class ServerTableView extends
TableSection<ServerDatasource> {
if (confirmed) {
int[] selectedIds = getSelectedIds(selections);
SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
-
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
Server.OperationMode.MAINTENANCE,
- new AsyncCallback<Void>() {
+
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
+ Server.OperationMode.MAINTENANCE, new
AsyncCallback<Void>() {
public void onSuccess(Void arg0) {
// TODO: msg
Message msg = new Message(MSG
@@ -214,15 +241,20 @@ public class ServerTableView extends
TableSection<ServerDatasource> {
return ids;
}
- private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
+ private List<String> getSelectedNames(ListGridRecord[] selections) {
if (selections == null) {
return new ArrayList<String>(0);
}
- ArrayList<String> ids = new ArrayList<String>(selections.length);
+ List<String> ids = new ArrayList<String>(selections.length);
for (ListGridRecord selection : selections) {
ids.add(selection.getAttributeAsString(FIELD_NAME));
}
return ids;
}
+ @Override
+ public ViewName getViewName() {
+ return VIEW_ID;
+ }
+
}
commit 080f519cf5fad164aabe667558f9518aa72a686d
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Mon Nov 26 21:15:49 2012 +0100
ServerNodeDatasource has been split into two separate, AgentDetailView added, some
refactoring of existing code
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 894c833..189da3f 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -178,7 +178,7 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
NavigationItem serversItemGwt = new NavigationItem(ServerTableView.VIEW_ID, new
ViewFactory() {
public Canvas createView() {
return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()),
- MSG.view_adminTopology_servers() + " (GWT)");
+ MSG.view_adminTopology_servers() + " (GWT)", null);
}
}, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
new file mode 100644
index 0000000..187eac9
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
@@ -0,0 +1,195 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_AGENT_TOKEN;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_LAST_AVAILABILITY_REPORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_SERVER;
+
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.types.Overflow;
+import com.smartgwt.client.types.VisibilityMode;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.form.fields.StaticTextItem;
+import com.smartgwt.client.widgets.layout.SectionStack;
+import com.smartgwt.client.widgets.layout.SectionStackSection;
+
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * Shows details of a server.
+ *
+ * @author Jiri Kremser
+ */
+public class AgentDetailView extends LocatableVLayout {
+
+ // private final CloudGWTServiceAsync cloudManager =
GWTServiceLookup.getCloudService();
+ private final int agentId;
+
+ private final LocatableSectionStack sectionStack;
+ private SectionStackSection detailsSection = null;
+ private SectionStackSection failoverListSection = null;
+
+ private volatile int initSectionCount = 0;
+
+ public AgentDetailView(String locatorId, int agentId) {
+ super(locatorId);
+ this.agentId = agentId;
+ setHeight100();
+ setWidth100();
+ setOverflow(Overflow.AUTO);
+
+ sectionStack = new LocatableSectionStack(extendLocatorId("stack"));
+ sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
+ sectionStack.setWidth100();
+ sectionStack.setHeight100();
+ sectionStack.setMargin(5);
+ sectionStack.setOverflow(Overflow.VISIBLE);
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+ GWTServiceLookup.getAgentService().getAgentByID(this.agentId, new
AsyncCallback<Agent>() {
+ public void onSuccess(final Agent agent) {
+ prepareDetailsSection(sectionStack, agent);
+ prepareFailoverListSection(sectionStack, agent);
+ }
+
+ public void onFailure(Throwable caught) {
+ SC.say("er1:" + caught);
+ //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+ }
+ });
+ }
+
+ public boolean isInitialized() {
+ return initSectionCount >= 2;
+ }
+
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+
+ // wait until we have all of the sections before we show them. We don't use
InitializableView because,
+ // it seems they are not supported (in the applicable renderView()) at this
level.
+ new Timer() {
+ final long startTime = System.currentTimeMillis();
+
+ public void run() {
+ if (isInitialized()) {
+ if (null != detailsSection) {
+ sectionStack.addSection(detailsSection);
+ }
+ if (null != failoverListSection) {
+ sectionStack.addSection(failoverListSection);
+ }
+
+ addMember(sectionStack);
+ markForRedraw();
+
+ } else {
+ // don't wait forever, give up after 20s and show what we have
+ long elapsedMillis = System.currentTimeMillis() - startTime;
+ if (elapsedMillis > 20000) {
+ initSectionCount = 2;
+ }
+ schedule(100); // Reschedule the timer.
+ }
+ }
+ }.run(); // fire the timer immediately
+ }
+
+ private void prepareFailoverListSection(SectionStack stack, Agent agent) {
+ SectionStackSection section = new
SectionStackSection(MSG.view_adminTopology_agentDetail_agentFailoverList());
+ section.setExpanded(true);
+ ServerTableView agentsTable = new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()), null,
+ agent.getId());
+ section.setItems(agentsTable);
+
+ failoverListSection = section;
+ ++initSectionCount;
+ return;
+ }
+
+ private void prepareDetailsSection(SectionStack stack, Agent agent) {
+ final LocatableDynamicForm form = new
LocatableDynamicForm(extendLocatorId("detailsForm"));
+ form.setMargin(10);
+ form.setWidth100();
+ form.setWrapItemTitles(false);
+ form.setNumCols(2);
+
+ StaticTextItem nameItem = new StaticTextItem(FIELD_NAME.propertyName(),
FIELD_NAME.title());
+ nameItem.setValue(agent.getName());
+
+ StaticTextItem addressItem = new StaticTextItem(FIELD_ADDRESS.propertyName(),
FIELD_ADDRESS.title());
+ addressItem.setValue(agent.getAddress());
+
+ StaticTextItem portItem = new StaticTextItem(FIELD_PORT.propertyName(),
FIELD_PORT.title());
+ portItem.setValue(agent.getPort());
+
+ StaticTextItem tokenItem = new StaticTextItem(FIELD_AGENT_TOKEN.propertyName(),
FIELD_AGENT_TOKEN.title());
+ tokenItem.setValue(agent.getAgentToken());
+
+ StaticTextItem lastAvailabilityItem = new
StaticTextItem(FIELD_LAST_AVAILABILITY_REPORT.propertyName(),
+ FIELD_LAST_AVAILABILITY_REPORT.title());
+ String lastReport = agent.getLastAvailabilityReport() == null ?
"unknown" : TimestampCellFormatter.format(
+ Long.valueOf(agent.getLastAvailabilityReport()),
TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM);
+ lastAvailabilityItem.setValue(lastReport);
+
+ StaticTextItem affinityGroupItem = new
StaticTextItem(FIELD_AFFINITY_GROUP.propertyName(),
+ FIELD_AFFINITY_GROUP.title());
+ affinityGroupItem.setValue(agent.getAffinityGroup() == null ? "" :
agent.getAffinityGroup().getName());
+
+ // TODO: create clickable link
+ StaticTextItem currentServerItem = new
StaticTextItem(FIELD_SERVER.propertyName(), FIELD_SERVER.title());
+ currentServerItem.setValue(agent.getServer() == null ? "none" :
agent.getServer().getName());
+
+ // ButtonItem saveButton = new ButtonItem();
+ // saveButton.setOverflow(Overflow.VISIBLE);
+ // saveButton.setTitle(MSG.common_button_save());
+ // saveButton.addClickHandler(new ClickHandler() {
+ // public void onClick(ClickEvent event) {
+ // RecordList list = form.getRecordList();
+ // SC.say("name is " +
list.get(0).getAttribute("name"));
+ // }
+ // });
+
+ form.setItems(nameItem, addressItem, portItem, tokenItem, lastAvailabilityItem,
affinityGroupItem,
+ currentServerItem);
+
+ SectionStackSection section = new
SectionStackSection(MSG.common_title_details());
+ section.setExpanded(true);
+ section.setItems(form);
+
+ detailsSection = section;
+ ++initSectionCount;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
index 0792373..3bb0280 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
@@ -81,10 +81,10 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
fields.add(FIELD_NAME.getListGridField("*"));
fields.add(FIELD_SERVER.getListGridField("120"));
- fields.add(FIELD_ADDRESS.getListGridField("105"));
+ fields.add(FIELD_ADDRESS.getListGridField("110"));
fields.add(FIELD_PORT.getListGridField("90"));
- ListGridField lastAvailabilityReportField =
FIELD_LAST_AVAILABILITY_REPORT.getListGridField("90");
+ ListGridField lastAvailabilityReportField =
FIELD_LAST_AVAILABILITY_REPORT.getListGridField("120");
TimestampCellFormatter.prepareDateField(lastAvailabilityReportField);
fields.add(lastAvailabilityReportField);
@@ -97,7 +97,6 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
final PageControl pc = getPageControl(request);
- // TODO: null is for all agents -> change to particular server id
GWTServiceLookup.getAgentService().getAgentsByServer(serverId, pc, new
AsyncCallback<PageList<Agent>>() {
public void onSuccess(PageList<Agent> result) {
response.setData(buildRecords(result));
@@ -151,9 +150,10 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
record.setAttribute(FIELD_NAME.propertyName(), from.getName());
record.setAttribute(FIELD_ADDRESS.propertyName(), from.getAddress());
record.setAttribute(FIELD_PORT.propertyName(), from.getPort());
- record.setAttribute(FIELD_SERVER.propertyName(), from.getServer().getName());
+ record.setAttribute(FIELD_SERVER.propertyName(), from.getServer() == null ?
"none" : from.getServer().getName());
record.setAttribute(FIELD_LAST_AVAILABILITY_REPORT.propertyName(),
from.getLastAvailabilityReport());
- record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getAffinityGroup());
+ record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(), from.getAffinityGroup()
== null ? "" : from
+ .getAffinityGroup().getName());
return record;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
index d0948f4..ae4dc50 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -18,14 +18,12 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.topology;
-import java.util.ArrayList;
import java.util.List;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
@@ -61,30 +59,30 @@ public class AgentTableView extends
TableSection<AgentNodeDatasource> {
@Override
public Canvas getDetailsView(Integer id) {
- return new ServerDetailView(extendLocatorId("detailsView"), id);
+ return new AgentDetailView(extendLocatorId("detailsView"), id);
}
- private int[] getSelectedIds(ListGridRecord[] selections) {
- if (selections == null) {
- return new int[0];
- }
- int[] ids = new int[selections.length];
- int i = 0;
- for (ListGridRecord selection : selections) {
- ids[i++] = selection.getAttributeAsInt(FIELD_ID);
- }
- return ids;
- }
-
- private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
- if (selections == null) {
- return new ArrayList<String>(0);
- }
- ArrayList<String> ids = new ArrayList<String>(selections.length);
- for (ListGridRecord selection : selections) {
- ids.add(selection.getAttributeAsString(FIELD_NAME));
- }
- return ids;
- }
+// private int[] getSelectedIds(ListGridRecord[] selections) {
+// if (selections == null) {
+// return new int[0];
+// }
+// int[] ids = new int[selections.length];
+// int i = 0;
+// for (ListGridRecord selection : selections) {
+// ids[i++] = selection.getAttributeAsInt(FIELD_ID);
+// }
+// return ids;
+// }
+//
+// private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
+// if (selections == null) {
+// return new ArrayList<String>(0);
+// }
+// ArrayList<String> ids = new ArrayList<String>(selections.length);
+// for (ListGridRecord selection : selections) {
+// ids.add(selection.getAttributeAsString(FIELD_NAME));
+// }
+// return ids;
+// }
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
new file mode 100644
index 0000000..0e21356
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
@@ -0,0 +1,169 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_ID;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_ORDINAL;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_SECURE_PORT;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceIntegerField;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.cloud.FailoverListDetails;
+import org.rhq.core.domain.criteria.Criteria;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public class FailoverListItemDatasource extends ServerDatasource<FailoverListDetails,
Criteria> {
+
+ private final int agentId;
+
+ public FailoverListItemDatasource(int agentId) {
+ super();
+ this.agentId = agentId;
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+ DataSourceField idField = new DataSourceIntegerField(FIELD_ID.propertyName(),
FIELD_ID.title(), 50);
+ idField.setPrimaryKey(true);
+ idField.setHidden(true);
+ fields.add(idField);
+ return fields;
+ }
+
+ @Override
+ public List<ListGridField> getListGridFields() {
+ List<ListGridField> fields = new ArrayList<ListGridField>();
+
+ ListGridField idField = FIELD_ID.getListGridField();
+ idField.setHidden(true);
+ fields.add(idField);
+ fields.add(FIELD_ORDINAL.getListGridField("55"));
+ fields.add(FIELD_NAME.getListGridField("*"));
+ fields.add(FIELD_OPERATION_MODE.getListGridField("90"));
+ fields.add(FIELD_ADDRESS.getListGridField("110"));
+ fields.add(FIELD_PORT.getListGridField("90"));
+ fields.add(FIELD_SECURE_PORT.getListGridField("75"));
+
+ ListGridField lastUpdateTimeField =
FIELD_MTIME.getListGridField("110");
+ TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
+ fields.add(lastUpdateTimeField);
+
+ fields.add(FIELD_AFFINITY_GROUP.getListGridField("80"));
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
+ final PageControl pc = getPageControl(request);
+
+ GWTServiceLookup.getCloudService().getFailoverListDetailsByAgentId(agentId, pc,
new AsyncCallback<List<FailoverListDetails>>() {
+ public void onSuccess(List<FailoverListDetails> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+
+ /**
+ * Returns a prepopulated PageControl based on the provided DSRequest. This will set
sort fields,
+ * pagination, but *not* filter fields.
+ *
+ * @param request the request to turn into a page control
+ * @return the page control for passing to criteria and other queries
+ */
+ protected PageControl getPageControl(DSRequest request) {
+ // Initialize paging.
+ PageControl pageControl = new PageControl(0, getDataPageSize());
+
+ // Initialize sorting.
+ String sortBy = request.getAttribute("sortBy");
+ if (sortBy != null) {
+ String[] sorts = sortBy.split(",");
+ for (String sort : sorts) {
+ PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
+ String columnName = (ordering == PageOrdering.DESC) ? sort.substring(1) :
sort;
+ pageControl.addDefaultOrderingField(columnName, ordering);
+ }
+ }
+
+ return pageControl;
+ }
+
+ @Override
+ public FailoverListDetails copyValues(Record from) {
+ throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ }
+
+ @Override
+ public ListGridRecord copyValues(FailoverListDetails from) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute(FIELD_ID.propertyName(), from.getServer().getId());
+ record.setAttribute(FIELD_ORDINAL.propertyName(), from.getOrdinal());
+ record.setAttribute(FIELD_NAME.propertyName(), from.getServer().getName());
+ record.setAttribute(FIELD_OPERATION_MODE.propertyName(),
from.getServer().getOperationMode());
+ record.setAttribute(FIELD_ADDRESS.propertyName(),
from.getServer().getAddress());
+ record.setAttribute(FIELD_PORT.propertyName(), from.getServer().getPort());
+ record.setAttribute(FIELD_SECURE_PORT.propertyName(),
from.getServer().getSecurePort());
+ record.setAttribute(FIELD_MTIME.propertyName(), from.getServer().getMtime());
+ record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getServer().getAffinityGroup() == null ? ""
+ : from.getServer().getAffinityGroup().getName());
+ return record;
+ }
+
+ @Override
+ protected Criteria getFetchCriteria(DSRequest request) {
+ // we don't use criteria for this datasource, just return null
+ return null;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasourceField.java
new file mode 100644
index 0000000..4c380fd
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasourceField.java
@@ -0,0 +1,83 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public enum FailoverListItemDatasourceField {
+
+ FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
+
+ FIELD_ORDINAL("ordinal", "poradi"),
+
+ FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
+
+ FIELD_OPERATION_MODE("operationMode",
CoreGUI.getMessages().view_adminTopology_server_mode()),
+
+ FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_server_endpointAddress()),
+
+ FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_server_nonSecurePort()),
+
+ FIELD_SECURE_PORT("securePort",
CoreGUI.getMessages().view_adminTopology_server_securePort()),
+
+ FIELD_MTIME("mtime",
CoreGUI.getMessages().view_adminTopology_server_lastUpdateTime()),
+
+ FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup()),
+
+ FIELD_AGENT_COUNT("agentCount",
CoreGUI.getMessages().view_adminTopology_server_agentCount());
+
+ /**
+ * Corresponds to a property name of Server (e.g. operationMode).
+ */
+ private String propertyName;
+
+ /**
+ * The table header for the field or property (e.g. Mode).
+ */
+ private String title;
+
+ private FailoverListItemDatasourceField(String propertyName, String title) {
+ this.propertyName = propertyName;
+ this.title = title;
+ }
+
+ public String propertyName() {
+ return propertyName;
+ }
+
+ public String title() {
+ return title;
+ }
+
+ public ListGridField getListGridField() {
+ return new ListGridField(propertyName, title);
+ }
+
+ public ListGridField getListGridField(String width) {
+ ListGridField field = new ListGridField(propertyName, title);
+ field.setWidth(width);
+ return field;
+ }
+}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
new file mode 100644
index 0000000..619821d
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
@@ -0,0 +1,33 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import java.util.List;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author Jirka Kremser
+ */
+public abstract class ServerDatasource<T, C extends BaseCriteria> extends
RPCDataSource<T, C> {
+ protected abstract List<ListGridField> getListGridFields();
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
index 1d5ae15..1d9dc46 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
@@ -19,16 +19,14 @@
package org.rhq.enterprise.gui.coregui.client.admin.topology;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_ADDRESS;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_AFFINITY_GROUP;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_CTIME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_MTIME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_NAME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_OPERATION_MODE;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_PORT;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_SECURE_PORT;
-
-import java.util.List;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_CTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_SECURE_PORT;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -46,7 +44,6 @@ import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import org.rhq.core.domain.cloud.Server;
-import org.rhq.core.domain.resource.Agent;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
@@ -90,16 +87,17 @@ public class ServerDetailView extends LocatableVLayout {
GWTServiceLookup.getCloudService().getServerById(this.serverId, new
AsyncCallback<Server>() {
public void onSuccess(final Server server) {
prepareDetailsSection(sectionStack, server);
-
GWTServiceLookup.getCloudService().getAgentsByServerName(server.getName(),
- new AsyncCallback<List<Agent>>() {
- public void onSuccess(List<Agent> agents) {
- prepareAgentSection(sectionStack, server, agents);
- };
-
- public void onFailure(Throwable caught) {
- //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
- }
- });
+ prepareAgentSection(sectionStack, server);
+//
GWTServiceLookup.getCloudService().getAgentsByServerName(server.getName(),
+// new AsyncCallback<List<Agent>>() {
+// public void onSuccess(List<Agent> agents) {
+// prepareAgentSection(sectionStack, server, agents);
+// };
+//
+// public void onFailure(Throwable caught) {
+// //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+// }
+// });
}
public void onFailure(Throwable caught) {
@@ -146,7 +144,7 @@ public class ServerDetailView extends LocatableVLayout {
}.run(); // fire the timer immediately
}
- private void prepareAgentSection(SectionStack stack, Server server, List<Agent>
agents) {
+ private void prepareAgentSection(SectionStack stack, Server server) {
SectionStackSection section = new
SectionStackSection(MSG.view_adminTopology_serverDetail_connectedAgents());
section.setExpanded(true);
AgentTableView agentsTable = new
AgentTableView(extendLocatorId(AgentTableView.VIEW_ID.getName()), null, serverId);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
deleted file mode 100644
index de6cf21..0000000
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
-
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_ADDRESS;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_AFFINITY_GROUP;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_AGENT_COUNT;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_ID;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_MTIME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_NAME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_OPERATION_MODE;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_PORT;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_SECURE_PORT;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.data.DSRequest;
-import com.smartgwt.client.data.DSResponse;
-import com.smartgwt.client.data.DataSourceField;
-import com.smartgwt.client.data.Record;
-import com.smartgwt.client.data.fields.DataSourceIntegerField;
-import com.smartgwt.client.widgets.grid.ListGridField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
-
-import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
-import org.rhq.core.domain.criteria.Criteria;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageOrdering;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-
-/**
- * @author Jirka Kremser
- *
- */
-public class ServerNodeDatasource extends RPCDataSource<ServerWithAgentCountComposite,
Criteria> {
-
- public ServerNodeDatasource() {
- super();
- List<DataSourceField> fields = addDataSourceFields();
- addFields(fields);
- }
-
- @Override
- protected List<DataSourceField> addDataSourceFields() {
- List<DataSourceField> fields = super.addDataSourceFields();
- DataSourceField idField = new DataSourceIntegerField(FIELD_ID.propertyName(),
FIELD_ID.title(), 50);
- idField.setPrimaryKey(true);
- idField.setHidden(true);
- fields.add(idField);
- return fields;
- }
-
- public List<ListGridField> getListGridFields() {
- List<ListGridField> fields = new ArrayList<ListGridField>();
-
- ListGridField idField = FIELD_ID.getListGridField();
- idField.setHidden(true);
- fields.add(idField);
-
- fields.add(FIELD_NAME.getListGridField("*"));
- fields.add(FIELD_OPERATION_MODE.getListGridField("90"));
- fields.add(FIELD_ADDRESS.getListGridField("20%"));
- fields.add(FIELD_PORT.getListGridField("90"));
- fields.add(FIELD_SECURE_PORT.getListGridField("75"));
-
- ListGridField lastUpdateTimeField =
FIELD_MTIME.getListGridField("20%");
- TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
- fields.add(lastUpdateTimeField);
-
- fields.add(FIELD_AFFINITY_GROUP.getListGridField("80"));
- fields.add(FIELD_AGENT_COUNT.getListGridField("75"));
-
- return fields;
- }
-
- @Override
- protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
- final PageControl pc = getPageControl(request);
-
- GWTServiceLookup.getCloudService().getServers(pc, new
AsyncCallback<List<ServerWithAgentCountComposite>>() {
- public void onSuccess(List<ServerWithAgentCountComposite> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.size());
- processResponse(request.getRequestId(), response);
- }
-
- @Override
- public void onFailure(Throwable t) {
- //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
- });
- }
-
- /**
- * Returns a prepopulated PageControl based on the provided DSRequest. This will set
sort fields,
- * pagination, but *not* filter fields.
- *
- * @param request the request to turn into a page control
- * @return the page control for passing to criteria and other queries
- */
- protected PageControl getPageControl(DSRequest request) {
- // Initialize paging.
- PageControl pageControl = new PageControl(0, getDataPageSize());
-
- // Initialize sorting.
- String sortBy = request.getAttribute("sortBy");
- if (sortBy != null) {
- String[] sorts = sortBy.split(",");
- for (String sort : sorts) {
- PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
- String columnName = (ordering == PageOrdering.DESC) ? sort.substring(1) :
sort;
- pageControl.addDefaultOrderingField(columnName, ordering);
- }
- }
-
- return pageControl;
- }
-
- @Override
- public ServerWithAgentCountComposite copyValues(Record from) {
- throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
- }
-
- @Override
- public ListGridRecord copyValues(ServerWithAgentCountComposite from) {
- ListGridRecord record = new ListGridRecord();
- record.setAttribute(FIELD_ID.propertyName(), from.getServer().getId());
- record.setAttribute(FIELD_NAME.propertyName(), from.getServer().getName());
- record.setAttribute(FIELD_OPERATION_MODE.propertyName(),
from.getServer().getOperationMode());
- record.setAttribute(FIELD_ADDRESS.propertyName(),
from.getServer().getAddress());
- record.setAttribute(FIELD_PORT.propertyName(), from.getServer().getPort());
- record.setAttribute(FIELD_SECURE_PORT.propertyName(),
from.getServer().getSecurePort());
- record.setAttribute(FIELD_MTIME.propertyName(), from.getServer().getMtime());
- record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getServer().getAffinityGroup());
- record.setAttribute(FIELD_AGENT_COUNT.propertyName(), from.getAgentCount());
- return record;
- }
-
- @Override
- protected Criteria getFetchCriteria(DSRequest request) {
- // we don't use criteria for this datasource, just return null
- return null;
- }
-}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasourceField.java
deleted file mode 100644
index 1e88e4d..0000000
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasourceField.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
-
-import com.smartgwt.client.widgets.grid.ListGridField;
-
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-
-/**
- * @author Jirka Kremser
- *
- */
-public enum ServerNodeDatasourceField {
-
- FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
-
- FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
-
- FIELD_OPERATION_MODE("operationMode",
CoreGUI.getMessages().view_adminTopology_server_mode()),
-
- FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_server_endpointAddress()),
-
- FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_server_nonSecurePort()),
-
- FIELD_SECURE_PORT("securePort",
CoreGUI.getMessages().view_adminTopology_server_securePort()),
-
- FIELD_CTIME("ctime",
CoreGUI.getMessages().view_adminTopology_serverDetail_installationDate()),
-
- FIELD_MTIME("mtime",
CoreGUI.getMessages().view_adminTopology_server_lastUpdateTime()),
-
- FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup()),
-
- FIELD_AGENT_COUNT("agentCount",
CoreGUI.getMessages().view_adminTopology_server_agentCount());
-
- /**
- * Corresponds to a property name of Server (e.g. operationMode).
- */
- private String propertyName;
-
- /**
- * The table header for the field or property (e.g. Mode).
- */
- private String title;
-
- private ServerNodeDatasourceField(String propertyName, String title) {
- this.propertyName = propertyName;
- this.title = title;
- }
-
- public String propertyName() {
- return propertyName;
- }
-
- public String title() {
- return title;
- }
-
- public ListGridField getListGridField() {
- return new ListGridField(propertyName, title);
- }
-
- public ListGridField getListGridField(String width) {
- ListGridField field = new ListGridField(propertyName, title);
- field.setWidth(width);
- return field;
- }
-}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
index 6817fdf..36c77ab 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
@@ -18,6 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.topology;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.FailoverListItemDatasourceField.FIELD_ORDINAL;
+
import java.util.ArrayList;
import java.util.List;
@@ -45,18 +47,21 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* @author Jiri Kremser
*/
-public class ServerTableView extends TableSection<ServerNodeDatasource> {
+public class ServerTableView extends TableSection<ServerDatasource> {
public static final ViewName VIEW_ID = new ViewName("Servers(GWT)",
MSG.view_adminTopology_servers() + "(GWT)",
IconEnum.SERVERS);
public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
+
+ private final boolean showActions;
- public ServerTableView(String locatorId, String tableTitle) {
+ public ServerTableView(String locatorId, String tableTitle, Integer agentId) {
super(locatorId, tableTitle);
+ this.showActions = agentId == null;
setHeight100();
setWidth100();
- setDataSource(new ServerNodeDatasource());
+ setDataSource(showActions ? new ServerWithAgentCountDatasource() : new
FailoverListItemDatasource(agentId));
}
@Override
@@ -64,8 +69,21 @@ public class ServerTableView extends
TableSection<ServerNodeDatasource> {
List<ListGridField> fields = getDataSource().getListGridFields();
ListGrid listGrid = getListGrid();
listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
- listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+ if (showActions) {
+ listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+ showActions();
+ } else {
+ listGrid.sort(FIELD_ORDINAL.propertyName(), SortDirection.ASCENDING);
+ }
+ super.configureTable();
+ }
+ @Override
+ public Canvas getDetailsView(Integer id) {
+ return new ServerDetailView(extendLocatorId("detailsView"), id);
+ }
+
+ private void showActions() {
addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(),
MSG.common_msg_areYouSure(), new AuthorizedTableAction(this,
TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
@@ -182,13 +200,6 @@ public class ServerTableView extends
TableSection<ServerNodeDatasource> {
});
}
});
-
- super.configureTable();
- }
-
- @Override
- public Canvas getDetailsView(Integer id) {
- return new ServerDetailView(extendLocatorId("detailsView"), id);
}
private int[] getSelectedIds(ListGridRecord[] selections) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
new file mode 100644
index 0000000..916f891
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
@@ -0,0 +1,166 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_AGENT_COUNT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_ID;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerWithAgentCountDatasourceField.FIELD_SECURE_PORT;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceIntegerField;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.criteria.Criteria;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public class ServerWithAgentCountDatasource extends
ServerDatasource<ServerWithAgentCountComposite, Criteria> {
+
+ public ServerWithAgentCountDatasource() {
+ super();
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+ DataSourceField idField = new DataSourceIntegerField(FIELD_ID.propertyName(),
FIELD_ID.title(), 50);
+ idField.setPrimaryKey(true);
+ idField.setHidden(true);
+ fields.add(idField);
+ return fields;
+ }
+
+ public List<ListGridField> getListGridFields() {
+ List<ListGridField> fields = new ArrayList<ListGridField>();
+
+ ListGridField idField = FIELD_ID.getListGridField();
+ idField.setHidden(true);
+ fields.add(idField);
+
+ fields.add(FIELD_NAME.getListGridField("*"));
+ fields.add(FIELD_OPERATION_MODE.getListGridField("90"));
+ fields.add(FIELD_ADDRESS.getListGridField("110"));
+ fields.add(FIELD_PORT.getListGridField("90"));
+ fields.add(FIELD_SECURE_PORT.getListGridField("75"));
+
+ ListGridField lastUpdateTimeField =
FIELD_MTIME.getListGridField("110");
+ TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
+ fields.add(lastUpdateTimeField);
+
+ fields.add(FIELD_AFFINITY_GROUP.getListGridField("80"));
+ fields.add(FIELD_AGENT_COUNT.getListGridField("75"));
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
+ final PageControl pc = getPageControl(request);
+
+ GWTServiceLookup.getCloudService().getServers(pc, new
AsyncCallback<List<ServerWithAgentCountComposite>>() {
+ public void onSuccess(List<ServerWithAgentCountComposite> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+
+ /**
+ * Returns a prepopulated PageControl based on the provided DSRequest. This will set
sort fields,
+ * pagination, but *not* filter fields.
+ *
+ * @param request the request to turn into a page control
+ * @return the page control for passing to criteria and other queries
+ */
+ protected PageControl getPageControl(DSRequest request) {
+ // Initialize paging.
+ PageControl pageControl = new PageControl(0, getDataPageSize());
+
+ // Initialize sorting.
+ String sortBy = request.getAttribute("sortBy");
+ if (sortBy != null) {
+ String[] sorts = sortBy.split(",");
+ for (String sort : sorts) {
+ PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
+ String columnName = (ordering == PageOrdering.DESC) ? sort.substring(1) :
sort;
+ pageControl.addDefaultOrderingField(columnName, ordering);
+ }
+ }
+
+ return pageControl;
+ }
+
+ @Override
+ public ServerWithAgentCountComposite copyValues(Record from) {
+ throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ }
+
+ @Override
+ public ListGridRecord copyValues(ServerWithAgentCountComposite from) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute(FIELD_ID.propertyName(), from.getServer().getId());
+ record.setAttribute(FIELD_NAME.propertyName(), from.getServer().getName());
+ record.setAttribute(FIELD_OPERATION_MODE.propertyName(),
from.getServer().getOperationMode());
+ record.setAttribute(FIELD_ADDRESS.propertyName(),
from.getServer().getAddress());
+ record.setAttribute(FIELD_PORT.propertyName(), from.getServer().getPort());
+ record.setAttribute(FIELD_SECURE_PORT.propertyName(),
from.getServer().getSecurePort());
+ record.setAttribute(FIELD_MTIME.propertyName(), from.getServer().getMtime());
+ record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getServer().getAffinityGroup() == null ? ""
+ : from.getServer().getAffinityGroup().getName());
+ record.setAttribute(FIELD_AGENT_COUNT.propertyName(), from.getAgentCount());
+ return record;
+ }
+
+ @Override
+ protected Criteria getFetchCriteria(DSRequest request) {
+ // we don't use criteria for this datasource, just return null
+ return null;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasourceField.java
new file mode 100644
index 0000000..f393288
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasourceField.java
@@ -0,0 +1,83 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public enum ServerWithAgentCountDatasourceField {
+
+ FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
+
+ FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
+
+ FIELD_OPERATION_MODE("operationMode",
CoreGUI.getMessages().view_adminTopology_server_mode()),
+
+ FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_server_endpointAddress()),
+
+ FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_server_nonSecurePort()),
+
+ FIELD_SECURE_PORT("securePort",
CoreGUI.getMessages().view_adminTopology_server_securePort()),
+
+ FIELD_CTIME("ctime",
CoreGUI.getMessages().view_adminTopology_serverDetail_installationDate()),
+
+ FIELD_MTIME("mtime",
CoreGUI.getMessages().view_adminTopology_server_lastUpdateTime()),
+
+ FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup()),
+
+ FIELD_AGENT_COUNT("agentCount",
CoreGUI.getMessages().view_adminTopology_server_agentCount());
+
+ /**
+ * Corresponds to a property name of Server (e.g. operationMode).
+ */
+ private String propertyName;
+
+ /**
+ * The table header for the field or property (e.g. Mode).
+ */
+ private String title;
+
+ private ServerWithAgentCountDatasourceField(String propertyName, String title) {
+ this.propertyName = propertyName;
+ this.title = title;
+ }
+
+ public String propertyName() {
+ return propertyName;
+ }
+
+ public String title() {
+ return title;
+ }
+
+ public ListGridField getListGridField() {
+ return new ListGridField(propertyName, title);
+ }
+
+ public ListGridField getListGridField(String width) {
+ ListGridField field = new ListGridField(propertyName, title);
+ field.setWidth(width);
+ return field;
+ }
+}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
index e7c162a..89ac705 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
@@ -38,5 +38,7 @@ public interface AgentGWTService extends RemoteService {
Boolean pingAgentForResource(int resourceId) throws RuntimeException;
List<Agent> getAllAgents() throws RuntimeException;
+
+ Agent getAgentByID(int agentId) throws RuntimeException;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
index 44a285a..e1c695b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
@@ -26,6 +26,7 @@ import java.util.List;
import com.google.gwt.user.client.rpc.RemoteService;
+import org.rhq.core.domain.cloud.FailoverListDetails;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
import org.rhq.core.domain.resource.Agent;
@@ -50,5 +51,7 @@ public interface CloudGWTService extends RemoteService {
void deleteServers(int[] serverIds) throws RuntimeException;
void updateServerMode(int[] serverIds, Server.OperationMode mode) throws
RuntimeException;
+
+ List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc);
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
index 5e2d50f..7a85d92 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
@@ -73,8 +73,18 @@ public class AgentGWTServiceImpl extends AbstractGWTServiceImpl
implements Agent
@Override
public PageList<Agent> getAgentsByServer(Integer serverId, PageControl pc)
throws RuntimeException {
try {
- //security handled in AgentManagerBean. requires View_Resource.
- return
SerialUtility.prepare(agentManager.getAgentsByServer(getSessionSubject(), serverId, pc),
"AgentService.getAgentsByServer");
+ //TODO: security handled in AgentManagerBean. requires View_Resource.
+ return
SerialUtility.prepare(agentManager.getAgentsByServer(getSessionSubject(), serverId, pc),
+ "AgentService.getAgentsByServer");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public Agent getAgentByID(int agentId) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(agentManager.getAgentByID(agentId),
"AgentService.getAgentByID");
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
index 118005f..0e5fd88 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
@@ -27,6 +27,7 @@ import java.util.List;
import org.apache.commons.lang.ArrayUtils;
+import org.rhq.core.domain.cloud.FailoverListDetails;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.cloud.Server.OperationMode;
import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
@@ -50,7 +51,8 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
@Override
public PageList<ServerWithAgentCountComposite> getServers(PageControl pc)
throws RuntimeException {
try {
- return
SerialUtility.prepare(cloudManager.getServerComposites(getSessionSubject(), pc),
"CloudGWTServiceImpl.getServers");
+ return
SerialUtility.prepare(cloudManager.getServerComposites(getSessionSubject(), pc),
+ "CloudGWTServiceImpl.getServers");
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
@@ -68,14 +70,14 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
@Override
public List<Agent> getAgentsByServerName(String serverName) throws
RuntimeException {
try {
- List <Agent> persistentBag =
SerialUtility.prepare(cloudManager.getAgentsByServerName(serverName),
"CloudGWTServiceImpl.getAgentsByServerName");
+ List<Agent> persistentBag =
SerialUtility.prepare(cloudManager.getAgentsByServerName(serverName),
+ "CloudGWTServiceImpl.getAgentsByServerName");
return new ArrayList<Agent>(persistentBag);
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
}
-
@Override
public void deleteServers(int[] serverIds) throws RuntimeException {
try {
@@ -85,7 +87,6 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
}
}
-
@Override
public void updateServerMode(int[] serverIds, OperationMode mode) throws
RuntimeException {
try {
@@ -95,4 +96,14 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
}
}
+ @Override
+ public List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc) {
+ try {
+ return
SerialUtility.prepare(cloudManager.getFailoverListDetailsByAgentId(agentId, pc),
+ "CloudGWTServiceImpl.getFailoverListDetailsByAgentId");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
}
commit 41d2e549663587ce3d6e81a962ffe6808a0fc1e6
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Sat Nov 24 13:42:24 2012 +0100
Detail of server is now fully functional, it also displays the list of connected
agents
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 963fee3..894c833 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -185,7 +185,7 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
NavigationItem agentsItemGwt = new NavigationItem(AgentTableView.VIEW_ID, new
ViewFactory() {
public Canvas createView() {
return new
AgentTableView(extendLocatorId(AgentTableView.VIEW_ID.getName()),
- MSG.view_adminTopology_agents() + " (GWT)");
+ MSG.view_adminTopology_agents() + " (GWT)", null);
}
}, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
index aaf6cc8..0792373 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
@@ -41,6 +41,7 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.criteria.Criteria;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -51,9 +52,12 @@ import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
*
*/
public class AgentNodeDatasource extends RPCDataSource<Agent, Criteria> {
+
+ private final Integer serverId;
- public AgentNodeDatasource() {
+ public AgentNodeDatasource(Integer serverId) {
super();
+ this.serverId = serverId;
List<DataSourceField> fields = addDataSourceFields();
addFields(fields);
}
@@ -76,15 +80,15 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
fields.add(idField);
fields.add(FIELD_NAME.getListGridField("*"));
- fields.add(FIELD_SERVER.getListGridField("90"));
- fields.add(FIELD_ADDRESS.getListGridField("90"));
+ fields.add(FIELD_SERVER.getListGridField("120"));
+ fields.add(FIELD_ADDRESS.getListGridField("105"));
fields.add(FIELD_PORT.getListGridField("90"));
ListGridField lastAvailabilityReportField =
FIELD_LAST_AVAILABILITY_REPORT.getListGridField("90");
TimestampCellFormatter.prepareDateField(lastAvailabilityReportField);
fields.add(lastAvailabilityReportField);
- fields.add(FIELD_AFFINITY_GROUP.getListGridField("80"));
+ fields.add(FIELD_AFFINITY_GROUP.getListGridField("100"));
return fields;
}
@@ -93,9 +97,9 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
final PageControl pc = getPageControl(request);
- // TODO: getAllAgents -> agentManager.getAgentsByServer(subject, null, pc);
- GWTServiceLookup.getAgentService().getAllAgents(new
AsyncCallback<List<Agent>>() {
- public void onSuccess(List<Agent> result) {
+ // TODO: null is for all agents -> change to particular server id
+ GWTServiceLookup.getAgentService().getAgentsByServer(serverId, pc, new
AsyncCallback<PageList<Agent>>() {
+ public void onSuccess(PageList<Agent> result) {
response.setData(buildRecords(result));
response.setTotalRows(result.size());
processResponse(request.getRequestId(), response);
@@ -147,7 +151,7 @@ public class AgentNodeDatasource extends RPCDataSource<Agent,
Criteria> {
record.setAttribute(FIELD_NAME.propertyName(), from.getName());
record.setAttribute(FIELD_ADDRESS.propertyName(), from.getAddress());
record.setAttribute(FIELD_PORT.propertyName(), from.getPort());
- record.setAttribute(FIELD_SERVER.propertyName(), from.getServer());
+ record.setAttribute(FIELD_SERVER.propertyName(), from.getServer().getName());
record.setAttribute(FIELD_LAST_AVAILABILITY_REPORT.propertyName(),
from.getLastAvailabilityReport());
record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getAffinityGroup());
return record;
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
index 36137d2..d0948f4 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -42,11 +42,11 @@ public class AgentTableView extends
TableSection<AgentNodeDatasource> {
public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
- public AgentTableView(String locatorId, String tableTitle) {
+ public AgentTableView(String locatorId, String tableTitle, Integer serverId) {
super(locatorId, tableTitle);
setHeight100();
setWidth100();
- setDataSource(new AgentNodeDatasource());
+ setDataSource(new AgentNodeDatasource(serverId));
}
@Override
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
index e02bf56..1d5ae15 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
@@ -36,7 +36,6 @@ import com.smartgwt.client.data.RecordList;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.form.fields.ButtonItem;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
@@ -68,7 +67,7 @@ public class ServerDetailView extends LocatableVLayout {
private SectionStackSection detailsSection = null;
private SectionStackSection agentSection = null;
- private int initSectionCount = 0;
+ private volatile int initSectionCount = 0;
public ServerDetailView(String locatorId, int serverId) {
super(locatorId);
@@ -94,7 +93,7 @@ public class ServerDetailView extends LocatableVLayout {
GWTServiceLookup.getCloudService().getAgentsByServerName(server.getName(),
new AsyncCallback<List<Agent>>() {
public void onSuccess(List<Agent> agents) {
- preparAgentSection(sectionStack, server, agents);
+ prepareAgentSection(sectionStack, server, agents);
};
public void onFailure(Throwable caught) {
@@ -104,14 +103,14 @@ public class ServerDetailView extends LocatableVLayout {
}
public void onFailure(Throwable caught) {
- //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+ SC.say("er1:" + caught);
+ //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
}
});
}
public boolean isInitialized() {
- // return initSectionCount >= 5;
- return true;
+ return initSectionCount >= 2;
}
@Override
@@ -139,7 +138,7 @@ public class ServerDetailView extends LocatableVLayout {
// don't wait forever, give up after 20s and show what we have
long elapsedMillis = System.currentTimeMillis() - startTime;
if (elapsedMillis > 20000) {
- initSectionCount = 5;
+ initSectionCount = 2;
}
schedule(100); // Reschedule the timer.
}
@@ -147,14 +146,12 @@ public class ServerDetailView extends LocatableVLayout {
}.run(); // fire the timer immediately
}
- private void preparAgentSection(SectionStack stack, Server server, List<Agent>
agents) {
+ private void prepareAgentSection(SectionStack stack, Server server, List<Agent>
agents) {
SectionStackSection section = new
SectionStackSection(MSG.view_adminTopology_serverDetail_connectedAgents());
section.setExpanded(true);
- Label help = new Label("agents grid..");
- section.setItems(help);
- // TODO: once the AgentTableView is done, instanciate it here
+ AgentTableView agentsTable = new
AgentTableView(extendLocatorId(AgentTableView.VIEW_ID.getName()), null, serverId);
+ section.setItems(agentsTable);
- stack.addSection(section);
agentSection = section;
++initSectionCount;
return;
@@ -213,10 +210,7 @@ public class ServerDetailView extends LocatableVLayout {
section.setExpanded(true);
section.setItems(form);
- stack.addSection(section);
detailsSection = section;
++initSectionCount;
-
- return;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
index eecbe1a..e7c162a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
@@ -23,6 +23,8 @@ import java.util.List;
import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
/**
* @author Simeon Pinder
@@ -30,6 +32,8 @@ import org.rhq.core.domain.resource.Agent;
public interface AgentGWTService extends RemoteService {
Agent getAgentForResource(int resourceId) throws RuntimeException;
+
+ PageList<Agent> getAgentsByServer(Integer serverId, PageControl pageControl)
throws RuntimeException;
Boolean pingAgentForResource(int resourceId) throws RuntimeException;
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
index cf4143b..5e2d50f 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
@@ -21,6 +21,8 @@ package org.rhq.enterprise.gui.coregui.server.gwt;
import java.util.List;
import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.AgentGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
import org.rhq.enterprise.server.core.AgentManagerLocal;
@@ -68,6 +70,16 @@ public class AgentGWTServiceImpl extends AbstractGWTServiceImpl
implements Agent
}
}
+ @Override
+ public PageList<Agent> getAgentsByServer(Integer serverId, PageControl pc)
throws RuntimeException {
+ try {
+ //security handled in AgentManagerBean. requires View_Resource.
+ return
SerialUtility.prepare(agentManager.getAgentsByServer(getSessionSubject(), serverId, pc),
"AgentService.getAgentsByServer");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
// public PageList<Availability> findAvailabilityForResource(int resourceId,
PageControl pc) {
// try {
// return
SerialUtility.prepare(availabilityManager.findAvailabilityForResource(getSessionSubject(),
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
index 0daa97d..118005f 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
@@ -22,6 +22,7 @@
*/
package org.rhq.enterprise.gui.coregui.server.gwt;
+import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ArrayUtils;
@@ -67,7 +68,8 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
@Override
public List<Agent> getAgentsByServerName(String serverName) throws
RuntimeException {
try {
- return SerialUtility.prepare(cloudManager.getAgentsByServerName(serverName),
"CloudGWTServiceImpl.getAgentsByServerName");
+ List <Agent> persistentBag =
SerialUtility.prepare(cloudManager.getAgentsByServerName(serverName),
"CloudGWTServiceImpl.getAgentsByServerName");
+ return new ArrayList<Agent>(persistentBag);
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
commit 68cbb519dda07244ac05da6e03b65535887651ca
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Sat Nov 24 01:52:23 2012 +0100
AgentTableView class added including the data fetching via datasource
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 88b957c..963fee3 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -34,6 +34,7 @@ import org.rhq.enterprise.gui.coregui.client.admin.roles.RolesView;
import
org.rhq.enterprise.gui.coregui.client.admin.templates.AlertDefinitionTemplateTypeView;
import
org.rhq.enterprise.gui.coregui.client.admin.templates.DriftDefinitionTemplateTypeView;
import org.rhq.enterprise.gui.coregui.client.admin.templates.MetricTemplateTypeView;
+import org.rhq.enterprise.gui.coregui.client.admin.topology.AgentTableView;
import org.rhq.enterprise.gui.coregui.client.admin.topology.ServerTableView;
import org.rhq.enterprise.gui.coregui.client.admin.users.UsersView;
import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
@@ -173,21 +174,28 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
return new
RemoteAgentInstallView(extendLocatorId("RemoteAgentInstall"));
}
}, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
+
+ NavigationItem serversItemGwt = new NavigationItem(ServerTableView.VIEW_ID, new
ViewFactory() {
+ public Canvas createView() {
+ return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()),
+ MSG.view_adminTopology_servers() + " (GWT)");
+ }
+ }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
- NavigationItem serversItemGwt = new NavigationItem(ServerTableView.VIEW_ID,
- new ViewFactory() {
- public Canvas createView() {
- return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()));
- }
- }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
+ NavigationItem agentsItemGwt = new NavigationItem(AgentTableView.VIEW_ID, new
ViewFactory() {
+ public Canvas createView() {
+ return new
AgentTableView(extendLocatorId(AgentTableView.VIEW_ID.getName()),
+ MSG.view_adminTopology_agents() + " (GWT)");
+ }
+ }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
NavigationSection topologyRegion = null;
if (isRHQ) {
topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
agentsItem,
- affinityGroupsItem, partitionEventsItem, serversItemGwt,
remoteAgentInstallItem);
+ affinityGroupsItem, partitionEventsItem, serversItemGwt, agentsItemGwt,
remoteAgentInstallItem);
} else {
topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
agentsItem,
- affinityGroupsItem, partitionEventsItem, serversItemGwt);
+ affinityGroupsItem, partitionEventsItem, serversItemGwt, agentsItemGwt);
}
return topologyRegion;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
new file mode 100644
index 0000000..aaf6cc8
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasource.java
@@ -0,0 +1,161 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_ID;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_LAST_AVAILABILITY_REPORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.AgentNodeDatasourceField.FIELD_SERVER;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceIntegerField;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.criteria.Criteria;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public class AgentNodeDatasource extends RPCDataSource<Agent, Criteria> {
+
+ public AgentNodeDatasource() {
+ super();
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+ DataSourceField idField = new DataSourceIntegerField(FIELD_ID.propertyName(),
FIELD_ID.title(), 50);
+ idField.setPrimaryKey(true);
+ idField.setHidden(true);
+ fields.add(idField);
+ return fields;
+ }
+
+ public List<ListGridField> getListGridFields() {
+ List<ListGridField> fields = new ArrayList<ListGridField>();
+
+ ListGridField idField = FIELD_ID.getListGridField();
+ idField.setHidden(true);
+ fields.add(idField);
+
+ fields.add(FIELD_NAME.getListGridField("*"));
+ fields.add(FIELD_SERVER.getListGridField("90"));
+ fields.add(FIELD_ADDRESS.getListGridField("90"));
+ fields.add(FIELD_PORT.getListGridField("90"));
+
+ ListGridField lastAvailabilityReportField =
FIELD_LAST_AVAILABILITY_REPORT.getListGridField("90");
+ TimestampCellFormatter.prepareDateField(lastAvailabilityReportField);
+ fields.add(lastAvailabilityReportField);
+
+ fields.add(FIELD_AFFINITY_GROUP.getListGridField("80"));
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
+ final PageControl pc = getPageControl(request);
+
+ // TODO: getAllAgents -> agentManager.getAgentsByServer(subject, null, pc);
+ GWTServiceLookup.getAgentService().getAllAgents(new
AsyncCallback<List<Agent>>() {
+ public void onSuccess(List<Agent> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+
+ /**
+ * Returns a prepopulated PageControl based on the provided DSRequest. This will set
sort fields,
+ * pagination, but *not* filter fields.
+ *
+ * @param request the request to turn into a page control
+ * @return the page control for passing to criteria and other queries
+ */
+ protected PageControl getPageControl(DSRequest request) {
+ // Initialize paging.
+ PageControl pageControl = new PageControl(0, getDataPageSize());
+
+ // Initialize sorting.
+ String sortBy = request.getAttribute("sortBy");
+ if (sortBy != null) {
+ String[] sorts = sortBy.split(",");
+ for (String sort : sorts) {
+ PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
+ String columnName = (ordering == PageOrdering.DESC) ? sort.substring(1) :
sort;
+ pageControl.addDefaultOrderingField(columnName, ordering);
+ }
+ }
+
+ return pageControl;
+ }
+
+ @Override
+ public Agent copyValues(Record from) {
+ throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ }
+
+ @Override
+ public ListGridRecord copyValues(Agent from) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute(FIELD_ID.propertyName(), from.getId());
+ record.setAttribute(FIELD_NAME.propertyName(), from.getName());
+ record.setAttribute(FIELD_ADDRESS.propertyName(), from.getAddress());
+ record.setAttribute(FIELD_PORT.propertyName(), from.getPort());
+ record.setAttribute(FIELD_SERVER.propertyName(), from.getServer());
+ record.setAttribute(FIELD_LAST_AVAILABILITY_REPORT.propertyName(),
from.getLastAvailabilityReport());
+ record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getAffinityGroup());
+ return record;
+ }
+
+ @Override
+ protected Criteria getFetchCriteria(DSRequest request) {
+ // we don't use criteria for this datasource, just return null
+ return null;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
new file mode 100644
index 0000000..6872204
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentNodeDatasourceField.java
@@ -0,0 +1,79 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public enum AgentNodeDatasourceField {
+
+ FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
+
+ FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
+
+ FIELD_SERVER("server",
CoreGUI.getMessages().view_adminTopology_agent_connectedServer()),
+
+ FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_agent_agentBindAddress()),
+
+ FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_agent_agentBindPort()),
+
+ FIELD_LAST_AVAILABILITY_REPORT("lastAvailabilityReport",
CoreGUI.getMessages().view_adminTopology_agent_lastAvailabilityReport()),
+
+ FIELD_AGENT_TOKEN("agentToken",
CoreGUI.getMessages().view_adminTopology_agentDetail_token()),
+
+ FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup());
+
+ /**
+ * Corresponds to a property name of Server (e.g. operationMode).
+ */
+ private String propertyName;
+
+ /**
+ * The table header for the field or property (e.g. Mode).
+ */
+ private String title;
+
+ private AgentNodeDatasourceField(String propertyName, String title) {
+ this.propertyName = propertyName;
+ this.title = title;
+ }
+
+ public String propertyName() {
+ return propertyName;
+ }
+
+ public String title() {
+ return title;
+ }
+
+ public ListGridField getListGridField() {
+ return new ListGridField(propertyName, title);
+ }
+
+ public ListGridField getListGridField(String width) {
+ ListGridField field = new ListGridField(propertyName, title);
+ field.setWidth(width);
+ return field;
+ }
+}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
new file mode 100644
index 0000000..36137d2
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -0,0 +1,90 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.smartgwt.client.types.SortDirection;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.enterprise.gui.coregui.client.IconEnum;
+import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+
+/**
+ * @author Jiri Kremser
+ */
+public class AgentTableView extends TableSection<AgentNodeDatasource> {
+
+ public static final ViewName VIEW_ID = new ViewName("Agents(GWT)",
MSG.view_adminTopology_agents() + "(GWT)",
+ IconEnum.SERVERS);
+ public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
+
+ public AgentTableView(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
+ setHeight100();
+ setWidth100();
+ setDataSource(new AgentNodeDatasource());
+ }
+
+ @Override
+ protected void configureTable() {
+ List<ListGridField> fields = getDataSource().getListGridFields();
+ ListGrid listGrid = getListGrid();
+ listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
+ listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+
+ super.configureTable();
+ }
+
+ @Override
+ public Canvas getDetailsView(Integer id) {
+ return new ServerDetailView(extendLocatorId("detailsView"), id);
+ }
+
+ private int[] getSelectedIds(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new int[0];
+ }
+ int[] ids = new int[selections.length];
+ int i = 0;
+ for (ListGridRecord selection : selections) {
+ ids[i++] = selection.getAttributeAsInt(FIELD_ID);
+ }
+ return ids;
+ }
+
+ private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new ArrayList<String>(0);
+ }
+ ArrayList<String> ids = new ArrayList<String>(selections.length);
+ for (ListGridRecord selection : selections) {
+ ids.add(selection.getAttributeAsString(FIELD_NAME));
+ }
+ return ids;
+ }
+
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
index 3cfac98..e02bf56 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
@@ -19,14 +19,16 @@
package org.rhq.enterprise.gui.coregui.client.admin.topology;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_ADDRESS;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_AFFINITY_GROUP;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_CTIME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_MTIME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_NAME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_OPERATION_MODE;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_PORT;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_SECURE_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_CTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_SECURE_PORT;
+
+import java.util.List;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -41,12 +43,11 @@ import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
-import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import org.rhq.core.domain.cloud.Server;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
@@ -87,21 +88,29 @@ public class ServerDetailView extends LocatableVLayout {
@Override
protected void onInit() {
super.onInit();
-
GWTServiceLookup.getCloudService().getServerById(this.serverId, new
AsyncCallback<Server>() {
- public void onSuccess(Server server) {
+ public void onSuccess(final Server server) {
prepareDetailsSection(sectionStack, server);
- preparAgentSection(sectionStack, server);
+
GWTServiceLookup.getCloudService().getAgentsByServerName(server.getName(),
+ new AsyncCallback<List<Agent>>() {
+ public void onSuccess(List<Agent> agents) {
+ preparAgentSection(sectionStack, server, agents);
+ };
+
+ public void onFailure(Throwable caught) {
+ //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+ }
+ });
}
public void onFailure(Throwable caught) {
-
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+ //TODO:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
}
});
}
public boolean isInitialized() {
-// return initSectionCount >= 5;
+ // return initSectionCount >= 5;
return true;
}
@@ -138,13 +147,13 @@ public class ServerDetailView extends LocatableVLayout {
}.run(); // fire the timer immediately
}
- private void preparAgentSection(SectionStack stack, Server server) {
+ private void preparAgentSection(SectionStack stack, Server server, List<Agent>
agents) {
SectionStackSection section = new
SectionStackSection(MSG.view_adminTopology_serverDetail_connectedAgents());
section.setExpanded(true);
Label help = new Label("agents grid..");
section.setItems(help);
- ListGrid agentGrid = new ListGrid();
-
+ // TODO: once the AgentTableView is done, instanciate it here
+
stack.addSection(section);
agentSection = section;
++initSectionCount;
@@ -186,20 +195,19 @@ public class ServerDetailView extends LocatableVLayout {
StaticTextItem lastUpdatetem = new StaticTextItem(FIELD_MTIME.propertyName(),
FIELD_MTIME.title());
lastUpdatetem.setValue(TimestampCellFormatter.format(Long.valueOf(server.getMtime()),
TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM));
-
+
ButtonItem saveButton = new ButtonItem();
saveButton.setOverflow(Overflow.VISIBLE);
- saveButton.setTitle(MSG.common_button_save());
- saveButton.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
+ saveButton.setTitle(MSG.common_button_save());
+ saveButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
RecordList list = form.getRecordList();
SC.say("name is " +
list.get(0).getAttribute("name"));
- }
+ }
});
form.setItems(nameItem, addressItem, portItem, securePortItem, operationModeItem,
affinityGroupItem,
installationDateItem, lastUpdatetem, saveButton);
-
SectionStackSection section = new
SectionStackSection(MSG.common_title_details());
section.setExpanded(true);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDataourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDataourceField.java
deleted file mode 100644
index 5e57aa0..0000000
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDataourceField.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
-
-import com.smartgwt.client.widgets.grid.ListGridField;
-
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-
-/**
- * @author Jirka Kremser
- *
- */
-public enum ServerNodeDataourceField {
-
- FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
-
- FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
-
- FIELD_OPERATION_MODE("operationMode",
CoreGUI.getMessages().view_adminTopology_server_mode()),
-
- FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_server_endpointAddress()),
-
- FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_server_nonSecurePort()),
-
- FIELD_SECURE_PORT("securePort",
CoreGUI.getMessages().view_adminTopology_server_securePort()),
-
- FIELD_CTIME("ctime",
CoreGUI.getMessages().view_adminTopology_serverDetail_installationDate()),
-
- FIELD_MTIME("mtime",
CoreGUI.getMessages().view_adminTopology_server_lastUpdateTime()),
-
- FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup()),
-
- FIELD_AGENT_COUNT("agentCount",
CoreGUI.getMessages().view_adminTopology_server_agentCount());
-
- /**
- * Corresponds to a property name of Server (e.g. operationMode).
- */
- private String propertyName;
-
- /**
- * The table header for the field or property (e.g. Mode).
- */
- private String title;
-
- private ServerNodeDataourceField(String propertyName, String title) {
- this.propertyName = propertyName;
- this.title = title;
- }
-
- public String propertyName() {
- return propertyName;
- }
-
- public String title() {
- return title;
- }
-
- public ListGridField getListGridField() {
- return new ListGridField(propertyName, title);
- }
-
- public ListGridField getListGridField(String width) {
- ListGridField field = new ListGridField(propertyName, title);
- field.setWidth(width);
- return field;
- }
-}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
index 25ada4e..de6cf21 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
@@ -18,15 +18,15 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.topology;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_ADDRESS;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_AFFINITY_GROUP;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_AGENT_COUNT;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_ID;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_MTIME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_NAME;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_OPERATION_MODE;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_PORT;
-import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_SECURE_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_AGENT_COUNT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_ID;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDatasourceField.FIELD_SECURE_PORT;
import java.util.ArrayList;
import java.util.List;
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasourceField.java
new file mode 100644
index 0000000..1e88e4d
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasourceField.java
@@ -0,0 +1,83 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public enum ServerNodeDatasourceField {
+
+ FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
+
+ FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
+
+ FIELD_OPERATION_MODE("operationMode",
CoreGUI.getMessages().view_adminTopology_server_mode()),
+
+ FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_server_endpointAddress()),
+
+ FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_server_nonSecurePort()),
+
+ FIELD_SECURE_PORT("securePort",
CoreGUI.getMessages().view_adminTopology_server_securePort()),
+
+ FIELD_CTIME("ctime",
CoreGUI.getMessages().view_adminTopology_serverDetail_installationDate()),
+
+ FIELD_MTIME("mtime",
CoreGUI.getMessages().view_adminTopology_server_lastUpdateTime()),
+
+ FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup()),
+
+ FIELD_AGENT_COUNT("agentCount",
CoreGUI.getMessages().view_adminTopology_server_agentCount());
+
+ /**
+ * Corresponds to a property name of Server (e.g. operationMode).
+ */
+ private String propertyName;
+
+ /**
+ * The table header for the field or property (e.g. Mode).
+ */
+ private String title;
+
+ private ServerNodeDatasourceField(String propertyName, String title) {
+ this.propertyName = propertyName;
+ this.title = title;
+ }
+
+ public String propertyName() {
+ return propertyName;
+ }
+
+ public String title() {
+ return title;
+ }
+
+ public ListGridField getListGridField() {
+ return new ListGridField(propertyName, title);
+ }
+
+ public ListGridField getListGridField(String width) {
+ ListGridField field = new ListGridField(propertyName, title);
+ field.setWidth(width);
+ return field;
+ }
+}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
index e5bbbaf..6817fdf 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
@@ -21,6 +21,7 @@ package org.rhq.enterprise.gui.coregui.client.admin.topology;
import java.util.ArrayList;
import java.util.List;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.util.BooleanCallback;
import com.smartgwt.client.util.SC;
@@ -30,26 +31,29 @@ import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* @author Jiri Kremser
*/
public class ServerTableView extends TableSection<ServerNodeDatasource> {
- public static final ViewName VIEW_ID = new ViewName("Servers(GWT)",
MSG.view_adminTopology_servers()+"(GWT)", IconEnum.SERVERS);
+ public static final ViewName VIEW_ID = new ViewName("Servers(GWT)",
MSG.view_adminTopology_servers() + "(GWT)",
+ IconEnum.SERVERS);
public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
-// private boolean showUndeployed = false;
-
- public ServerTableView(String locatorId) {
- super(locatorId, MSG.view_adminTopology_servers()+"(GWT)");
+ public ServerTableView(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
setHeight100();
setWidth100();
setDataSource(new ServerNodeDatasource());
@@ -60,153 +64,125 @@ public class ServerTableView extends
TableSection<ServerNodeDatasource> {
List<ListGridField> fields = getDataSource().getListGridFields();
ListGrid listGrid = getListGrid();
listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
- listGrid.sort(ServerNodeDataourceField.FIELD_NAME.propertyName(),
SortDirection.ASCENDING);
+ listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+
+ addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(),
+ MSG.common_msg_areYouSure(), new AuthorizedTableAction(this,
TableActionEnablement.ANY,
+ Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ List<String> selectedNames = getSelectedNames(selections);
+ // TODO: msg
+ // String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
+ String message = "Really? Normal? For all I've done for you?
" + selectedNames;
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
+
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
Server.OperationMode.NORMAL,
+ new AsyncCallback<Void>() {
+ public void onSuccess(Void arg0) {
+ // TODO: msg
+ Message msg = new Message(MSG
+
.view_admin_plugins_disabledServerPlugins("sdf"), Message.Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ // TODO: msg
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
- addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(), MSG.common_msg_areYouSure(),
+ addTableAction(extendLocatorId("setMaintenance"),
MSG.view_adminTopology_server_setMaintenance(),
new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
- public void executeAction(ListGridRecord[] selections, Object
actionValue) {
- int[] selectedIds = getSelectedIds(selections);
- SC.say("setting servers to normal mode, ids: " +
selectedIds);
-//
GWTServiceLookup.getPluginService().enableServerPlugins(selectedIds,
-// new AsyncCallback<ArrayList<String>>() {
-// @Override
-// public void onSuccess(ArrayList<String> result) {
-// Message msg = new Message(
-//
MSG.view_admin_plugins_enabledServerPlugins(result.toString()), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-//
MSG.view_admin_plugins_enabledServerPluginsFailure() + " " +
caught.getMessage(),
-// caught);
-// refreshTableInfo();
-// }
-// });
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ List<String> selectedNames = getSelectedNames(selections);
+ // TODO: msg
+ // String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
+ String message = "Really? Maitenance? For all I've done for
you? " + selectedNames;
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
+
GWTServiceLookup.getCloudService().updateServerMode(selectedIds,
Server.OperationMode.MAINTENANCE,
+ new AsyncCallback<Void>() {
+ public void onSuccess(Void arg0) {
+ // TODO: msg
+ Message msg = new Message(MSG
+
.view_admin_plugins_disabledServerPlugins("sdf"), Message.Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ // TODO: msg
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
}
});
- addTableAction(extendLocatorId("setMaintenance"),
MSG.view_adminTopology_server_setMaintenance(), new AuthorizedTableAction(this,
- TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
- public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
- ArrayList<String> selectedNames = getSelectedNames(selections);
- String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
- SC.ask(message, new BooleanCallback() {
- public void execute(Boolean confirmed) {
- if (confirmed) {
- int[] selectedIds = getSelectedIds(selections);
- SC.say("setting servers to maintenance mode, ids: "
+ selectedIds);
-//
GWTServiceLookup.getPluginService().disableServerPlugins(selectedIds,
-// new AsyncCallback<ArrayList<String>>() {
-// @Override
-// public void onSuccess(ArrayList<String>
result) {
-// Message msg = new
Message(MSG.view_admin_plugins_disabledServerPlugins(result
-// .toString()), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-//
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
-// + caught.getMessage(), caught);
-// refreshTableInfo();
-// }
-// });
- } else {
- refreshTableInfo();
+ addTableAction(extendLocatorId("removeSelected"),
MSG.view_adminTopology_server_removeSelected(),
+ MSG.common_msg_areYouSure(), new AuthorizedTableAction(this,
TableActionEnablement.ANY,
+ Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ List<String> selectedNames = getSelectedNames(selections);
+ String message = "Really? Delete? For all I've done for you?
" + selectedNames;
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids:
" + selectedIds);
+
GWTServiceLookup.getCloudService().deleteServers(selectedIds,
+ new AsyncCallback<Void>() {
+ public void onSuccess(Void arg0) {
+ // TODO: msg
+ Message msg = new Message(MSG
+
.view_admin_plugins_disabledServerPlugins("sdf"), Message.Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ // TODO: msg
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+
+ });
+ } else {
+ refreshTableInfo();
+ }
}
- }
- });
- }
- });
-
-
- addTableAction(extendLocatorId("removeSelected"),
MSG.view_adminTopology_server_removeSelected(), MSG.common_msg_areYouSure(),
- new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
- public void executeAction(ListGridRecord[] selections, Object
actionValue) {
- int[] selectedIds = getSelectedIds(selections);
- SC.say("removing servers with ids: " + selectedIds);
-// GWTServiceLookup.getCloudService().purgeServerPlugins(selectedIds,
-// new AsyncCallback<ArrayList<String>>() {
-// @Override
-// public void onSuccess(ArrayList<String> result) {
-// Message msg = new Message(
-//
MSG.view_admin_plugins_purgedServerPlugins(result.toString()), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-// MSG.view_admin_plugins_purgedServerPluginsFailure()
+ " " + caught.getMessage(),
-// caught);
-// refreshTableInfo();
-// }
-// });
+ });
}
});
-// IButton scanForUpdatesButton = new
LocatableIButton(extendLocatorId("scanButton"),
-// MSG.view_admin_plugins_scan());
-// scanForUpdatesButton.setAutoFit(true);
-// scanForUpdatesButton.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// GWTServiceLookup.getPluginService().scanAndRegister(new
AsyncCallback<Void>() {
-// @Override
-// public void onSuccess(Void result) {
-// Message msg = new
Message(MSG.view_admin_plugins_scanComplete(), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-// MSG.view_admin_plugins_scanFailure() + " " +
caught.getMessage(), caught);
-// refreshTableInfo();
-// }
-// });
-// }
-// });
-
-// IButton restartMasterPCButton = new
LocatableIButton(extendLocatorId("restartMasterPCButton"),
-// MSG.view_admin_plugins_restartMasterPC());
-// restartMasterPCButton.setAutoFit(true);
-// restartMasterPCButton.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCStarted(), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-//
-// GWTServiceLookup.getPluginService().restartMasterPluginContainer(new
AsyncCallback<Void>() {
-// @Override
-// public void onSuccess(Void result) {
-// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCComplete(), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-// MSG.view_admin_plugins_restartMasterPCFailure() + "
" + caught.getMessage(), caught);
-// refreshTableInfo();
-// }
-// });
-// }
-// });
-
-// PluginFileUploadForm pluginUploadForm = new
PluginFileUploadForm(extendLocatorId("upload"),
-// MSG.view_admin_plugins_upload(), true);
-
-// addExtraWidget(scanForUpdatesButton, true);
-// addExtraWidget(restartMasterPCButton, true);
-// addExtraWidget(pluginUploadForm, true);
-
super.configureTable();
}
@@ -238,6 +214,4 @@ public class ServerTableView extends
TableSection<ServerNodeDatasource> {
return ids;
}
-
-
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
index 6cecb62..eecbe1a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AgentGWTService.java
@@ -18,6 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.client.gwt;
+import java.util.List;
+
import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.resource.Agent;
@@ -30,5 +32,7 @@ public interface AgentGWTService extends RemoteService {
Agent getAgentForResource(int resourceId) throws RuntimeException;
Boolean pingAgentForResource(int resourceId) throws RuntimeException;
+
+ List<Agent> getAllAgents() throws RuntimeException;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
index 84477f2..44a285a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
@@ -42,9 +42,13 @@ public interface CloudGWTService extends RemoteService {
* @throws RuntimeException
*/
List<ServerWithAgentCountComposite> getServers(PageControl pc) throws
RuntimeException;
-
+
Server getServerById(int serverId) throws RuntimeException;
-
+
List<Agent> getAgentsByServerName(String serverName) throws RuntimeException;
+ void deleteServers(int[] serverIds) throws RuntimeException;
+
+ void updateServerMode(int[] serverIds, Server.OperationMode mode) throws
RuntimeException;
+
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
index ddd9fda..cf4143b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
@@ -18,6 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.server.gwt;
+import java.util.List;
+
import org.rhq.core.domain.resource.Agent;
import org.rhq.enterprise.gui.coregui.client.gwt.AgentGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
@@ -26,6 +28,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
/**
* @author Simeon Pinder
+ * @author Jirka Kremser
*/
public class AgentGWTServiceImpl extends AbstractGWTServiceImpl implements
AgentGWTService {
@@ -55,6 +58,16 @@ public class AgentGWTServiceImpl extends AbstractGWTServiceImpl
implements Agent
}
}
+ @Override
+ public List<Agent> getAllAgents() throws RuntimeException {
+ try {
+ //security handled in AgentManagerBean. requires View_Resource.
+ return SerialUtility.prepare(agentManager.getAllAgents(),
"AgentService.getAllAgents");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
// public PageList<Availability> findAvailabilityForResource(int resourceId,
PageControl pc) {
// try {
// return
SerialUtility.prepare(availabilityManager.findAvailabilityForResource(getSessionSubject(),
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
index 5265288..0daa97d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
@@ -24,7 +24,10 @@ package org.rhq.enterprise.gui.coregui.server.gwt;
import java.util.List;
+import org.apache.commons.lang.ArrayUtils;
+
import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.Server.OperationMode;
import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.util.PageControl;
@@ -70,4 +73,24 @@ public class CloudGWTServiceImpl extends AbstractGWTServiceImpl
implements Cloud
}
}
+
+ @Override
+ public void deleteServers(int[] serverIds) throws RuntimeException {
+ try {
+ cloudManager.deleteServers(ArrayUtils.toObject(serverIds));
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+
+ @Override
+ public void updateServerMode(int[] serverIds, OperationMode mode) throws
RuntimeException {
+ try {
+ cloudManager.updateServerMode(ArrayUtils.toObject(serverIds), mode);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
}
commit 5784d52e88e5246631f854757b25b88312e5766f
Merge: f9b6131 a819562
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Fri Nov 23 21:26:22 2012 +0100
Merge branch 'master' into jkremser/ha-jsf-to-gwt-rewrite
commit f9b6131fb7cc0208feb1d4410be5c82a6233e6f2
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Fri Nov 23 21:25:52 2012 +0100
detail view for server node, also the datasource is now a standalone class
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 668a49f..88b957c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -34,6 +34,7 @@ import org.rhq.enterprise.gui.coregui.client.admin.roles.RolesView;
import
org.rhq.enterprise.gui.coregui.client.admin.templates.AlertDefinitionTemplateTypeView;
import
org.rhq.enterprise.gui.coregui.client.admin.templates.DriftDefinitionTemplateTypeView;
import org.rhq.enterprise.gui.coregui.client.admin.templates.MetricTemplateTypeView;
+import org.rhq.enterprise.gui.coregui.client.admin.topology.ServerTableView;
import org.rhq.enterprise.gui.coregui.client.admin.users.UsersView;
import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
import org.rhq.enterprise.gui.coregui.client.components.TitleBar;
@@ -61,6 +62,7 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
public static final ViewName SECTION_CONTENT_VIEW_ID = new
ViewName("Content", MSG.view_admin_content());
// TODO these iframe page view ids should go away in favor of the gwt view page
view_id, when available
+ private static final ViewName PAGE_SERVERS_VIEW_ID = new
ViewName("Servers", MSG.view_adminTopology_servers(), IconEnum.SERVERS);
private static final ViewName PAGE_AGENTS_VIEW_ID = new ViewName("Agents",
MSG.view_adminTopology_agents(),IconEnum.AGENT);
private static final ViewName PAGE_AFFINITY_GROUPS_VIEW_ID = new
ViewName("AffinityGroups",
MSG.view_adminTopology_affinityGroups(), IconEnum.ALL_GROUPS);
@@ -135,12 +137,12 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
ProductInfo productInfo = CoreGUI.get().getProductInfo();
boolean isRHQ = (productInfo != null) &&
"RHQ".equals(productInfo.getShortName());
- NavigationItem serversItem = new NavigationItem(ServerTableView.VIEW_ID,
- new ViewFactory() {
- public Canvas createView() {
- return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()));
- }
- }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
+ NavigationItem serversItem = new NavigationItem(PAGE_SERVERS_VIEW_ID, new
ViewFactory() {
+ public Canvas createView() {
+ return new FullHTMLPane(extendLocatorId(PAGE_SERVERS_VIEW_ID.getName()),
+ "/rhq/ha/listServers-plain.xhtml?nomenu=true");
+ }
+ }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
NavigationItem agentsItem = new NavigationItem(PAGE_AGENTS_VIEW_ID, new
ViewFactory() {
public Canvas createView() {
@@ -171,14 +173,21 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
return new
RemoteAgentInstallView(extendLocatorId("RemoteAgentInstall"));
}
}, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
+
+ NavigationItem serversItemGwt = new NavigationItem(ServerTableView.VIEW_ID,
+ new ViewFactory() {
+ public Canvas createView() {
+ return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()));
+ }
+ }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
NavigationSection topologyRegion = null;
if (isRHQ) {
topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
agentsItem,
- affinityGroupsItem, partitionEventsItem, remoteAgentInstallItem);
+ affinityGroupsItem, partitionEventsItem, serversItemGwt,
remoteAgentInstallItem);
} else {
topologyRegion = new NavigationSection(SECTION_TOPOLOGY_VIEW_ID, serversItem,
agentsItem,
- affinityGroupsItem, partitionEventsItem);
+ affinityGroupsItem, partitionEventsItem, serversItemGwt);
}
return topologyRegion;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerDetailView.java
deleted file mode 100644
index 44bcb26..0000000
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerDetailView.java
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin;
-
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.types.Overflow;
-import com.smartgwt.client.types.VisibilityMode;
-import com.smartgwt.client.widgets.Img;
-import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.form.fields.CanvasItem;
-import com.smartgwt.client.widgets.form.fields.StaticTextItem;
-import com.smartgwt.client.widgets.layout.SectionStack;
-import com.smartgwt.client.widgets.layout.SectionStackSection;
-
-import org.rhq.core.domain.cloud.Server;
-import org.rhq.core.domain.plugin.PluginKey;
-import org.rhq.core.domain.plugin.ServerPlugin;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ImageManager;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
-
-/**
- * Shows details of a server.
- *
- * @author Jiri Kremser
- */
-public class ServerDetailView extends LocatableVLayout {
-
-// private final CloudGWTServiceAsync cloudManager =
GWTServiceLookup.getCloudService();
- private final int serverId;
-
- private final LocatableSectionStack sectionStack;
- private SectionStackSection detailsSection = null;
- private SectionStackSection helpSection = null;
- private SectionStackSection controlsSection = null;
- private SectionStackSection pluginConfigSection = null;
- private SectionStackSection scheduledJobsSection = null;
- private int initSectionCount = 0;
-
- public ServerDetailView(String locatorId, int serverId) {
- super(locatorId);
- this.serverId = serverId;
- setHeight100();
- setWidth100();
- setOverflow(Overflow.AUTO);
-
- sectionStack = new LocatableSectionStack(extendLocatorId("stack"));
- sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
- sectionStack.setWidth100();
- sectionStack.setHeight100();
- sectionStack.setMargin(5);
- sectionStack.setOverflow(Overflow.VISIBLE);
- }
-
- @Override
- protected void onInit() {
- super.onInit();
-
- GWTServiceLookup.getCloudService().getServerById(this.serverId, new
AsyncCallback<Server>() {
- public void onSuccess(Server server) {
-// prepareDetailsSection(sectionStack, server);
-// prepareHelpSection(sectionStack, server);
-// prepareControlsSection(sectionStack, server);
-// preparePluginConfigurationSection(sectionStack, server);
-// prepareScheduledJobsSection(sectionStack, server);
- }
-
- public void onFailure(Throwable caught) {
-
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
- }
- });
- }
-
- public boolean isInitialized() {
- return initSectionCount >= 5;
- }
-
- @Override
- protected void onDraw() {
- super.onDraw();
-
- // wait until we have all of the sections before we show them. We don't use
InitializableView because,
- // it seems they are not supported (in the applicable renderView()) at this
level.
- new Timer() {
- final long startTime = System.currentTimeMillis();
-
- public void run() {
- if (isInitialized()) {
- if (null != detailsSection) {
- sectionStack.addSection(detailsSection);
- }
- if (null != helpSection) {
- sectionStack.addSection(helpSection);
- }
- if (null != controlsSection) {
- sectionStack.addSection(controlsSection);
- }
- if (null != pluginConfigSection) {
- sectionStack.addSection(pluginConfigSection);
- }
- if (null != scheduledJobsSection) {
- sectionStack.addSection(scheduledJobsSection);
- }
-
- addMember(sectionStack);
- markForRedraw();
-
- } else {
- // don't wait forever, give up after 20s and show what we have
- long elapsedMillis = System.currentTimeMillis() - startTime;
- if (elapsedMillis > 20000) {
- initSectionCount = 5;
- }
- schedule(100); // Reschedule the timer.
- }
- }
- }.run(); // fire the timer immediately
- }
-
- private void prepareControlsSection(final SectionStack stack, final ServerPlugin
plugin) {
- PluginKey pluginKey = PluginKey.createServerPluginKey(plugin.getType(),
plugin.getName());
-
-// pluginManager.getServerPluginControlDefinitions(pluginKey,
-// new AsyncCallback<ArrayList<ServerPluginControlDefinition>>()
{
-// public void onSuccess(ArrayList<ServerPluginControlDefinition>
result) {
-// if (result != null && !result.isEmpty()) {
-// SectionStackSection section = new
SectionStackSection(MSG.view_admin_plugins_serverControls());
-// section.setExpanded(false);
-// section.addItem(new
ServerPluginControlView(extendLocatorId("controlView"), plugin, result));
-//
-// controlsSection = section;
-// }
-// ++initSectionCount;
-// }
-//
-// public void onFailure(Throwable caught) {
-//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
-// }
-// });
- }
-
- private void preparePluginConfigurationSection(final SectionStack stack, final
ServerPlugin plugin) {
- final PluginKey pluginKey = PluginKey.createServerPluginKey(plugin.getType(),
plugin.getName());
-
-// pluginManager.getServerPluginConfigurationDefinition(pluginKey, new
AsyncCallback<ConfigurationDefinition>() {
-// public void onSuccess(ConfigurationDefinition def) {
-// if (def != null) {
-// LocatableVLayout layout = new
LocatableVLayout(extendLocatorId("pcEditorLayout"));
-//
-// ToolStrip buttons = new ToolStrip();
-// buttons.setWidth100();
-// buttons.setExtraSpace(10);
-// buttons.setMembersMargin(5);
-// buttons.setLayoutMargin(5);
-//
-// final IButton saveButtonPC = new
LocatableIButton(extendLocatorId("pcSave"), MSG
-// .common_button_save());
-//
-// final IButton resetButtonPC = new
LocatableIButton(extendLocatorId("pcRest"), MSG
-// .common_button_reset());
-//
-// Configuration config = plugin.getPluginConfiguration();
-// final ConfigurationEditor editorPC = new
ConfigurationEditor(extendLocatorId("pcEdit"), def, config);
-// editorPC.setOverflow(Overflow.AUTO);
-// editorPC.addPropertyValueChangeListener(new
PropertyValueChangeListener() {
-// public void propertyValueChanged(PropertyValueChangeEvent
event) {
-// if (event.isInvalidPropertySetChanged()) {
-// Map<String, String> invalidPropertyNames =
event.getInvalidPropertyNames();
-// if (invalidPropertyNames.isEmpty()) {
-// saveButtonPC.enable();
-// } else {
-// saveButtonPC.disable();
-// }
-// }
-// }
-// });
-//
-// resetButtonPC.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// editorPC.reset();
-// }
-// });
-//
-// saveButtonPC.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// if (!editorPC.validate()) {
-// Message msg = new
Message(MSG.view_admin_plugins_serverConfig_badSettings(),
-// Severity.Warning,
EnumSet.of(Message.Option.Transient));
-// CoreGUI.getMessageCenter().notify(msg);
-// return;
-// }
-//// pluginManager.updateServerPluginConfiguration(pluginKey,
editorPC.getConfiguration(),
-//// new AsyncCallback<Void>() {
-//// public void onSuccess(Void result) {
-//// Message m = new
Message(MSG.view_admin_plugins_serverConfig_settingsSaved());
-//// CoreGUI.getMessageCenter().notify(m);
-//// }
-////
-//// public void onFailure(Throwable caught) {
-//// CoreGUI.getErrorHandler().handleError(
-////
MSG.view_admin_plugins_serverConfig_saveFailed(), caught);
-//// }
-//// });
-// }
-// });
-//
-// buttons.addMember(saveButtonPC);
-// buttons.addMember(resetButtonPC);
-// layout.addMember(buttons);
-// layout.addMember(editorPC);
-//
-// SectionStackSection section = new
SectionStackSection(MSG.view_admin_plugins_serverConfig());
-// section.setExpanded(false);
-// section.setItems(layout);
-//
-// pluginConfigSection = section;
-// }
-//
-// ++initSectionCount;
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
-// }
-// });
- return;
- }
-
- private void prepareScheduledJobsSection(final SectionStack stack, final ServerPlugin
plugin) {
- final PluginKey pluginKey = PluginKey.createServerPluginKey(plugin.getType(),
plugin.getName());
-
-// pluginManager.getServerPluginScheduledJobsDefinition(pluginKey, new
AsyncCallback<ConfigurationDefinition>() {
-// public void onSuccess(ConfigurationDefinition def) {
-// if (def != null) {
-// LocatableVLayout layout = new
LocatableVLayout(extendLocatorId("sjEditorLayout"));
-//
-// ToolStrip buttons = new ToolStrip();
-// buttons.setWidth100();
-// buttons.setExtraSpace(10);
-// buttons.setMembersMargin(5);
-// buttons.setLayoutMargin(5);
-//
-// final IButton saveButtonSJ = new
LocatableIButton(extendLocatorId("sjSave"), MSG
-// .common_button_save());
-// buttons.addMember(saveButtonSJ);
-//
-// final IButton resetButtonSJ = new
LocatableIButton(extendLocatorId("sjRest"), MSG
-// .common_button_reset());
-// buttons.addMember(resetButtonSJ);
-//
-// Configuration config = plugin.getScheduledJobsConfiguration();
-// final ConfigurationEditor editorSJ = new
ConfigurationEditor(extendLocatorId("sjEdit"), def, config);
-// editorSJ.setOverflow(Overflow.AUTO);
-// editorSJ.addPropertyValueChangeListener(new
PropertyValueChangeListener() {
-// public void propertyValueChanged(PropertyValueChangeEvent
event) {
-// if (event.isInvalidPropertySetChanged()) {
-// Map<String, String> invalidPropertyNames =
event.getInvalidPropertyNames();
-// if (invalidPropertyNames.isEmpty()) {
-// saveButtonSJ.enable();
-// } else {
-// saveButtonSJ.disable();
-// }
-// }
-// }
-// });
-//
-// resetButtonSJ.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// editorSJ.reset();
-// }
-// });
-//
-// saveButtonSJ.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// if (!editorSJ.validate()) {
-// Message msg = new
Message(MSG.view_admin_plugins_serverConfig_badSettings(),
-// Severity.Warning,
EnumSet.of(Message.Option.Transient));
-// CoreGUI.getMessageCenter().notify(msg);
-// return;
-// }
-//// pluginManager.updateServerPluginScheduledJobs(pluginKey,
editorSJ.getConfiguration(),
-//// new AsyncCallback<Void>() {
-//// public void onSuccess(Void result) {
-//// Message m = new
Message(MSG.view_admin_plugins_serverConfig_settingsSaved());
-//// CoreGUI.getMessageCenter().notify(m);
-//// }
-////
-//// public void onFailure(Throwable caught) {
-//// CoreGUI.getErrorHandler().handleError(
-////
MSG.view_admin_plugins_serverConfig_saveFailed(), caught);
-//// }
-//// });
-// }
-// });
-//
-// layout.addMember(buttons);
-// layout.addMember(editorSJ);
-//
-// SectionStackSection section = new
SectionStackSection(MSG.view_admin_plugins_serverScheduleJobs());
-// section.setExpanded(false);
-// section.setItems(layout);
-//
-// scheduledJobsSection = section;
-// }
-//
-// ++initSectionCount;
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
-// }
-// });
- return;
- }
-
- private void prepareHelpSection(SectionStack stack, ServerPlugin plugin) {
- if (plugin.getHelp() != null && plugin.getHelp().length() > 0) {
- SectionStackSection section = new
SectionStackSection(MSG.common_title_help());
- section.setExpanded(true);
- Label help = new Label(plugin.getHelp());
- section.setItems(help);
-
- helpSection = section;
- }
-
- ++initSectionCount;
- return;
- }
-
- private void prepareDetailsSection(SectionStack stack, ServerPlugin plugin) {
- LocatableDynamicForm form = new
LocatableDynamicForm(extendLocatorId("detailsForm"));
- form.setMargin(10);
- form.setWidth100();
- form.setWrapItemTitles(false);
- form.setNumCols(4);
-
- StaticTextItem nameItem = new StaticTextItem("name",
MSG.common_title_name());
- nameItem.setValue(plugin.getName());
-
- StaticTextItem displayNameItem = new StaticTextItem("displayName",
MSG.common_title_display_name());
- displayNameItem.setValue(plugin.getDisplayName());
-
- StaticTextItem versionItem = new StaticTextItem("version",
MSG.common_title_version());
- versionItem.setValue(plugin.getVersion());
-
- StaticTextItem md5Item = new StaticTextItem("MD5", "MD5");
- md5Item.setValue(plugin.getMD5());
-
- StaticTextItem pathItem = new StaticTextItem("path",
MSG.common_title_path());
- pathItem.setValue(plugin.getPath());
-
- StaticTextItem ampsItem = new StaticTextItem("ampsVersion", "AMPS
" + MSG.common_title_version());
- ampsItem.setValue(plugin.getAmpsVersion());
-
- StaticTextItem descItem = new StaticTextItem("desc",
MSG.common_title_description());
- descItem.setValue(plugin.getDescription());
-
- StaticTextItem mtimeItem = new StaticTextItem("mtime",
MSG.common_title_lastUpdated());
-
mtimeItem.setValue(TimestampCellFormatter.format(Long.valueOf(plugin.getMtime()),
- TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM));
-
- StaticTextItem kindItem = new StaticTextItem("kind",
MSG.common_title_kind());
- switch (plugin.getDeployment()) {
- case AGENT:
- kindItem.setValue(MSG.view_admin_plugins_agent());
- break;
- case SERVER:
- kindItem.setValue(MSG.view_admin_plugins_server());
- break;
- }
-
- CanvasItem enabledItem = new CanvasItem("enabled",
MSG.common_title_enabled());
- Img img = new Img(ImageManager.getAvailabilityIcon(plugin.isEnabled()), 16, 16);
- enabledItem.setCanvas(img);
-
- StaticTextItem typeItem = new StaticTextItem("type",
MSG.common_title_type());
- typeItem.setValue(plugin.getType());
-
- form.setItems(displayNameItem, nameItem, versionItem, ampsItem, md5Item,
kindItem, descItem, pathItem,
- mtimeItem, enabledItem, typeItem);
-
- SectionStackSection section = new
SectionStackSection(MSG.common_title_details());
- section.setExpanded(true);
- section.setItems(form);
-
- detailsSection = section;
- ++initSectionCount;
-
- return;
- }
-}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
deleted file mode 100644
index 57b6d1c..0000000
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.data.DSRequest;
-import com.smartgwt.client.data.DSResponse;
-import com.smartgwt.client.data.DataSourceField;
-import com.smartgwt.client.data.Record;
-import com.smartgwt.client.data.fields.DataSourceIntegerField;
-import com.smartgwt.client.types.SortDirection;
-import com.smartgwt.client.util.BooleanCallback;
-import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.grid.ListGrid;
-import com.smartgwt.client.widgets.grid.ListGridField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
-
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
-import org.rhq.core.domain.criteria.Criteria;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageOrdering;
-import org.rhq.enterprise.gui.coregui.client.IconEnum;
-import org.rhq.enterprise.gui.coregui.client.admin.ServerTableView.CloudDataSource;
-import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
-import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
-import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-
-/**
- * @author Jiri Kremser
- */
-public class ServerTableView extends TableSection<CloudDataSource> {
-
- public static final ViewName VIEW_ID = new ViewName("Servers",
MSG.view_adminTopology_servers(), IconEnum.SERVERS);
- public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
- + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
-
- private static final String FIELD_ID = "id";
- private static final String FIELD_NAME = "name";
- private static final String FIELD_MODE = "operationMode";
- private static final String FIELD_ENDPOINT_ADDRESS = "address";
- private static final String FIELD_NONSECURE_PORT = "port";
- private static final String FIELD_SECURE_PORT = "securePort";
- private static final String FIELD_LAST_UPDATE_TIME = "mtime";
- private static final String FIELD_AFFINITY_GROUP = "affinityGroup";
- private static final String FIELD_AGENT_COUNT = "agentCount";
-
-// private boolean showUndeployed = false;
-
- public ServerTableView(String locatorId) {
- super(locatorId, null);
- setHeight100();
- setWidth100();
- setDataSource(new CloudDataSource());
- }
-
- @Override
- protected void configureTable() {
- List<ListGridField> fields = getDataSource().getListGridFields();
- ListGrid listGrid = getListGrid();
- listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
- listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
-
- addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(), MSG.common_msg_areYouSure(),
- new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
- public void executeAction(ListGridRecord[] selections, Object
actionValue) {
- int[] selectedIds = getSelectedIds(selections);
- SC.say("setting servers to normal mode, ids: " +
selectedIds);
-//
GWTServiceLookup.getPluginService().enableServerPlugins(selectedIds,
-// new AsyncCallback<ArrayList<String>>() {
-// @Override
-// public void onSuccess(ArrayList<String> result) {
-// Message msg = new Message(
-//
MSG.view_admin_plugins_enabledServerPlugins(result.toString()), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-//
MSG.view_admin_plugins_enabledServerPluginsFailure() + " " +
caught.getMessage(),
-// caught);
-// refreshTableInfo();
-// }
-// });
- }
- });
-
- addTableAction(extendLocatorId("setMaintenance"),
MSG.view_adminTopology_server_setMaintenance(), new AuthorizedTableAction(this,
- TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
- public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
- ArrayList<String> selectedNames = getSelectedNames(selections);
- String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
- SC.ask(message, new BooleanCallback() {
- public void execute(Boolean confirmed) {
- if (confirmed) {
- int[] selectedIds = getSelectedIds(selections);
- SC.say("setting servers to maintenance mode, ids: "
+ selectedIds);
-//
GWTServiceLookup.getPluginService().disableServerPlugins(selectedIds,
-// new AsyncCallback<ArrayList<String>>() {
-// @Override
-// public void onSuccess(ArrayList<String>
result) {
-// Message msg = new
Message(MSG.view_admin_plugins_disabledServerPlugins(result
-// .toString()), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-//
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
-// + caught.getMessage(), caught);
-// refreshTableInfo();
-// }
-// });
- } else {
- refreshTableInfo();
- }
- }
- });
- }
- });
-
-
- addTableAction(extendLocatorId("removeSelected"),
MSG.view_adminTopology_server_removeSelected(), MSG.common_msg_areYouSure(),
- new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
- public void executeAction(ListGridRecord[] selections, Object
actionValue) {
- int[] selectedIds = getSelectedIds(selections);
- SC.say("removing servers with ids: " + selectedIds);
-// GWTServiceLookup.getCloudService().purgeServerPlugins(selectedIds,
-// new AsyncCallback<ArrayList<String>>() {
-// @Override
-// public void onSuccess(ArrayList<String> result) {
-// Message msg = new Message(
-//
MSG.view_admin_plugins_purgedServerPlugins(result.toString()), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-// MSG.view_admin_plugins_purgedServerPluginsFailure()
+ " " + caught.getMessage(),
-// caught);
-// refreshTableInfo();
-// }
-// });
- }
- });
-
-// IButton scanForUpdatesButton = new
LocatableIButton(extendLocatorId("scanButton"),
-// MSG.view_admin_plugins_scan());
-// scanForUpdatesButton.setAutoFit(true);
-// scanForUpdatesButton.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// GWTServiceLookup.getPluginService().scanAndRegister(new
AsyncCallback<Void>() {
-// @Override
-// public void onSuccess(Void result) {
-// Message msg = new
Message(MSG.view_admin_plugins_scanComplete(), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-// MSG.view_admin_plugins_scanFailure() + " " +
caught.getMessage(), caught);
-// refreshTableInfo();
-// }
-// });
-// }
-// });
-
-// IButton restartMasterPCButton = new
LocatableIButton(extendLocatorId("restartMasterPCButton"),
-// MSG.view_admin_plugins_restartMasterPC());
-// restartMasterPCButton.setAutoFit(true);
-// restartMasterPCButton.addClickHandler(new ClickHandler() {
-// public void onClick(ClickEvent event) {
-// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCStarted(), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-//
-// GWTServiceLookup.getPluginService().restartMasterPluginContainer(new
AsyncCallback<Void>() {
-// @Override
-// public void onSuccess(Void result) {
-// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCComplete(), Severity.Info);
-// CoreGUI.getMessageCenter().notify(msg);
-// refresh();
-// }
-//
-// @Override
-// public void onFailure(Throwable caught) {
-// CoreGUI.getErrorHandler().handleError(
-// MSG.view_admin_plugins_restartMasterPCFailure() + "
" + caught.getMessage(), caught);
-// refreshTableInfo();
-// }
-// });
-// }
-// });
-
-// PluginFileUploadForm pluginUploadForm = new
PluginFileUploadForm(extendLocatorId("upload"),
-// MSG.view_admin_plugins_upload(), true);
-
-// addExtraWidget(scanForUpdatesButton, true);
-// addExtraWidget(restartMasterPCButton, true);
-// addExtraWidget(pluginUploadForm, true);
-
- super.configureTable();
- }
-
- @Override
- public Canvas getDetailsView(Integer id) {
- return new ServerDetailView(extendLocatorId("detailsView"), id);
- }
-
- private int[] getSelectedIds(ListGridRecord[] selections) {
- if (selections == null) {
- return new int[0];
- }
- int[] ids = new int[selections.length];
- int i = 0;
- for (ListGridRecord selection : selections) {
- ids[i++] = selection.getAttributeAsInt(FIELD_ID);
- }
- return ids;
- }
-
- private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
- if (selections == null) {
- return new ArrayList<String>(0);
- }
- ArrayList<String> ids = new ArrayList<String>(selections.length);
- for (ListGridRecord selection : selections) {
- ids.add(selection.getAttributeAsString(FIELD_NAME));
- }
- return ids;
- }
-
- public class CloudDataSource extends RPCDataSource<ServerWithAgentCountComposite,
Criteria> {
-
- public CloudDataSource() {
- super();
- List<DataSourceField> fields = addDataSourceFields();
- addFields(fields);
- }
-
- @Override
- protected List<DataSourceField> addDataSourceFields() {
- List<DataSourceField> fields = super.addDataSourceFields();
- DataSourceField idField = new DataSourceIntegerField(FIELD_ID,
MSG.common_title_id(), 50);
- idField.setPrimaryKey(true);
- idField.setHidden(true);
- fields.add(idField);
- return fields;
- }
-
- public List<ListGridField> getListGridFields() {
- List<ListGridField> fields = new ArrayList<ListGridField>();
-
- ListGridField idField = new ListGridField(FIELD_ID, MSG.common_title_id());
- idField.setHidden(true);
- fields.add(idField);
-
- ListGridField nameField = new ListGridField(FIELD_NAME,
MSG.common_title_name());
- fields.add(nameField);
-
- ListGridField modeField = new ListGridField(FIELD_MODE,
MSG.view_adminTopology_server_mode());
- fields.add(modeField);
-
- ListGridField endpointAddressField = new
ListGridField(FIELD_ENDPOINT_ADDRESS,
- MSG.view_adminTopology_server_endpointAddress());
- // TimestampCellFormatter.prepareDateField(endpointAddressField);
- fields.add(endpointAddressField);
-
- ListGridField nonsecurePortField = new ListGridField(FIELD_NONSECURE_PORT,
- MSG.view_adminTopology_server_nonSecurePort());
- // enabledField.setType(ListGridFieldType.IMAGE);
- // enabledField.setAlign(Alignment.CENTER);
- fields.add(nonsecurePortField);
-
- ListGridField securedPortField = new ListGridField(FIELD_SECURE_PORT,
- MSG.view_adminTopology_server_securePort());
- // deployedField.setType(ListGridFieldType.IMAGE);
- // deployedField.setAlign(Alignment.CENTER);
- // deployedField.setHidden(true);
- fields.add(securedPortField);
-
- ListGridField lastUpdateTimeField = new
ListGridField(FIELD_LAST_UPDATE_TIME,
- MSG.view_adminTopology_server_lastUpdateTime());
- TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
- fields.add(lastUpdateTimeField);
-
- ListGridField affinityGroupField = new ListGridField(FIELD_AFFINITY_GROUP,
- MSG.view_adminTopology_server_affinityGroup());
- fields.add(affinityGroupField);
-
- ListGridField agentCountField = new ListGridField(FIELD_AGENT_COUNT,
- MSG.view_adminTopology_server_agentCount());
- fields.add(agentCountField);
-
- idField.setWidth(100);
- nameField.setWidth("30%");
- modeField.setWidth("*");
- endpointAddressField.setWidth("20%");
- nonsecurePortField.setWidth(65);
- securedPortField.setWidth(75);
- lastUpdateTimeField.setWidth(100);
-
- return fields;
- }
-
- @Override
- protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
- final PageControl pc = getPageControl(request);
-
- GWTServiceLookup.getCloudService().getServers(pc, new
AsyncCallback<List<ServerWithAgentCountComposite>>() {
- public void onSuccess(List<ServerWithAgentCountComposite> result)
{
- response.setData(buildRecords(result));
- response.setTotalRows(result.size());
- processResponse(request.getRequestId(), response);
- }
-
- @Override
- public void onFailure(Throwable t) {
- //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
- });
- }
-
- /**
- * Returns a prepopulated PageControl based on the provided DSRequest. This will
set sort fields,
- * pagination, but *not* filter fields.
- *
- * @param request the request to turn into a page control
- * @return the page control for passing to criteria and other queries
- */
- protected PageControl getPageControl(DSRequest request) {
- // Initialize paging.
- PageControl pageControl = new PageControl(0, getDataPageSize());
-
- // Initialize sorting.
- String sortBy = request.getAttribute("sortBy");
- if (sortBy != null) {
- String[] sorts = sortBy.split(",");
- for (String sort : sorts) {
- PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
- String columnName = (ordering == PageOrdering.DESC) ?
sort.substring(1) : sort;
- pageControl.addDefaultOrderingField(columnName, ordering);
- }
- }
-
- return pageControl;
- }
-
- @Override
- public ServerWithAgentCountComposite copyValues(Record from) {
- throw new UnsupportedOperationException(
- "ServerTableView.CloudDataSourcepublic Server copyValues(Record
from)");
- }
-
- @Override
- public ListGridRecord copyValues(ServerWithAgentCountComposite from) {
- ListGridRecord record = new ListGridRecord();
- record.setAttribute(FIELD_ID, from.getServer().getId());
- record.setAttribute(FIELD_NAME, from.getServer().getName());
- record.setAttribute(FIELD_MODE, from.getServer().getOperationMode());
- record.setAttribute(FIELD_ENDPOINT_ADDRESS, from.getServer().getAddress());
- record.setAttribute(FIELD_NONSECURE_PORT, from.getServer().getPort());
- record.setAttribute(FIELD_SECURE_PORT, from.getServer().getSecurePort());
- record.setAttribute(FIELD_LAST_UPDATE_TIME, from.getServer().getMtime());
- record.setAttribute(FIELD_AFFINITY_GROUP,
from.getServer().getAffinityGroup());
- record.setAttribute(FIELD_AGENT_COUNT, from.getAgentCount());
- return record;
- }
-
- @Override
- protected Criteria getFetchCriteria(DSRequest request) {
- // we don't use criteria for this datasource, just return null
- return null;
- }
- }
-
-}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
new file mode 100644
index 0000000..3cfac98
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
@@ -0,0 +1,214 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_CTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_SECURE_PORT;
+
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.RecordList;
+import com.smartgwt.client.types.Overflow;
+import com.smartgwt.client.types.VisibilityMode;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.form.fields.ButtonItem;
+import com.smartgwt.client.widgets.form.fields.SelectItem;
+import com.smartgwt.client.widgets.form.fields.StaticTextItem;
+import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
+import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.layout.SectionStack;
+import com.smartgwt.client.widgets.layout.SectionStackSection;
+
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * Shows details of a server.
+ *
+ * @author Jiri Kremser
+ */
+public class ServerDetailView extends LocatableVLayout {
+
+ // private final CloudGWTServiceAsync cloudManager =
GWTServiceLookup.getCloudService();
+ private final int serverId;
+
+ private final LocatableSectionStack sectionStack;
+ private SectionStackSection detailsSection = null;
+ private SectionStackSection agentSection = null;
+
+ private int initSectionCount = 0;
+
+ public ServerDetailView(String locatorId, int serverId) {
+ super(locatorId);
+ this.serverId = serverId;
+ setHeight100();
+ setWidth100();
+ setOverflow(Overflow.AUTO);
+
+ sectionStack = new LocatableSectionStack(extendLocatorId("stack"));
+ sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
+ sectionStack.setWidth100();
+ sectionStack.setHeight100();
+ sectionStack.setMargin(5);
+ sectionStack.setOverflow(Overflow.VISIBLE);
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ GWTServiceLookup.getCloudService().getServerById(this.serverId, new
AsyncCallback<Server>() {
+ public void onSuccess(Server server) {
+ prepareDetailsSection(sectionStack, server);
+ preparAgentSection(sectionStack, server);
+ }
+
+ public void onFailure(Throwable caught) {
+
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+ }
+ });
+ }
+
+ public boolean isInitialized() {
+// return initSectionCount >= 5;
+ return true;
+ }
+
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+
+ // wait until we have all of the sections before we show them. We don't use
InitializableView because,
+ // it seems they are not supported (in the applicable renderView()) at this
level.
+ new Timer() {
+ final long startTime = System.currentTimeMillis();
+
+ public void run() {
+ if (isInitialized()) {
+ if (null != detailsSection) {
+ sectionStack.addSection(detailsSection);
+ }
+ if (null != agentSection) {
+ sectionStack.addSection(agentSection);
+ }
+
+ addMember(sectionStack);
+ markForRedraw();
+
+ } else {
+ // don't wait forever, give up after 20s and show what we have
+ long elapsedMillis = System.currentTimeMillis() - startTime;
+ if (elapsedMillis > 20000) {
+ initSectionCount = 5;
+ }
+ schedule(100); // Reschedule the timer.
+ }
+ }
+ }.run(); // fire the timer immediately
+ }
+
+ private void preparAgentSection(SectionStack stack, Server server) {
+ SectionStackSection section = new
SectionStackSection(MSG.view_adminTopology_serverDetail_connectedAgents());
+ section.setExpanded(true);
+ Label help = new Label("agents grid..");
+ section.setItems(help);
+ ListGrid agentGrid = new ListGrid();
+
+ stack.addSection(section);
+ agentSection = section;
+ ++initSectionCount;
+ return;
+ }
+
+ private void prepareDetailsSection(SectionStack stack, Server server) {
+ final LocatableDynamicForm form = new
LocatableDynamicForm(extendLocatorId("detailsForm"));
+ form.setMargin(10);
+ form.setWidth100();
+ form.setWrapItemTitles(false);
+ form.setNumCols(2);
+
+ StaticTextItem nameItem = new StaticTextItem(FIELD_NAME.propertyName(),
FIELD_NAME.title());
+ nameItem.setValue(server.getName());
+
+ TextItem addressItem = new TextItem(FIELD_ADDRESS.propertyName(),
FIELD_ADDRESS.title());
+ addressItem.setValue(server.getAddress());
+
+ TextItem portItem = new TextItem(FIELD_PORT.propertyName(), FIELD_PORT.title());
+ portItem.setValue(server.getPort());
+
+ TextItem securePortItem = new TextItem(FIELD_SECURE_PORT.propertyName(),
FIELD_SECURE_PORT.title());
+ securePortItem.setValue(server.getSecurePort());
+
+ SelectItem operationModeItem = new
SelectItem(FIELD_OPERATION_MODE.propertyName(),
+ MSG.view_adminTopology_serverDetail_operationMode());
+ operationModeItem.setValueMap("NORMAL", "MAINTENANCE");
+ operationModeItem.setValue(server.getOperationMode());
+
+ StaticTextItem affinityGroupItem = new
StaticTextItem(FIELD_AFFINITY_GROUP.propertyName(),
+ FIELD_AFFINITY_GROUP.title());
+ affinityGroupItem.setValue(server.getAffinityGroup());
+
+ StaticTextItem installationDateItem = new
StaticTextItem(FIELD_CTIME.propertyName(), FIELD_CTIME.title());
+
installationDateItem.setValue(TimestampCellFormatter.format(Long.valueOf(server.getCtime()),
+ TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM));
+
+ StaticTextItem lastUpdatetem = new StaticTextItem(FIELD_MTIME.propertyName(),
FIELD_MTIME.title());
+
lastUpdatetem.setValue(TimestampCellFormatter.format(Long.valueOf(server.getMtime()),
+ TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM));
+
+ ButtonItem saveButton = new ButtonItem();
+ saveButton.setOverflow(Overflow.VISIBLE);
+ saveButton.setTitle(MSG.common_button_save());
+ saveButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ RecordList list = form.getRecordList();
+ SC.say("name is " +
list.get(0).getAttribute("name"));
+ }
+ });
+
+ form.setItems(nameItem, addressItem, portItem, securePortItem, operationModeItem,
affinityGroupItem,
+ installationDateItem, lastUpdatetem, saveButton);
+
+
+ SectionStackSection section = new
SectionStackSection(MSG.common_title_details());
+ section.setExpanded(true);
+ section.setItems(form);
+
+ stack.addSection(section);
+ detailsSection = section;
+ ++initSectionCount;
+
+ return;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDataourceField.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDataourceField.java
new file mode 100644
index 0000000..5e57aa0
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDataourceField.java
@@ -0,0 +1,83 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public enum ServerNodeDataourceField {
+
+ FIELD_ID("id", CoreGUI.getMessages().common_title_id()),
+
+ FIELD_NAME("name", CoreGUI.getMessages().common_title_name()),
+
+ FIELD_OPERATION_MODE("operationMode",
CoreGUI.getMessages().view_adminTopology_server_mode()),
+
+ FIELD_ADDRESS("address",
CoreGUI.getMessages().view_adminTopology_server_endpointAddress()),
+
+ FIELD_PORT("port",
CoreGUI.getMessages().view_adminTopology_server_nonSecurePort()),
+
+ FIELD_SECURE_PORT("securePort",
CoreGUI.getMessages().view_adminTopology_server_securePort()),
+
+ FIELD_CTIME("ctime",
CoreGUI.getMessages().view_adminTopology_serverDetail_installationDate()),
+
+ FIELD_MTIME("mtime",
CoreGUI.getMessages().view_adminTopology_server_lastUpdateTime()),
+
+ FIELD_AFFINITY_GROUP("affinityGroup",
CoreGUI.getMessages().view_adminTopology_server_affinityGroup()),
+
+ FIELD_AGENT_COUNT("agentCount",
CoreGUI.getMessages().view_adminTopology_server_agentCount());
+
+ /**
+ * Corresponds to a property name of Server (e.g. operationMode).
+ */
+ private String propertyName;
+
+ /**
+ * The table header for the field or property (e.g. Mode).
+ */
+ private String title;
+
+ private ServerNodeDataourceField(String propertyName, String title) {
+ this.propertyName = propertyName;
+ this.title = title;
+ }
+
+ public String propertyName() {
+ return propertyName;
+ }
+
+ public String title() {
+ return title;
+ }
+
+ public ListGridField getListGridField() {
+ return new ListGridField(propertyName, title);
+ }
+
+ public ListGridField getListGridField(String width) {
+ ListGridField field = new ListGridField(propertyName, title);
+ field.setWidth(width);
+ return field;
+ }
+}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
new file mode 100644
index 0000000..25ada4e
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerNodeDatasource.java
@@ -0,0 +1,166 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_ADDRESS;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_AFFINITY_GROUP;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_AGENT_COUNT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_ID;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_MTIME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_NAME;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_OPERATION_MODE;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_PORT;
+import static
org.rhq.enterprise.gui.coregui.client.admin.topology.ServerNodeDataourceField.FIELD_SECURE_PORT;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceIntegerField;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.criteria.Criteria;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author Jirka Kremser
+ *
+ */
+public class ServerNodeDatasource extends RPCDataSource<ServerWithAgentCountComposite,
Criteria> {
+
+ public ServerNodeDatasource() {
+ super();
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+ DataSourceField idField = new DataSourceIntegerField(FIELD_ID.propertyName(),
FIELD_ID.title(), 50);
+ idField.setPrimaryKey(true);
+ idField.setHidden(true);
+ fields.add(idField);
+ return fields;
+ }
+
+ public List<ListGridField> getListGridFields() {
+ List<ListGridField> fields = new ArrayList<ListGridField>();
+
+ ListGridField idField = FIELD_ID.getListGridField();
+ idField.setHidden(true);
+ fields.add(idField);
+
+ fields.add(FIELD_NAME.getListGridField("*"));
+ fields.add(FIELD_OPERATION_MODE.getListGridField("90"));
+ fields.add(FIELD_ADDRESS.getListGridField("20%"));
+ fields.add(FIELD_PORT.getListGridField("90"));
+ fields.add(FIELD_SECURE_PORT.getListGridField("75"));
+
+ ListGridField lastUpdateTimeField =
FIELD_MTIME.getListGridField("20%");
+ TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
+ fields.add(lastUpdateTimeField);
+
+ fields.add(FIELD_AFFINITY_GROUP.getListGridField("80"));
+ fields.add(FIELD_AGENT_COUNT.getListGridField("75"));
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
+ final PageControl pc = getPageControl(request);
+
+ GWTServiceLookup.getCloudService().getServers(pc, new
AsyncCallback<List<ServerWithAgentCountComposite>>() {
+ public void onSuccess(List<ServerWithAgentCountComposite> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+
+ /**
+ * Returns a prepopulated PageControl based on the provided DSRequest. This will set
sort fields,
+ * pagination, but *not* filter fields.
+ *
+ * @param request the request to turn into a page control
+ * @return the page control for passing to criteria and other queries
+ */
+ protected PageControl getPageControl(DSRequest request) {
+ // Initialize paging.
+ PageControl pageControl = new PageControl(0, getDataPageSize());
+
+ // Initialize sorting.
+ String sortBy = request.getAttribute("sortBy");
+ if (sortBy != null) {
+ String[] sorts = sortBy.split(",");
+ for (String sort : sorts) {
+ PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
+ String columnName = (ordering == PageOrdering.DESC) ? sort.substring(1) :
sort;
+ pageControl.addDefaultOrderingField(columnName, ordering);
+ }
+ }
+
+ return pageControl;
+ }
+
+ @Override
+ public ServerWithAgentCountComposite copyValues(Record from) {
+ throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ }
+
+ @Override
+ public ListGridRecord copyValues(ServerWithAgentCountComposite from) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute(FIELD_ID.propertyName(), from.getServer().getId());
+ record.setAttribute(FIELD_NAME.propertyName(), from.getServer().getName());
+ record.setAttribute(FIELD_OPERATION_MODE.propertyName(),
from.getServer().getOperationMode());
+ record.setAttribute(FIELD_ADDRESS.propertyName(),
from.getServer().getAddress());
+ record.setAttribute(FIELD_PORT.propertyName(), from.getServer().getPort());
+ record.setAttribute(FIELD_SECURE_PORT.propertyName(),
from.getServer().getSecurePort());
+ record.setAttribute(FIELD_MTIME.propertyName(), from.getServer().getMtime());
+ record.setAttribute(FIELD_AFFINITY_GROUP.propertyName(),
from.getServer().getAffinityGroup());
+ record.setAttribute(FIELD_AGENT_COUNT.propertyName(), from.getAgentCount());
+ return record;
+ }
+
+ @Override
+ protected Criteria getFetchCriteria(DSRequest request) {
+ // we don't use criteria for this datasource, just return null
+ return null;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
new file mode 100644
index 0000000..e5bbbaf
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
@@ -0,0 +1,243 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin.topology;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.smartgwt.client.types.SortDirection;
+import com.smartgwt.client.util.BooleanCallback;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.authz.Permission;
+import org.rhq.enterprise.gui.coregui.client.IconEnum;
+import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
+import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+
+/**
+ * @author Jiri Kremser
+ */
+public class ServerTableView extends TableSection<ServerNodeDatasource> {
+
+ public static final ViewName VIEW_ID = new ViewName("Servers(GWT)",
MSG.view_adminTopology_servers()+"(GWT)", IconEnum.SERVERS);
+ public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
+
+// private boolean showUndeployed = false;
+
+ public ServerTableView(String locatorId) {
+ super(locatorId, MSG.view_adminTopology_servers()+"(GWT)");
+ setHeight100();
+ setWidth100();
+ setDataSource(new ServerNodeDatasource());
+ }
+
+ @Override
+ protected void configureTable() {
+ List<ListGridField> fields = getDataSource().getListGridFields();
+ ListGrid listGrid = getListGrid();
+ listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
+ listGrid.sort(ServerNodeDataourceField.FIELD_NAME.propertyName(),
SortDirection.ASCENDING);
+
+ addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(), MSG.common_msg_areYouSure(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
+ public void executeAction(ListGridRecord[] selections, Object
actionValue) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to normal mode, ids: " +
selectedIds);
+//
GWTServiceLookup.getPluginService().enableServerPlugins(selectedIds,
+// new AsyncCallback<ArrayList<String>>() {
+// @Override
+// public void onSuccess(ArrayList<String> result) {
+// Message msg = new Message(
+//
MSG.view_admin_plugins_enabledServerPlugins(result.toString()), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+//
MSG.view_admin_plugins_enabledServerPluginsFailure() + " " +
caught.getMessage(),
+// caught);
+// refreshTableInfo();
+// }
+// });
+ }
+ });
+
+ addTableAction(extendLocatorId("setMaintenance"),
MSG.view_adminTopology_server_setMaintenance(), new AuthorizedTableAction(this,
+ TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ ArrayList<String> selectedNames = getSelectedNames(selections);
+ String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("setting servers to maintenance mode, ids: "
+ selectedIds);
+//
GWTServiceLookup.getPluginService().disableServerPlugins(selectedIds,
+// new AsyncCallback<ArrayList<String>>() {
+// @Override
+// public void onSuccess(ArrayList<String>
result) {
+// Message msg = new
Message(MSG.view_admin_plugins_disabledServerPlugins(result
+// .toString()), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+//
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+// + caught.getMessage(), caught);
+// refreshTableInfo();
+// }
+// });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
+
+
+ addTableAction(extendLocatorId("removeSelected"),
MSG.view_adminTopology_server_removeSelected(), MSG.common_msg_areYouSure(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
+ public void executeAction(ListGridRecord[] selections, Object
actionValue) {
+ int[] selectedIds = getSelectedIds(selections);
+ SC.say("removing servers with ids: " + selectedIds);
+// GWTServiceLookup.getCloudService().purgeServerPlugins(selectedIds,
+// new AsyncCallback<ArrayList<String>>() {
+// @Override
+// public void onSuccess(ArrayList<String> result) {
+// Message msg = new Message(
+//
MSG.view_admin_plugins_purgedServerPlugins(result.toString()), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+// MSG.view_admin_plugins_purgedServerPluginsFailure()
+ " " + caught.getMessage(),
+// caught);
+// refreshTableInfo();
+// }
+// });
+ }
+ });
+
+// IButton scanForUpdatesButton = new
LocatableIButton(extendLocatorId("scanButton"),
+// MSG.view_admin_plugins_scan());
+// scanForUpdatesButton.setAutoFit(true);
+// scanForUpdatesButton.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// GWTServiceLookup.getPluginService().scanAndRegister(new
AsyncCallback<Void>() {
+// @Override
+// public void onSuccess(Void result) {
+// Message msg = new
Message(MSG.view_admin_plugins_scanComplete(), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+// MSG.view_admin_plugins_scanFailure() + " " +
caught.getMessage(), caught);
+// refreshTableInfo();
+// }
+// });
+// }
+// });
+
+// IButton restartMasterPCButton = new
LocatableIButton(extendLocatorId("restartMasterPCButton"),
+// MSG.view_admin_plugins_restartMasterPC());
+// restartMasterPCButton.setAutoFit(true);
+// restartMasterPCButton.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCStarted(), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+//
+// GWTServiceLookup.getPluginService().restartMasterPluginContainer(new
AsyncCallback<Void>() {
+// @Override
+// public void onSuccess(Void result) {
+// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCComplete(), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+// MSG.view_admin_plugins_restartMasterPCFailure() + "
" + caught.getMessage(), caught);
+// refreshTableInfo();
+// }
+// });
+// }
+// });
+
+// PluginFileUploadForm pluginUploadForm = new
PluginFileUploadForm(extendLocatorId("upload"),
+// MSG.view_admin_plugins_upload(), true);
+
+// addExtraWidget(scanForUpdatesButton, true);
+// addExtraWidget(restartMasterPCButton, true);
+// addExtraWidget(pluginUploadForm, true);
+
+ super.configureTable();
+ }
+
+ @Override
+ public Canvas getDetailsView(Integer id) {
+ return new ServerDetailView(extendLocatorId("detailsView"), id);
+ }
+
+ private int[] getSelectedIds(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new int[0];
+ }
+ int[] ids = new int[selections.length];
+ int i = 0;
+ for (ListGridRecord selection : selections) {
+ ids[i++] = selection.getAttributeAsInt(FIELD_ID);
+ }
+ return ids;
+ }
+
+ private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new ArrayList<String>(0);
+ }
+ ArrayList<String> ids = new ArrayList<String>(selections.length);
+ for (ListGridRecord selection : selections) {
+ ids.add(selection.getAttributeAsString(FIELD_NAME));
+ }
+ return ids;
+ }
+
+
+
+}
commit a819562f809b7ca59c4f9b39c779df7abdb84704
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 13:14:48 2012 +0100
Add more excludes for the mem pools
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
index 0bf2796..374748d 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
@@ -58,7 +58,9 @@ public class GenericJBossAS7PluginTest extends
AbstractJBossAS7PluginTest {
// are not exposed, it is normal that the server returns 'undefined' for
the value
// Note that those
excludedMetricNamesByType.put(new ResourceType("Memory Pool
Resource",PLUGIN_NAME, ResourceCategory.SERVICE,null),
- new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage"});
+ new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage",
+
"collection-usage-threshold-exceeded","collection-usage:committed","collection-usage:init",
+
"collection-usage:max","collection-usage:used","usage-threshold-count","usage-threshold-exceeded"});
assertAllNumericMetricsAndTraitsHaveNonNullValues(excludedMetricNamesByType);
}
commit 22e30a3ff434e1193ef84ce6fa0ae7eb0dc2cbec
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 11:41:25 2012 +0100
Make message more clear in case of failure.
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
index bb1eca2..130f7f3 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/nonpc/AbstractIntegrationTest.java
@@ -100,7 +100,7 @@ public abstract class AbstractIntegrationTest {
assert node != null : "No result from upload - node was null";
assert node.has("outcome") : "No outcome from upload";
String outcome = node.get("outcome").getTextValue();
- assert outcome.equals("success") : "Upload was no success" +
outcome;
+ assert outcome.equals("success") : "Upload was no success, but:
[" + outcome + "]";
JsonNode resultNode = node.get("result");
return resultNode.get("BYTES_VALUE").getTextValue();
commit c9d13f6b1cc8745c11e047be4c55786a8b9ca16c
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 22 09:10:41 2012 +0100
Add some excluded metrics, as they may indeed return null.
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
index 2b7ec7a..0bf2796 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/GenericJBossAS7PluginTest.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.testng.annotations.Test;
+import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.plugin.testutil.AbstractAgentPluginTest;
import org.rhq.modules.plugins.jbossas7.itest.domain.ManagedServerTest;
@@ -53,6 +54,11 @@ public class GenericJBossAS7PluginTest extends
AbstractJBossAS7PluginTest {
// It's normal for the "startTime" trait to be null for a Managed
Server that is down/disabled.
// It's normal for the "multicastAddress" trait to be null for a
Managed Server that is not configured for JGroups HA.
excludedMetricNamesByType.put(ManagedServerTest.RESOURCE_TYPE, new String[]
{"startTime", "multicastAddress"});
+ // Some memory pools do not expose those statistics (by default), so in case
they
+ // are not exposed, it is normal that the server returns 'undefined' for
the value
+ // Note that those
+ excludedMetricNamesByType.put(new ResourceType("Memory Pool
Resource",PLUGIN_NAME, ResourceCategory.SERVICE,null),
+ new String[]
{"collection-usage-threshold-count","collection-usage-threshold","collection-usage"});
assertAllNumericMetricsAndTraitsHaveNonNullValues(excludedMetricNamesByType);
}
commit 94e78de367b5472188fcad8425b0e057f8d602af
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Nov 20 10:31:32 2012 +0100
Print the DB-url and user that is used to run the tests to make debugging easier.
diff --git
a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 82af5e0..b57f661 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -24,6 +24,7 @@ package org.rhq.core.domain.test;
import java.io.File;
import java.net.URL;
+import java.sql.DatabaseMetaData;
import java.util.Date;
import java.util.Hashtable;
@@ -79,6 +80,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
deployer.start();
System.err.println("...... deployer started....");
+ printDbVersion();
} catch (Throwable t) {
// Catch RuntimeExceptions and Errors and dump their stack trace, because
Surefire will completely swallow them
// and throw a cryptic NPE (see
http://jira.codehaus.org/browse/SUREFIRE-157)!
@@ -100,6 +102,13 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
return lookupEntityManager();
}
+ private static void printDbVersion() throws Exception {
+ EntityManager em = lookupEntityManager();
+ DatabaseMetaData md = ((org.hibernate.ejb.EntityManagerImpl)
em).getSession().connection().getMetaData();
+ System.err.println(">>> Database url for testing is [" +
md.getURL() + "] with user [" + md.getUserName() + "] <<<");
+
+ }
+
public boolean isPostgres(EntityManager em) throws Exception {
return ((org.hibernate.ejb.EntityManagerImpl)
em).getSession().connection().getMetaData()
.getDatabaseProductName().toLowerCase().indexOf("postgres") >
-1;
commit fa0629bd6c85ddea66f782772a9e4b11fbdc78a0
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 18:41:14 2012 +0100
Recovering from the loss of ant as a transitive dep of cobertura in tests.
diff --git
a/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
b/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
index 01a38e6..b651629 100644
---
a/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
+++
b/modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java
@@ -22,13 +22,10 @@ package org.rhq.enterprise.clienapi;
import static org.testng.Assert.assertEquals;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.Reader;
import java.net.URI;
-import java.net.URL;
-import org.apache.tools.ant.filters.StringInputStream;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
diff --git a/modules/enterprise/server/jar/pom.xml
b/modules/enterprise/server/jar/pom.xml
index 06a6e69..18ff9d4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -571,6 +571,12 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
commit 5d2732fd7f4b2c11e81962dc95584a3f0801fab1
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 17:26:11 2012 +0100
Removing last remnants of cobertura from the poms.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index e036910..20f1f76 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -16,16 +16,6 @@
<name>RHQ Helpers</name>
<description>parent POM for all RHQ helpers</description>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
<modules>
<module>rtfilter</module>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 2525960..a04cf92 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -40,12 +40,6 @@
<artifactId>commons-beanutils</artifactId>
<version>1.8.2</version>
</dependency>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils-dbunit</artifactId>
@@ -70,6 +64,11 @@
using the version that we use else where.
jsanda 10/20/2010
+
+ Cobertura is not used anymore so no ASM clashes should
+ be present. We still maintain this exclusion though
+ to force the usage of "our" version of Hibernate.
+ lkrejci 2012-11-21
-->
<exclusion>
<groupId>org.hibernate</groupId>
diff --git a/pom.xml b/pom.xml
index cefbe69..f8b3811 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,6 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<testng.version>6.5.2</testng.version>
- <cobertura.version>1.9.4.1</cobertura.version>
<augeas.version>0.9.0</augeas.version>
<augeas.classifier>el5</augeas.classifier>
<augeas.zip.version>0.9.0</augeas.zip.version>
@@ -567,13 +566,6 @@
</dependency>
<!-- end of workaround -->
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
-
</dependencies>
commit e2b304be7cc59a0e4cf331b1f8506bf8d2f9eb56
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 16:07:30 2012 +0100
Fixing the incorrect assertions in the ApplicationServerComponentTest in AS5
integration tests.
diff --git
a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
index 6d60b85..effc856 100644
---
a/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
+++
b/modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java
@@ -23,9 +23,9 @@
package org.rhq.plugins.jbossas5.itest;
import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
import java.io.File;
import java.util.Arrays;
@@ -220,8 +220,8 @@ public class ApplicationServerComponentTest extends
AbstractJBossAS5PluginTest {
operationResult = invokeOperation(getServerResource(), SHUTDOWN_OPERATION_NAME,
null);
avail = getAvailability(getServerResource());
assertEquals(avail, AvailabilityType.DOWN);
- assertNull(operationResult.getErrorMessage());
- assertEquals(operationResult.getSimpleResult(), "The server has been shut
down.");
+ assertNotNull(operationResult.getErrorMessage());
+ assertNull(operationResult.getSimpleResult());
// Before restarting it, add some stuff to the 'startScriptEnv' and
'startScriptArgs' props so we can verify
// they are used correctly by the Start op.
commit 2ae8bc1158dcae4457a738a7414e3c71fd898ed0
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Nov 20 15:17:34 2012 +0100
[BZ 850818 - Globally uncaught exception on clicking OK button while adding CLI Script
alert notification to the alert definition] Another possible scenario where NPE was thrown
was fixed by this commit.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
index b212043..1d55350 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/CliNotificationSenderForm.java
@@ -140,8 +140,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
protected List<FormItem> getOnDrawItems() {
List<FormItem> items = super.getOnDrawItems();
- TextItem version = new TextItem("editableVersion", MSG
-
.view_alert_definition_notification_cliScript_editor_newScriptVersion());
+ TextItem version = new TextItem("editableVersion",
+
MSG.view_alert_definition_notification_cliScript_editor_newScriptVersion());
version.setColSpan(getNumCols());
version.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
@@ -179,8 +179,9 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
}
};
- private boolean formBuilt;
+ private static String FAILED_LAST_TIME = "failed";
+ private boolean formBuilt;
private SelectItem repoSelector;
private RadioGroupWithComponentsItem packageSelector;
private SelectItem existingPackageSelector;
@@ -227,8 +228,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
SectionItem userSection = new SectionItem("userSection");
userSection.setDefaultValue(MSG.view_alert_definition_notification_cliScript_editor_whichUser());
- repoSelector = new
SortedSelectItem(extendLocatorId("repoSelector"), MSG
-
.view_alert_definition_notification_cliScript_editor_selectRepo());
+ repoSelector = new
SortedSelectItem(extendLocatorId("repoSelector"),
+
MSG.view_alert_definition_notification_cliScript_editor_selectRepo());
repoSelector.setDefaultToFirstOption(true);
repoSelector.setWrapTitle(false);
repoSelector.setWidth(400);
@@ -404,10 +405,19 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
private void validatePackage(final AsyncCallback<Void> callback) {
if (config.selectedRepo == null) {
- repoSelector.setIcons(failureIcon);
+ setFailed(repoSelector);
callback.onFailure(null);
return;
}
+ setOk(repoSelector);
+ if (!existingPackageSelector.isDisabled()) {
+ if (config.selectedPackage == null) {
+ setFailed(existingPackageSelector);
+ callback.onFailure(null);
+ return;
+ }
+ setOk(existingPackageSelector);
+ }
getConfiguration().put(new PropertySimple(PROP_REPO_ID,
config.selectedRepo.getId()));
if (packageSelector.getSelectedIndex() == 0) {
@@ -418,7 +428,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
if (cliScriptPackageType.getVersionFormat() != null) {
String versionRegex =
cliScriptPackageType.getVersionFormat().getFullFormatRegex();
if (versionRegex != null) {
- if
(!matches(uploadForm.getField("version").getValue().toString(), versionRegex))
{
+ Object version =
uploadForm.getField("version").getValue();
+ if (version == null ||!matches(version.toString(), versionRegex)) {
uploadForm.getItem("editableVersion").setIcons(failureIcon);
callback.onFailure(null);
return;
@@ -530,8 +541,8 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
form.setTitleOrientation(TitleOrientation.TOP);
anotherUserName = new TextItem("userName",
MSG.dataSource_users_field_name());
anotherUserPassword = new PasswordItem("password",
MSG.common_title_password());
- verifyUserButton = new ButtonItem("verify", MSG
-
.view_alert_definition_notification_cliScript_editor_verifyAuthentication());
+ verifyUserButton = new ButtonItem("verify",
+
MSG.view_alert_definition_notification_cliScript_editor_verifyAuthentication());
successIcon = new FormItemIcon();
successIcon.setSrc(ImageManager.getAvailabilityIcon(Boolean.TRUE));
@@ -680,6 +691,19 @@ public class CliNotificationSenderForm extends
AbstractNotificationSenderForm {
GWTServiceLookup.getContentService().findPackageType(null, PACKAGE_TYPE_NAME,
handler);
}
+ private void setFailed(FormItem item) {
+ item.setIcons(failureIcon);
+ item.setAttribute(FAILED_LAST_TIME, true);
+ }
+
+ private void setOk(FormItem item) {
+ Boolean lastTimeFail = item.getAttributeAsBoolean(FAILED_LAST_TIME);
+ if (lastTimeFail != null && lastTimeFail) {
+ item.setIcons(successIcon);
+ item.setAttribute(FAILED_LAST_TIME, false);
+ }
+ }
+
private void checkAuthenticationAndDo(final AsyncCallback<Void> action) {
String username = anotherUserName.getEnteredValue();
String password = anotherUserPassword.getEnteredValue();
commit 5028943b4989adb7fa0af99396bd604b6db889c5
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Tue Nov 20 13:38:45 2012 +0100
Greasemonkey script for FF for typing in the default credentials after pressing Alt +
C (can be used also in Chrome with Tampermonkey extension)
diff --git a/etc/greasemonkey/RHQ_login_monkey.user.js
b/etc/greasemonkey/RHQ_login_monkey.user.js
new file mode 100644
index 0000000..5c67125
--- /dev/null
+++ b/etc/greasemonkey/RHQ_login_monkey.user.js
@@ -0,0 +1,31 @@
+// ==UserScript==
+// @name RHQ login monkey
+// @namespace org.rhq.enterprise.gui.coregui
+// @description Types in the credentials
+// @include *:7080/coregui/*
+// @include *:7080/coregui/#LogOut
+// @grant none
+// @version 1
+// ==/UserScript==
+
+//GM_registerMenuCommand("Fill the credentials", function(e) {
+// fillTheCredentials();
+//}, "c", "alt", "c" );
+
+
+(function(){
+document.addEventListener('keydown', function(e) {
+ // pressed alt+c
+ if (e.keyCode == 67 && !e.shiftKey && !e.ctrlKey && e.altKey
&& !e.metaKey) {
+ fillTheCredentials();
+ }
+}, false);
+})();
+
+
+function fillTheCredentials() {
+ document.getElementsByName("user")[0].value="rhqadmin"
+ document.getElementsByName("password")[0].value="rhqadmin"
+ //document.forms[0].submit() don't work, SmartGWT uses internal logic
+ document.getElementsByName("password")[0].focus()
+}
commit 8ab939690aefbb6316aca6336c41804f728d290e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Nov 19 17:49:07 2012 -0500
[Bug 878224 -Updated alert defs may not fire in an HA environment]
When setting the server status dirty to notify the need for global condition cache
refresh, update *all* servers. The global condition cache is supposed to be
replicated across HA servers. Otherwise, different servers will have different
condition sets generating unexpected results.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
index 09d5332..0ba8683 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
@@ -89,8 +89,7 @@ import org.rhq.core.domain.resource.Agent;
@NamedQuery(name = Server.QUERY_UPDATE_STATUS_BY_NAME, query = "" //
+ " UPDATE Server s " //
+ " SET s.status = -1 " // negative numbers so that bitmask strat
does not conflict with this one
- + " WHERE s.status = 0 " // we only need the first guy to set it
- + " AND s.name = :identity ") })
+ + " WHERE s.status = 0 ") })
@SequenceGenerator(name = "id", sequenceName = "RHQ_SERVER_ID_SEQ")
@Table(name = "RHQ_SERVER")
public class Server implements Serializable {
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
index 9658dd1..e84c979 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
@@ -188,7 +188,6 @@ public class StatusManagerBean implements StatusManagerLocal {
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void markGlobalCache() {
Query updateServerQuery =
entityManager.createNamedQuery(Server.QUERY_UPDATE_STATUS_BY_NAME);
- updateServerQuery.setParameter("identity",
serverManager.getIdentity());
int serversUpdated = updateServerQuery.executeUpdate();
/*
commit 6c27b0e3a978a7642b9bcead40cb2eee0cec7265
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 19 17:07:28 2012 +0100
Make the copied error logs really reflect the test they were collected for.
Also bumped up the number and size of the retained logs greatly, because
we collect A LOT of data in the debug mode, which is needed until we fix
the failures in the CI environment.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
index 4a0f7b7..b1c8a24 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
@@ -168,7 +168,8 @@ public class AugeasReferenceLeakingTest extends BMNGRunner {
}
};
- setup = new ApacheTestSetup(this.getClass(), apacheConfig.configurationName,
+ setup = new ApacheTestSetup(this.getClass().getSimpleName()
+ + "#testReadingConfigurationsDoesNotLeakAugeasReferences",
apacheConfig.configurationName,
PluginContainerTest.getCurrentMockContext(),
new ResourceTypes(PluginLocation.APACHE_PLUGIN));
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
index 430f00a..9f12166 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
@@ -73,7 +73,7 @@ public class ApacheTestSetup {
private Map<String, String> inventoryFileReplacements;
private Mockery context;
private ResourceTypes apacheResourceTypes;
- private Class<?> testClass;
+ private String testId;
public class ApacheSetup {
private String serverRoot;
@@ -133,7 +133,7 @@ public class ApacheTestSetup {
File errorLog = new File(new File(new File(serverRoot), "logs"),
"error_log");
if (errorLog.exists() && errorLog.canRead()) {
- String copyName = testClass.getSimpleName() + "-" +
configurationName + ".httpd.error_log";
+ String copyName = testId + ".httpd.error_log";
FileUtil.copyFile(errorLog, new File(new File("target"),
copyName));
}
@@ -214,9 +214,9 @@ public class ApacheTestSetup {
}
}
- public ApacheTestSetup(Class<?> testClass, String configurationName, Mockery
context,
+ public ApacheTestSetup(String testId, String configurationName, Mockery context,
ResourceTypes apacheResourceTypes) {
- this.testClass = testClass;
+ this.testId = testId;
this.configurationName = configurationName;
this.context = context;
this.apacheResourceTypes = apacheResourceTypes;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 9180f2c..8f8cdb6 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -95,14 +95,15 @@ public class UpgradeTestBase extends PluginContainerTest {
platform = discoverPlatform();
}
- protected void testUpgrade(ApacheTestConfiguration testConfiguration) throws
Throwable {
- final ApacheTestSetup setup = new ApacheTestSetup(this.getClass(),
testConfiguration.configurationName,
- context, apacheResourceTypes);
+ protected void testUpgrade(String testMethod, ApacheTestConfiguration
testConfiguration) throws Throwable {
+ String testId = this.getClass().getSimpleName() + "#" + testMethod;
+ final ApacheTestSetup setup = new ApacheTestSetup(testId,
testConfiguration.configurationName, context,
+ apacheResourceTypes);
boolean testFailed = false;
try {
LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
- + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
+ + testId);
String[] configFiles =
Arrays.copyOf(testConfiguration.apacheConfigurationFiles,
testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] =
"/snmpd.conf";
@@ -203,7 +204,7 @@ public class UpgradeTestBase extends PluginContainerTest {
}
LOG.debug("----------------------------------------------------------
Finished the upgrade test for: "
- + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
+ + testId);
}
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
index 80efc67..9c1c921 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeNestedConfigurationFromRHQ1_3Test.java
@@ -58,7 +58,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
public void testWithResolvableServerNames(final String installPath, final String
exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableServerNames", new
ApacheTestConfiguration() {
{
serverRoot = installPath;
binPath = exePath;
@@ -94,7 +94,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueServerNames(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueServerNames", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_UNRESOLVABLE_SERVER_NAMES;
apacheConfigurationFiles = configuredApacheConfigurationFiles;
@@ -120,7 +120,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -148,7 +148,7 @@ public class UpgradeNestedConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
index 8788287..dfb78d1 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq1_3_x/UpgradeSimpleConfigurationFromRHQ1_3Test.java
@@ -59,7 +59,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
public void testWithResolvableServerNames_Apache2(final String installPath, final
String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableServerNames_Apache2", new
ApacheTestConfiguration() {
{
serverRoot = installPath;
binPath = exePath;
@@ -77,7 +77,8 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
public void testWithResolvableServerNames_Apache1(final String installPath, final
String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {{
+ testUpgrade("testWithResolvableServerNames_Apache1", new
ApacheTestConfiguration() {
+ {
serverRoot = installPath;
binPath = exePath;
configurationName = DEPLOYMENT_SIMPLE_WITH_RESOLVABLE_SERVERNAMES;
@@ -90,7 +91,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueServerNames_Apache2(final String installPath, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueServerNames_Apache2", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_UNRESOLVABLE_SERVER_NAMES;
apacheConfigurationFiles = configuredApacheConfigurationFiles;
@@ -113,7 +114,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -135,7 +136,7 @@ public class UpgradeSimpleConfigurationFromRHQ1_3Test extends
UpgradeTestBase {
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
index 3600fcd..99bea6e 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeNestedConfigurationFromRHQ3_0_0Test.java
@@ -66,7 +66,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -91,7 +91,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -124,7 +124,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN }, numberOfInitialDiscoveries =
2)
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -168,7 +168,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -193,7 +193,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -229,7 +229,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -265,7 +265,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -296,7 +296,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -328,7 +328,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -359,7 +359,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
index 9fceb54..916ed0f 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_0/UpgradeSimpleConfigurationFromRHQ3_0_0Test.java
@@ -73,7 +73,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -93,7 +93,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -114,7 +114,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN}, numberOfInitialDiscoveries =
2)
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -146,7 +146,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -166,7 +166,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -192,7 +192,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -218,7 +218,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -257,7 +257,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -284,7 +284,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -310,7 +310,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_0Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
index 97c1c35..5b5fddc 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeNestedConfigurationFromRHQ3_0_1Test.java
@@ -74,7 +74,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -99,7 +99,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -129,7 +129,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -160,7 +160,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -199,7 +199,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -230,7 +230,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -287,7 +287,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testDuplicateMainVhostsMarkedAsFailedUpgrade(final String installDir,
final String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testDuplicateMainVhostsMarkedAsFailedUpgrade", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithDuplicateMain;
@@ -332,7 +332,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -383,7 +383,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -415,7 +415,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -452,7 +452,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
index ffdc62d..16de715 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_1/UpgradeSimpleConfigurationFromRHQ3_0_1Test.java
@@ -74,7 +74,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -94,7 +94,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithResolvableNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -139,7 +139,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -165,7 +165,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithUnresolvableNamesWithoutSNMP(final String installDir, final
String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -194,7 +194,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSNMP;
@@ -220,7 +220,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testWithNonUniqueNamesWithoutSNMP(final String installDir, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNamesWithoutSNMP", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithoutSNMP;
@@ -272,7 +272,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path"})
public void testDuplicateMainVhostsMarkedAsFailedUpgrade(final String installDir,
final String exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testDuplicateMainVhostsMarkedAsFailedUpgrade", new
ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithDuplicateMain;
@@ -317,7 +317,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -363,7 +363,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddressWithSNMP", new ApacheTestConfiguration()
{
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -394,7 +394,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithoutSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithoutSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -445,7 +445,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_1Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = {PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN})
@Parameters({"apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddressWithSNMP(final String installPath, final String
exePath) throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddressWithSNMP", new
ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
index e911667..9539bd2 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeNestedConfigurationFromRHQ3_0_2Test.java
@@ -62,7 +62,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -82,7 +82,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNames", new ApacheTestConfiguration()
{
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -113,7 +113,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSingleVHost;
@@ -144,7 +144,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -179,7 +179,7 @@ public class UpgradeNestedConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
index 3882f8f..0b1e7ac 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/rhq3_0_2/UpgradeSimpleConfigurationFromRHQ3_0_2Test.java
@@ -61,7 +61,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithResolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithResolvableNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -76,7 +76,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithUnresolvableNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithUnresolvableNames", new ApacheTestConfiguration()
{
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFile;
@@ -102,7 +102,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithNonUniqueNames(final String installDir, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithNonUniqueNames", new ApacheTestConfiguration() {
{
apacheConfigurationFiles = configuredApacheConfigurationFiles;
inventoryFile = configuredInventoryFileWithSingleVhost;
@@ -128,7 +128,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithAnyAddress(final String installPath, final String exePath) throws
Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithAnyAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
@@ -158,7 +158,7 @@ public class UpgradeSimpleConfigurationFromRHQ3_0_2Test extends
UpgradeTestBase
@PluginContainerSetup(plugins = { PluginLocation.PLATFORM_PLUGIN,
PluginLocation.AUGEAS_PLUGIN, PluginLocation.APACHE_PLUGIN })
@Parameters({ "apache2.install.dir", "apache2.exe.path" })
public void testWithWildcardAddress(final String installPath, final String exePath)
throws Throwable {
- testUpgrade(new ApacheTestConfiguration() {
+ testUpgrade("testWithWildcardAddress", new ApacheTestConfiguration() {
{
configurationName = DEPLOYMENT_SIMPLE_WITH_WILDCARD_LISTENS;
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
index 56284ce..008588f 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml
@@ -16,6 +16,8 @@
<param name="File" value="target/test.log"/>
<param name="Threshold" value="DEBUG"/>
<param name="Append" value="false"/>
+ <param name="MaxBackupIndex" value="1000" />
+ <param name="MaxFileSize" value="50MB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p %d{dd-MM
HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
</layout>
commit 43724fc53d9c440a4ee9d86ea10d8146f95149fc
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 19 13:33:12 2012 +0100
Backup the apache error logs on per-test-method basis.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
index 58ac1fc..4a0f7b7 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/augeas/AugeasReferenceLeakingTest.java
@@ -53,7 +53,6 @@ import org.rhq.plugins.apache.PluginLocation;
import org.rhq.plugins.apache.setup.ApacheTestConfiguration;
import org.rhq.plugins.apache.setup.ApacheTestSetup;
import org.rhq.plugins.apache.upgrade.UpgradeTestBase;
-import org.rhq.plugins.apache.util.ApacheExecutionUtil.ExpectedApacheState;
import org.rhq.plugins.apache.util.ResourceTypes;
import org.rhq.test.pc.PluginContainerSetup;
import org.rhq.test.pc.PluginContainerTest;
@@ -169,7 +168,8 @@ public class AugeasReferenceLeakingTest extends BMNGRunner {
}
};
- setup = new ApacheTestSetup(apacheConfig.configurationName,
PluginContainerTest.getCurrentMockContext(),
+ setup = new ApacheTestSetup(this.getClass(), apacheConfig.configurationName,
+ PluginContainerTest.getCurrentMockContext(),
new ResourceTypes(PluginLocation.APACHE_PLUGIN));
Resource platform = UpgradeTestBase.discoverPlatform();
@@ -186,7 +186,7 @@ public class AugeasReferenceLeakingTest extends BMNGRunner {
private void stopApache() throws Exception {
if (setup != null) {
-
setup.withApacheSetup().getExecutionUtil().invokeOperation(ExpectedApacheState.STOPPED,
"stop");
+ setup.withApacheSetup().stopApache();
setup = null;
}
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
index e27c394..430f00a 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/setup/ApacheTestSetup.java
@@ -44,6 +44,8 @@ import org.rhq.core.domain.resource.ResourceError;
import org.rhq.core.pc.ServerServices;
import org.rhq.core.pc.upgrade.FakeServerInventory;
import org.rhq.core.system.SystemInfoFactory;
+import org.rhq.core.util.file.FileUtil;
+import org.rhq.plugins.apache.ApacheServerComponent;
import org.rhq.plugins.apache.ApacheServerDiscoveryComponent;
import org.rhq.plugins.apache.ApacheVirtualHostServiceComponent;
import org.rhq.plugins.apache.ApacheVirtualHostServiceDiscoveryComponent;
@@ -71,6 +73,7 @@ public class ApacheTestSetup {
private Map<String, String> inventoryFileReplacements;
private Mockery context;
private ResourceTypes apacheResourceTypes;
+ private Class<?> testClass;
public class ApacheSetup {
private String serverRoot;
@@ -115,6 +118,39 @@ public class ApacheTestSetup {
return this;
}
+ public void startApache() throws Exception {
+ //clear the error log
+ File errorLog = new File(new File(new File(serverRoot), "logs"),
"error_log");
+ errorLog.delete();
+
+ getExecutionUtil().invokeOperation(ExpectedApacheState.RUNNING,
"start");
+ }
+
+ public void stopApache() throws Exception {
+ getExecutionUtil().invokeOperation(ExpectedApacheState.STOPPED,
"stop");
+
+ //save a copy of the error log
+ File errorLog = new File(new File(new File(serverRoot), "logs"),
"error_log");
+
+ if (errorLog.exists() && errorLog.canRead()) {
+ String copyName = testClass.getSimpleName() + "-" +
configurationName + ".httpd.error_log";
+
+ FileUtil.copyFile(errorLog, new File(new File("target"),
copyName));
+ }
+ }
+
+ public void reloadApache() {
+
+ }
+
+ public ApacheServerComponent getServerComponent() {
+ return getExecutionUtil().getServerComponent();
+ }
+
+ public ApacheDirectiveTree getRuntimeConfiguration() {
+ return getExecutionUtil().getRuntimeConfiguration();
+ }
+
public ApacheExecutionUtil getExecutionUtil() {
return execution;
}
@@ -125,11 +161,15 @@ public class ApacheTestSetup {
assertTrue(serverRootDir.exists(), "The configured server root denotes a
non-existant directory: '"
+ serverRootDir + "'.");
+ File logsDir = new File(serverRootDir, "logs");
+
+ assertTrue(logsDir.exists(), "The configured server root denotes a
directory that doesn't have a 'logs' subdirectory. This is
unexpected.");
+
File confDir = new File(serverRootDir, "conf");
assertTrue(confDir.exists(),
"The configured server root denotes a directory that doesn't
have a 'conf' subdirectory. This is unexpected.");
-
+
String confFilePath = confDir.getAbsolutePath() + File.separatorChar +
"httpd.conf";
String snmpHost = null;
@@ -166,7 +206,7 @@ public class ApacheTestSetup {
private void doSetup() throws Exception {
init();
- execution.invokeOperation(ExpectedApacheState.RUNNING, "start");
+ startApache();
}
public ApacheTestSetup setup() throws Exception {
@@ -174,7 +214,9 @@ public class ApacheTestSetup {
}
}
- public ApacheTestSetup(String configurationName, Mockery context, ResourceTypes
apacheResourceTypes) {
+ public ApacheTestSetup(Class<?> testClass, String configurationName, Mockery
context,
+ ResourceTypes apacheResourceTypes) {
+ this.testClass = testClass;
this.configurationName = configurationName;
this.context = context;
this.apacheResourceTypes = apacheResourceTypes;
@@ -275,9 +317,9 @@ public class ApacheTestSetup {
ApacheDeploymentUtil.addDefaultVariables(replacements, null);
- HttpdAddressUtility addressUtility =
apacheSetup.getExecutionUtil().getServerComponent()
+ HttpdAddressUtility addressUtility = apacheSetup.getServerComponent()
.getAddressUtility();
- ApacheDirectiveTree runtimeConfig =
apacheSetup.getExecutionUtil().getRuntimeConfiguration();
+ ApacheDirectiveTree runtimeConfig = apacheSetup.getRuntimeConfiguration();
replacements.put("snmp.identifier",
addressUtility.getHttpdInternalMainServerAddressRepresentation(runtimeConfig).toString(false,
false));
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 8c0d2eb..9180f2c 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -62,7 +62,6 @@ import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
import org.rhq.plugins.apache.setup.ApacheTestConfiguration;
import org.rhq.plugins.apache.setup.ApacheTestSetup;
import org.rhq.plugins.apache.util.ApacheDeploymentUtil.DeploymentConfig;
-import org.rhq.plugins.apache.util.ApacheExecutionUtil.ExpectedApacheState;
import org.rhq.plugins.apache.util.ResourceTypes;
import org.rhq.plugins.apache.util.VHostSpec;
import org.rhq.plugins.apache.util.VirtualHostLegacyResourceKeyUtil;
@@ -97,7 +96,8 @@ public class UpgradeTestBase extends PluginContainerTest {
}
protected void testUpgrade(ApacheTestConfiguration testConfiguration) throws
Throwable {
- final ApacheTestSetup setup = new
ApacheTestSetup(testConfiguration.configurationName, context, apacheResourceTypes);
+ final ApacheTestSetup setup = new ApacheTestSetup(this.getClass(),
testConfiguration.configurationName,
+ context, apacheResourceTypes);
boolean testFailed = false;
try {
@@ -193,7 +193,7 @@ public class UpgradeTestBase extends PluginContainerTest {
throw t;
} finally {
try {
-
setup.withApacheSetup().getExecutionUtil().invokeOperation(ExpectedApacheState.STOPPED,
"stop");
+ setup.withApacheSetup().stopApache();
} catch (Exception e) {
if (testFailed) {
LOG.error("Failed to stop apache.", e);
@@ -209,7 +209,7 @@ public class UpgradeTestBase extends PluginContainerTest {
protected void defineRHQ3ResourceKeys(ApacheTestConfiguration testConfig,
ApacheTestSetup setup) throws Exception {
setup.withApacheSetup().init();
- ApacheServerComponent component =
setup.withApacheSetup().getExecutionUtil().getServerComponent();
+ ApacheServerComponent component = setup.withApacheSetup().getServerComponent();
ApacheDirectiveTree config = component.parseRuntimeConfiguration(false);
DeploymentConfig deployConfig = setup.getDeploymentConfig();
commit 7f44776f62d66f19332b6f9608ff93a8f8fddd7c
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 19 12:52:42 2012 +0100
Slightly improving logging on apache upgrade tests.
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
index 62efbbe..8c0d2eb 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java
@@ -101,6 +101,9 @@ public class UpgradeTestBase extends PluginContainerTest {
boolean testFailed = false;
try {
+ LOG.debug("----------------------------------------------------------
Starting the upgrade test for: "
+ + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
+
String[] configFiles =
Arrays.copyOf(testConfiguration.apacheConfigurationFiles,
testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] =
"/snmpd.conf";
@@ -198,6 +201,9 @@ public class UpgradeTestBase extends PluginContainerTest {
throw e;
}
}
+
+ LOG.debug("----------------------------------------------------------
Finished the upgrade test for: "
+ + this.getClass().getSimpleName() + ": " +
testConfiguration.configurationName);
}
}
diff --git
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
index ba6df54..64ab1c0 100644
---
a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
+++
b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheExecutionUtil.java
@@ -46,6 +46,7 @@ import org.rhq.core.pluginapi.inventory.PluginContainerDeployment;
import org.rhq.core.pluginapi.inventory.ProcessScanResult;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.core.system.ProcessInfo;
import org.rhq.core.system.SystemInfo;
import org.rhq.core.system.SystemInfoFactory;
@@ -179,8 +180,13 @@ public class ApacheExecutionUtil {
public void invokeOperation(ExpectedApacheState desiredState, String operation)
throws Exception {
int i = 0;
+
while (i < 10) {
- serverComponent.invokeOperation(operation, new Configuration());
+ OperationResult res = serverComponent.invokeOperation(operation, new
Configuration());
+
+ LOG.debug("Invoked operation '" + operation + "' on
" + resourceContext.getResourceKey() + " (waiting for "
+ + desiredState + "), attempt " + i + ": "
+ + res.getComplexResults().getMap().toString());
//wait for max 30s for the operation to "express" itself
int w = 0;
commit 23be83c54ea7c50393c99834bdb0a22136ecb42e
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Nov 19 12:01:12 2012 +0100
BZ 861239 - add a flush() so that getting the live availability works.
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 a016f8e..053d5c9 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
@@ -276,7 +276,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// make sure the user is authorized to delete this resource (which implies you
can delete all its children)
// TODO: There is a pretty good argument for this being replaced with
MANAGE_INVENTORY. It takes an
// inventory manager to import resources, so why not to remove them? But, since
no one has complained
- // we're timid about making a change that may hamstring existing setups.
+ // we're timid about making a change that may hamstring existing setups.
if (!authorizationManager.hasResourcePermission(user, Permission.DELETE_RESOURCE,
resourceId)) {
throw new PermissionException("You do not have permission to uninventory
resource [" + resourceId + "]");
}
@@ -371,8 +371,8 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
}
}
- // now remove the dommed agent. Call flush() to force out any problems with
agent removal
- // so that we can catch them and report a better exception.
+ // now remove the doomed agent. Call flush() to force out any problems with
agent removal
+ // so that we can catch them and report a better exception.
if (doomedAgent != null) {
agentManager.deleteAgent(doomedAgent);
entityManager.flush();
@@ -517,7 +517,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_2, // then delete the
config objects
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_3, // then the history
objects wrapping those configs
AlertConditionLog.QUERY_DELETE_BY_RESOURCES, // Don't
- AlertConditionLog.QUERY_DELETE_BY_RESOURCES_BULK_DELETE, // alter
+ AlertConditionLog.QUERY_DELETE_BY_RESOURCES_BULK_DELETE, // alter
AlertNotificationLog.QUERY_DELETE_BY_RESOURCES, // the
Alert.QUERY_DELETE_BY_RESOURCES, // order
AlertCondition.QUERY_DELETE_BY_RESOURCES, // of
@@ -885,7 +885,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
/**
* Get the complete set of resource type Ids in the ancestries provided. This is
useful for
* being able to load all the types in advance of generating decoded values.
- *
+ *
* @return
*/
private HashSet<Integer> getAncestryTypeIds(Collection<String>
ancestries) {
@@ -2353,6 +2353,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
if (avail != null) {
results.setAvailabilityType(avail.getAvailabilityType());
}
+ entityManager.flush();
}
} catch (Throwable ignore) {
}
@@ -2637,7 +2638,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// make sure the user is authorized to disable this resource (which implies
you can disable all its children)
// TODO: this may require its own permission, but until someone needs it
we'll piggyback on DELETE, at least
- // that gives a resource-level permission option.
+ // that gives a resource-level permission option.
if (!authorizationManager.hasResourcePermission(subject,
Permission.DELETE_RESOURCE, resourceId)) {
throw new PermissionException("You do not have permission to disable
resource [" + resourceId + "]");
}
@@ -2680,7 +2681,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// Set the resources disabled via the standard mergeInventoryReport mechanism,
from the server service
// level. We do this for a few reasons:
// - The server service uses locking to ensure we don't conflict with an
actual report from the agent
- // - It ensure all necessary db modications take place, like avail history and
current avail
+ // - It ensure all necessary db modifications take place, like avail history and
current avail
// - It ensures that all ancillary avail change logic, like alerting, still
happens.
DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl();
for (AvailabilityReport report : reports.values()) {
@@ -2715,7 +2716,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// make sure the user is authorized to enable this resource (which implies
you can enable all its children)
// TODO: this may require its own permission, but until someone needs it
we'll piggyback on DELETE, at least
- // that gives a resource-level permission option.
+ // that gives a resource-level permission option.
if (!authorizationManager.hasResourcePermission(subject,
Permission.DELETE_RESOURCE, resourceId)) {
throw new PermissionException("You do not have permission to enable
resource [" + resourceId + "]");
}
@@ -2757,7 +2758,7 @@ public class ResourceManagerBean implements ResourceManagerLocal,
ResourceManage
// Set the resources disabled via the standard mergeInventoryReport mechanism,
from the server service
// level. We do this for a few reasons:
// - The server service uses locking to ensure we don't conflict with an
actual report from the agent
- // - It ensure all necessary db modications take place, like avail history and
current avail
+ // - It ensure all necessary db modifications take place, like avail history and
current avail
// - It ensures that all ancillary avail change logic, like alerting, still
happens.
DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl();
for (AvailabilityReport report : reports.values()) {
commit 4a93caa8696e880fb0ce8c961cf98402b4a2827b
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Nov 19 10:43:39 2012 +0100
Add Thomas as developer and mark Ian as retired
diff --git a/pom.xml b/pom.xml
index eeaac9c..cefbe69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
<jboss-javassist.version>3.9.0.GA</jboss-javassist.version>
<jbossws-native-dist.version>3.1.1.GA</jbossws-native-dist.version>
<!-- End: JBoss AS Dependency Versions -->
-
+
<commons-logging.version>1.1.0.jboss</commons-logging.version>
<concurrent.version>1.3.4-jboss-update1</concurrent.version> <!--
oswego-concurrent compatible with 4.2.3.GA -->
<findbugs.version>2.3.2</findbugs.version>
@@ -118,7 +118,7 @@
Arquillian integration, and works with jacoco (as opposed to javassist 3.9.0,
which doesn't in some cases.) -->
<javassist.version>3.16.1-GA</javassist.version>
-
+
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -608,7 +608,7 @@
</exclusions>
</dependency>
</dependencies>
-
+
<executions>
<execution>
<id>pre-create target/classes</id>
@@ -774,7 +774,7 @@
</exclusions>
</configuration>
</plugin>
-
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
@@ -786,7 +786,7 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
- </plugins>
+ </plugins>
</pluginManagement>
@@ -1135,7 +1135,7 @@
</plugin>
</plugins>
- </build>
+ </build>
<repositories>
@@ -1234,7 +1234,7 @@
<jacoco.integration-test.args></jacoco.integration-test.args>
</properties>
</profile>
-
+
<profile>
<id>code-coverage</id>
<activation>
@@ -1263,7 +1263,7 @@
<include>org.rhq.*</include>
</includes>
</configuration>
- </execution>
+ </execution>
<execution>
<id>prepare-agent-for-integration-tests</id>
<phase>pre-integration-test</phase>
@@ -1399,7 +1399,7 @@
</plugins>
</build>
</profile>
-
+
<!-- NOTE: This profile is extended upon in several other submodules.
If you need to change its activation policy, make sure to do that in
*ALL* the modules that define this profile. -->
@@ -1409,16 +1409,16 @@
<property>
<!-- we want this always active but activeByDefault doesn't work
-->
<!-- see
http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
- <name>java.home</name>
+ <name>java.home</name>
</property>
</activation>
-
+
<!-- Can be used to pass a flag down to deployment composing ANT scripts and
somesuch -->
<properties>
<rhq.bundle-additional-script-languages>true</rhq.bundle-additional-script-languages>
- </properties>
+ </properties>
</profile>
-
+
<profile>
<id>ojdbc-driver</id>
<activation>
@@ -1617,7 +1617,7 @@
</configuration>
</plugin>
</plugins>
- </reporting>
+ </reporting>
</profile>
<profile>
@@ -1625,7 +1625,7 @@
<property>
<name>generate-dependency-graph</name>
<value>true</value>
- </property>
+ </property>
</activation>
<reporting>
@@ -1638,7 +1638,7 @@
</configuration>
</plugin>
</plugins>
- </reporting>
+ </reporting>
</profile>
</profiles>
@@ -1652,8 +1652,8 @@
<reportSet>
</reportSet>
</reportSets>
- </plugin>
-
+ </plugin>
+
<!--
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -1850,6 +1850,10 @@
</roles>
</developer>
<developer>
+ <name>Thomas Segismont</name>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
<name>Jay Shaughnessy</name>
<timezone>-5</timezone>
</developer>
@@ -1857,6 +1861,9 @@
<name>Ian Springer</name>
<timezone>-5</timezone>
<
url>http://freshjava.blogspot.com/</url>
+ <roles>
+ <role>retired</role>
+ </roles>
</developer>
<developer>
<name>Mike Thompson</name>
commit 60c1d42fa5750ef5d1829e97b6b15323501bc3f2
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Mon Nov 19 10:05:01 2012 +0100
exposing the CloudManagerBean via CLI
diff --git
a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
index 1dd79f1..caa25e1 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
@@ -24,6 +24,7 @@ import org.rhq.enterprise.server.alert.AlertManagerRemote;
import org.rhq.enterprise.server.auth.SubjectManagerRemote;
import org.rhq.enterprise.server.authz.RoleManagerRemote;
import org.rhq.enterprise.server.bundle.BundleManagerRemote;
+import org.rhq.enterprise.server.cloud.CloudManagerRemote;
import org.rhq.enterprise.server.configuration.ConfigurationManagerRemote;
import org.rhq.enterprise.server.content.ContentManagerRemote;
import org.rhq.enterprise.server.content.RepoManagerRemote;
@@ -63,6 +64,7 @@ public enum RhqManager {
BundleManager(BundleManagerRemote.class, "${BundleManager}"), //
CallTimeDataManager(CallTimeDataManagerRemote.class,
"${CallTimeDataManager}"), //
RepoManager(RepoManagerRemote.class, "${RepoManager}"), //
+ CloudManager(CloudManagerRemote.class, "${CloudManager}"), //
ConfigurationManager(ConfigurationManagerRemote.class,
"${ConfigurationManager}"), //
ContentManager(ContentManagerRemote.class, "${ContentManager}"), //
DataAccessManager(DataAccessManagerRemote.class, "${DataAccessManager}"),
//
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
index 01faa80..20cc694 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
@@ -56,7 +56,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
* @author Joseph Marques
*/
@Stateless
-public class CloudManagerBean implements CloudManagerLocal {
+public class CloudManagerBean implements CloudManagerLocal, CloudManagerRemote {
private final Log log = LogFactory.getLog(CloudManagerBean.class);
// A time sufficient to determine whether a server is down. Can be based on the
initial delay set for the server instance
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerRemote.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerRemote.java
new file mode 100644
index 0000000..1f97b99
--- /dev/null
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerRemote.java
@@ -0,0 +1,90 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.server.cloud;
+
+import java.util.List;
+
+import javax.ejb.Remote;
+
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+
+/**
+ * @author Jiri Kremser
+ */
+@Remote
+public interface CloudManagerRemote {
+
+// void deleteServers(Integer[] serverIds) throws CloudManagerException;
+//
+// void deleteServer(Integer serverId) throws CloudManagerException;
+//
+// List<Agent> getAgentsByServerName(String serverName);
+//
+// Server getServerById(int serverId);
+//
+// Server getServerByName(String serverName);
+//
+// /**
+// * Return every server registered in the database considered part of the active
cloud. This will exclude, for example,
+// * servers in INSTALLED mode or any other mode that should not be included when
performing cloud operations such as partitioning.
+// * @return All servers available to the cloud.
+// */
+// List<Server> getAllCloudServers();
+//
+ /**
+ * Return every server registered in the database.
+ * @return All servers, regardless of operation mode.
+ */
+ List<Server> getAllServers();
+
+ PageList<ServerWithAgentCountComposite> getServerComposites(Subject subject,
PageControl pc);
+//
+// /**
+// * Returns the number of servers that are part of the "server cloud",
which excludes
+// * servers that have been installed but not associated with the cloud.
+// * The returned count will include those servers that are down or in maintenance
mode,
+// * in addition to those servers that are currently running in a normal state.
+// *
+// * @return count of servers in the cloud
+// */
+// int getServerCount();
+//
+// /**
+// * Returns the number of servers that are part of the "server cloud" that
are currently
+// * running in "normal" mode.
+// *
+// * This excludes all other servers such as those servers that have been installed
but
+// * not associated with the cloud, servers that are down or in maintenance mode.
+// *
+// * @return count of servers in the cloud that are in a normal running state
+// */
+// int getNormalServerCount();
+//
+// void updateServerMode(Integer[] serverIds, Server.OperationMode mode);
+//
+// Server updateServer(Subject subject, Server server);
+//
+// PageList<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId,
PageControl pc);
+//
+// void markStaleServersDown(Subject subject);
+}
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/RemoteAPIValidator.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/RemoteAPIValidator.java
index ec0e4f7..d1f74bc 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/RemoteAPIValidator.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/RemoteAPIValidator.java
@@ -37,6 +37,7 @@ import org.rhq.enterprise.server.alert.AlertDefinitionManagerBean;
import org.rhq.enterprise.server.alert.AlertManagerBean;
import org.rhq.enterprise.server.auth.SubjectManagerBean;
import org.rhq.enterprise.server.authz.RoleManagerBean;
+import org.rhq.enterprise.server.cloud.CloudManagerBean;
import org.rhq.enterprise.server.configuration.ConfigurationManagerBean;
import org.rhq.enterprise.server.content.AdvisoryManagerBean;
import org.rhq.enterprise.server.content.ContentManagerBean;
@@ -71,6 +72,7 @@ public class RemoteAPIValidator {
AvailabilityManagerBean.class,//
CallTimeDataManagerBean.class, //
RepoManagerBean.class,//
+ CloudManagerBean.class,//
ConfigurationManagerBean.class, //
ContentManagerBean.class, //
//ContentSourceManagerBean.class, //
commit c66d7848a05f3dd6e5338b76f96b87de57f13e96
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Mon Nov 19 10:04:21 2012 +0100
new GWT service for CRUD operations with RHQ server
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/composite/ServerWithAgentCountComposite.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/composite/ServerWithAgentCountComposite.java
index 6fff481..1732a3f 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/composite/ServerWithAgentCountComposite.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/composite/ServerWithAgentCountComposite.java
@@ -22,14 +22,22 @@
*/
package org.rhq.core.domain.cloud.composite;
+import java.io.Serializable;
+
import org.rhq.core.domain.cloud.Server;
/**
* @author Joseph Marques
*/
-public class ServerWithAgentCountComposite {
- private final Server server;
- private final int agentCount;
+public class ServerWithAgentCountComposite implements Serializable {
+
+ private static final long serialVersionUID = -7553274660445454259L;
+ private Server server;
+ private int agentCount;
+
+ public ServerWithAgentCountComposite() {
+ // GWT needs this
+ }
public ServerWithAgentCountComposite(Server server, Number agentCount) {
super();
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerDetailView.java
new file mode 100644
index 0000000..44bcb26
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerDetailView.java
@@ -0,0 +1,415 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin;
+
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.types.Overflow;
+import com.smartgwt.client.types.VisibilityMode;
+import com.smartgwt.client.widgets.Img;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.form.fields.CanvasItem;
+import com.smartgwt.client.widgets.form.fields.StaticTextItem;
+import com.smartgwt.client.widgets.layout.SectionStack;
+import com.smartgwt.client.widgets.layout.SectionStackSection;
+
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.plugin.PluginKey;
+import org.rhq.core.domain.plugin.ServerPlugin;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * Shows details of a server.
+ *
+ * @author Jiri Kremser
+ */
+public class ServerDetailView extends LocatableVLayout {
+
+// private final CloudGWTServiceAsync cloudManager =
GWTServiceLookup.getCloudService();
+ private final int serverId;
+
+ private final LocatableSectionStack sectionStack;
+ private SectionStackSection detailsSection = null;
+ private SectionStackSection helpSection = null;
+ private SectionStackSection controlsSection = null;
+ private SectionStackSection pluginConfigSection = null;
+ private SectionStackSection scheduledJobsSection = null;
+ private int initSectionCount = 0;
+
+ public ServerDetailView(String locatorId, int serverId) {
+ super(locatorId);
+ this.serverId = serverId;
+ setHeight100();
+ setWidth100();
+ setOverflow(Overflow.AUTO);
+
+ sectionStack = new LocatableSectionStack(extendLocatorId("stack"));
+ sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
+ sectionStack.setWidth100();
+ sectionStack.setHeight100();
+ sectionStack.setMargin(5);
+ sectionStack.setOverflow(Overflow.VISIBLE);
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ GWTServiceLookup.getCloudService().getServerById(this.serverId, new
AsyncCallback<Server>() {
+ public void onSuccess(Server server) {
+// prepareDetailsSection(sectionStack, server);
+// prepareHelpSection(sectionStack, server);
+// prepareControlsSection(sectionStack, server);
+// preparePluginConfigurationSection(sectionStack, server);
+// prepareScheduledJobsSection(sectionStack, server);
+ }
+
+ public void onFailure(Throwable caught) {
+
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+ }
+ });
+ }
+
+ public boolean isInitialized() {
+ return initSectionCount >= 5;
+ }
+
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+
+ // wait until we have all of the sections before we show them. We don't use
InitializableView because,
+ // it seems they are not supported (in the applicable renderView()) at this
level.
+ new Timer() {
+ final long startTime = System.currentTimeMillis();
+
+ public void run() {
+ if (isInitialized()) {
+ if (null != detailsSection) {
+ sectionStack.addSection(detailsSection);
+ }
+ if (null != helpSection) {
+ sectionStack.addSection(helpSection);
+ }
+ if (null != controlsSection) {
+ sectionStack.addSection(controlsSection);
+ }
+ if (null != pluginConfigSection) {
+ sectionStack.addSection(pluginConfigSection);
+ }
+ if (null != scheduledJobsSection) {
+ sectionStack.addSection(scheduledJobsSection);
+ }
+
+ addMember(sectionStack);
+ markForRedraw();
+
+ } else {
+ // don't wait forever, give up after 20s and show what we have
+ long elapsedMillis = System.currentTimeMillis() - startTime;
+ if (elapsedMillis > 20000) {
+ initSectionCount = 5;
+ }
+ schedule(100); // Reschedule the timer.
+ }
+ }
+ }.run(); // fire the timer immediately
+ }
+
+ private void prepareControlsSection(final SectionStack stack, final ServerPlugin
plugin) {
+ PluginKey pluginKey = PluginKey.createServerPluginKey(plugin.getType(),
plugin.getName());
+
+// pluginManager.getServerPluginControlDefinitions(pluginKey,
+// new AsyncCallback<ArrayList<ServerPluginControlDefinition>>()
{
+// public void onSuccess(ArrayList<ServerPluginControlDefinition>
result) {
+// if (result != null && !result.isEmpty()) {
+// SectionStackSection section = new
SectionStackSection(MSG.view_admin_plugins_serverControls());
+// section.setExpanded(false);
+// section.addItem(new
ServerPluginControlView(extendLocatorId("controlView"), plugin, result));
+//
+// controlsSection = section;
+// }
+// ++initSectionCount;
+// }
+//
+// public void onFailure(Throwable caught) {
+//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+// }
+// });
+ }
+
+ private void preparePluginConfigurationSection(final SectionStack stack, final
ServerPlugin plugin) {
+ final PluginKey pluginKey = PluginKey.createServerPluginKey(plugin.getType(),
plugin.getName());
+
+// pluginManager.getServerPluginConfigurationDefinition(pluginKey, new
AsyncCallback<ConfigurationDefinition>() {
+// public void onSuccess(ConfigurationDefinition def) {
+// if (def != null) {
+// LocatableVLayout layout = new
LocatableVLayout(extendLocatorId("pcEditorLayout"));
+//
+// ToolStrip buttons = new ToolStrip();
+// buttons.setWidth100();
+// buttons.setExtraSpace(10);
+// buttons.setMembersMargin(5);
+// buttons.setLayoutMargin(5);
+//
+// final IButton saveButtonPC = new
LocatableIButton(extendLocatorId("pcSave"), MSG
+// .common_button_save());
+//
+// final IButton resetButtonPC = new
LocatableIButton(extendLocatorId("pcRest"), MSG
+// .common_button_reset());
+//
+// Configuration config = plugin.getPluginConfiguration();
+// final ConfigurationEditor editorPC = new
ConfigurationEditor(extendLocatorId("pcEdit"), def, config);
+// editorPC.setOverflow(Overflow.AUTO);
+// editorPC.addPropertyValueChangeListener(new
PropertyValueChangeListener() {
+// public void propertyValueChanged(PropertyValueChangeEvent
event) {
+// if (event.isInvalidPropertySetChanged()) {
+// Map<String, String> invalidPropertyNames =
event.getInvalidPropertyNames();
+// if (invalidPropertyNames.isEmpty()) {
+// saveButtonPC.enable();
+// } else {
+// saveButtonPC.disable();
+// }
+// }
+// }
+// });
+//
+// resetButtonPC.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// editorPC.reset();
+// }
+// });
+//
+// saveButtonPC.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// if (!editorPC.validate()) {
+// Message msg = new
Message(MSG.view_admin_plugins_serverConfig_badSettings(),
+// Severity.Warning,
EnumSet.of(Message.Option.Transient));
+// CoreGUI.getMessageCenter().notify(msg);
+// return;
+// }
+//// pluginManager.updateServerPluginConfiguration(pluginKey,
editorPC.getConfiguration(),
+//// new AsyncCallback<Void>() {
+//// public void onSuccess(Void result) {
+//// Message m = new
Message(MSG.view_admin_plugins_serverConfig_settingsSaved());
+//// CoreGUI.getMessageCenter().notify(m);
+//// }
+////
+//// public void onFailure(Throwable caught) {
+//// CoreGUI.getErrorHandler().handleError(
+////
MSG.view_admin_plugins_serverConfig_saveFailed(), caught);
+//// }
+//// });
+// }
+// });
+//
+// buttons.addMember(saveButtonPC);
+// buttons.addMember(resetButtonPC);
+// layout.addMember(buttons);
+// layout.addMember(editorPC);
+//
+// SectionStackSection section = new
SectionStackSection(MSG.view_admin_plugins_serverConfig());
+// section.setExpanded(false);
+// section.setItems(layout);
+//
+// pluginConfigSection = section;
+// }
+//
+// ++initSectionCount;
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+// }
+// });
+ return;
+ }
+
+ private void prepareScheduledJobsSection(final SectionStack stack, final ServerPlugin
plugin) {
+ final PluginKey pluginKey = PluginKey.createServerPluginKey(plugin.getType(),
plugin.getName());
+
+// pluginManager.getServerPluginScheduledJobsDefinition(pluginKey, new
AsyncCallback<ConfigurationDefinition>() {
+// public void onSuccess(ConfigurationDefinition def) {
+// if (def != null) {
+// LocatableVLayout layout = new
LocatableVLayout(extendLocatorId("sjEditorLayout"));
+//
+// ToolStrip buttons = new ToolStrip();
+// buttons.setWidth100();
+// buttons.setExtraSpace(10);
+// buttons.setMembersMargin(5);
+// buttons.setLayoutMargin(5);
+//
+// final IButton saveButtonSJ = new
LocatableIButton(extendLocatorId("sjSave"), MSG
+// .common_button_save());
+// buttons.addMember(saveButtonSJ);
+//
+// final IButton resetButtonSJ = new
LocatableIButton(extendLocatorId("sjRest"), MSG
+// .common_button_reset());
+// buttons.addMember(resetButtonSJ);
+//
+// Configuration config = plugin.getScheduledJobsConfiguration();
+// final ConfigurationEditor editorSJ = new
ConfigurationEditor(extendLocatorId("sjEdit"), def, config);
+// editorSJ.setOverflow(Overflow.AUTO);
+// editorSJ.addPropertyValueChangeListener(new
PropertyValueChangeListener() {
+// public void propertyValueChanged(PropertyValueChangeEvent
event) {
+// if (event.isInvalidPropertySetChanged()) {
+// Map<String, String> invalidPropertyNames =
event.getInvalidPropertyNames();
+// if (invalidPropertyNames.isEmpty()) {
+// saveButtonSJ.enable();
+// } else {
+// saveButtonSJ.disable();
+// }
+// }
+// }
+// });
+//
+// resetButtonSJ.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// editorSJ.reset();
+// }
+// });
+//
+// saveButtonSJ.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// if (!editorSJ.validate()) {
+// Message msg = new
Message(MSG.view_admin_plugins_serverConfig_badSettings(),
+// Severity.Warning,
EnumSet.of(Message.Option.Transient));
+// CoreGUI.getMessageCenter().notify(msg);
+// return;
+// }
+//// pluginManager.updateServerPluginScheduledJobs(pluginKey,
editorSJ.getConfiguration(),
+//// new AsyncCallback<Void>() {
+//// public void onSuccess(Void result) {
+//// Message m = new
Message(MSG.view_admin_plugins_serverConfig_settingsSaved());
+//// CoreGUI.getMessageCenter().notify(m);
+//// }
+////
+//// public void onFailure(Throwable caught) {
+//// CoreGUI.getErrorHandler().handleError(
+////
MSG.view_admin_plugins_serverConfig_saveFailed(), caught);
+//// }
+//// });
+// }
+// });
+//
+// layout.addMember(buttons);
+// layout.addMember(editorSJ);
+//
+// SectionStackSection section = new
SectionStackSection(MSG.view_admin_plugins_serverScheduleJobs());
+// section.setExpanded(false);
+// section.setItems(layout);
+//
+// scheduledJobsSection = section;
+// }
+//
+// ++initSectionCount;
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), caught);
+// }
+// });
+ return;
+ }
+
+ private void prepareHelpSection(SectionStack stack, ServerPlugin plugin) {
+ if (plugin.getHelp() != null && plugin.getHelp().length() > 0) {
+ SectionStackSection section = new
SectionStackSection(MSG.common_title_help());
+ section.setExpanded(true);
+ Label help = new Label(plugin.getHelp());
+ section.setItems(help);
+
+ helpSection = section;
+ }
+
+ ++initSectionCount;
+ return;
+ }
+
+ private void prepareDetailsSection(SectionStack stack, ServerPlugin plugin) {
+ LocatableDynamicForm form = new
LocatableDynamicForm(extendLocatorId("detailsForm"));
+ form.setMargin(10);
+ form.setWidth100();
+ form.setWrapItemTitles(false);
+ form.setNumCols(4);
+
+ StaticTextItem nameItem = new StaticTextItem("name",
MSG.common_title_name());
+ nameItem.setValue(plugin.getName());
+
+ StaticTextItem displayNameItem = new StaticTextItem("displayName",
MSG.common_title_display_name());
+ displayNameItem.setValue(plugin.getDisplayName());
+
+ StaticTextItem versionItem = new StaticTextItem("version",
MSG.common_title_version());
+ versionItem.setValue(plugin.getVersion());
+
+ StaticTextItem md5Item = new StaticTextItem("MD5", "MD5");
+ md5Item.setValue(plugin.getMD5());
+
+ StaticTextItem pathItem = new StaticTextItem("path",
MSG.common_title_path());
+ pathItem.setValue(plugin.getPath());
+
+ StaticTextItem ampsItem = new StaticTextItem("ampsVersion", "AMPS
" + MSG.common_title_version());
+ ampsItem.setValue(plugin.getAmpsVersion());
+
+ StaticTextItem descItem = new StaticTextItem("desc",
MSG.common_title_description());
+ descItem.setValue(plugin.getDescription());
+
+ StaticTextItem mtimeItem = new StaticTextItem("mtime",
MSG.common_title_lastUpdated());
+
mtimeItem.setValue(TimestampCellFormatter.format(Long.valueOf(plugin.getMtime()),
+ TimestampCellFormatter.DATE_TIME_FORMAT_MEDIUM));
+
+ StaticTextItem kindItem = new StaticTextItem("kind",
MSG.common_title_kind());
+ switch (plugin.getDeployment()) {
+ case AGENT:
+ kindItem.setValue(MSG.view_admin_plugins_agent());
+ break;
+ case SERVER:
+ kindItem.setValue(MSG.view_admin_plugins_server());
+ break;
+ }
+
+ CanvasItem enabledItem = new CanvasItem("enabled",
MSG.common_title_enabled());
+ Img img = new Img(ImageManager.getAvailabilityIcon(plugin.isEnabled()), 16, 16);
+ enabledItem.setCanvas(img);
+
+ StaticTextItem typeItem = new StaticTextItem("type",
MSG.common_title_type());
+ typeItem.setValue(plugin.getType());
+
+ form.setItems(displayNameItem, nameItem, versionItem, ampsItem, md5Item,
kindItem, descItem, pathItem,
+ mtimeItem, enabledItem, typeItem);
+
+ SectionStackSection section = new
SectionStackSection(MSG.common_title_details());
+ section.setExpanded(true);
+ section.setItems(form);
+
+ detailsSection = section;
+ ++initSectionCount;
+
+ return;
+ }
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
index e99efbe..57b6d1c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
@@ -31,30 +31,24 @@ import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.util.BooleanCallback;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.IButton;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
import org.rhq.core.domain.criteria.Criteria;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.admin.ServerTableView.CloudDataSource;
import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.components.upload.PluginFileUploadForm;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIButton;
/**
* @author Jiri Kremser
@@ -67,15 +61,15 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
private static final String FIELD_ID = "id";
private static final String FIELD_NAME = "name";
- private static final String FIELD_MODE = "mode";
- private static final String FIELD_ENDPOINT_ADDRESS = "endpointAddress";
- private static final String FIELD_NONSECURE_PORT = "nonsecurePort";
+ private static final String FIELD_MODE = "operationMode";
+ private static final String FIELD_ENDPOINT_ADDRESS = "address";
+ private static final String FIELD_NONSECURE_PORT = "port";
private static final String FIELD_SECURE_PORT = "securePort";
- private static final String FIELD_LAST_UPDATE_TIME = "lastUpdateTime";
+ private static final String FIELD_LAST_UPDATE_TIME = "mtime";
private static final String FIELD_AFFINITY_GROUP = "affinityGroup";
private static final String FIELD_AGENT_COUNT = "agentCount";
- private boolean showUndeployed = false;
+// private boolean showUndeployed = false;
public ServerTableView(String locatorId) {
super(locatorId, null);
@@ -91,32 +85,33 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
- addTableAction(extendLocatorId("enable"), MSG.common_button_enable(),
MSG.common_msg_areYouSure(),
+ addTableAction(extendLocatorId("setNormal"),
MSG.view_adminTopology_server_setNormal(), MSG.common_msg_areYouSure(),
new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
public void executeAction(ListGridRecord[] selections, Object
actionValue) {
int[] selectedIds = getSelectedIds(selections);
- GWTServiceLookup.getPluginService().enableServerPlugins(selectedIds,
- new AsyncCallback<ArrayList<String>>() {
- @Override
- public void onSuccess(ArrayList<String> result) {
- Message msg = new Message(
-
MSG.view_admin_plugins_enabledServerPlugins(result.toString()), Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
- refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- MSG.view_admin_plugins_enabledServerPluginsFailure()
+ " " + caught.getMessage(),
- caught);
- refreshTableInfo();
- }
- });
+ SC.say("setting servers to normal mode, ids: " +
selectedIds);
+//
GWTServiceLookup.getPluginService().enableServerPlugins(selectedIds,
+// new AsyncCallback<ArrayList<String>>() {
+// @Override
+// public void onSuccess(ArrayList<String> result) {
+// Message msg = new Message(
+//
MSG.view_admin_plugins_enabledServerPlugins(result.toString()), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+//
MSG.view_admin_plugins_enabledServerPluginsFailure() + " " +
caught.getMessage(),
+// caught);
+// refreshTableInfo();
+// }
+// });
}
});
- addTableAction(extendLocatorId("disable"), MSG.common_button_disable(),
new AuthorizedTableAction(this,
+ addTableAction(extendLocatorId("setMaintenance"),
MSG.view_adminTopology_server_setMaintenance(), new AuthorizedTableAction(this,
TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
ArrayList<String> selectedNames = getSelectedNames(selections);
@@ -125,59 +120,25 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
public void execute(Boolean confirmed) {
if (confirmed) {
int[] selectedIds = getSelectedIds(selections);
-
GWTServiceLookup.getPluginService().disableServerPlugins(selectedIds,
- new AsyncCallback<ArrayList<String>>() {
- @Override
- public void onSuccess(ArrayList<String> result)
{
- Message msg = new
Message(MSG.view_admin_plugins_disabledServerPlugins(result
- .toString()), Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
- refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
-
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
- + caught.getMessage(), caught);
- refreshTableInfo();
- }
- });
- } else {
- refreshTableInfo();
- }
- }
- });
- }
- });
-
- addTableAction(extendLocatorId("undeploy"),
MSG.view_admin_plugins_undeploy(), new AuthorizedTableAction(this,
- TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
- public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
- ArrayList<String> selectedNames = getSelectedNames(selections);
- String message =
MSG.view_admin_plugins_serverUndeployConfirm(selectedNames.toString());
- SC.ask(message, new BooleanCallback() {
- public void execute(Boolean confirmed) {
- if (confirmed) {
- int[] selectedIds = getSelectedIds(selections);
-
GWTServiceLookup.getPluginService().undeployServerPlugins(selectedIds,
- new AsyncCallback<ArrayList<String>>() {
- @Override
- public void onSuccess(ArrayList<String> result)
{
- Message msg = new
Message(MSG.view_admin_plugins_undeployedServerPlugins(result
- .toString()), Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
- refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
-
MSG.view_admin_plugins_undeployedServerPluginsFailure() + " "
- + caught.getMessage(), caught);
- refreshTableInfo();
- }
- });
+ SC.say("setting servers to maintenance mode, ids: "
+ selectedIds);
+//
GWTServiceLookup.getPluginService().disableServerPlugins(selectedIds,
+// new AsyncCallback<ArrayList<String>>() {
+// @Override
+// public void onSuccess(ArrayList<String>
result) {
+// Message msg = new
Message(MSG.view_admin_plugins_disabledServerPlugins(result
+// .toString()), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+//
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+// + caught.getMessage(), caught);
+// refreshTableInfo();
+// }
+// });
} else {
refreshTableInfo();
}
@@ -186,102 +147,95 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
}
});
- addTableAction(extendLocatorId("purge"), MSG.common_button_purge(),
MSG.common_msg_areYouSure(),
+
+ addTableAction(extendLocatorId("removeSelected"),
MSG.view_adminTopology_server_removeSelected(), MSG.common_msg_areYouSure(),
new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
- public boolean isEnabled(ListGridRecord[] selection) {
- if (showUndeployed) {
- return super.isEnabled(selection);
- } else {
- return false; // we aren't showing undeployed plugins, so
there is no plugin shown that can be purged anyway
- }
- }
-
public void executeAction(ListGridRecord[] selections, Object
actionValue) {
int[] selectedIds = getSelectedIds(selections);
- GWTServiceLookup.getPluginService().purgeServerPlugins(selectedIds,
- new AsyncCallback<ArrayList<String>>() {
- @Override
- public void onSuccess(ArrayList<String> result) {
- Message msg = new Message(
-
MSG.view_admin_plugins_purgedServerPlugins(result.toString()), Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
- refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- MSG.view_admin_plugins_purgedServerPluginsFailure() +
" " + caught.getMessage(),
- caught);
- refreshTableInfo();
- }
- });
+ SC.say("removing servers with ids: " + selectedIds);
+// GWTServiceLookup.getCloudService().purgeServerPlugins(selectedIds,
+// new AsyncCallback<ArrayList<String>>() {
+// @Override
+// public void onSuccess(ArrayList<String> result) {
+// Message msg = new Message(
+//
MSG.view_admin_plugins_purgedServerPlugins(result.toString()), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+// MSG.view_admin_plugins_purgedServerPluginsFailure()
+ " " + caught.getMessage(),
+// caught);
+// refreshTableInfo();
+// }
+// });
}
});
- IButton scanForUpdatesButton = new
LocatableIButton(extendLocatorId("scanButton"),
- MSG.view_admin_plugins_scan());
- scanForUpdatesButton.setAutoFit(true);
- scanForUpdatesButton.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
- GWTServiceLookup.getPluginService().scanAndRegister(new
AsyncCallback<Void>() {
- @Override
- public void onSuccess(Void result) {
- Message msg = new Message(MSG.view_admin_plugins_scanComplete(),
Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
- refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- MSG.view_admin_plugins_scanFailure() + " " +
caught.getMessage(), caught);
- refreshTableInfo();
- }
- });
- }
- });
-
- IButton restartMasterPCButton = new
LocatableIButton(extendLocatorId("restartMasterPCButton"),
- MSG.view_admin_plugins_restartMasterPC());
- restartMasterPCButton.setAutoFit(true);
- restartMasterPCButton.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
- Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCStarted(), Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
-
- GWTServiceLookup.getPluginService().restartMasterPluginContainer(new
AsyncCallback<Void>() {
- @Override
- public void onSuccess(Void result) {
- Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCComplete(), Severity.Info);
- CoreGUI.getMessageCenter().notify(msg);
- refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- MSG.view_admin_plugins_restartMasterPCFailure() + "
" + caught.getMessage(), caught);
- refreshTableInfo();
- }
- });
- }
- });
-
+// IButton scanForUpdatesButton = new
LocatableIButton(extendLocatorId("scanButton"),
+// MSG.view_admin_plugins_scan());
+// scanForUpdatesButton.setAutoFit(true);
+// scanForUpdatesButton.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// GWTServiceLookup.getPluginService().scanAndRegister(new
AsyncCallback<Void>() {
+// @Override
+// public void onSuccess(Void result) {
+// Message msg = new
Message(MSG.view_admin_plugins_scanComplete(), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+// MSG.view_admin_plugins_scanFailure() + " " +
caught.getMessage(), caught);
+// refreshTableInfo();
+// }
+// });
+// }
+// });
+
+// IButton restartMasterPCButton = new
LocatableIButton(extendLocatorId("restartMasterPCButton"),
+// MSG.view_admin_plugins_restartMasterPC());
+// restartMasterPCButton.setAutoFit(true);
+// restartMasterPCButton.addClickHandler(new ClickHandler() {
+// public void onClick(ClickEvent event) {
+// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCStarted(), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+//
+// GWTServiceLookup.getPluginService().restartMasterPluginContainer(new
AsyncCallback<Void>() {
+// @Override
+// public void onSuccess(Void result) {
+// Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCComplete(), Severity.Info);
+// CoreGUI.getMessageCenter().notify(msg);
+// refresh();
+// }
+//
+// @Override
+// public void onFailure(Throwable caught) {
+// CoreGUI.getErrorHandler().handleError(
+// MSG.view_admin_plugins_restartMasterPCFailure() + "
" + caught.getMessage(), caught);
+// refreshTableInfo();
+// }
+// });
+// }
+// });
- PluginFileUploadForm pluginUploadForm = new
PluginFileUploadForm(extendLocatorId("upload"),
- MSG.view_admin_plugins_upload(), true);
+// PluginFileUploadForm pluginUploadForm = new
PluginFileUploadForm(extendLocatorId("upload"),
+// MSG.view_admin_plugins_upload(), true);
- addExtraWidget(scanForUpdatesButton, true);
- addExtraWidget(restartMasterPCButton, true);
- addExtraWidget(pluginUploadForm, true);
+// addExtraWidget(scanForUpdatesButton, true);
+// addExtraWidget(restartMasterPCButton, true);
+// addExtraWidget(pluginUploadForm, true);
super.configureTable();
}
@Override
public Canvas getDetailsView(Integer id) {
- return new ServerPluginDetailView(extendLocatorId("detailsView"), id);
+ return new ServerDetailView(extendLocatorId("detailsView"), id);
}
private int[] getSelectedIds(ListGridRecord[] selections) {
@@ -307,7 +261,7 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
return ids;
}
- public class CloudDataSource extends RPCDataSource<Server, Criteria> {
+ public class CloudDataSource extends RPCDataSource<ServerWithAgentCountComposite,
Criteria> {
public CloudDataSource() {
super();
@@ -338,29 +292,35 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
ListGridField modeField = new ListGridField(FIELD_MODE,
MSG.view_adminTopology_server_mode());
fields.add(modeField);
- ListGridField endpointAddressField = new
ListGridField(FIELD_ENDPOINT_ADDRESS, MSG.view_adminTopology_server_endpointAddress());
-// TimestampCellFormatter.prepareDateField(endpointAddressField);
+ ListGridField endpointAddressField = new
ListGridField(FIELD_ENDPOINT_ADDRESS,
+ MSG.view_adminTopology_server_endpointAddress());
+ // TimestampCellFormatter.prepareDateField(endpointAddressField);
fields.add(endpointAddressField);
- ListGridField nonsecurePortField = new ListGridField(FIELD_NONSECURE_PORT,
MSG.view_adminTopology_server_nonSecurePort());
-// enabledField.setType(ListGridFieldType.IMAGE);
-// enabledField.setAlign(Alignment.CENTER);
+ ListGridField nonsecurePortField = new ListGridField(FIELD_NONSECURE_PORT,
+ MSG.view_adminTopology_server_nonSecurePort());
+ // enabledField.setType(ListGridFieldType.IMAGE);
+ // enabledField.setAlign(Alignment.CENTER);
fields.add(nonsecurePortField);
- ListGridField securedPortField = new ListGridField(FIELD_SECURE_PORT,
MSG.view_adminTopology_server_securePort());
-// deployedField.setType(ListGridFieldType.IMAGE);
-// deployedField.setAlign(Alignment.CENTER);
-// deployedField.setHidden(true);
+ ListGridField securedPortField = new ListGridField(FIELD_SECURE_PORT,
+ MSG.view_adminTopology_server_securePort());
+ // deployedField.setType(ListGridFieldType.IMAGE);
+ // deployedField.setAlign(Alignment.CENTER);
+ // deployedField.setHidden(true);
fields.add(securedPortField);
- ListGridField lastUpdateTimeField = new ListGridField(FIELD_LAST_UPDATE_TIME,
MSG.view_adminTopology_server_lastUpdateTime());
- TimestampCellFormatter.prepareDateField(endpointAddressField);
+ ListGridField lastUpdateTimeField = new
ListGridField(FIELD_LAST_UPDATE_TIME,
+ MSG.view_adminTopology_server_lastUpdateTime());
+ TimestampCellFormatter.prepareDateField(lastUpdateTimeField);
fields.add(lastUpdateTimeField);
-
- ListGridField affinityGroupField = new ListGridField(FIELD_AFFINITY_GROUP,
MSG.view_adminTopology_server_affinityGroup());
+
+ ListGridField affinityGroupField = new ListGridField(FIELD_AFFINITY_GROUP,
+ MSG.view_adminTopology_server_affinityGroup());
fields.add(affinityGroupField);
-
- ListGridField agentCountField = new ListGridField(FIELD_AGENT_COUNT,
MSG.view_adminTopology_server_agentCount());
+
+ ListGridField agentCountField = new ListGridField(FIELD_AGENT_COUNT,
+ MSG.view_adminTopology_server_agentCount());
fields.add(agentCountField);
idField.setWidth(100);
@@ -376,39 +336,66 @@ public class ServerTableView extends
TableSection<CloudDataSource> {
@Override
protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
-// GWTServiceLookup.getPluginService().getServerPlugins(showUndeployed,
-// new AsyncCallback<ArrayList<Server>>() {
-// public void onSuccess(ArrayList<Server> result) {
-// response.setData(buildRecords(result));
-// response.setTotalRows(result.size());
-// processResponse(request.getRequestId(), response);
-// }
-//
-// @Override
-// public void onFailure(Throwable t) {
-//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
-// response.setStatus(DSResponse.STATUS_FAILURE);
-// processResponse(request.getRequestId(), response);
-// }
-// });
+ final PageControl pc = getPageControl(request);
+
+ GWTServiceLookup.getCloudService().getServers(pc, new
AsyncCallback<List<ServerWithAgentCountComposite>>() {
+ public void onSuccess(List<ServerWithAgentCountComposite> result)
{
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ //todo:
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+
+ /**
+ * Returns a prepopulated PageControl based on the provided DSRequest. This will
set sort fields,
+ * pagination, but *not* filter fields.
+ *
+ * @param request the request to turn into a page control
+ * @return the page control for passing to criteria and other queries
+ */
+ protected PageControl getPageControl(DSRequest request) {
+ // Initialize paging.
+ PageControl pageControl = new PageControl(0, getDataPageSize());
+
+ // Initialize sorting.
+ String sortBy = request.getAttribute("sortBy");
+ if (sortBy != null) {
+ String[] sorts = sortBy.split(",");
+ for (String sort : sorts) {
+ PageOrdering ordering = (sort.startsWith("-")) ?
PageOrdering.DESC : PageOrdering.ASC;
+ String columnName = (ordering == PageOrdering.DESC) ?
sort.substring(1) : sort;
+ pageControl.addDefaultOrderingField(columnName, ordering);
+ }
+ }
+
+ return pageControl;
}
@Override
- public Server copyValues(Record from) {
- throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ public ServerWithAgentCountComposite copyValues(Record from) {
+ throw new UnsupportedOperationException(
+ "ServerTableView.CloudDataSourcepublic Server copyValues(Record
from)");
}
@Override
- public ListGridRecord copyValues(Server from) {
+ public ListGridRecord copyValues(ServerWithAgentCountComposite from) {
ListGridRecord record = new ListGridRecord();
- record.setAttribute(FIELD_ID, from.getId());
- record.setAttribute(FIELD_NAME, from.getName());
- record.setAttribute(FIELD_MODE, from.getOperationMode());
- record.setAttribute(FIELD_ENDPOINT_ADDRESS, from.getAddress());
- record.setAttribute(FIELD_NONSECURE_PORT, from.getPort());
- record.setAttribute(FIELD_SECURE_PORT, from.getSecurePort());
- record.setAttribute(FIELD_LAST_UPDATE_TIME, from.getMtime());
- record.setAttribute(FIELD_AFFINITY_GROUP, from.getAffinityGroup());
+ record.setAttribute(FIELD_ID, from.getServer().getId());
+ record.setAttribute(FIELD_NAME, from.getServer().getName());
+ record.setAttribute(FIELD_MODE, from.getServer().getOperationMode());
+ record.setAttribute(FIELD_ENDPOINT_ADDRESS, from.getServer().getAddress());
+ record.setAttribute(FIELD_NONSECURE_PORT, from.getServer().getPort());
+ record.setAttribute(FIELD_SECURE_PORT, from.getServer().getSecurePort());
+ record.setAttribute(FIELD_LAST_UPDATE_TIME, from.getServer().getMtime());
+ record.setAttribute(FIELD_AFFINITY_GROUP,
from.getServer().getAffinityGroup());
record.setAttribute(FIELD_AGENT_COUNT, from.getAgentCount());
return record;
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
new file mode 100644
index 0000000..84477f2
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
@@ -0,0 +1,50 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.gwt;
+
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+
+/**
+ * @author Jiri Kremser
+ */
+public interface CloudGWTService extends RemoteService {
+
+ /**
+ *
+ * @return a list of all available servers (the servers in MAINTENANCE mode are
included as well)
+ * @throws RuntimeException
+ */
+ List<ServerWithAgentCountComposite> getServers(PageControl pc) throws
RuntimeException;
+
+ Server getServerById(int serverId) throws RuntimeException;
+
+ List<Agent> getAgentsByServerName(String serverName) throws RuntimeException;
+
+}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
index b1289e4..54e2a30 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
@@ -205,6 +205,10 @@ public class GWTServiceLookup {
public static PlatformUtilizationGWTServiceAsync getPlatformUtilizationService() {
return secure(PlatformUtilizationGWTServiceAsync.Util.getInstance());
}
+
+ public static CloudGWTServiceAsync getCloudService() {
+ return secure(CloudGWTServiceAsync.Util.getInstance());
+ }
@SuppressWarnings("unchecked")
private static <T> T secure(Object sdt) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
new file mode 100644
index 0000000..5265288
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
@@ -0,0 +1,73 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.server.gwt;
+
+import java.util.List;
+
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.gui.coregui.client.gwt.CloudGWTService;
+import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
+import org.rhq.enterprise.server.cloud.CloudManagerLocal;
+import org.rhq.enterprise.server.util.LookupUtil;
+
+/**
+ * @author Jiri Kremser
+ */
+public class CloudGWTServiceImpl extends AbstractGWTServiceImpl implements
CloudGWTService {
+
+ private static final long serialVersionUID = 1L;
+
+ private CloudManagerLocal cloudManager = LookupUtil.getCloudManager();
+
+ @Override
+ public PageList<ServerWithAgentCountComposite> getServers(PageControl pc)
throws RuntimeException {
+ try {
+ return
SerialUtility.prepare(cloudManager.getServerComposites(getSessionSubject(), pc),
"CloudGWTServiceImpl.getServers");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public Server getServerById(int serverId) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(cloudManager.getServerById(serverId),
"CloudGWTServiceImpl.getServerById");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public List<Agent> getAgentsByServerName(String serverName) throws
RuntimeException {
+ try {
+ return SerialUtility.prepare(cloudManager.getAgentsByServerName(serverName),
"CloudGWTServiceImpl.getAgentsByServerName");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
b/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
index 418e37b..b32c98c 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
@@ -194,6 +194,10 @@
<servlet-class>org.rhq.enterprise.gui.coregui.server.gwt.PlatformUtilizationGWTServiceImpl</servlet-class>
</servlet>
<servlet>
+ <servlet-name>org.rhq.enterprise.gui.coregui.CoreGUI
CloudGWTService</servlet-name>
+
<servlet-class>org.rhq.enterprise.gui.coregui.server.gwt.CloudGWTServiceImpl</servlet-class>
+ </servlet>
+ <servlet>
<servlet-name>ReportExporter</servlet-name>
<servlet-class>org.rhq.enterprise.gui.coregui.server.reports.ReportExportServlet</servlet-class>
</servlet>
@@ -374,6 +378,10 @@
<url-pattern>/org.rhq.enterprise.gui.coregui.CoreGUI/PlatformUtilizationGWTService</url-pattern>
</servlet-mapping>
<servlet-mapping>
+ <servlet-name>org.rhq.enterprise.gui.coregui.CoreGUI
CloudGWTService</servlet-name>
+
<url-pattern>/org.rhq.enterprise.gui.coregui.CoreGUI/CloudGWTService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
<servlet-name>ReportExporter</servlet-name>
<url-pattern>/ReportExporter</url-pattern>
</servlet-mapping>
commit 4e2ff6a181ba78b6286353b3bbf1ad045643988d
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Nov 16 10:16:24 2012 -0500
[Bug 877179 -revert changes to plugin api signature for
PropertyDefinitionMap.getPropertyDefinitions()]
While maintaining the fix done for Bug 786416, restore the public API that
was broken in the original fix work. Also, maintain as much of the API
introduced in that fix work just in case it is now in use.
Also fixed PropertyDefinitionMap.put(PropertyDefinition) to be more careful
, and well-defined, about how it handles ordering.
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionMap.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionMap.java
index 53ba6ce..4265168 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionMap.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionMap.java
@@ -23,11 +23,13 @@
package org.rhq.core.domain.configuration.definition;
import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
@@ -75,7 +77,7 @@ public class PropertyDefinitionMap extends PropertyDefinition {
}
/**
- * @return The <name,propDef> Mapping. This guarantees no ordering.
+ * @return The <name,propDef> Map. This guarantees no ordering.
*/
@NotNull
public Map<String, PropertyDefinition> getMap() {
@@ -91,45 +93,78 @@ public class PropertyDefinitionMap extends PropertyDefinition {
}
/**
- * Convenience routine to get the ordered properties from the Map.
+ * For public API compatibility.
+ * @deprecated use {@link #setMap(Map)}
+ */
+ public void setPropertyDefinitions(@NotNull Map<String, PropertyDefinition>
propertyDefinitions) {
+ setMap(propertyDefinitions);
+ }
+
+ /**
+ * This returned {@link Map} is backed by a {@link SortedMap} sorted on
PropertyDefinition.order. This means that
+ * result.keySet() and result.values() will be sorted by PropertyDefinition.order,
ascending. Min(order) is 0.
+ * <p>
+ * For an unsorted Map use {@link #getMap()}.</p>
*
- * @return Not Null. The map's property definitions sorted by
PropertyDefinition.order, ascending. Min(order) is 0.
+ * @return The map's property definitions sorted by PropertyDefinition.order,
ascending. Min(order) is 0.
*/
- public List<PropertyDefinition> getPropertyDefinitions() {
- final List<PropertyDefinition> propDefs = new
ArrayList<PropertyDefinition>(getMap().values());
+ @NotNull
+ public Map<String, PropertyDefinition> getPropertyDefinitions() {
+ Map<String, PropertyDefinition> map = getMap();
+
+ // if there is nothing to sort just return it.
+ if (map.size() <= 1) {
+ return map;
+ }
- Collections.sort(propDefs, new Comparator<PropertyDefinition>() {
- public int compare(PropertyDefinition o1, PropertyDefinition o2) {
- return Integer.valueOf(o1.getOrder()).compareTo(o2.getOrder());
+ // a funky comparator that compares index order given prop def names (i.e. keys)
+ Comparator<String> orderComparator = new Comparator<String>() {
+ public int compare(String o1, String o2) {
+ return
Integer.valueOf(get(o1).getOrder()).compareTo(get(o2).getOrder());
}
- });
+ };
+
+ final Map<String, PropertyDefinition> result = new TreeMap<String,
PropertyDefinition>(orderComparator);
+ for (String key : map.keySet()) {
+ result.put(key, map.get(key));
+ }
- return propDefs;
+ return result;
}
/**
- * Helper to get only the summary properties for this map definition. If no
properties were defined as summary
- * properties in the plugin descriptor, the full list of properties will be
returned.
+ * Convenience routine to get the ordered property definitions from the Map.
+ *
+ * @return The map's property definitions sorted by PropertyDefinition.order,
ascending. Min(order) is 0.
+ */
+ @NotNull
+ public Collection<PropertyDefinition> getOrderedPropertyDefinitions() {
+ return getPropertyDefinitions().values();
+ }
+
+ /**
+ * Convenience routine to get only the summary property definitions.
*
- * @return the member properties that are marked as summary properties; the
properties will be returned in the same
- * order they were defined in the plugin descriptor; if no properties were
defined as summary properties in
- * the plugin descriptor, the full list of properties will be returned
+ * @return the summary property definitions. If no property definitions were defined
+ * as summary properties in the plugin descriptor, all property definitions will be
returned.
+ * The property definitions will be sorted by PropertyDefinition.order, ascending.
Min(order) is 0.
*/
@NotNull
public List<PropertyDefinition> getSummaryPropertyDefinitions() {
- List<PropertyDefinition> summaryDefinitions = new
ArrayList<PropertyDefinition>();
- for (PropertyDefinition propertyDefinition : getMap().values()) {
- if (propertyDefinition.isSummary()) {
- summaryDefinitions.add(propertyDefinition);
+ List<PropertyDefinition> result = new
ArrayList<PropertyDefinition>();
+ Collection<PropertyDefinition> propDefs = getOrderedPropertyDefinitions();
+
+ for (PropertyDefinition pd : propDefs) {
+ if (pd.isSummary()) {
+ result.add(pd);
}
}
- if (summaryDefinitions.isEmpty()) {
- // No properties were defined as summary properties - return the full list of
properties.
- summaryDefinitions.addAll(getMap().values());
+ if (result.isEmpty()) {
+ result.addAll(propDefs);
}
- return summaryDefinitions;
+ return result;
}
public PropertyDefinitionSimple getPropertyDefinitionSimple(String name) {
@@ -149,13 +184,36 @@ public class PropertyDefinitionMap extends PropertyDefinition {
}
/**
- * If an order index is not set on the propertyDefinition it will be set to the
current number
- * of propDefs for the map. So, adding props to the map in the desired order will
- * the
+ * If propertyDefinition.order is <= 0 or > Map.size() it will be set to the
current number of propDefs for
+ * the map (placing it at the end). Otherwise, it will be inserted, incrementing the
order of existing
+ * Map entries.
+ *
* @param propertyDefinition
*/
public void put(PropertyDefinition propertyDefinition) {
- getMap().put(propertyDefinition.getName(), propertyDefinition);
+ Map<String, PropertyDefinition> map = getMap();
+
+ if (map.isEmpty()) {
+ propertyDefinition.setOrder(0);
+
+ } else {
+ int order = propertyDefinition.getOrder();
+ int size = map.size();
+
+ if ((order <= 0) || (order >= size)) {
+ propertyDefinition.setOrder(size);
+
+ } else {
+ // insert into existing ordering by bumping up existing entries
+ for (PropertyDefinition p : map.values()) {
+ if (p.getOrder() >= order) {
+ p.setOrder(p.getOrder() + 1);
+ }
+ }
+ }
+ }
+
+ map.put(propertyDefinition.getName(), propertyDefinition);
propertyDefinition.setParentPropertyMapDefinition(this);
}
}
\ No newline at end of file
diff --git
a/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/ConfigRenderer.java
b/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/ConfigRenderer.java
index 7a94fed..319335e 100644
--- a/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/ConfigRenderer.java
+++ b/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/ConfigRenderer.java
@@ -476,7 +476,7 @@ public class ConfigRenderer extends Renderer {
.getPropertyDefinitionList(listName).getMemberDefinition();
String mapName = mapDefinition.getName();
PropertyMap newMap = new PropertyMap(mapName);
- for (PropertyDefinition mapMemberDefinition :
mapDefinition.getPropertyDefinitions()) {
+ for (PropertyDefinition mapMemberDefinition :
mapDefinition.getOrderedPropertyDefinitions()) {
PropertyDefinitionSimple simpleDefinition = (PropertyDefinitionSimple)
mapMemberDefinition;
newMap.put(new PropertySimple(simpleDefinition.getName(),
(simpleDefinition.isRequired()) ? "" : null));
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/AggregateConfigurationBuilder.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/AggregateConfigurationBuilder.java
index 5ef910b..15e01ef 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/AggregateConfigurationBuilder.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/AggregateConfigurationBuilder.java
@@ -20,6 +20,7 @@
package org.rhq.enterprise.gui.coregui.client.components.configuration;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -103,7 +104,7 @@ public class AggregateConfigurationBuilder {
private static void buildAggregatePropertyMap(PropertyDefinitionMap
propertyDefinitionMap,
List<AbstractPropertyMap> sourceParentPropertyMaps, AbstractPropertyMap
targetParentPropertyMap) {
- List<PropertyDefinition> childPropertyDefinitions =
propertyDefinitionMap.getPropertyDefinitions();
+ Collection<PropertyDefinition> childPropertyDefinitions =
propertyDefinitionMap.getOrderedPropertyDefinitions();
if (!childPropertyDefinitions.isEmpty()) {
for (PropertyDefinition childPropertyDefinition : childPropertyDefinitions)
buildAggregateProperty(childPropertyDefinition, sourceParentPropertyMaps,
targetParentPropertyMap);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
index 62eab7d..9448dd9 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
@@ -176,7 +176,7 @@ public class ConfigurationComparisonView extends VLayout {
for (AbstractPropertyMap map : maps) {
properties.add((PropertyMap) map);
}
- buildNode(mapNode, defMap.getPropertyDefinitions(), properties);
+ buildNode(mapNode, defMap.getOrderedPropertyDefinitions(), properties);
if (!mapNode.getAttributeAsBoolean(ATTRIB_ALL_SAME)) {
parent.setAttribute(ATTRIB_ALL_SAME, false);
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
index 40413af..47f9c57 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
@@ -253,7 +253,7 @@ public class ConfigurationEditor extends LocatableVLayout {
public void setAllPropertiesWritable(boolean allPropertiesWritable) {
this.allPropertiesWritable = allPropertiesWritable;
}
-
+
public boolean isPreserveTextFormatting() {
return preserveTextFormatting;
}
@@ -394,9 +394,9 @@ public class ConfigurationEditor extends LocatableVLayout {
this.originalConfiguration = configuration.deepCopy();
}
- String oobProp = this.configuration.getSimpleValue("__OOB",null);
- if (oobProp!=null) {
- Message msg = new
Message(oobProp,Message.Severity.Warning,EnumSet.of(Message.Option.Transient));
+ String oobProp = this.configuration.getSimpleValue("__OOB", null);
+ if (oobProp != null) {
+ Message msg = new Message(oobProp, Message.Severity.Warning,
EnumSet.of(Message.Option.Transient));
CoreGUI.getMessageCenter().notify(msg);
}
@@ -584,7 +584,7 @@ public class ConfigurationEditor extends LocatableVLayout {
fields.add(createHeaderTextItem(MSG.common_title_description()));
}
- private StaticTextItem createHeaderTextItem(String value){
+ private StaticTextItem createHeaderTextItem(String value) {
StaticTextItem unsetHeader = new StaticTextItem();
unsetHeader.setValue(value);
unsetHeader.setShowTitle(false);
@@ -783,13 +783,13 @@ public class ConfigurationEditor extends LocatableVLayout {
propertyDefinitionMap = propertyDefinitionMapClone;
}
LocatableVLayout layout = new LocatableVLayout(parentLocatorId +
"_Layout");
-
+
HTMLFlow description = new HTMLFlow(propertyDefinitionMap.getDescription());
layout.addMember(description);
final PropertyDefinitionMap propertyDefinitionMapFinal = propertyDefinitionMap;
LocatableDynamicForm valuesCanvas = buildPropertiesForm(layout.getLocatorId(),
- propertyDefinitionMapFinal.getPropertyDefinitions(), propertyMap);
+ propertyDefinitionMapFinal.getOrderedPropertyDefinitions(), propertyMap);
layout.addMember(valuesCanvas);
if (isDynamic && !isReadOnly(propertyDefinitionMap, propertyMap)) {
@@ -951,7 +951,8 @@ public class ConfigurationEditor extends LocatableVLayout {
summaryTable.setRecordEnabledProperty(null);
List<ListGridField> fieldsList = new ArrayList<ListGridField>();
- final List<PropertyDefinition> propertyDefinitions =
memberPropertyDefinitionMap.getPropertyDefinitions();
+ final List<PropertyDefinition> propertyDefinitions = new
ArrayList<PropertyDefinition>(
+ memberPropertyDefinitionMap.getOrderedPropertyDefinitions());
List<PropertyDefinition> summaryPropertyDefinitions = new
ArrayList<PropertyDefinition>();
for (PropertyDefinition subDef : propertyDefinitions) {
@@ -1009,9 +1010,10 @@ public class ConfigurationEditor extends LocatableVLayout {
SC.confirm(MSG.view_configEdit_confirm_2(), new BooleanCallback() {
public void execute(Boolean confirmed) {
if (confirmed) {
- if( summaryTable.getRecordList().getLength() <=
propertyDefinitionList.getMin()){
-
SC.say(MSG.view_configEdit_minBoundsExceeded(String.valueOf(propertyDefinitionList.getMin())));
- }else {
+ if (summaryTable.getRecordList().getLength() <=
propertyDefinitionList.getMin()) {
+
SC.say(MSG.view_configEdit_minBoundsExceeded(String.valueOf(propertyDefinitionList
+ .getMin())));
+ } else {
PropertyMapListGridRecord recordToBeDeleted =
(PropertyMapListGridRecord) recordClickEvent
.getRecord();
propertyList.getList().remove(recordToBeDeleted.getIndex());
@@ -1042,12 +1044,12 @@ public class ConfigurationEditor extends LocatableVLayout {
if (!propertyReadOnly) {
IButton addRowButton = new IButton();
addRowButton.setIcon(Window.getImgURL(ImageManager.getAddIcon()));
- addRowButton.addClickHandler(new
com.smartgwt.client.widgets.events.ClickHandler() {
- public void onClick(ClickEvent clickEvent) {
- displayMapEditor(summaryTable, null, propertyDefinitionList,
propertyList,
- memberPropertyDefinitionMap, null, mapReadOnly);
- }
- });
+ addRowButton.addClickHandler(new
com.smartgwt.client.widgets.events.ClickHandler() {
+ public void onClick(ClickEvent clickEvent) {
+ displayMapEditor(summaryTable, null, propertyDefinitionList,
propertyList,
+ memberPropertyDefinitionMap, null, mapReadOnly);
+ }
+ });
toolStrip.addMember(addRowButton);
}
@@ -1086,7 +1088,7 @@ public class ConfigurationEditor extends LocatableVLayout {
boolean allPropsDefsReadOnly = true;
for (PropertyDefinition subDef : propertyDefinitions) {
if (!subDef.isReadOnly()) {
- Log.debug("Found at least one non-readOnly property for:
"+subDef.getName());
+ Log.debug("Found at least one non-readOnly property for: " +
subDef.getName());
allPropsDefsReadOnly = false;
break;
}
@@ -1137,7 +1139,7 @@ public class ConfigurationEditor extends LocatableVLayout {
final IButton deleteButton = new
LocatableIButton(extendLocatorId("Delete"));
deleteButton.setIcon(Window.getImgURL(ImageManager.getRemoveIcon()));
- deleteButton.setTooltip(MSG.view_configEdit_tooltip_1());
+ deleteButton.setTooltip(MSG.view_configEdit_tooltip_1());
deleteButton.setDisabled(true);
deleteButton.addClickHandler(new
com.smartgwt.client.widgets.events.ClickHandler() {
public void onClick(ClickEvent clickEvent) {
@@ -1145,9 +1147,10 @@ public class ConfigurationEditor extends LocatableVLayout {
final String noun = (selectedValues.length == 1) ?
MSG.common_label_item() : MSG
.common_label_items();
String message =
MSG.view_configEdit_confirm_3(Integer.toString(selectedValues.length), noun);
- if(propertyList.getList().size() <=
propertyDefinitionList.getMin()){
- SC.say("You cannot delete this entry because the minimum
size bounds has been met: "+ propertyDefinitionList.getMin());
- }else {
+ if (propertyList.getList().size() <=
propertyDefinitionList.getMin()) {
+ SC.say("You cannot delete this entry because the minimum
size bounds has been met: "
+ + propertyDefinitionList.getMin());
+ } else {
SC.ask(message, new BooleanCallback() {
public void execute(Boolean confirmed) {
if (confirmed) {
@@ -1164,8 +1167,9 @@ public class ConfigurationEditor extends LocatableVLayout {
firePropertyChangedEvent(propertyList,
propertyDefinitionList, true);
CoreGUI.getMessageCenter().notify(
- new
Message(MSG.view_configEdit_msg_3(Integer.toString(selectedValues.length),
- noun),
EnumSet.of(Message.Option.Transient)));
+ new Message(MSG.view_configEdit_msg_3(
+ Integer.toString(selectedValues.length),
noun), EnumSet
+ .of(Message.Option.Transient)));
}
}
}
@@ -1190,9 +1194,9 @@ public class ConfigurationEditor extends LocatableVLayout {
newButton.addClickHandler(new
com.smartgwt.client.widgets.events.ClickHandler() {
public void onClick(ClickEvent clickEvent) {
- if(propertyList.getList().size() >=
propertyDefinitionList.getMax()){
+ if (propertyList.getList().size() >=
propertyDefinitionList.getMax()) {
SC.say(MSG.view_configEdit_maxBoundsExceeded(String.valueOf(propertyDefinitionList.getMax())));
- }else {
+ } else {
final LocatableWindow popup =
createPopup(MSG.view_configEdit_addItem(), 300, 145);
VLayout vLayout = new VLayout();
@@ -1271,8 +1275,8 @@ public class ConfigurationEditor extends LocatableVLayout {
popup.show();
simpleField.focusInItem();
+ }
}
- }
});
footer.addMember(newButton);
@@ -1310,7 +1314,7 @@ public class ConfigurationEditor extends LocatableVLayout {
FormItem valueItem = null;
boolean propertyIsReadOnly = isReadOnly(propertyDefinitionSimple,
propertySimple);
- Log.debug("Building simple field for " + propertySimple
+"(read-only:"+propertyIsReadOnly+")...");
+ Log.debug("Building simple field for " + propertySimple +
"(read-only:" + propertyIsReadOnly + ")...");
// TODO (ips, 03/25/11): We eventually want to use StaticTextItems for read-only
PASSWORD props too, but we have
// to wait until we implement masking/unmasking of PASSWORD props at the SLSB
layer first.
@@ -1400,16 +1404,16 @@ public class ConfigurationEditor extends LocatableVLayout {
});
// Since spinnerItems only fire ChangedEvent once the spinner buttons are
pushed
// we add blur handler to pick up any changes to that field when leaving
- if(valueItem instanceof SpinnerItem){
+ if (valueItem instanceof SpinnerItem) {
valueItem.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(BlurEvent event) {
updatePropertySimpleValue(event.getItem(),
event.getItem().getValue(), propertySimple,
- propertyDefinitionSimple);
+ propertyDefinitionSimple);
// Only fire a prop value change event if the prop's a
top-level simple or a simple within a
// top-level map.
if (shouldFireEventOnPropertyValueChange(event.getItem(),
propertyDefinitionSimple,
- propertySimple)) {
+ propertySimple)) {
boolean isValid = event.getItem().validate();
firePropertyChangedEvent(propertySimple,
propertyDefinitionSimple, isValid);
}
@@ -1445,8 +1449,8 @@ public class ConfigurationEditor extends LocatableVLayout {
}
private void setValueAsTooltipIfAppropriate(FormItem formItem, String value) {
- if (((formItem instanceof TextItem) && !(formItem instanceof
PasswordItem)) ||
- (formItem instanceof TextAreaItem)) {
+ if (((formItem instanceof TextItem) && !(formItem instanceof
PasswordItem))
+ || (formItem instanceof TextAreaItem)) {
formItem.setTooltip(value);
}
}
@@ -1689,7 +1693,8 @@ public class ConfigurationEditor extends LocatableVLayout {
final PropertyDefinitionList propertyDefinitionList, final PropertyList
propertyList,
PropertyDefinitionMap memberMapDefinition, final PropertyMap memberMap, final
boolean mapReadOnly) {
- final List<PropertyDefinition> memberDefinitions =
memberMapDefinition.getPropertyDefinitions();
+ final List<PropertyDefinition> memberDefinitions = new
ArrayList<PropertyDefinition>(
+ memberMapDefinition.getOrderedPropertyDefinitions());
final boolean newRow = (memberMap == null);
final PropertyMap workingMap = (newRow) ? new
PropertyMap(memberMapDefinition.getName()) : memberMap
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
index 6f18088..2165fa8 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
@@ -2475,7 +2475,7 @@ public class ConfigurationManagerBean implements
ConfigurationManagerLocal, Conf
handlePDS(subject, pds);
} else if (memberDef instanceof PropertyDefinitionMap) {
PropertyDefinitionMap pdm = (PropertyDefinitionMap) memberDef;
- for (PropertyDefinition inner : pdm.getPropertyDefinitions()) {
+ for (PropertyDefinition inner : pdm.getOrderedPropertyDefinitions())
{
if (inner instanceof PropertyDefinitionSimple) {
handlePDS(subject, (PropertyDefinitionSimple) inner);
}
@@ -2487,7 +2487,7 @@ public class ConfigurationManagerBean implements
ConfigurationManagerLocal, Conf
} else if (pd instanceof PropertyDefinitionMap) {
PropertyDefinitionMap pdm = (PropertyDefinitionMap) pd;
- for (PropertyDefinition inner : pdm.getPropertyDefinitions()) {
+ for (PropertyDefinition inner : pdm.getOrderedPropertyDefinitions()) {
if (inner instanceof PropertyDefinitionSimple) {
handlePDS(subject, (PropertyDefinitionSimple) inner);
} else {
diff --git
a/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ConfigurationInstanceDescriptorUtil.java
b/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ConfigurationInstanceDescriptorUtil.java
index 85f4a45..7c6687a 100644
---
a/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ConfigurationInstanceDescriptorUtil.java
+++
b/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ConfigurationInstanceDescriptorUtil.java
@@ -214,7 +214,7 @@ public class ConfigurationInstanceDescriptorUtil {
setCommonProps(ret, def, true);
- for (PropertyDefinition mem : def.getPropertyDefinitions()) {
+ for (PropertyDefinition mem : def.getOrderedPropertyDefinitions()) {
ConfigurationProperty memDef = convertDefinition(mem);
addToJAXBElementList(ret.getConfigurationProperty(),
ConfigurationProperty.class, memDef,
@@ -353,7 +353,7 @@ public class ConfigurationInstanceDescriptorUtil {
setCommonProps(ret, def, false);
List<JAXBElement<? extends ConfigurationProperty>> elements =
ret.getConfigurationProperty();
- for (PropertyDefinition el : def.getPropertyDefinitions()) {
+ for (PropertyDefinition el : def.getOrderedPropertyDefinitions()) {
ConfigurationProperty prop = convertDefinition(el);
QName tagName = getTagName(prop);
addToJAXBElementList(elements, ConfigurationProperty.class, prop,
tagName);
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMap.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMap.java
index addd917..e5209c9 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMap.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMap.java
@@ -70,7 +70,7 @@ public class MappingDirectivePerMap extends AugeasToConfigurationSimple
{
PropertyMap map = new PropertyMap(directiveName);
int idx = 0;
- for (PropertyDefinition propDef : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition propDef : propDefMap.getOrderedPropertyDefinitions()) {
if (propDef instanceof PropertyDefinitionSimple) {
if (params.size() > idx) {
String value = params.get(idx);
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMapIndex.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMapIndex.java
index 7198240..3882938 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMapIndex.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingDirectivePerMapIndex.java
@@ -55,7 +55,7 @@ public class MappingDirectivePerMapIndex extends MappingDirectivePerMap
{
PropertyMap map = new PropertyMap(directiveName);
int idx = 0;
- for (PropertyDefinition propDef : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition propDef : propDefMap.getOrderedPropertyDefinitions()) {
if (propDef instanceof PropertyDefinitionSimple) {
if (ApacheServerComponent.AUXILIARY_INDEX_PROP.equals(propDef.getName()))
{
map.put(new
PropertySimple(ApacheServerComponent.AUXILIARY_INDEX_PROP, node.getSeq()));
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingParamPerMap.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingParamPerMap.java
index 5237817..4f4676a 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingParamPerMap.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingParamPerMap.java
@@ -85,7 +85,7 @@ public class MappingParamPerMap extends AugeasToConfigurationSimple {
int idx = i;
PropertyMap map = new PropertyMap(mapDef.getName());
propList.add(map);
- for (PropertyDefinition def : mapDef.getPropertyDefinitions()) {
+ for (PropertyDefinition def : mapDef.getOrderedPropertyDefinitions()) {
if (ApacheServerComponent.AUXILIARY_INDEX_PROP.equals(def.getName()))
{
map.put(new
PropertySimple(ApacheServerComponent.AUXILIARY_INDEX_PROP, directiveNode.getSeq()));
} else {
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMap.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMap.java
index 0daf099..8ca1597 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMap.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMap.java
@@ -91,7 +91,7 @@ public class MappingToAugeasDirectivePerMap extends
ConfigurationToAugeasApacheB
StringBuffer param = new StringBuffer();
- for (PropertyDefinition propVal : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition propVal : propDefMap.getOrderedPropertyDefinitions()) {
PropertySimple property = propMap.getSimple(propVal.getName());
if (property != null) {
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMapIndex.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMapIndex.java
index 492e7a9..7193813 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMapIndex.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasDirectivePerMapIndex.java
@@ -95,7 +95,7 @@ public class MappingToAugeasDirectivePerMapIndex extends
ConfigurationToAugeasAp
String propertyName = prop.getName();
StringBuffer param = new StringBuffer();
- for (PropertyDefinition propVal : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition propVal : propDefMap.getOrderedPropertyDefinitions()) {
PropertySimple property = propMap.getSimple(propVal.getName());
if (property != null) {
diff --git
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasParamPerMap.java
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasParamPerMap.java
index a12374f..ae2054d 100644
---
a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasParamPerMap.java
+++
b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/mappingImpl/MappingToAugeasParamPerMap.java
@@ -87,7 +87,7 @@ public class MappingToAugeasParamPerMap extends
ConfigurationToAugeasApacheBase
StringBuffer param = new StringBuffer();
for (List<PropertyMap> directive : map) {
for (PropertyMap propMap : directive) {
- for (PropertyDefinition propDefMap :
memberPropDef.getPropertyDefinitions()) {//for (Property propVal :
propMap.getMap().values()){
+ for (PropertyDefinition propDefMap :
memberPropDef.getOrderedPropertyDefinitions()) {//for (Property propVal :
propMap.getMap().values()){
Property propVal = propMap.get(propDefMap.getName());
if (propVal != null)
if (!propVal.getName().equals("_index")) {
diff --git
a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
index 5e6f431..5976ad8 100644
---
a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
+++
b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
@@ -486,7 +486,7 @@ public class AugeasConfigurationComponent<T extends
ResourceComponent<?>> implem
protected void populatePropertyMap(PropertyDefinitionMap propDefMap, PropertyMap
propMap, Augeas augeas,
AugeasNode mapNode) {
- for (PropertyDefinition mapEntryPropDef : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition mapEntryPropDef :
propDefMap.getOrderedPropertyDefinitions()) {
loadProperty(mapEntryPropDef, propMap, augeas, mapNode);
}
}
@@ -559,7 +559,7 @@ public class AugeasConfigurationComponent<T extends
ResourceComponent<?>> implem
protected void setNodeFromPropertyMap(PropertyDefinitionMap propDefMap, PropertyMap
propMap, Augeas augeas,
AugeasNode mapNode) {
- for (PropertyDefinition mapEntryPropDef : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition mapEntryPropDef :
propDefMap.getOrderedPropertyDefinitions()) {
setNode(mapEntryPropDef, propMap, augeas, mapNode);
}
}
diff --git
a/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/AugeasToConfigurationSimple.java
b/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/AugeasToConfigurationSimple.java
index 0a2f8d1..584f6dc 100644
---
a/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/AugeasToConfigurationSimple.java
+++
b/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/AugeasToConfigurationSimple.java
@@ -106,7 +106,7 @@ public class AugeasToConfigurationSimple implements
AugeasToConfiguration {
public PropertyMap createPropertyMap(PropertyDefinitionMap propDefMap, AugeasNode
node) throws AugeasRhqException {
PropertyMap propMap = new PropertyMap(propDefMap.getName());
- for (PropertyDefinition mapEntryPropDef : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition mapEntryPropDef :
propDefMap.getOrderedPropertyDefinitions()) {
propMap.put(loadProperty(mapEntryPropDef, node));
}
return propMap;
diff --git
a/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/ConfigurationToAugeasSimple.java
b/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/ConfigurationToAugeasSimple.java
index 91a8eb1..fb571d3 100644
---
a/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/ConfigurationToAugeasSimple.java
+++
b/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/ConfigurationToAugeasSimple.java
@@ -106,7 +106,7 @@ public class ConfigurationToAugeasSimple implements
ConfigurationToAugeas {
i = seq - 1;
}
- for (PropertyDefinition mapEntryPropDef : propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition mapEntryPropDef :
propDefMap.getOrderedPropertyDefinitions()) {
updateProperty(mapEntryPropDef, map, nodes.get(i), 0);
}
diff --git
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/PropertyMapToCompositeValueSupportAdapter.java
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/PropertyMapToCompositeValueSupportAdapter.java
index c040b9b..d9edd45 100644
---
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/PropertyMapToCompositeValueSupportAdapter.java
+++
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/PropertyMapToCompositeValueSupportAdapter.java
@@ -65,7 +65,7 @@ public class PropertyMapToCompositeValueSupportAdapter extends
AbstractPropertyM
: "none";
compositeMetaType = new MutableCompositeMetaType(name, desc);
if (propDefMap != null) {
- for (PropertyDefinition mapMemberPropDef :
propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition mapMemberPropDef :
propDefMap.getOrderedPropertyDefinitions()) {
String mapMemberDesc = (propDefMap.getDescription() != null) ?
propDefMap.getDescription() : "none";
MetaType mapMemberMetaType =
ConversionUtils.convertPropertyDefinitionToMetaType(mapMemberPropDef);
compositeMetaType.addItem(mapMemberPropDef.getName(), mapMemberDesc,
mapMemberMetaType);
diff --git
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/custom/JMSSecurityConfigAdapter.java
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/custom/JMSSecurityConfigAdapter.java
index b08a37b..e7f5233 100644
---
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/custom/JMSSecurityConfigAdapter.java
+++
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/adapter/impl/configuration/custom/JMSSecurityConfigAdapter.java
@@ -116,7 +116,7 @@ public class JMSSecurityConfigAdapter extends
AbstractPropertyListAdapter {
: "none";
MutableCompositeMetaType compositeMetaType = new MutableCompositeMetaType(name,
desc);
if (propDefMap != null) {
- for (PropertyDefinition mapMemberPropDef :
propDefMap.getPropertyDefinitions()) {
+ for (PropertyDefinition mapMemberPropDef :
propDefMap.getOrderedPropertyDefinitions()) {
if (mapMemberPropDef.getName().equals("name"))
continue;
String mapMemberDesc = (propDefMap.getDescription() != null) ?
propDefMap.getDescription() : "none";
diff --git
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/util/ConversionUtils.java
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/util/ConversionUtils.java
index c3758a6..839b9a9 100644
---
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/util/ConversionUtils.java
+++
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/util/ConversionUtils.java
@@ -22,9 +22,9 @@
*/
package org.rhq.plugins.jbossas5.util;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -235,11 +235,12 @@ public class ConversionUtils {
// TODO (very low priority, since lists of lists are not going to be at all
common)
memberMetaType = null;
} else if (propDef instanceof PropertyDefinitionMap) {
- List<PropertyDefinition> memberPropDefs = ((PropertyDefinitionMap)
propDef).getPropertyDefinitions();
+ Collection<PropertyDefinition> memberPropDefs =
((PropertyDefinitionMap) propDef)
+ .getOrderedPropertyDefinitions();
if (memberPropDefs.isEmpty())
throw new IllegalStateException("PropertyDefinitionMap doesn't
contain any member PropertyDefinitions.");
// NOTE: We assume member prop defs are all of the same type, since for
MapCompositeMetaTypes, they have to be.
- PropertyDefinition mapMemberPropDef = memberPropDefs.get(0);
+ PropertyDefinition mapMemberPropDef = memberPropDefs.iterator().next();
MetaType mapMemberMetaType =
convertPropertyDefinitionToMetaType(mapMemberPropDef);
memberMetaType = new MapCompositeMetaType(mapMemberMetaType);
} else {
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
index 2fdff39..f71bcfc 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
@@ -334,7 +334,7 @@ public class ConfigurationLoadDelegate implements ConfigurationFacet
{
propertyMap.put(additionalNameProperty);
}
- List<PropertyDefinition> propDefs = propDefMap.getPropertyDefinitions();
+ Collection<PropertyDefinition> propDefs =
propDefMap.getOrderedPropertyDefinitions();
if (propDefName.endsWith(":collapsed")) {
// The result is a map of {" a" : " b" }, while the
propdef is in the form
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
index f73ccf5..4f840fd 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
@@ -216,7 +216,7 @@ public class ConfigurationWriteDelegate implements ConfigurationFacet
{
}
}
- definitions = definitionMap.getPropertyDefinitions();
+ definitions = new
ArrayList<PropertyDefinition>(definitionMap.getOrderedPropertyDefinitions());
PropertyMap map = conf.getMap(mapName);
for (PropertyDefinition def : definitions) {
createWriteAttribute(cop, address1, def,
map.get(def.getName()));
commit 083142e3ce028497c6c78649d7a2e5cd76050d10
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Nov 16 10:26:48 2012 -0600
Test for the release_tag variable and not the actual string.
diff --git a/release.sh b/release.sh
index 19a685b..6b99187 100755
--- a/release.sh
+++ b/release.sh
@@ -306,7 +306,7 @@ set_local_and_environment_variables()
MAVEN_ARGS="$MAVEN_ARGS --debug"
fi
- if [ -z "RELEASE_TAG" ]; then
+ if [ -z "$RELEASE_TAG" ]; then
TAG_PREFIX="RHQ"
TAG_VERSION=`echo $RELEASE_VERSION | sed 's/[\.|-]/_/g'`
RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
commit 142928fd92ab6304ed21391dfeb24f6a8681f642
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Nov 16 09:50:41 2012 -0600
Add tag name variable to the debug output.
diff --git a/release.sh b/release.sh
index 7d6a16e..19a685b 100755
--- a/release.sh
+++ b/release.sh
@@ -256,7 +256,7 @@ parse_and_validate_options()
print_centered "Script Options"
script_options=( "RELEASE_VERSION" "DEVELOPMENT_VERSION"
"RELEASE_BRANCH" "RELEASE_TYPE" \
- "MODE" "SCM_STRATEGY"
"TERMINAL_BRANCH")
+ "MODE" "SCM_STRATEGY"
"TERMINAL_BRANCH" "RELEASE_TAG")
print_variables "${script_options[@]}"
}
@@ -326,7 +326,8 @@ set_local_and_environment_variables()
print_variables "${environment_variables[@]}"
print_centered "Local Variables"
- local_variables=( "MAVEN_LOCAL_REPO_DIR" "MAVEN_SETTINGS_FILE"
"MAVEN_ARGS" )
+ local_variables=( "MAVEN_LOCAL_REPO_DIR" "MAVEN_SETTINGS_FILE"
"MAVEN_ARGS" \
+ "RELEASE_TAG" )
print_variables "${local_variables[@]}"
}
commit 310e27df47e9c46c8d272139af6c326645975d02
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Nov 15 23:12:45 2012 -0600
Add option to override the tag name generated by the script. This feature should be
used for continuous integration purposes only.
diff --git a/release.sh b/release.sh
index f9c816d..7d6a16e 100755
--- a/release.sh
+++ b/release.sh
@@ -63,7 +63,10 @@ USAGE: release.sh OPTIONS
Set maven in debug mode. Default is false; true if option specified without
argument.
--workspace=workspace_to_use [OPTIONAL]
- Override the workspace used by default by the script.
+ Override the workspace used by the script.
+
+ --tag-name=tag_name [OPTIONAL]
+ Override the default tag name generated by this script. Using the default tag name
is the preferred alternative. Please use this option only if absolutely needed.
--override-tag=[true|false] [OPTIONAL]
Override the tag if it already exists remotely. Default is false; true if option
specified without argument.
@@ -94,9 +97,10 @@ parse_and_validate_options()
DEBUG_MODE=false
OVERRIDE_TAG=false
TERMINAL_BRANCH=false
+ RELEASE_TAG=
short_options="h"
-
long_options="help,release-version:,development-version:,release-branch:,release-type:,test-mode,production-mode,mode:,branch,tag,scm-strategy:,extra-profile:,debug::,workspace:,override-tag::"
+
long_options="help,release-version:,development-version:,release-branch:,release-type:,test-mode,production-mode,mode:,branch,tag,scm-strategy:,extra-profile:,debug::,workspace:,override-tag::,tag-name:"
PROGNAME=${0##*/}
ARGS=$(getopt -s bash --options $short_options --longoptions $long_options --name
$PROGNAME -- "$@" )
@@ -184,6 +188,11 @@ parse_and_validate_options()
WORKSPACE=$1
shift
;;
+ --tag-name)
+ shift
+ RELEASE_TAG=$1
+ shift
+ ;;
--override-tag)
shift
case "$1" in
@@ -297,9 +306,11 @@ set_local_and_environment_variables()
MAVEN_ARGS="$MAVEN_ARGS --debug"
fi
- TAG_PREFIX="RHQ"
- TAG_VERSION=`echo $RELEASE_VERSION | sed 's/[\.|-]/_/g'`
- RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
+ if [ -z "RELEASE_TAG" ]; then
+ TAG_PREFIX="RHQ"
+ TAG_VERSION=`echo $RELEASE_VERSION | sed 's/[\.|-]/_/g'`
+ RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
+ fi
# Set the system character encoding to ISO-8859-1 to ensure i18log reads its
# messages and writes its resource bundle properties files in that encoding,
@@ -571,7 +582,6 @@ checkout_build_branch_for_release()
BUILD_BRANCH="${RELEASE_BRANCH}"
else
BUILD_BRANCH="release-$RELEASE_VERSION"
- # delete the branch if it exists, so we can recreate it fresh
EXISTING_BUILD_BRANCH=`git ls-remote --heads origin "$BUILD_BRANCH"`
if [ -n "$EXISTING_BUILD_BRANCH" ];
then
commit 040489bba03aa722ad4d8348b96e93836143abc9
Merge: 2303cb7 7afe389
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 16 11:54:06 2012 +0100
Merge branch 'lkrejci/code-coverage'
commit 898a3136bc10259d71d85e693ed59481c43ca691
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Thu Nov 15 19:55:26 2012 +0100
skeleton implementation for server view in High Availability Administration Console
including the inner class -- datasource for the Server entity
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index a44b90c..668a49f 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -61,7 +61,6 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
public static final ViewName SECTION_CONTENT_VIEW_ID = new
ViewName("Content", MSG.view_admin_content());
// TODO these iframe page view ids should go away in favor of the gwt view page
view_id, when available
- private static final ViewName PAGE_SERVERS_VIEW_ID = new
ViewName("Servers", MSG.view_adminTopology_servers(), IconEnum.SERVERS);
private static final ViewName PAGE_AGENTS_VIEW_ID = new ViewName("Agents",
MSG.view_adminTopology_agents(),IconEnum.AGENT);
private static final ViewName PAGE_AFFINITY_GROUPS_VIEW_ID = new
ViewName("AffinityGroups",
MSG.view_adminTopology_affinityGroups(), IconEnum.ALL_GROUPS);
@@ -136,11 +135,10 @@ public class AdministrationView extends
AbstractSectionedLeftNavigationView {
ProductInfo productInfo = CoreGUI.get().getProductInfo();
boolean isRHQ = (productInfo != null) &&
"RHQ".equals(productInfo.getShortName());
- NavigationItem serversItem = new NavigationItem(PAGE_SERVERS_VIEW_ID,
+ NavigationItem serversItem = new NavigationItem(ServerTableView.VIEW_ID,
new ViewFactory() {
public Canvas createView() {
- return new
FullHTMLPane(extendLocatorId(PAGE_SERVERS_VIEW_ID.getName()),
- "/rhq/ha/listServers-plain.xhtml?nomenu=true");
+ return new
ServerTableView(extendLocatorId(ServerTableView.VIEW_ID.getName()));
}
}, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
new file mode 100644
index 0000000..e99efbe
--- /dev/null
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/ServerTableView.java
@@ -0,0 +1,423 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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.enterprise.gui.coregui.client.admin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceIntegerField;
+import com.smartgwt.client.types.SortDirection;
+import com.smartgwt.client.util.BooleanCallback;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.criteria.Criteria;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.IconEnum;
+import org.rhq.enterprise.gui.coregui.client.admin.ServerTableView.CloudDataSource;
+import org.rhq.enterprise.gui.coregui.client.components.table.AuthorizedTableAction;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.components.upload.PluginFileUploadForm;
+import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIButton;
+
+/**
+ * @author Jiri Kremser
+ */
+public class ServerTableView extends TableSection<CloudDataSource> {
+
+ public static final ViewName VIEW_ID = new ViewName("Servers",
MSG.view_adminTopology_servers(), IconEnum.SERVERS);
+ public static final String VIEW_PATH = AdministrationView.VIEW_ID + "/"
+ + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID;
+
+ private static final String FIELD_ID = "id";
+ private static final String FIELD_NAME = "name";
+ private static final String FIELD_MODE = "mode";
+ private static final String FIELD_ENDPOINT_ADDRESS = "endpointAddress";
+ private static final String FIELD_NONSECURE_PORT = "nonsecurePort";
+ private static final String FIELD_SECURE_PORT = "securePort";
+ private static final String FIELD_LAST_UPDATE_TIME = "lastUpdateTime";
+ private static final String FIELD_AFFINITY_GROUP = "affinityGroup";
+ private static final String FIELD_AGENT_COUNT = "agentCount";
+
+ private boolean showUndeployed = false;
+
+ public ServerTableView(String locatorId) {
+ super(locatorId, null);
+ setHeight100();
+ setWidth100();
+ setDataSource(new CloudDataSource());
+ }
+
+ @Override
+ protected void configureTable() {
+ List<ListGridField> fields = getDataSource().getListGridFields();
+ ListGrid listGrid = getListGrid();
+ listGrid.setFields(fields.toArray(new ListGridField[fields.size()]));
+ listGrid.sort(FIELD_NAME, SortDirection.ASCENDING);
+
+ addTableAction(extendLocatorId("enable"), MSG.common_button_enable(),
MSG.common_msg_areYouSure(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
+ public void executeAction(ListGridRecord[] selections, Object
actionValue) {
+ int[] selectedIds = getSelectedIds(selections);
+ GWTServiceLookup.getPluginService().enableServerPlugins(selectedIds,
+ new AsyncCallback<ArrayList<String>>() {
+ @Override
+ public void onSuccess(ArrayList<String> result) {
+ Message msg = new Message(
+
MSG.view_admin_plugins_enabledServerPlugins(result.toString()), Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_admin_plugins_enabledServerPluginsFailure()
+ " " + caught.getMessage(),
+ caught);
+ refreshTableInfo();
+ }
+ });
+ }
+ });
+
+ addTableAction(extendLocatorId("disable"), MSG.common_button_disable(),
new AuthorizedTableAction(this,
+ TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ ArrayList<String> selectedNames = getSelectedNames(selections);
+ String message =
MSG.view_admin_plugins_serverDisableConfirm(selectedNames.toString());
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+
GWTServiceLookup.getPluginService().disableServerPlugins(selectedIds,
+ new AsyncCallback<ArrayList<String>>() {
+ @Override
+ public void onSuccess(ArrayList<String> result)
{
+ Message msg = new
Message(MSG.view_admin_plugins_disabledServerPlugins(result
+ .toString()), Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_disabledServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
+
+ addTableAction(extendLocatorId("undeploy"),
MSG.view_admin_plugins_undeploy(), new AuthorizedTableAction(this,
+ TableActionEnablement.ANY, Permission.MANAGE_SETTINGS) {
+ public void executeAction(final ListGridRecord[] selections, Object
actionValue) {
+ ArrayList<String> selectedNames = getSelectedNames(selections);
+ String message =
MSG.view_admin_plugins_serverUndeployConfirm(selectedNames.toString());
+ SC.ask(message, new BooleanCallback() {
+ public void execute(Boolean confirmed) {
+ if (confirmed) {
+ int[] selectedIds = getSelectedIds(selections);
+
GWTServiceLookup.getPluginService().undeployServerPlugins(selectedIds,
+ new AsyncCallback<ArrayList<String>>() {
+ @Override
+ public void onSuccess(ArrayList<String> result)
{
+ Message msg = new
Message(MSG.view_admin_plugins_undeployedServerPlugins(result
+ .toString()), Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+
MSG.view_admin_plugins_undeployedServerPluginsFailure() + " "
+ + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+ });
+ } else {
+ refreshTableInfo();
+ }
+ }
+ });
+ }
+ });
+
+ addTableAction(extendLocatorId("purge"), MSG.common_button_purge(),
MSG.common_msg_areYouSure(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY,
Permission.MANAGE_SETTINGS) {
+ public boolean isEnabled(ListGridRecord[] selection) {
+ if (showUndeployed) {
+ return super.isEnabled(selection);
+ } else {
+ return false; // we aren't showing undeployed plugins, so
there is no plugin shown that can be purged anyway
+ }
+ }
+
+ public void executeAction(ListGridRecord[] selections, Object
actionValue) {
+ int[] selectedIds = getSelectedIds(selections);
+ GWTServiceLookup.getPluginService().purgeServerPlugins(selectedIds,
+ new AsyncCallback<ArrayList<String>>() {
+ @Override
+ public void onSuccess(ArrayList<String> result) {
+ Message msg = new Message(
+
MSG.view_admin_plugins_purgedServerPlugins(result.toString()), Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_admin_plugins_purgedServerPluginsFailure() +
" " + caught.getMessage(),
+ caught);
+ refreshTableInfo();
+ }
+ });
+ }
+ });
+
+ IButton scanForUpdatesButton = new
LocatableIButton(extendLocatorId("scanButton"),
+ MSG.view_admin_plugins_scan());
+ scanForUpdatesButton.setAutoFit(true);
+ scanForUpdatesButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ GWTServiceLookup.getPluginService().scanAndRegister(new
AsyncCallback<Void>() {
+ @Override
+ public void onSuccess(Void result) {
+ Message msg = new Message(MSG.view_admin_plugins_scanComplete(),
Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_admin_plugins_scanFailure() + " " +
caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+ });
+ }
+ });
+
+ IButton restartMasterPCButton = new
LocatableIButton(extendLocatorId("restartMasterPCButton"),
+ MSG.view_admin_plugins_restartMasterPC());
+ restartMasterPCButton.setAutoFit(true);
+ restartMasterPCButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCStarted(), Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+
+ GWTServiceLookup.getPluginService().restartMasterPluginContainer(new
AsyncCallback<Void>() {
+ @Override
+ public void onSuccess(Void result) {
+ Message msg = new
Message(MSG.view_admin_plugins_restartMasterPCComplete(), Severity.Info);
+ CoreGUI.getMessageCenter().notify(msg);
+ refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_admin_plugins_restartMasterPCFailure() + "
" + caught.getMessage(), caught);
+ refreshTableInfo();
+ }
+ });
+ }
+ });
+
+
+ PluginFileUploadForm pluginUploadForm = new
PluginFileUploadForm(extendLocatorId("upload"),
+ MSG.view_admin_plugins_upload(), true);
+
+ addExtraWidget(scanForUpdatesButton, true);
+ addExtraWidget(restartMasterPCButton, true);
+ addExtraWidget(pluginUploadForm, true);
+
+ super.configureTable();
+ }
+
+ @Override
+ public Canvas getDetailsView(Integer id) {
+ return new ServerPluginDetailView(extendLocatorId("detailsView"), id);
+ }
+
+ private int[] getSelectedIds(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new int[0];
+ }
+ int[] ids = new int[selections.length];
+ int i = 0;
+ for (ListGridRecord selection : selections) {
+ ids[i++] = selection.getAttributeAsInt(FIELD_ID);
+ }
+ return ids;
+ }
+
+ private ArrayList<String> getSelectedNames(ListGridRecord[] selections) {
+ if (selections == null) {
+ return new ArrayList<String>(0);
+ }
+ ArrayList<String> ids = new ArrayList<String>(selections.length);
+ for (ListGridRecord selection : selections) {
+ ids.add(selection.getAttributeAsString(FIELD_NAME));
+ }
+ return ids;
+ }
+
+ public class CloudDataSource extends RPCDataSource<Server, Criteria> {
+
+ public CloudDataSource() {
+ super();
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+ DataSourceField idField = new DataSourceIntegerField(FIELD_ID,
MSG.common_title_id(), 50);
+ idField.setPrimaryKey(true);
+ idField.setHidden(true);
+ fields.add(idField);
+ return fields;
+ }
+
+ public List<ListGridField> getListGridFields() {
+ List<ListGridField> fields = new ArrayList<ListGridField>();
+
+ ListGridField idField = new ListGridField(FIELD_ID, MSG.common_title_id());
+ idField.setHidden(true);
+ fields.add(idField);
+
+ ListGridField nameField = new ListGridField(FIELD_NAME,
MSG.common_title_name());
+ fields.add(nameField);
+
+ ListGridField modeField = new ListGridField(FIELD_MODE,
MSG.view_adminTopology_server_mode());
+ fields.add(modeField);
+
+ ListGridField endpointAddressField = new
ListGridField(FIELD_ENDPOINT_ADDRESS, MSG.view_adminTopology_server_endpointAddress());
+// TimestampCellFormatter.prepareDateField(endpointAddressField);
+ fields.add(endpointAddressField);
+
+ ListGridField nonsecurePortField = new ListGridField(FIELD_NONSECURE_PORT,
MSG.view_adminTopology_server_nonSecurePort());
+// enabledField.setType(ListGridFieldType.IMAGE);
+// enabledField.setAlign(Alignment.CENTER);
+ fields.add(nonsecurePortField);
+
+ ListGridField securedPortField = new ListGridField(FIELD_SECURE_PORT,
MSG.view_adminTopology_server_securePort());
+// deployedField.setType(ListGridFieldType.IMAGE);
+// deployedField.setAlign(Alignment.CENTER);
+// deployedField.setHidden(true);
+ fields.add(securedPortField);
+
+ ListGridField lastUpdateTimeField = new ListGridField(FIELD_LAST_UPDATE_TIME,
MSG.view_adminTopology_server_lastUpdateTime());
+ TimestampCellFormatter.prepareDateField(endpointAddressField);
+ fields.add(lastUpdateTimeField);
+
+ ListGridField affinityGroupField = new ListGridField(FIELD_AFFINITY_GROUP,
MSG.view_adminTopology_server_affinityGroup());
+ fields.add(affinityGroupField);
+
+ ListGridField agentCountField = new ListGridField(FIELD_AGENT_COUNT,
MSG.view_adminTopology_server_agentCount());
+ fields.add(agentCountField);
+
+ idField.setWidth(100);
+ nameField.setWidth("30%");
+ modeField.setWidth("*");
+ endpointAddressField.setWidth("20%");
+ nonsecurePortField.setWidth(65);
+ securedPortField.setWidth(75);
+ lastUpdateTimeField.setWidth(100);
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response,
Criteria criteria) {
+// GWTServiceLookup.getPluginService().getServerPlugins(showUndeployed,
+// new AsyncCallback<ArrayList<Server>>() {
+// public void onSuccess(ArrayList<Server> result) {
+// response.setData(buildRecords(result));
+// response.setTotalRows(result.size());
+// processResponse(request.getRequestId(), response);
+// }
+//
+// @Override
+// public void onFailure(Throwable t) {
+//
CoreGUI.getErrorHandler().handleError(MSG.view_admin_plugins_loadFailure(), t);
+// response.setStatus(DSResponse.STATUS_FAILURE);
+// processResponse(request.getRequestId(), response);
+// }
+// });
+ }
+
+ @Override
+ public Server copyValues(Record from) {
+ throw new
UnsupportedOperationException("ServerTableView.CloudDataSourcepublic Server
copyValues(Record from)");
+ }
+
+ @Override
+ public ListGridRecord copyValues(Server from) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute(FIELD_ID, from.getId());
+ record.setAttribute(FIELD_NAME, from.getName());
+ record.setAttribute(FIELD_MODE, from.getOperationMode());
+ record.setAttribute(FIELD_ENDPOINT_ADDRESS, from.getAddress());
+ record.setAttribute(FIELD_NONSECURE_PORT, from.getPort());
+ record.setAttribute(FIELD_SECURE_PORT, from.getSecurePort());
+ record.setAttribute(FIELD_LAST_UPDATE_TIME, from.getMtime());
+ record.setAttribute(FIELD_AFFINITY_GROUP, from.getAffinityGroup());
+ record.setAttribute(FIELD_AGENT_COUNT, from.getAgentCount());
+ return record;
+ }
+
+ @Override
+ protected Criteria getFetchCriteria(DSRequest request) {
+ // we don't use criteria for this datasource, just return null
+ return null;
+ }
+ }
+
+}
commit 57046c78299c5b348b547aad9ac6a9610fc7787b
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Thu Nov 15 19:53:47 2012 +0100
i18n for the new gwt HAAC
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 20fada6..8aad726 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -529,13 +529,44 @@ view_adminTemplates_pluginTemplates = Plugin Templates
view_adminTemplates_prompt_disabledAlertTemplates = Number of alert templates that are
created but disabled on this resource type
view_adminTemplates_prompt_disabledMetricTemplates = Number of metric schedules that are
disabled by default on this resource type
view_adminTemplates_prompt_enabledAlertTemplates = Number of alert templates that are
enabled on this resource type
-view_adminTemplates_prompt_enabledMetricTemplates = Number of metric schedules that are
enabled by default on this resource type
+view_adminTemplates_prompt_enabledMetricTemplates = Number bf metric schedules that are
enabled by default on this resource type
view_adminTemplates_servers = Servers
view_adminTemplates_userTemplates = User Templates
view_adminTopology_affinityGroups = Affinity Groups
+view_adminTopology_affinityGroups_agentCount = Agent Count
+view_adminTopology_affinityGroups_agetnMembers = Agent Members
+view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part of an
Affinity Group
+view_adminTopology_affinityGroups_createNew = Create New
+view_adminTopology_affinityGroups_details = Affinity Group Details
+view_adminTopology_affinityGroups_removeSelected = Remove Selected
+view_adminTopology_affinityGroups_serverCount = Server Count
+view_adminTopology_affinityGroups_serverMembers = Server Members
view_adminTopology_agents = Agents
+view_adminTopology_agent_agentBindAddress = Agent Bind Address
+view_adminTopology_agent_agentBindPort = Agent Bind Port
+view_adminTopology_agent_agentName = Agent Name
+view_adminTopology_agent_connectedServer = Connected Server
+view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
+view_adminTopology_agentDetail_address = Address
+view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
+view_adminTopology_agentDetail_currentServer = Current Server
+view_adminTopology_agentDetail_token = Token
view_adminTopology_partitionEvents = Partition Events
view_adminTopology_remoteAgentInstall = Remote Agent Install
+view_adminTopology_server_affinityGroup = Affinity Group
+view_adminTopology_server_agentCount = Agent Count
+view_adminTopology_server_endpointAddress = Endpoint Address
+view_adminTopology_server_lastUpdateTime = Last Update Time
+view_adminTopology_server_mode = Mode
+view_adminTopology_server_nonSecurePort = Nonsecure Port
+view_adminTopology_server_removeSelected = Remove Selected
+view_adminTopology_server_securePort = Secure Port
+view_adminTopology_server_setMaintenance = Set Maintenance
+view_adminTopology_server_setNormal = Set Normal
+view_adminTopology_serverDetail_connectedAgents = Connected Agents
+view_adminTopology_serverDetail_installationDate = Installation Date
+view_adminTopology_serverDetail_operationMode = Operation Mode
view_adminTopology_servers = Servers
view_adminUsersDetails_dataTypeName = user
view_adminUsers_failCreateUserWithExistingName = Failed to create user with existing name
[{0}]. Please use another name.
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index f90e510..12ff6e5 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -552,9 +552,40 @@ view_adminTemplates_prompt_enabledMetricTemplates = Počet šablon
rozvrhů sbě
view_adminTemplates_servers = Servery
view_adminTemplates_userTemplates = Uživatelské šablony
view_adminTopology_affinityGroups = Afinitní skupiny
+view_adminTopology_affinityGroups_agentCount = Počet agentů
+view_adminTopology_affinityGroups_agetnMembers = Členští agenti
+view_adminTopology_affinityGroups_agentsInThisGroup = Agenti této skupiny
+view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agenti mimo tuto
skupinu
+view_adminTopology_affinityGroups_createNew = Vytvořit novou
+view_adminTopology_affinityGroups_details = Detaily afinitní skupiny
+view_adminTopology_affinityGroups_removeSelected = Odstanit vybrané
+view_adminTopology_affinityGroups_serverCount = Počet serverů
+view_adminTopology_affinityGroups_serverMembers = Členské servery
view_adminTopology_agents = Agenti
-view_adminTopology_partitionEvents = Události rozdělení
-view_adminTopology_remoteAgentInstall = Instalace vzdáleného agenta
+view_adminTopology_agent_agentBindAddress = Adresa agenta
+view_adminTopology_agent_agentBindPort = Port agenta
+view_adminTopology_agent_agentName = Jméno agenta
+view_adminTopology_agent_connectedServer = Připojený server
+view_adminTopology_agent_lastAvailabilityReport = Poslední report dostupnosti
+view_adminTopology_agentDetail_address = Adresa
+view_adminTopology_agentDetail_agentFailoverList = Agentův failover list
+view_adminTopology_agentDetail_currentServer = Současný server
+view_adminTopology_agentDetail_token = Token
+view_adminTopology_partitionEvents = Události o clusteru
+view_adminTopology_remoteAgentInstall = Nainstalovat vzdáleně agenta
+view_adminTopology_server_affinityGroup = Afinitní skupina
+view_adminTopology_server_agentCount = Počet agentů
+view_adminTopology_server_endpointAddress = Adresa koncového bodu
+view_adminTopology_server_lastUpdateTime = Čas poslední aktualizace
+view_adminTopology_server_mode = Mód
+view_adminTopology_server_nonSecurePort = Nezabezpečený port
+view_adminTopology_server_removeSelected = Odstanit vybrané
+view_adminTopology_server_securePort = Zabezpečený port
+view_adminTopology_server_setMaintenance = Nastavit údržbu
+view_adminTopology_server_setNormal = Nastavit do normálu
+view_adminTopology_serverDetail_connectedAgents = Připojení agenti
+view_adminTopology_serverDetail_installationDate = Datum instalace
+view_adminTopology_serverDetail_operationMode = Mód provozu
view_adminTopology_servers = Servery
view_adminUsersDetails_dataTypeName = uživatel
view_adminUsers_failCreateUserWithExistingName = Nepodařilo se vytvořit uživatele s
existujícím jménem [{0}]. Použíjte prosím jiné jméno.
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 08c11c8..aaceef0 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -500,9 +500,40 @@ view_adminTemplates_pluginTemplates = Vorlagen für Plugins Plugins
view_adminTemplates_servers = Server
view_adminTemplates_userTemplates = Nutzers-spezifische Vorlagen
view_adminTopology_affinityGroups = Affinitätsgruppen
+##view_adminTopology_affinityGroups_agentCount = Agent Count
+##view_adminTopology_affinityGroups_agetnMembers = Agent Members
+##view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+##view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part of
an Affinity Group
+##view_adminTopology_affinityGroups_createNew = Create New
+##view_adminTopology_affinityGroups_details = Affinity Group Details
+##view_adminTopology_affinityGroups_removeSelected = Remove Selected
+##view_adminTopology_affinityGroups_serverCount = Server Count
+##view_adminTopology_affinityGroups_serverMembers = Server Members
view_adminTopology_agents = Agenten
+##view_adminTopology_agent_agentBindAddress = Agent Bind Address
+##view_adminTopology_agent_agentBindPort = Agent Bind Port
+##view_adminTopology_agent_agentName = Agent Name
+##view_adminTopology_agent_connectedServer = Connected Server
+##view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
+##view_adminTopology_agentDetail_address = Address
+##view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
+##view_adminTopology_agentDetail_currentServer = Current Server
+##view_adminTopology_agentDetail_token = Token
view_adminTopology_partitionEvents = Partitionierungs-Ereignisse
view_adminTopology_remoteAgentInstall = Installation entfernter Agenten
+##view_adminTopology_server_affinityGroup = Affinity Group
+##view_adminTopology_server_agentCount = Agent Count
+##view_adminTopology_server_endpointAddress = Endpoint Address
+##view_adminTopology_server_lastUpdateTime = Last Update Time
+##view_adminTopology_server_mode = Mode
+##view_adminTopology_server_nonSecurePort = Nonsecure Port
+##view_adminTopology_server_removeSelected = Remove Selected
+##view_adminTopology_server_securePort = Secure Port
+##view_adminTopology_server_setMaintenance = Set Maintenance
+##view_adminTopology_server_setNormal = Set Normal
+##view_adminTopology_serverDetail_connectedAgents = Connected Agents
+##view_adminTopology_serverDetail_installationDate = Installation Date
+##view_adminTopology_serverDetail_operationMode = Operation Mode
view_adminTopology_servers = Server
view_adminUsersDetails_dataTypeName = Benutzer
##view_adminUsers_failCreateUserWithExistingName = Failed to create user with existing
name [{0}]. Please use another name.
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index b10c816..0bd15f6 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -531,9 +531,40 @@ view_adminTemplates_prompt_enabledMetricTemplates = このリソースタイプ
view_adminTemplates_servers = サービス
view_adminTemplates_userTemplates = ユーザーテンプレート
view_adminTopology_affinityGroups = アフィニティグループ
+##view_adminTopology_affinityGroups_agentCount = Agent Count
+##view_adminTopology_affinityGroups_agetnMembers = Agent Members
+##view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+##view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part of
an Affinity Group
+##view_adminTopology_affinityGroups_createNew = Create New
+##view_adminTopology_affinityGroups_details = Affinity Group Details
+##view_adminTopology_affinityGroups_removeSelected = Remove Selected
+##view_adminTopology_affinityGroups_serverCount = Server Count
+##view_adminTopology_affinityGroups_serverMembers = Server Members
view_adminTopology_agents = エージェント
+##view_adminTopology_agent_agentBindAddress = Agent Bind Address
+##view_adminTopology_agent_agentBindPort = Agent Bind Port
+##view_adminTopology_agent_agentName = Agent Name
+##view_adminTopology_agent_connectedServer = Connected Server
+##view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
+##view_adminTopology_agentDetail_address = Address
+##view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
+##view_adminTopology_agentDetail_currentServer = Current Server
+##view_adminTopology_agentDetail_token = Token
view_adminTopology_partitionEvents = イベントの分類
view_adminTopology_remoteAgentInstall = リモートエージェントのインストール
+##view_adminTopology_server_affinityGroup = Affinity Group
+##view_adminTopology_server_agentCount = Agent Count
+##view_adminTopology_server_endpointAddress = Endpoint Address
+##view_adminTopology_server_lastUpdateTime = Last Update Time
+##view_adminTopology_server_mode = Mode
+##view_adminTopology_server_nonSecurePort = Nonsecure Port
+##view_adminTopology_server_removeSelected = Remove Selected
+##view_adminTopology_server_securePort = Secure Port
+##view_adminTopology_server_setMaintenance = Set Maintenance
+##view_adminTopology_server_setNormal = Set Normal
+##view_adminTopology_serverDetail_connectedAgents = Connected Agents
+##view_adminTopology_serverDetail_installationDate = Installation Date
+##view_adminTopology_serverDetail_operationMode = Operation Mode
view_adminTopology_servers = サーバー
view_adminUsersDetails_dataTypeName = ユーザー
##view_adminUsers_failCreateUserWithExistingName = Failed to create user with existing
name [{0}]. Please use another name.
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index e7462f3..8105704 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -536,9 +536,40 @@ view_adminTemplates_prompt_enabledMetricTemplates = N\u00FAmero de
coletas habil
view_adminTemplates_servers = Servidores
##view_adminTemplates_userTemplates = User Templates
view_adminTopology_affinityGroups = Grupos de Afinidade
+##view_adminTopology_affinityGroups_agentCount = Agent Count
+##view_adminTopology_affinityGroups_agetnMembers = Agent Members
+##view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+##view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part of
an Affinity Group
+##view_adminTopology_affinityGroups_createNew = Create New
+##view_adminTopology_affinityGroups_details = Affinity Group Details
+##view_adminTopology_affinityGroups_removeSelected = Remove Selected
+##view_adminTopology_affinityGroups_serverCount = Server Count
+##view_adminTopology_affinityGroups_serverMembers = Server Members
view_adminTopology_agents = Agentes
+##view_adminTopology_agent_agentBindAddress = Agent Bind Address
+##view_adminTopology_agent_agentBindPort = Agent Bind Port
+##view_adminTopology_agent_agentName = Agent Name
+##view_adminTopology_agent_connectedServer = Connected Server
+##view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
+##view_adminTopology_agentDetail_address = Address
+##view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
+##view_adminTopology_agentDetail_currentServer = Current Server
+##view_adminTopology_agentDetail_token = Token
view_adminTopology_partitionEvents = Eventos na Parti\u00E7\u00E3o
view_adminTopology_remoteAgentInstall = Instala\u00E7\u00E3o Remota de Agentes
+##view_adminTopology_server_affinityGroup = Affinity Group
+##view_adminTopology_server_agentCount = Agent Count
+##view_adminTopology_server_endpointAddress = Endpoint Address
+##view_adminTopology_server_lastUpdateTime = Last Update Time
+##view_adminTopology_server_mode = Mode
+##view_adminTopology_server_nonSecurePort = Nonsecure Port
+##view_adminTopology_server_removeSelected = Remove Selected
+##view_adminTopology_server_securePort = Secure Port
+##view_adminTopology_server_setMaintenance = Set Maintenance
+##view_adminTopology_server_setNormal = Set Normal
+##view_adminTopology_serverDetail_connectedAgents = Connected Agents
+##view_adminTopology_serverDetail_installationDate = Installation Date
+##view_adminTopology_serverDetail_operationMode = Operation Mode
view_adminTopology_servers = Servidores
view_adminUsersDetails_dataTypeName = usu\u00E1rio
##view_adminUsers_failCreateUserWithExistingName = Failed to create user with existing
name [{0}]. Please use another name.
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index 3bb95c0..90a3d4c 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -523,9 +523,40 @@
#view_adminTemplates_servers = Servers
#view_adminTemplates_userTemplates = User Templates
#view_adminTopology_affinityGroups = Affinity Groups
+#view_adminTopology_affinityGroups_agentCount = Agent Count
+#view_adminTopology_affinityGroups_agetnMembers = Agent Members
+#view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+#view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part of an
Affinity Group
+#view_adminTopology_affinityGroups_createNew = Create New
+#view_adminTopology_affinityGroups_details = Affinity Group Details
+#view_adminTopology_affinityGroups_removeSelected = Remove Selected
+#view_adminTopology_affinityGroups_serverCount = Server Count
+#view_adminTopology_affinityGroups_serverMembers = Server Members
#view_adminTopology_agents = Agents
+#view_adminTopology_agent_agentBindAddress = Agent Bind Address
+#view_adminTopology_agent_agentBindPort = Agent Bind Port
+#view_adminTopology_agent_agentName = Agent Name
+#view_adminTopology_agent_connectedServer = Connected Server
+#view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
+#view_adminTopology_agentDetail_address = Address
+#view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
+#view_adminTopology_agentDetail_currentServer = Current Server
+#view_adminTopology_agentDetail_token = Token
#view_adminTopology_partitionEvents = Partition Events
#view_adminTopology_remoteAgentInstall = Remote Agent Install
+#view_adminTopology_server_affinityGroup = Affinity Group
+#view_adminTopology_server_agentCount = Agent Count
+#view_adminTopology_server_endpointAddress = Endpoint Address
+#view_adminTopology_server_lastUpdateTime = Last Update Time
+#view_adminTopology_server_mode = Mode
+#view_adminTopology_server_nonSecurePort = Nonsecure Port
+#view_adminTopology_server_removeSelected = Remove Selected
+#view_adminTopology_server_securePort = Secure Port
+#view_adminTopology_server_setMaintenance = Set Maintenance
+#view_adminTopology_server_setNormal = Set Normal
+#view_adminTopology_serverDetail_connectedAgents = Connected Agents
+#view_adminTopology_serverDetail_installationDate = Installation Date
+#view_adminTopology_serverDetail_operationMode = Operation Mode
#view_adminTopology_servers = Servers
#view_adminUsersDetails_dataTypeName = user
##view_adminUsers_failCreateUserWithExistingName = Failed to create user with existing
name [{0}]. Please use another name.
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 69c9081..ad55392 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -523,9 +523,40 @@ view_adminTemplates_prompt_enabledMetricTemplates =
\u8fd9\u4e2a\u7c7b\u578b\u76
view_adminTemplates_servers = \u670d\u52a1\u5668
##view_adminTemplates_userTemplates = User Templates
view_adminTopology_affinityGroups = \u76f8\u5173\u7ec4
+##view_adminTopology_affinityGroups_agentCount = Agent Count
+##view_adminTopology_affinityGroups_agetnMembers = Agent Members
+##view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+##view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part of
an Affinity Group
+##view_adminTopology_affinityGroups_createNew = Create New
+##view_adminTopology_affinityGroups_details = Affinity Group Details
+##view_adminTopology_affinityGroups_removeSelected = Remove Selected
+##view_adminTopology_affinityGroups_serverCount = Server Count
+##view_adminTopology_affinityGroups_serverMembers = Server Members
view_adminTopology_agents = \u4ee3\u7406
+##view_adminTopology_agent_agentBindAddress = Agent Bind Address
+##view_adminTopology_agent_agentBindPort = Agent Bind Port
+##view_adminTopology_agent_agentName = Agent Name
+##view_adminTopology_agent_connectedServer = Connected Server
+##view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
+##view_adminTopology_agentDetail_address = Address
+##view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
+##view_adminTopology_agentDetail_currentServer = Current Server
+##view_adminTopology_agentDetail_token = Token
view_adminTopology_partitionEvents = Partition\u4e8b\u4ef6
view_adminTopology_remoteAgentInstall = \u8fdc\u7a0b\u4ee3\u7406\u5b89\u88c5
+##view_adminTopology_server_affinityGroup = Affinity Group
+##view_adminTopology_server_agentCount = Agent Count
+##view_adminTopology_server_endpointAddress = Endpoint Address
+##view_adminTopology_server_lastUpdateTime = Last Update Time
+##view_adminTopology_server_mode = Mode
+##view_adminTopology_server_nonSecurePort = Nonsecure Port
+##view_adminTopology_server_removeSelected = Remove Selected
+##view_adminTopology_server_securePort = Secure Port
+##view_adminTopology_server_setMaintenance = Set Maintenance
+##view_adminTopology_server_setNormal = Set Normal
+##view_adminTopology_serverDetail_connectedAgents = Connected Agents
+##view_adminTopology_serverDetail_installationDate = Installation Date
+##view_adminTopology_serverDetail_operationMode = Operation Mode
view_adminTopology_servers = \u670d\u52a1\u5668
view_adminUsersDetails_dataTypeName = user
##view_adminUsers_failCreateUserWithExistingName = Failed to create user with existing
name [{0}]. Please use another name.
commit 2303cb7a2931110b17d745de7454503534224ce4
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Nov 15 13:57:50 2012 -0600
Avoid uncessary attempts to merge remote branches when local branches are created for
test builds with tagging.
diff --git a/release.sh b/release.sh
index 8c6d514..f9c816d 100755
--- a/release.sh
+++ b/release.sh
@@ -373,10 +373,14 @@ run_release_version_and_tag_process()
if [ "$SCM_STRATEGY" = "tag" ];
then
echo "9) Merge any remote changes into the local branch to be able to push tag
and version change. This will fail if the merge process requires manual merges."
- git pull origin "$BUILD_BRANCH"
- [ "$?" -ne 0 ] && abort "Merge with remote $BUILD_BRANCH
failed."
+ git ls-remote --exit-code origin $BUILD_BRANCH
+ if [ "$?" -eq 0 ];
+ then
+ git pull origin "$BUILD_BRANCH"
+ [ "$?" -ne 0 ] && abort "Merge with remote $BUILD_BRANCH
failed."
+ fi
else
- echo "9) DID NOT execute this step because local branch was created. No need
to merge back changes."
+ echo "9) DID NOT execute remote changes merge because local branch was
created. No need to merge back changes."
fi
echo "10) Everything went well so far, all the changes are now pushed!!!"
commit 7afe389bce54ace3d460ea9e13245bc7689747a9
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Oct 31 13:05:04 2012 +0100
Build everything including all the integration tests in the code-coverage
profile.
Clean up the integration-tests pom. The jbos-as-7-plugin-test no longer exists.
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index 982dfca..9678b15 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -60,19 +60,34 @@
<profiles>
<profile>
<id>integration-tests</id>
+ <activation>
+ <property>
+ <name>integration.tests</name>
+ </property>
+ </activation>
+
<modules>
<module>apache-plugin-test</module>
<module>jndi-access</module>
<!--<module>mod_cluster-plugin-test</module>-->
+ <!--<module>rest-api</module>-->
</modules>
</profile>
+
<profile>
- <id>as7-integration-test</id>
- <!-- this one is separate from others, requires special setup -->
- <modules>
- <module>jboss-as-7-plugin-test</module>
- </modules>
- </profile>
+ <id>code-coverage</id>
+ <activation>
+ <property>
+ <name>code-coverage</name>
+ </property>
+ </activation>
+ <modules>
+ <module>apache-plugin-test</module>
+ <module>jndi-access</module>
+ <!--<module>mod_cluster-plugin-test</module>-->
+ <!--<module>rest-api</module>-->
+ </modules>
+ </profile>
</profiles>
diff --git a/modules/pom.xml b/modules/pom.xml
index c2c5087..e40d89a 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -176,6 +176,23 @@
<module>integration-tests</module>
</modules>
</profile>
+
+ <profile>
+ <id>code-coverage</id>
+ <activation>
+ <property>
+ <name>code-coverage</name>
+ </property>
+ </activation>
+ <modules>
+ <module>core</module>
+ <module>common</module>
+ <module>plugins</module>
+ <module>helpers</module>
+ <module>enterprise</module>
+ <module>integration-tests</module>
+ </modules>
+ </profile>
</profiles>
</project>
commit 5eec477dba382b8c67d966f53f67907c95833fad
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Oct 30 13:48:15 2012 +0100
Removed unnecessary property def.
diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml
index a638858..7bce055 100644
--- a/code-coverage/pom.xml
+++ b/code-coverage/pom.xml
@@ -11,10 +11,6 @@
<name>RHQ Code Coverage</name>
<description>A module gathering the code coverage info from the test runs of all
the RHQ modules</description>
- <properties>
- <rhq.internal>false</rhq.internal>
- </properties>
-
<profiles>
<profile>
<id>code-coverage</id>
commit 1f005f8ed4d286f8c325ca9b54628fc0925831f6
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Oct 30 12:31:27 2012 +0100
Changed the code-coverage provider to JaCoCo.
We now generate a separate coverage report for unit tests and integration tests.
We also generate one overall report per project.
Additionally an overall report including the results of all unit and integration
tests is generated in a new top-level module called "code-coverage".
diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml
new file mode 100644
index 0000000..a638858
--- /dev/null
+++ b/code-coverage/pom.xml
@@ -0,0 +1,209 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>rhq-parent</artifactId>
+ <groupId>org.rhq</groupId>
+ <version>4.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>rhq-code-coverage</artifactId>
+
+ <name>RHQ Code Coverage</name>
+ <description>A module gathering the code coverage info from the test runs of all
the RHQ modules</description>
+
+ <properties>
+ <rhq.internal>false</rhq.internal>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>code-coverage</id>
+ <activation>
+ <property>
+ <name>code-coverage</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- Do NOT run code coverage on this module... -->
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <!-- Do NOT run tests in this module... -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <!-- NOT even the integration tests... -->
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <!-- Copy the ant tasks jar. Needed for ts.jacoco.report-ant .
-->
+ <execution>
+ <id>jacoco-dependency-ant</id>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <phase>process-test-resources</phase>
+ <inherited>false</inherited>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <version>${jacoco.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <stripVersion>true</stripVersion>
+
<outputDirectory>${project.build.directory}/jacoco-jars</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>overall-chart-creation</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <!-- Execute an ant task within maven -->
+ <echo message="Generating JaCoCo Reports"
/>
+ <taskdef name="report"
classname="org.jacoco.ant.ReportTask">
+ <classpath
path="${project.build.directory}/jacoco-jars/org.jacoco.ant.jar" />
+ </taskdef>
+ <mkdir
dir="${project.reporting.outputDirectory}/coverage-report/overall" />
+ <report>
+ <executiondata>
+ <fileset
dir="${basedir}/../modules">
+ <include
name="**/target/jacoco-unit-test.exec" />
+ <include
name="**/target/jacoco-integration-test.exec" />
+ </fileset>
+ </executiondata>
+ <structure name="RHQ Overall Code Coverage
Report (including unit and integration tests)">
+ <group name="Plugins">
+ <classfiles>
+ <fileset
dir="${basedir}/../modules">
+ <include
name="plugins/**/target/classes/org/rhq/**" />
+ <include
name="plugins/**/target/generated-classes/*/org/rhq/**" />
+ <include
name="integration-tests/**/target/classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/generated-classes/org/rhq/**" />
+ </fileset>
+ </classfiles>
+ <sourcefiles>
+ <dirset
dir="${basedir}/../modules/">
+ <include
name="**/src/main/java" />
+ <include
name="**/target/generated-sources/*" />
+ </dirset>
+ </sourcefiles>
+ </group>
+ <group name="Core">
+ <classfiles>
+ <fileset
dir="${basedir}/../modules">
+ <include
name="core/**/target/classes/org/rhq/**" />
+ <include
name="core/**/target/generated-classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/generated-classes/org/rhq/**" />
+ </fileset>
+ </classfiles>
+ <sourcefiles>
+ <dirset
dir="${basedir}/../modules/">
+ <include
name="**/src/main/java" />
+ <include
name="**/target/generated-sources/*" />
+ </dirset>
+ </sourcefiles>
+ </group>
+ <group name="Enterprise">
+ <classfiles>
+ <fileset
dir="${basedir}/../modules">
+ <include
name="enterprise/**/target/classes/org/rhq/**" />
+ <include
name="enterprise/**/target/generated-classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/generated-classes/org/rhq/**" />
+ <exclude
name="enterprise/gui/**" />
+ </fileset>
+ </classfiles>
+ <sourcefiles>
+ <dirset
dir="${basedir}/../modules/">
+ <include
name="**/src/main/java" />
+ <include
name="**/target/generated-sources/*" />
+ </dirset>
+ </sourcefiles>
+ </group>
+ <group name="GUI">
+ <classfiles>
+ <fileset
dir="${basedir}/../modules">
+ <include
name="enterprise/gui/**/target/classes/org/rhq/**" />
+ <include
name="enterprise/gui/**/target/generated-classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/classes/org/rhq/**" />
+ <include
name="integration-tests/**/target/generated-classes/org/rhq/**" />
+ </fileset>
+ </classfiles>
+ <sourcefiles>
+ <dirset
dir="${basedir}/../modules/">
+ <include
name="**/src/main/java" />
+ <include
name="**/target/generated-sources/*" />
+ </dirset>
+ </sourcefiles>
+ </group>
+ <group name="Miscellaneous">
+ <classfiles>
+ <fileset
dir="${basedir}/../modules">
+ <include
name="**/target/classes/org/rhq/**" />
+ <include
name="**/target/generated-classes/org/rhq/**" />
+ <exclude
name="plugins/**/target/classes/org/rhq/**" />
+ <exclude
name="plugins/**/target/generated-classes/*/org/rhq/**" />
+ <exclude
name="core/**/target/classes/org/rhq/**" />
+ <exclude
name="core/**/target/generated-classes/org/rhq/**" />
+ <exclude
name="enterprise/**/target/classes/org/rhq/**" />
+ <exclude
name="enterprise/**/target/generated-classes/org/rhq/**" />
+ </fileset>
+ </classfiles>
+ <sourcefiles>
+ <dirset
dir="${basedir}/../modules/">
+ <include
name="**/src/main/java" />
+ <include
name="**/target/generated-sources/*" />
+ </dirset>
+ </sourcefiles>
+ </group>
+ </structure>
+ <html
destdir="${project.reporting.outputDirectory}/coverage-report/overall" />
+ <xml
destfile="${project.reporting.outputDirectory}/coverage-report/overall/coverage-report.xml"
/>
+ <csv
destfile="${project.reporting.outputDirectory}/coverage-report/overall/coverage-report.csv"
/>
+ </report>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <version>${jacoco.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
\ No newline at end of file
diff --git a/etc/apt/pom.xml b/etc/apt/pom.xml
index 882bdee..215ebd9 100644
--- a/etc/apt/pom.xml
+++ b/etc/apt/pom.xml
@@ -107,8 +107,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/etc/guiperftests/pom.xml b/etc/guiperftests/pom.xml
index 4ef1107..07d6d1d 100644
--- a/etc/guiperftests/pom.xml
+++ b/etc/guiperftests/pom.xml
@@ -70,7 +70,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
- <argLine>-Xms16M -Xmx256M</argLine>
+ <argLine>${jacoco.unit-test.args} -Xms16M -Xmx256M</argLine>
</configuration>
</plugin>
</plugins>
diff --git a/modules/core/arquillian-integration/container/pom.xml
b/modules/core/arquillian-integration/container/pom.xml
index 590a475..19b4d35 100644
--- a/modules/core/arquillian-integration/container/pom.xml
+++ b/modules/core/arquillian-integration/container/pom.xml
@@ -83,8 +83,10 @@
<!-- 3rd party -->
+ <!-- Yes, this is meant to be org.javassist:javassist, and NOT
+ javassist:javassist - which is an older impl -->
<dependency>
- <groupId>javassist</groupId>
+ <groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 217830c..d7e1500 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -92,9 +92,9 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!-- need to point the library path to the location of the native libraries
-->
-
<argLine>-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar</argLine>
+ <argLine>${jacoco.unit-test.args}
-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar</argLine>
<!--
- <argLine>-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar
-Dsigar.nativeLogging=true -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args}
-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar -Dsigar.nativeLogging=true
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/core/plugin-container/pom.xml
b/modules/core/plugin-container/pom.xml
index 04c6f92..b3fcf49 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -364,9 +364,9 @@
<excludedGroups>arquillian,${rhq.testng.excludedGroups}</excludedGroups>
<!-- need to point the library path to the location of the native
libraries -->
-
<argLine>-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar</argLine>
+ <argLine>${jacoco.unit-test.args}
-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar</argLine>
<!--
-
<argLine>-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar
-Dsigar.nativeLogging=true</argLine>
+ <argLine>${jacoco.unit-test.args}
-Dorg.hyperic.sigar.path=${project.build.directory}/jboss-sigar
-Dsigar.nativeLogging=true</argLine>
-->
</configuration>
</execution>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 016f36c..0b290d3 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -240,9 +240,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
- <!-- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
+ <!-- <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine> -->
- <argLine>-Djava.security.manager
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
+ <argLine>${jacoco.unit-test.args} -Djava.security.manager
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit the
JVM. -->
<failIfNoTests>true</failIfNoTests>
</configuration>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index b14937b..6214f5e 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -144,7 +144,7 @@
<skip>false</skip>
-->
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
<systemPropertyVariables combine.children="append">
<rhq.comm.test.connectorBindPort>${rhq.comm.test.connectorBindPort}</rhq.comm.test.connectorBindPort>
diff --git a/modules/enterprise/remoting/cli/pom.xml
b/modules/enterprise/remoting/cli/pom.xml
index 6669e43..e069d89 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -200,7 +200,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups},ws</excludedGroups>
<forkMode>pertest</forkMode>
- <argLine>-Xmx512m -Xms128m</argLine>
+ <argLine>${jacoco.unit-test.args} -Xmx512m
-Xms128m</argLine>
<additionalClasspathElements>
-->
<!-- The below is required for WS Java Client support -->
diff --git a/modules/enterprise/remoting/webservices/pom.xml
b/modules/enterprise/remoting/webservices/pom.xml
index e2a48c4..33c1952 100644
--- a/modules/enterprise/remoting/webservices/pom.xml
+++ b/modules/enterprise/remoting/webservices/pom.xml
@@ -207,7 +207,7 @@
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<groups>ws</groups>
<forkMode>pertest</forkMode>
- <argLine>-Xmx512m -Xms128m</argLine>
+ <argLine>${jacoco.unit-test.args} -Xmx512m
-Xms128m</argLine>
<systemProperties>
<property>
<name>deploymentDirectory</name>
diff --git a/modules/enterprise/scripting/javascript/pom.xml
b/modules/enterprise/scripting/javascript/pom.xml
index 7788fd6..ab35acb 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -57,7 +57,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
- <argLine>-Djava.security.manager
+ <argLine>${jacoco.unit-test.args} -Djava.security.manager
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit
the JVM. -->
diff --git a/modules/enterprise/scripting/python/pom.xml
b/modules/enterprise/scripting/python/pom.xml
index 9355be6..e4b3cfb 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -56,7 +56,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
- <argLine>-Djava.security.manager
+ <argLine>${jacoco.unit-test.args} -Djava.security.manager
-Djava.security.policy==${project.build.testOutputDirectory}/allow-all.policy</argLine>
<!-- This is important, because some of the tests try to exit
the JVM. -->
diff --git
a/modules/enterprise/scripting/python/src/test/java/org/rhq/scripting/python/PythonScriptEngineInitializerTest.java
b/modules/enterprise/scripting/python/src/test/java/org/rhq/scripting/python/PythonScriptEngineInitializerTest.java
index b1d4a65..e3b1355 100644
---
a/modules/enterprise/scripting/python/src/test/java/org/rhq/scripting/python/PythonScriptEngineInitializerTest.java
+++
b/modules/enterprise/scripting/python/src/test/java/org/rhq/scripting/python/PythonScriptEngineInitializerTest.java
@@ -25,6 +25,7 @@ import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.net.URI;
import java.security.AccessControlException;
import java.security.Permissions;
@@ -164,6 +165,12 @@ public class PythonScriptEngineInitializerTest {
Map<String, Set<Method>> ret = new HashMap<String,
Set<Method>>();
for (Method m : cls.getDeclaredMethods()) {
+ int mods = m.getModifiers();
+
+ if (Modifier.isStatic(mods) || !Modifier.isPublic(mods)) {
+ continue;
+ }
+
Set<Method> methods = ret.get(m.getName());
if (methods == null) {
methods = new HashSet<Method>();
diff --git a/modules/enterprise/server/itests/pom.xml
b/modules/enterprise/server/itests/pom.xml
index 337f003..0ec6a6a 100644
--- a/modules/enterprise/server/itests/pom.xml
+++ b/modules/enterprise/server/itests/pom.xml
@@ -369,7 +369,7 @@
<value>${project.version}</value>
</property>
</systemProperties>
- <argLine>-Djava.security.manager
-Djava.security.policy==${basedir}/target/test-classes/security.policy</argLine>
+ <argLine>${jacoco.unit-test.args} -Djava.security.manager
-Djava.security.policy==${basedir}/target/test-classes/security.policy</argLine>
<additionalClasspathElements>
<!-- The below is required for tests to run against Oracle.
-->
<additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar</additionalClasspathElement>
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml
b/modules/enterprise/server/plugins/alert-cli/pom.xml
index ba3d9e7..5beb580 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -28,7 +28,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
- <!-- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
+ <!-- <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine> -->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml
b/modules/enterprise/server/plugins/alert-email/pom.xml
index 4ef23f6..42e8f66 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -34,7 +34,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml
b/modules/enterprise/server/plugins/alert-irc/pom.xml
index 23835a6..03db452 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -31,7 +31,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml
b/modules/enterprise/server/plugins/alert-log4j/pom.xml
index 2348550..01ad691 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -21,7 +21,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml
b/modules/enterprise/server/plugins/alert-microblog/pom.xml
index ff263a3..e7359c1 100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -29,7 +29,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
index 7e492cb..66b5993 100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -21,7 +21,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml
b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 9dc3ad5..a5f809f 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -21,7 +21,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml
b/modules/enterprise/server/plugins/alert-roles/pom.xml
index 248675d..e561d51 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -32,7 +32,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-sms/pom.xml
b/modules/enterprise/server/plugins/alert-sms/pom.xml
index b0c88c9..72a6b15 100644
--- a/modules/enterprise/server/plugins/alert-sms/pom.xml
+++ b/modules/enterprise/server/plugins/alert-sms/pom.xml
@@ -64,7 +64,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml
b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 5561091..3619956 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -29,7 +29,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml
b/modules/enterprise/server/plugins/alert-subject/pom.xml
index e3394ab..ca4c079 100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -21,7 +21,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml
b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index b4f59b0..e896df6 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -66,7 +66,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/cloud/pom.xml
b/modules/enterprise/server/plugins/cloud/pom.xml
index 6ed8c41..bf2f8d5 100644
--- a/modules/enterprise/server/plugins/cloud/pom.xml
+++ b/modules/enterprise/server/plugins/cloud/pom.xml
@@ -49,7 +49,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml
b/modules/enterprise/server/plugins/cobbler/pom.xml
index d91220a..af648f1 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -73,7 +73,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/disk/pom.xml
b/modules/enterprise/server/plugins/disk/pom.xml
index af75452..f6f4172 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -48,8 +48,8 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
- -->
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ -->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 1c65111..ccc7edd 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -88,7 +88,7 @@
<skipTests>${skip.mongodb.tests}</skipTests>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml
b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index ad0fc4f..ec4f8d3 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -62,7 +62,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
index 7f4dfac..96458e2 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -68,7 +68,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml
b/modules/enterprise/server/plugins/groovy-script/pom.xml
index b306249..d8ea7f7 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -125,7 +125,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml
b/modules/enterprise/server/plugins/jboss-software/pom.xml
index cbb2a54..c2e0b73 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -53,7 +53,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
- <!--<argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
index 5a7da8e..bb5ef4d 100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -21,7 +21,7 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/url/pom.xml
b/modules/enterprise/server/plugins/url/pom.xml
index 471153b..338e489 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -57,8 +57,8 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
- -->
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ -->
</configuration>
</plugin>
diff --git a/modules/enterprise/server/plugins/yum/pom.xml
b/modules/enterprise/server/plugins/yum/pom.xml
index c07a573..2d0ed5e 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -42,8 +42,8 @@
<configuration>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<!--
- <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
- -->
+ <argLine>${jacoco.unit-test.args} -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ -->
</configuration>
</plugin>
diff --git a/modules/integration-tests/apache-plugin-test/pom.xml
b/modules/integration-tests/apache-plugin-test/pom.xml
index 4f57361..390c772 100644
--- a/modules/integration-tests/apache-plugin-test/pom.xml
+++ b/modules/integration-tests/apache-plugin-test/pom.xml
@@ -270,7 +270,7 @@
<additionalClasspathElements>
<additionalClasspathElement>${env.JAVA_HOME}/lib/tools.jar</additionalClasspathElement>
</additionalClasspathElements>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine> -->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
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 3533cff..aed285e 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -326,7 +326,7 @@
<jnp.port>${jnp.port}</jnp.port>
<jnp.rmiPort>${jnp.rmiPort}</jnp.rmiPort>
</systemPropertyVariables>
- <argLine>-Djava.security.manager
-Djava.security.policy==${basedir}/target/test-classes/security.policy</argLine>
+ <argLine>${jacoco.unit-test.args} -Djava.security.manager
-Djava.security.policy==${basedir}/target/test-classes/security.policy</argLine>
<additionalClasspathElements>
<!-- The below is required for tests to run against
Oracle. -->
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index 63fb98d..0a30815 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -345,7 +345,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index aa455b8..7a84e11 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -163,7 +163,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 0427125..357d294 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -160,9 +160,9 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
<!--
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
<systemProperties>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 83070a3..2055075 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -225,7 +225,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 62e4127..b20128b 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -132,8 +132,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index d362d14..dd09ee4 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -168,7 +168,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 7a51dda..b657717 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -157,7 +157,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml
b/modules/plugins/filetemplate-bundle/pom.xml
index e635b21..5701fed 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -141,8 +141,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 866bbb9..5ede70d 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -154,7 +154,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index 5240ed7..f959900 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -134,8 +134,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index d893686..a3526b1 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -164,7 +164,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 9e6f67f..76159e8 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -90,8 +90,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/iptables/pom.xml b/modules/plugins/iptables/pom.xml
index d6eeff3..6f76c32 100644
--- a/modules/plugins/iptables/pom.xml
+++ b/modules/plugins/iptables/pom.xml
@@ -106,8 +106,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 283b840..40783dd 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -344,8 +344,8 @@
<useSystemClassLoader>true</useSystemClassLoader>
<excludes><exclude>org/rhq/plugins/jbossas5/itest/**</exclude></excludes>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<additionalClasspathElements>
<additionalClasspathElement>
${project.build.testSourceDirectory}/../jars/ejb2-test.jar
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 10b0ad2..61677c1 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -88,7 +88,6 @@
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
@@ -307,7 +306,8 @@
<delete file="${as7.zipfile}"/>
<get src="${as7.url}" dest="${as7.zipfile}"
usetimestamp="true" verbose="true"/>
<unzip src="${as7.zipfile}"
dest="${java.io.tmpdir}"/>
- <delete dir="${jboss7.home}"
verbose="true"/>
+ <!-- What was this supposed to do? Right now, it'd delete the
AS7 deployment we just unzipped. -->
+ <!-- <delete dir="${jboss7.home}"
verbose="true"/> -->
<move file="${java.io.tmpdir}/jboss-eap-6.0"
tofile="${jboss7.home}"
failonerror="false"/>
@@ -612,7 +612,6 @@
</build>
</profile>
-
</profiles>
</project>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index a7bb4b2..4f44560 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -265,8 +265,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml
b/modules/plugins/jboss-cache-v3/pom.xml
index 82e9ce7..d361412 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -384,8 +384,8 @@
<additionalClasspathElement>${project.build.testSourceDirectory}/../jars/TestCacheEJB.jar</additionalClasspathElement>
</additionalClasspathElements>
<excludedGroups>jbosscache3.test</excludedGroups>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index 3224e55..aa567d1 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -124,8 +124,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/jdbctrace/pom.xml b/modules/plugins/jdbctrace/pom.xml
index 3a3ea7c..5eb4cbf 100644
--- a/modules/plugins/jdbctrace/pom.xml
+++ b/modules/plugins/jdbctrace/pom.xml
@@ -162,8 +162,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/jira/pom.xml b/modules/plugins/jira/pom.xml
index d9f90ba..a0c584d 100644
--- a/modules/plugins/jira/pom.xml
+++ b/modules/plugins/jira/pom.xml
@@ -142,8 +142,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 36db1d4..6338a09 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -122,8 +122,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/lsof/pom.xml b/modules/plugins/lsof/pom.xml
index eca4983..a83c1e3 100644
--- a/modules/plugins/lsof/pom.xml
+++ b/modules/plugins/lsof/pom.xml
@@ -132,8 +132,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 4a3493f..159ca2b 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -152,7 +152,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 9d1d12f..2aca604 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -137,8 +137,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 1150274..5784707 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -142,8 +142,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 2e34f17..b5675b2 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -110,9 +110,9 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Djava.library.path=${basedir}/target/itest/lib</argLine>
+ <argLine>${jacoco.integration-test.args}
-Djava.library.path=${basedir}/target/itest/lib</argLine>
<!--
- <argLine>-Djava.library.path=${basedir}/target/itest/lib
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ <argLine>${jacoco.integration-test.args}
-Djava.library.path=${basedir}/target/itest/lib -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
<systemPropertyVariables>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 3ea1b6a..e97e499 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -90,8 +90,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 4e01e5d..1f09192 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -162,7 +162,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index a169747..8edd65b 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -136,8 +136,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 78156ef..8e3a261 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -110,7 +110,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
<systemPropertyVariables
combine.children="append">
<project.artifactId>${project.artifactId}</project.artifactId>
<project.version>${project.version}</project.version>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 6fcebc8..e829cdd 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -135,7 +135,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 4bf3518..8eb30e5 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -162,7 +162,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 7dc360f..b0e846e 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -90,8 +90,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 0462ac0..d03c5c4 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -154,7 +154,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 095692b..c17112c 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -152,7 +152,7 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<environmentVariables>
<LD_LIBRARY_PATH>${basedir}/target/itest/lib:${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
</environmentVariables>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index e1b0c40..93092ea 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -117,8 +117,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index cf01db9..ad8efb4 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -111,8 +111,8 @@
<skip>${maven.test.skip}</skip>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>false</useSystemClassLoader>
-
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
-
<!--<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
+ <argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
+ <!--<argLine>${jacoco.integration-test.args}
-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib -Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>-->
<systemProperties>
<property>
<name>project.artifactId</name>
diff --git a/pom.xml b/pom.xml
index 53fa751..ea5af1c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
<jboss-javassist.version>3.9.0.GA</jboss-javassist.version>
<jbossws-native-dist.version>3.1.1.GA</jbossws-native-dist.version>
<!-- End: JBoss AS Dependency Versions -->
-
+
<commons-logging.version>1.1.0.jboss</commons-logging.version>
<concurrent.version>1.3.4-jboss-update1</concurrent.version> <!--
oswego-concurrent compatible with 4.2.3.GA -->
<findbugs.version>2.3.2</findbugs.version>
@@ -109,10 +109,16 @@
<ant.contrib.version>1.0b3</ant.contrib.version>
<resteasy.version>2.3.4.Final</resteasy.version>
<freemarker.version>2.3.18</freemarker.version>
- <powermock.version>1.4.11</powermock.version>
+ <powermock.version>1.4.12</powermock.version>
<arquillian.version>1.0.1.Final</arquillian.version>
<xercesImpl.version>2.9.1-jbossas-2</xercesImpl.version> <!-- see
BZ-820629 and CVE-2009-2625 -->
+ <!-- Note that this is DIFFERENT from the jboss-javassist defined above.
+ This version is used for org.javassist:javassist artifact that is used in
+ Arquillian integration, and works with jacoco (as opposed to javassist 3.9.0,
+ which doesn't in some cases.) -->
+ <javassist.version>3.16.1-GA</javassist.version>
+
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -195,6 +201,8 @@
<!-- The name of the file in the module's root dir that contains the
intentional
api changes to be ignored by Clirr api checks -->
<intentional-api-changes-file>intentional-api-changes-since-${signature-check-base-version}.xml</intentional-api-changes-file>
+
+ <jacoco.version>0.6.0.201210061924</jacoco.version>
</properties>
@@ -496,6 +504,11 @@
<scope>import</scope>
</dependency>
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${javassist.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -594,18 +607,24 @@
</exclusion>
</exclusions>
</dependency>
-
- <!-- We must declare this here to workaround
-
http://jira.codehaus.org/browse/MANTRUN-51.
- Once we require Maven 3.0, this will no
- no longer needed. -->
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
</dependencies>
- </plugin>
+
+ <executions>
+ <execution>
+ <id>pre-create target/classes</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <echo>Pre-creating target/classes so that Jacoco can see it
even if there are no source files in the module.</echo>
+ <mkdir dir="${project.build.directory}/classes"
/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -645,7 +664,7 @@
http://jira.codehaus.org/browse/SUREFIRE-836. -->
<version>2.11</version>
<configuration>
- <argLine>-Xms32M -Xmx512M</argLine>
+ <argLine>${jacoco.integration-test.args} -Xms32M
-Xmx512M</argLine>
</configuration>
</plugin>
<plugin>
@@ -694,7 +713,7 @@
http://jira.codehaus.org/browse/SUREFIRE-836. -->
<version>2.11</version>
<configuration>
- <argLine>-Xms32M -Xmx512M</argLine>
+ <argLine>${jacoco.unit-test.args} -Xms32M -Xmx512M</argLine>
</configuration>
</plugin>
<plugin>
@@ -761,7 +780,13 @@
<artifactId>clirr-maven-plugin</artifactId>
<version>${clirr.version}</version>
</plugin>
- </plugins>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ </plugin>
+ </plugins>
</pluginManagement>
@@ -1187,34 +1212,190 @@
<modules>
<module>modules</module>
+ <module>code-coverage</module>
</modules>
<profiles>
+ <!-- This profile is the "opposite" of the code coverage profile and
provides
+ default values for properties that are set in the code-coverage profile
+ to kick of jacoco java agent. -->
+ <profile>
+ <id>no-code-coverage</id>
+ <activation>
+ <property>
+ <name>!code-coverage</name>
+ </property>
+ </activation>
+
+ <properties>
+ <jacoco.unit-test.args></jacoco.unit-test.args>
+ <jacoco.integration-test.args></jacoco.integration-test.args>
+ </properties>
+ </profile>
+
<profile>
<id>code-coverage</id>
-
+ <activation>
+ <property>
+ <name>code-coverage</name>
+ </property>
+ </activation>
<build>
<plugins>
+ <!-- This definition creates the 2 independent coverage reports -
+ separately for unit tests and integration tests -->
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.5.2</version>
- <configuration>
- <formats>
- <format>xml</format>
- </formats>
- </configuration>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
- <phase>post-integration-test</phase>
+ <id>prepare-agent-for-unit-tests</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+
<destFile>${project.build.directory}/jacoco-unit-test.exec</destFile>
+ <propertyName>jacoco.unit-test.args</propertyName>
+ <includes>
+ <include>org.rhq.*</include>
+ </includes>
+ </configuration>
+ </execution>
+ <execution>
+ <id>prepare-agent-for-integration-tests</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+
<destFile>${project.build.directory}/jacoco-integration-test.exec</destFile>
+
<propertyName>jacoco.integration-test.args</propertyName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report-unit-tests</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+
<dataFile>${project.build.directory}/jacoco-unit-test.exec</dataFile>
+
<outputDirectory>${project.reporting.outputDirectory}/coverage-report/unit-tests</outputDirectory>
+ <includes>
+ <include>org/rhq/**</include>
+ </includes>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report-integration-tests</id>
+ <!-- Run this very late so that test, integration-test
+ have already been completed -->
+ <phase>verify</phase>
<goals>
- <goal>cobertura</goal>
+ <goal>report</goal>
</goals>
+ <configuration>
+
<dataFile>${project.build.directory}/jacoco-integration-test.exec</dataFile>
+
<outputDirectory>${project.reporting.outputDirectory}/coverage-report/integration-tests</outputDirectory>
+ <includes>
+ <include>org/rhq/**</include>
+ </includes>
+ </configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
+
+ <!-- The following insanity merges the two separate coverage reports
+ and produces an overall report - the total test coverage including
+ both unit and integration tests (defined in the same module).
+ If the integration test resides in a separate module, it is only
+ possible to deduce the coverage from report generated by the
+ top-level code-coverage module that merges all the coverage
+ reports in the whole build. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <!-- Copy the ant tasks jar. Needed for org.jacoco.ant.ReportTask .
-->
+ <execution>
+ <id>jacoco-dependency-ant</id>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <phase>process-test-resources</phase>
+ <inherited>false</inherited>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <version>${jacoco.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <stripVersion>true</stripVersion>
+
<outputDirectory>${project.build.directory}/jacoco-jars</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>overall-chart-creation</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <!-- Execute an ant task within maven -->
+ <echo message="Generating Overall JaCoCo Report"
/>
+ <taskdef name="report"
classname="org.jacoco.ant.ReportTask">
+ <classpath
path="${project.build.directory}/jacoco-jars/org.jacoco.ant.jar" />
+ </taskdef>
+ <mkdir
dir="${project.reporting.outputDirectory}/coverage-report/overall" />
+ <report>
+ <executiondata>
+ <fileset
dir="${project.build.directory}">
+ <include name="jacoco-unit-test.exec"
/>
+ <include
name="jacoco-integration-test.exec" />
+ </fileset>
+ </executiondata>
+ <structure name="Overall Code Coverage Report
(including unit and integration tests)">
+ <classfiles>
+ <fileset
dir="${project.build.directory}">
+ <include name="classes/org/rhq/**"
/>
+ <include
name="generated-classes/*/org/rhq/**" />
+ </fileset>
+ </classfiles>
+ <sourcefiles>
+ <dirset dir="${basedir}">
+ <include name="src/main/java" />
+ <include
name="target/generated-sources/*" />
+ </dirset>
+ </sourcefiles>
+ </structure>
+ <html
destdir="${project.reporting.outputDirectory}/coverage-report/overall" />
+ <xml
destfile="${project.reporting.outputDirectory}/coverage-report/overall/jacoco.xml"
/>
+ <csv
destfile="${project.reporting.outputDirectory}/coverage-report/overall/jacoco.csv"
/>
+ </report>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <version>${jacoco.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
</profile>
commit a63181a5c6d2c609091abd23312af3e5bb1f7e5e
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Oct 22 12:01:21 2012 +0200
Replacing all the cobertura definitions in all the poms with one definition
in the root pom.
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index 1de27c1..9390f57 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -140,89 +140,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index e7416c4..f69c49e 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -112,90 +112,4 @@
</plugin>
</plugins>
</build>
-
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 92a62cb..008da6e 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -82,89 +82,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the
original classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of
cobertura data file-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory
-->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes
folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/common/filetemplate-bundle/pom.xml
b/modules/common/filetemplate-bundle/pom.xml
index 930b7e1..7dc4571 100644
--- a/modules/common/filetemplate-bundle/pom.xml
+++ b/modules/common/filetemplate-bundle/pom.xml
@@ -39,90 +39,4 @@
</exclusions>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
\ No newline at end of file
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 10b3663..c8f844c 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -84,96 +84,5 @@
</plugins>
</build>
-->
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <path id="cobertura.classpath">
- <fileset
dir="${user.home}/.m2/repository/net/sourceforge/cobertura/cobertura/${cobertura.version}/">
- <include name="cobertura*.jar" />
- <include name="lib/**/*.jar" />
- </fileset>
- </path>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
+ </project>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index a988ab6..799b3f3 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -198,91 +198,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
- todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/site/cobertura"/>
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
- destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java"/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index e0ceba4..b625dd1 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -410,90 +410,6 @@
</profile>
<profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura
-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"
/>
- <!-- backup all classes so that we can
instrument the original classes -->
- <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
- <fileset
dir="target/classes">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and save there
location of cobertura data file -->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- instrument all classes in target/classes
directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class"
/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- prepare directory structure for cobertura
-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura"
/>
- <!-- restore classes from backup folder to
classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset
dir="target/cobertura/backup">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete
dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>ojdbc-driver</id>
<dependencies>
<dependency>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index e9db3de..216cb4e 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -429,90 +429,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 336e33c..217830c 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -159,91 +159,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
-
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<repositories>
<!-- This is for SIGAR 1.6.4. -->
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index 922855c..f73e3c5 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -124,91 +124,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/core/plugin-container/pom.xml
b/modules/core/plugin-container/pom.xml
index c6ce32d..04c6f92 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -387,92 +387,4 @@
</plugins>
</build>
-
- <profiles>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index a154988..d0eff4c 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -18,14 +18,6 @@
<name>RHQ Core Modules</name>
<description>parent POM for modules comprising the RHQ core (i.e. modules
required by both the enterprise and embedded editions of RHQ)</description>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
-
<profiles>
<profile>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index 145bf2b..0f4ea25 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -134,90 +134,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 53c13c7..cede0a3 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -254,89 +254,6 @@ Build-Number=${buildNumber}
<profiles>
<profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>install-and-deploy-zip</id>
<activation>
<property>
diff --git a/modules/enterprise/agentupdate/pom.xml
b/modules/enterprise/agentupdate/pom.xml
index f060517..6aa8582 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -197,89 +197,6 @@ rhq-agent.latest.build-number=${buildNumber}
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<reporting>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index f3587e0..016f36c 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -357,97 +357,6 @@
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"
/>
- <!-- backup all classes so that we
- can instrument the original classes -->
- <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
- <fileset
dir="target/classes">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and
- save there location of cobertura data file
-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- instrument all classes in target/classes
- directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class"
/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura"
/>
- <!-- restore classes from backup
- folder to classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset
dir="target/cobertura/backup">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete
dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties
- file -->
- <delete
file="target/classes/cobertura.properties" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
<!-- Profile activated explicitly by command line call, or brew property.
-->
<profile>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index 47be0b5..b14937b 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -219,89 +219,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/gui/portal-war/pom.xml
b/modules/enterprise/gui/portal-war/pom.xml
index 4e3910f..fe836b5 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -543,93 +543,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.class" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.class" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.class"
/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.class" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.java" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/gui/rest-war/pom.xml
b/modules/enterprise/gui/rest-war/pom.xml
index 93c2544..554212b 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -196,94 +196,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.class" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.class" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.class"
/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder
-->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.class" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include
name="org/rhq/enterprise/gui/util/LookupComponent.java" />
- <include
name="org/rhq/enterprise/gui/common/time/converter/RelativeDurationConverter.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index f2356ec..1bb6d0e 100644
--- a/modules/enterprise/pom.xml
+++ b/modules/enterprise/pom.xml
@@ -16,14 +16,6 @@
<name>RHQ Enterprise Modules</name>
<description>parent POM for modules comprising the RHQ enterprise
edition</description>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
-
<profiles>
<profile>
diff --git a/modules/enterprise/remoting/cli/pom.xml
b/modules/enterprise/remoting/cli/pom.xml
index b263f29..6669e43 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -326,90 +326,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/scripting/api/pom.xml
b/modules/enterprise/scripting/api/pom.xml
index e14a164..dfac97d 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -82,96 +82,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <tasks>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"
/>
- <!-- backup all classes so that we
- can instrument the original classes -->
- <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
- <fileset
dir="target/classes">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and
- save there location of cobertura data file
-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- instrument all classes in target/classes
- directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class"
/>
- </fileset>
- </cobertura-instrument>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <tasks>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura"
/>
- <!-- restore classes from backup
- folder to classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset
dir="target/cobertura/backup">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete
dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties
- file -->
- <delete
file="target/classes/cobertura.properties" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/scripting/javascript/pom.xml
b/modules/enterprise/scripting/javascript/pom.xml
index a76e987..7788fd6 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -126,105 +126,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <tasks>
- <!-- prepare directory structure for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument
- the original classes -->
- <copy toDir="target/cobertura/backup"
- verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there
- location of cobertura data file -->
- <touch
- file="target/classes/cobertura.properties"
/>
- <echo
-
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath"
- resource="tasks.properties" />
- <!-- instrument all classes in target/classes
- directory -->
- <cobertura-instrument
-
datafile="${project.build.directory}/cobertura/cobertura.ser"
-
todir="${project.build.directory}/classes">
- <fileset
-
dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <tasks>
- <taskdef
classpathref="maven.plugin.classpath"
- resource="tasks.properties" />
- <!-- prepare directory structure for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to
- classes folder -->
- <copy toDir="target/classes"
verbose="true"
- overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
-
datafile="${project.build.directory}/cobertura/cobertura.ser"
-
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
- file="target/classes/cobertura.properties"
/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/scripting/python/pom.xml
b/modules/enterprise/scripting/python/pom.xml
index 66a7814..9355be6 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -123,96 +123,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <tasks>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"
/>
- <!-- backup all classes so that we
- can instrument the original classes -->
- <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
- <fileset
dir="target/classes">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and
- save there location of cobertura data file
-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- instrument all classes in target/classes
- directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class"
/>
- </fileset>
- </cobertura-instrument>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <tasks>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura"
/>
- <!-- restore classes from backup
- folder to classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset
dir="target/cobertura/backup">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete
dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties
- file -->
- <delete
file="target/classes/cobertura.properties" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/client-api/pom.xml
b/modules/enterprise/server/client-api/pom.xml
index 0fcbdae..2fc9182 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -129,97 +129,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"
/>
- <!-- backup all classes so that we
- can instrument the original classes -->
- <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
- <fileset
dir="target/classes">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and
- save there location of cobertura data file
-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- instrument all classes in target/classes
- directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class"
/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura"
/>
- <!-- restore classes from backup
- folder to classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset
dir="target/cobertura/backup">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete
dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties
- file -->
- <delete
file="target/classes/cobertura.properties" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/container/pom.xml
b/modules/enterprise/server/container/pom.xml
index c956183..209a7a1 100644
--- a/modules/enterprise/server/container/pom.xml
+++ b/modules/enterprise/server/container/pom.xml
@@ -346,106 +346,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-merge</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-merge
datafile="${project.build.directory}/cobertura/cobertura.ser">
- <fileset dir="../../../../">
- <include name="**/cobertura.ser" />
- </fileset>
- </cobertura-merge>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>post-integration-test</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>
- import java.util.regex.Pattern
- import java.util.regex.Matcher
-
- def repClos
- def list = new ArrayList()
-
- Pattern sourceCodeFolder = Pattern.compile(".*/src/main/java")
- Pattern sourceCodeFile =
Pattern.compile('.*/src/main/java/(.*.java)')
-
- list.add("--format")
- list.add("xml")
- list.add("--datafile")
- list.add("${project.build.directory}/cobertura/cobertura.ser")
- list.add("--destination")
- list.add("${project.build.directory}/site/cobertura")
-
- repClosFile = {
- Matcher matcher = sourceCodeFile.matcher(it.canonicalPath)
- if (matcher.matches()){
- list.add(matcher[0][1])
- }
-
- if (it.isDirectory()){
- it.eachFile(repClosFile)
- }
- }
-
- repClosDir = {
- Matcher matcher = sourceCodeFolder.matcher(it.canonicalPath)
- if (matcher.matches()){
- list.add("--basedir")
- list.add(it.canonicalPath)
- it.eachFile(repClosFile)
- }
- it.eachDir(repClosDir);
- }
-
- def ear = new File("${project.build.directory}/../../../../")
- repClosDir(ear)
-
- net.sourceforge.cobertura.reporting.Main.main((String[]) list)
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/jar/pom.xml
b/modules/enterprise/server/jar/pom.xml
index dbcaac4..787450a 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -1148,91 +1148,6 @@
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
- todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- <exclude
name="**/DynamicConfigurationPropertyLocal.class"/>
- <exclude
name="**/DynamicConfigurationPropertyBean.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/site/cobertura"/>
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
- destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java"/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<reporting>
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml
b/modules/enterprise/server/plugins/alert-cli/pom.xml
index 06da1ea..ba3d9e7 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -115,97 +115,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"
/>
- <!-- backup all classes so that we
- can instrument the original classes -->
- <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
- <fileset
dir="target/classes">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- create a properties file and
- save there location of cobertura data file
-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- instrument all classes in target/classes
- directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class"
/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
- <!-- prepare directory structure
- for cobertura -->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura"
/>
- <!-- restore classes from backup
- folder to classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset
dir="target/cobertura/backup">
- <include name="**/*.class"
/>
- </fileset>
- </copy>
- <!-- delete backup folder -->
- <delete
dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java"
/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties
- file -->
- <delete
file="target/classes/cobertura.properties" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml
b/modules/enterprise/server/plugins/alert-email/pom.xml
index 3998439..4ef23f6 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -118,91 +118,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml
b/modules/enterprise/server/plugins/alert-irc/pom.xml
index da035f6..23835a6 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -170,92 +170,6 @@
</plugin>
</plugins>
</build>
-
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml
b/modules/enterprise/server/plugins/alert-log4j/pom.xml
index 2baa5b5..2348550 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -106,92 +106,6 @@
</plugins>
</build>
-
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml
b/modules/enterprise/server/plugins/alert-microblog/pom.xml
index 768f3f1..ff263a3 100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -167,92 +167,6 @@
</plugin>
</plugins>
</build>
-
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
index 784f469..7e492cb 100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -105,90 +105,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
\ No newline at end of file
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml
b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 02559e1..9dc3ad5 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -162,89 +162,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml
b/modules/enterprise/server/plugins/alert-roles/pom.xml
index 74b1ed7..248675d 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -116,92 +116,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
-
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
b/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
index 843b2af..bd48580 100644
--- a/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
+++ b/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
@@ -135,88 +135,5 @@
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/plugins/alert-sms/pom.xml
b/modules/enterprise/server/plugins/alert-sms/pom.xml
index 31fdfd7..b0c88c9 100644
--- a/modules/enterprise/server/plugins/alert-sms/pom.xml
+++ b/modules/enterprise/server/plugins/alert-sms/pom.xml
@@ -187,90 +187,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml
b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 1339180..5561091 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -136,92 +136,6 @@
</plugins>
</build>
-
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml
b/modules/enterprise/server/plugins/alert-subject/pom.xml
index c4dae00..e3394ab 100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -85,90 +85,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
-
</project>
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml
b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index 8bd965d..b4f59b0 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -206,89 +206,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml
b/modules/enterprise/server/plugins/cobbler/pom.xml
index da27dd9..d91220a 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -157,88 +157,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/plugins/disk/pom.xml
b/modules/enterprise/server/plugins/disk/pom.xml
index 0f9eb80..af75452 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -132,89 +132,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 33af23c..1c65111 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -208,90 +208,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml
b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index 419ab6f..ad0fc4f 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -146,89 +146,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
index db8855d..7f4dfac 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -184,89 +184,6 @@
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml
b/modules/enterprise/server/plugins/groovy-script/pom.xml
index f708881..b306249 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -209,89 +209,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/groovy">
- <include name="**/*.groovy" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<repositories>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml
b/modules/enterprise/server/plugins/jboss-software/pom.xml
index 47f4d12..cbb2a54 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -136,89 +136,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
index 7171409..5a7da8e 100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -106,90 +106,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
-
</project>
diff --git a/modules/enterprise/server/plugins/url/pom.xml
b/modules/enterprise/server/plugins/url/pom.xml
index cbe8f64..471153b 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -141,90 +141,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
-
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/modules/enterprise/server/plugins/yum/pom.xml
b/modules/enterprise/server/plugins/yum/pom.xml
index c95e71e..c07a573 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -126,90 +126,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/modules/enterprise/server/safe-invoker/pom.xml
b/modules/enterprise/server/safe-invoker/pom.xml
index 7b66f19..b8dedcc 100644
--- a/modules/enterprise/server/safe-invoker/pom.xml
+++ b/modules/enterprise/server/safe-invoker/pom.xml
@@ -95,89 +95,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml
b/modules/enterprise/server/sars/agent-sar/pom.xml
index b412a88..06a1601 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -198,89 +198,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml
b/modules/enterprise/server/xml-schemas/pom.xml
index f4dd08c..59509ec 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -213,91 +213,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
- todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/site/cobertura"/>
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
- destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java"/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 7be4429..c83a433 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -72,90 +72,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
\ No newline at end of file
diff --git a/modules/helpers/perftest-support/pom.xml
b/modules/helpers/perftest-support/pom.xml
index 37ae750..3350726 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -114,90 +114,4 @@
</plugin>
</plugins>
</build>
-
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index 62bf822..5c89a0f 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -94,90 +94,5 @@
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 7e619d8..479a58f 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -137,90 +137,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/JBossOSGi/pom.xml b/modules/plugins/JBossOSGi/pom.xml
index 0abd4b2..5e06698 100644
--- a/modules/plugins/JBossOSGi/pom.xml
+++ b/modules/plugins/JBossOSGi/pom.xml
@@ -150,89 +150,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 9bb0064..aa455b8 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -255,89 +255,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 5aaf36b..0427125 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -259,90 +259,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 46ed194..83070a3 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -316,90 +316,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 117ae7f..1aef708 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -208,90 +208,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 3a96cb4..62e4127 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -226,89 +226,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 30cf1f7..d362d14 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -281,89 +281,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index c7bcc0e..7a51dda 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -249,89 +249,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 5c98a63..ab9a02e 100644
--- a/modules/plugins/database/pom.xml
+++ b/modules/plugins/database/pom.xml
@@ -102,90 +102,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/modules/plugins/filetemplate-bundle/pom.xml
b/modules/plugins/filetemplate-bundle/pom.xml
index dee59ab..e635b21 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -235,89 +235,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 50f902c..866bbb9 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -246,89 +246,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 1e46384..ae4c71b 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -103,91 +103,7 @@
</plugins>
</build>
-
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<dependencies>
diff --git a/modules/plugins/hardware/pom.xml b/modules/plugins/hardware/pom.xml
index 5b17f47..875a2a4 100644
--- a/modules/plugins/hardware/pom.xml
+++ b/modules/plugins/hardware/pom.xml
@@ -70,89 +70,4 @@
</plugins>
</build>
- <profiles>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index f60b3c0..5240ed7 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -228,89 +228,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 364d33f..d893686 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -256,89 +256,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index 9ecab0b..36495b8 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -74,91 +74,5 @@
</plugin>
</plugins>
</build>
-
- <profiles>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 34e14a0..9e6f67f 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -184,89 +184,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
\ No newline at end of file
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index c7dd0eb..d9fd462 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -128,89 +128,6 @@
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 60601e7..283b840 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -659,98 +659,7 @@
</plugins>
</build>
- </profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo file="target/classes/cobertura.properties">
-
net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser
- </echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
-
datafile="${project.build.directory}/cobertura/cobertura.ser"
- todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/site/cobertura"/>
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
-
datafile="${project.build.directory}/cobertura/cobertura.ser"
-
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java"/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
+ </profile>
</profiles>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index b7e854b..a7bb4b2 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -358,90 +358,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml
b/modules/plugins/jboss-cache-v3/pom.xml
index ad60365..82e9ce7 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -493,92 +493,8 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
-
+
<reporting>
<plugins>
<plugin>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index 26ffe85..3224e55 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -218,89 +218,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/jdbctrace/pom.xml b/modules/plugins/jdbctrace/pom.xml
index 4d6b14a..3a3ea7c 100644
--- a/modules/plugins/jdbctrace/pom.xml
+++ b/modules/plugins/jdbctrace/pom.xml
@@ -256,89 +256,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/jira/pom.xml b/modules/plugins/jira/pom.xml
index 4839ea0..d9f90ba 100644
--- a/modules/plugins/jira/pom.xml
+++ b/modules/plugins/jira/pom.xml
@@ -304,89 +304,7 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
+
</profiles>
</project>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 2548445..36db1d4 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -261,90 +261,5 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index 2985077..9f99351 100644
--- a/modules/plugins/kickstart/pom.xml
+++ b/modules/plugins/kickstart/pom.xml
@@ -103,88 +103,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/lsof/pom.xml b/modules/plugins/lsof/pom.xml
index d3d6b24..eca4983 100644
--- a/modules/plugins/lsof/pom.xml
+++ b/modules/plugins/lsof/pom.xml
@@ -226,89 +226,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 1d34979..9d1d12f 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -230,89 +230,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 895bdbb..1150274 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -235,89 +235,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/nss/pom.xml b/modules/plugins/nss/pom.xml
index e5e9534..a3a46b2 100644
--- a/modules/plugins/nss/pom.xml
+++ b/modules/plugins/nss/pom.xml
@@ -90,89 +90,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/onewire/pom.xml b/modules/plugins/onewire/pom.xml
index 3595d8d..2402ffd 100644
--- a/modules/plugins/onewire/pom.xml
+++ b/modules/plugins/onewire/pom.xml
@@ -144,89 +144,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index c8bdc71..de6e1ef 100644
--- a/modules/plugins/oracle/pom.xml
+++ b/modules/plugins/oracle/pom.xml
@@ -195,92 +195,6 @@
</plugins>
</build>
</profile>
-
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch
file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset
dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes"
verbose="true" overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset
dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 725c803..2e34f17 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -204,92 +204,6 @@
</plugins>
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
- todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties"/>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura"/>
- <mkdir dir="target/site/cobertura"/>
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class"/>
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
- destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java"/>
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 28744ea..3ea1b6a 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -183,89 +183,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 1f5c297..4e01e5d 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -254,89 +254,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index d76f60c..a169747 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -229,89 +229,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 134d18d..78156ef 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -196,88 +196,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 0f44105..6fcebc8 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -227,89 +227,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 0762aa5..4bf3518 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -254,89 +254,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 584604f..7dc360f 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -182,89 +182,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
\ No newline at end of file
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 05e604a..432c618 100644
--- a/modules/plugins/script2/pom.xml
+++ b/modules/plugins/script2/pom.xml
@@ -159,89 +159,6 @@
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/services/pom.xml b/modules/plugins/services/pom.xml
index a484f18..4470d5d 100644
--- a/modules/plugins/services/pom.xml
+++ b/modules/plugins/services/pom.xml
@@ -110,89 +110,6 @@
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>1.9.4.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup"/>
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties"/>
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class"/>
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup"/>
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete
file="target/classes/cobertura.properties"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 99babba..a7f58f3 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -140,89 +140,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index d947395..0462ac0 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -246,89 +246,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index afb9cd2..095692b 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -244,89 +244,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 0a64aed..e1b0c40 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -210,89 +210,5 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
-
</project>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 54a7c4d..f823291 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -125,90 +125,6 @@
</build>
</profile>
-
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index ba660e3..cf01db9 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -272,89 +272,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>cobertura-plugins</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 55add04..2525960 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -104,92 +104,5 @@
<version>3.1</version>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>post-integration-test</phase>
- <configuration>
- <target>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
diff --git a/pom.xml b/pom.xml
index a66acb6..53fa751 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1192,6 +1192,33 @@
<profiles>
+ <profile>
+ <id>code-coverage</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.5.2</version>
+ <configuration>
+ <formats>
+ <format>xml</format>
+ </formats>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>cobertura</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
<!-- NOTE: This profile is extended upon in several other submodules.
If you need to change its activation policy, make sure to do that in
*ALL* the modules that define this profile. -->