[rhq] Branch 'rhq-on-as7' - 2 commits - modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java | 24 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/client/RemoteClientServlet.java | 98 ------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerBean.java | 149 ++++++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerLocal.java | 67 ++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginService.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java | 6
6 files changed, 230 insertions(+), 116 deletions(-)
New commits:
commit 9c9b1c4efb093e45f871dbb116f0aa881a1cc15f
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Nov 30 15:01:12 2012 -0500
name the master PC's data directory name so it better identifies itself as being owned by rhq
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginService.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginService.java
index e421ee5..2bd3b2b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginService.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginService.java
@@ -132,7 +132,7 @@ public class ServerPluginService implements ServerPluginServiceMBean {
File pluginDir = getServerPluginsDirectory();
File serverDataDir = LookupUtil.getCoreServer().getJBossServerDataDir();
- File dataDir = new File(serverDataDir, "server-plugins");
+ File dataDir = new File(serverDataDir, "rhq-masterpc-server-plugins");
dataDir.mkdirs(); // make sure the data directory exists
File tmpDir = LookupUtil.getCoreServer().getJBossServerTempDir();
commit cbd256f0f18d4ecd89f914386ded765701ef9f77
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Nov 30 15:00:43 2012 -0500
add new remote client SLSB so it can manage the version file in the data directory
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
index 9ae1b11..0080751 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
@@ -31,6 +31,7 @@ import org.rhq.core.domain.common.ServerDetails;
import org.rhq.core.domain.common.composite.SystemSettings;
import org.rhq.enterprise.gui.coregui.client.gwt.SystemGWTService;
import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.core.RemoteClientManagerLocal;
import org.rhq.enterprise.server.system.SystemManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -47,6 +48,7 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
private SystemManagerLocal systemManager = LookupUtil.getSystemManager();
private AgentManagerLocal agentManager = LookupUtil.getAgentManager();
+ private RemoteClientManagerLocal remoteClientManager = LookupUtil.getRemoteClientManager();
@Override
public ProductInfo getProductInfo() throws RuntimeException {
@@ -171,18 +173,11 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
@Override
public HashMap<String, String> getClientVersionProperties() throws RuntimeException {
- File versionFile = new File(getClientDataDownloadDir(), "rhq-client-version.properties");
try {
- Properties p = new Properties();
- FileInputStream inStream = new FileInputStream(versionFile);
- try {
- p.load(inStream);
- } finally {
- inStream.close();
- }
- return convertFromProperties(p);
+ Properties props = remoteClientManager.getRemoteClientVersionFileContent();
+ return convertFromProperties(props);
} catch (Throwable t) {
- throw getExceptionToThrowToClient(t, "Unable to retrieve client version info.");
+ throw getExceptionToThrowToClient(t, "Unable to retrieve CLI version info.");
}
}
@@ -240,15 +235,6 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
return downloadDir;
}
- private File getClientDataDownloadDir() {
- File earDir = LookupUtil.getCoreServer().getJBossServerDataDir();
- File downloadDir = new File(earDir, "rhq-downloads/rhq-client");
- if (!downloadDir.isDirectory()) {
- throw new RuntimeException("Server is missing client download directory at [" + downloadDir + "]");
- }
- return downloadDir;
- }
-
private File getBundleDeployerDownloadDir() {
File homeDir = getDownloadHomeDir();
File downloadDir = new File(homeDir, "bundle-deployer");
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/client/RemoteClientServlet.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/client/RemoteClientServlet.java
index baceb79..9127927 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/client/RemoteClientServlet.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/client/RemoteClientServlet.java
@@ -20,8 +20,6 @@ package org.rhq.enterprise.gui.client;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
import java.io.IOException;
import javax.servlet.ServletException;
@@ -33,9 +31,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.cloud.Server.OperationMode;
-import org.rhq.core.util.MessageDigestGenerator;
import org.rhq.core.util.stream.StreamUtil;
-import org.rhq.enterprise.server.core.CoreServerMBean;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -47,10 +43,6 @@ public class RemoteClientServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
- private static final String RHQ_SERVER_VERSION = "rhq-server.version";
- private static final String RHQ_SERVER_BUILD_NUMBER = "rhq-server.build-number";
- private static final String RHQ_CLIENT_MD5 = "rhq-client.md5";
-
// the system property that defines how many concurrent downloads we will allow
private static String SYSPROP_CLIENT_DOWNLOADS_LIMIT = "rhq.server.client-downloads-limit";
@@ -69,29 +61,6 @@ public class RemoteClientServlet extends HttpServlet {
private Log log = LogFactory.getLog(this.getClass());
@Override
- public void init() throws ServletException {
- log.info("Starting the RHQ remote client servlet...");
-
- // make sure we have a binary distro file; log its location
- try {
- log.info("Remote Client Binary File: " + getRemoteClientZip());
- } catch (Throwable t) {
- log.error("Remote client is not available for deployment - cause: " + t);
- return;
- }
-
- // make sure we create a version file if we have to by getting the version file now
- try {
- File versionFile = getVersionFile();
-
- // log the version info - this also makes sure we can read it back in
- log.debug(versionFile + ":\n" + new String(StreamUtil.slurp(new FileInputStream(versionFile))));
- } catch (Throwable t) {
- log.error("Cannot determine the remote client version information.", t);
- }
- }
-
- @Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// seeing odd browser caching issues, even though we set Last-Modified. so force no caching for now
disableBrowserCache(resp);
@@ -133,7 +102,7 @@ public class RemoteClientServlet extends HttpServlet {
}
try {
- File zip = getRemoteClientZip();
+ File zip = LookupUtil.getRemoteClientManager().getRemoteClientBinaryFile();
if (!zip.exists()) {
disableBrowserCache(resp);
resp.sendError(HttpServletResponse.SC_NOT_FOUND, "Remote Client binary does not exist: "
@@ -161,42 +130,9 @@ public class RemoteClientServlet extends HttpServlet {
return;
}
- private File getRemoteClientZip() throws Exception {
- File dir = getDownloadDir();
- for (File file : dir.listFiles()) {
- if (file.getName().endsWith(".zip")) {
- return file;
- }
- }
-
- throw new FileNotFoundException("Missing remote client binary in [" + dir + "]");
- }
-
- private File getDownloadDir() throws Exception {
- File earDir = LookupUtil.getCoreServer().getEarDeploymentDir();
- File downloadDir = new File(earDir, "rhq-downloads/rhq-client");
- if (!downloadDir.exists()) {
- throw new FileNotFoundException("Missing remote client download directory at [" + downloadDir + "]");
- }
- return downloadDir;
- }
-
- private File getDataDownloadDir() throws Exception {
- File earDir = LookupUtil.getCoreServer().getJBossServerDataDir();
- File downloadDir = new File(earDir, "rhq-downloads/rhq-client");
- if (!downloadDir.isDirectory()) {
- downloadDir.mkdirs();
- if (!downloadDir.isDirectory()) {
- throw new FileNotFoundException("Missing remote client data download directory at [" + downloadDir
- + "]");
- }
- }
- return downloadDir;
- }
-
private void getVersion(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
try {
- File versionFile = getVersionFile();
+ File versionFile = LookupUtil.getRemoteClientManager().getRemoteClientVersionFile();
resp.setContentType("text/plain");
resp.setDateHeader("Last-Modified", versionFile.lastModified());
@@ -248,36 +184,6 @@ public class RemoteClientServlet extends HttpServlet {
resp.sendError(ERROR_CODE_TOO_MANY_DOWNLOADS, "Maximum limit exceeded - download client later");
}
- private File getVersionFile() throws Exception {
- File versionFile = new File(getDataDownloadDir(), "rhq-client-version.properties");
- if (!versionFile.exists()) {
- // we do not have the version properties file yet, let's extract some info and create one
- StringBuilder serverVersionInfo = new StringBuilder();
-
- CoreServerMBean coreServer = LookupUtil.getCoreServer();
- serverVersionInfo.append(RHQ_SERVER_VERSION + '=').append(coreServer.getVersion()).append('\n');
- serverVersionInfo.append(RHQ_SERVER_BUILD_NUMBER + '=').append(coreServer.getBuildNumber()).append('\n');
-
- // calculate the MD5 of the client zip
- File zip = getRemoteClientZip();
- String md5Property = RHQ_CLIENT_MD5 + '=' + MessageDigestGenerator.getDigestString(zip) + '\n';
-
- // now write the server version info in our internal version file our servlet will use
- FileOutputStream versionFileOutputStream = new FileOutputStream(versionFile);
- try {
- versionFileOutputStream.write(serverVersionInfo.toString().getBytes());
- versionFileOutputStream.write(md5Property.getBytes());
- } finally {
- try {
- versionFileOutputStream.close();
- } catch (Exception ignore) {
- }
- }
- }
-
- return versionFile;
- }
-
private boolean isServerAcceptingRequests() {
try {
OperationMode mode = LookupUtil.getServerManager().getServer().getOperationMode();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerBean.java
new file mode 100644
index 0000000..2d053eb
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerBean.java
@@ -0,0 +1,149 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 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.core;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import javax.ejb.Stateless;
+import javax.interceptor.ExcludeDefaultInterceptors;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.util.MessageDigestGenerator;
+import org.rhq.enterprise.server.util.LookupUtil;
+
+/**
+ * Provides access to the remote client binary distribution (the CLI).
+ *
+ * @author John Mazzitelli
+ */
+@Stateless
+public class RemoteClientManagerBean implements RemoteClientManagerLocal {
+ private final Log log = LogFactory.getLog(RemoteClientManagerBean.class);
+
+ // constants used for the cli version file
+ private static final String RHQ_SERVER_VERSION = "rhq-server.version";
+ private static final String RHQ_SERVER_BUILD_NUMBER = "rhq-server.build-number";
+ private static final String RHQ_CLIENT_MD5 = "rhq-client.md5";
+
+ @ExcludeDefaultInterceptors
+ @Override
+ public File getRemoteClientVersionFile() throws Exception {
+ File versionFile = new File(getDataDownloadDir(), "rhq-client-version.properties");
+ if (!versionFile.exists()) {
+ // we do not have the version properties file yet, let's extract some info and create one
+ StringBuilder serverVersionInfo = new StringBuilder();
+
+ CoreServerMBean coreServer = LookupUtil.getCoreServer();
+ serverVersionInfo.append(RHQ_SERVER_VERSION + '=').append(coreServer.getVersion()).append('\n');
+ serverVersionInfo.append(RHQ_SERVER_BUILD_NUMBER + '=').append(coreServer.getBuildNumber()).append('\n');
+
+ // calculate the MD5 of the client zip
+ File zip = getRemoteClientBinaryFile();
+ log.info("Remote Client Binary File: " + zip.getAbsolutePath());
+
+ String md5Property = RHQ_CLIENT_MD5 + '=' + MessageDigestGenerator.getDigestString(zip) + '\n';
+
+ // now write the server version info in our internal version file our servlet will use
+ FileOutputStream versionFileOutputStream = new FileOutputStream(versionFile);
+ try {
+ versionFileOutputStream.write(serverVersionInfo.toString().getBytes());
+ versionFileOutputStream.write(md5Property.getBytes());
+ } finally {
+ try {
+ versionFileOutputStream.close();
+ } catch (Exception ignore) {
+ }
+ }
+
+ log.info("Remote Client Version File: " + versionFile);
+ }
+
+ return versionFile;
+ }
+
+ @ExcludeDefaultInterceptors
+ @Override
+ public Properties getRemoteClientVersionFileContent() throws Exception {
+ FileInputStream stream = new FileInputStream(getRemoteClientVersionFile());
+ try {
+ Properties props = new Properties();
+ props.load(stream);
+ return props;
+ } finally {
+ try {
+ stream.close();
+ } catch (Exception e) {
+ }
+ }
+ }
+
+ @ExcludeDefaultInterceptors
+ @Override
+ public File getRemoteClientBinaryFile() throws Exception {
+ File downloadDir = getDownloadDir();
+ for (File file : downloadDir.listFiles()) {
+ if (file.getName().endsWith(".zip")) {
+ return file;
+ }
+ }
+
+ throw new FileNotFoundException("Missing CLI binary in [" + downloadDir + "]");
+ }
+
+ /**
+ * The directory on the server's file system where the CLI binary file is found.
+ *
+ * @return directory where the downloads are found
+ *
+ * @throws Exception if could not determine the location or it does not exist
+ */
+ private File getDownloadDir() throws Exception {
+ File earDir = LookupUtil.getCoreServer().getEarDeploymentDir();
+ File downloadDir = new File(earDir, "rhq-downloads/rhq-client");
+ if (!downloadDir.isDirectory()) {
+ throw new FileNotFoundException("Missing remote client download directory at [" + downloadDir + "]");
+ }
+ return downloadDir;
+ }
+
+ /**
+ * The directory on the server's file system where the CLI version file is found.
+ *
+ * @return directory where the version file is found
+ *
+ * @throws Exception if could not determine the location or it does not exist
+ */
+ private File getDataDownloadDir() throws Exception {
+ File earDir = LookupUtil.getCoreServer().getJBossServerDataDir();
+ File downloadDir = new File(earDir, "rhq-downloads/rhq-client");
+ if (!downloadDir.isDirectory()) {
+ downloadDir.mkdirs();
+ if (!downloadDir.isDirectory()) {
+ throw new FileNotFoundException("Missing remote client data download directory [" + downloadDir + "]");
+ }
+ }
+ return downloadDir;
+ }
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerLocal.java
new file mode 100644
index 0000000..1f8ebb5
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/RemoteClientManagerLocal.java
@@ -0,0 +1,67 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 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.core;
+
+import java.io.File;
+import java.util.Properties;
+
+import javax.ejb.Local;
+
+/**
+ * Local interface to the {@link RemoteAgentClientManagerBean} SLSB. This manager performs
+ * things related to the remote client (CLI) distribution.
+ *
+ * @author John Mazzitelli
+ */
+@Local
+public interface RemoteClientManagerLocal {
+
+ /**
+ * Returns the path on the server's file system where the CLI version file is found.
+ * The CLI version file contains information about the CLI binary, such
+ * as what version it is.
+ *
+ * @return version file location
+ *
+ * @throws Exception if the file could not be created or found
+ */
+ File getRemoteClientVersionFile() throws Exception;
+
+ /**
+ * Returns the content of the CLI version file, which simply consists
+ * of some name/value pairs.
+ * The version file contains information about the CLI binary, such
+ * as what version it is.
+ *
+ * @return version properties found in the version file.
+ *
+ * @throws Exception if cannot read the version file
+ */
+ Properties getRemoteClientVersionFileContent() throws Exception;
+
+ /**
+ * Returns the path on the server's file system where the CLI binary is found.
+ * This is the actual CLI distribution that can be installed on remote client machines.
+ *
+ * @return binary location
+ *
+ * @throws Exception if the binary file does not exist
+ */
+ File getRemoteClientBinaryFile() throws Exception;
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
index 7b784fa..a7bd680 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
@@ -102,6 +102,8 @@ import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.core.CoreServerMBean;
import org.rhq.enterprise.server.core.EmailManagerBean;
import org.rhq.enterprise.server.core.EmailManagerLocal;
+import org.rhq.enterprise.server.core.RemoteClientManagerBean;
+import org.rhq.enterprise.server.core.RemoteClientManagerLocal;
import org.rhq.enterprise.server.core.plugin.PluginDeploymentScannerMBean;
import org.rhq.enterprise.server.dashboard.DashboardManagerBean;
import org.rhq.enterprise.server.dashboard.DashboardManagerLocal;
@@ -275,6 +277,10 @@ public final class LookupUtil {
return lookupLocal(AlertConditionConsumerBean.class);
}
+ public static RemoteClientManagerLocal getRemoteClientManager() {
+ return lookupLocal(RemoteClientManagerBean.class);
+ }
+
public static AgentManagerLocal getAgentManager() {
return lookupLocal(AgentManagerBean.class);
}
11 years, 5 months
[rhq] Branch 'rhq-on-as7' - modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 9acf82454a07dcbc0397ad76b2a16f08e3f70e30
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Nov 30 13:39:06 2012 -0500
opps..forgot to delete the import
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
index 00ace88..0057d83 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
@@ -55,7 +55,6 @@ import org.rhq.core.util.ObjectNameFactory;
import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.enterprise.communications.ServiceContainerConfigurationConstants;
import org.rhq.enterprise.communications.util.SecurityUtil;
-import org.rhq.enterprise.gui.client.RemoteClientServlet;
import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator;
import org.rhq.enterprise.server.auth.SessionManager;
11 years, 5 months
[rhq] Branch 'release/jon3.1.x' - modules/plugins
by Jay Shaughnessy
modules/plugins/jboss-as-5/pom.xml | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit a15e23ba22604078b1e9d30fb1b6ee90b4b50fff
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Nov 30 12:17:37 2012 -0500
Add support (hopefully) for EAP 5.2 in as5.itest profile.
Cherry pick of master commit 24a906cb902960a614df13165776cfd5f42516e7
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 5a89ee2..9b04398 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -479,17 +479,15 @@
<get src="${as5.url}" dest="${as5.zipfile}"
usetimestamp="true" verbose="true"/>
<unzip src="${as5.zipfile}" dest="${java.io.tmpdir}"/>
+ <!-- This works for AS versions -->
<move file="${java.io.tmpdir}/jboss-${as5.version}"
tofile="${jboss5.home}" failonerror="false"
overwrite="false"/>
- <move file="${java.io.tmpdir}/jboss-eap-5.0/jboss-as"
+ <!-- This works for EAP versions -->
+ <move file="${java.io.tmpdir}/jboss-eap-${as5.version}/jboss-as"
tofile="${jboss5.home}" failonerror="false"
overwrite="false"/>
- <delete dir="${java.io.tmpdir}/jboss-eap-5.0" failonerror="false"/>
- <move file="${java.io.tmpdir}/jboss-eap-5.1/jboss-as"
- tofile="${jboss5.home}" failonerror="false"
- overwrite="false"/>
- <delete dir="${java.io.tmpdir}/jboss-eap-5.1" failonerror="false"/>
+ <delete dir="${java.io.tmpdir}/jboss-eap-${as5.version}" failonerror="false"/>
<chmod perm="u+rx">
<fileset dir="${jboss5.home}/bin" includes="*.sh"/>
11 years, 5 months
[rhq] Branch 'rhq-on-as7' - modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java | 4 +---
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java | 2 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 698e3ea30232b05f29bdad9e1dce895498da45e8
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Nov 30 12:13:06 2012 -0500
there is no need for this undeployInstaller method anymore
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
index 9e92a69..00ace88 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
@@ -55,6 +55,7 @@ import org.rhq.core.util.ObjectNameFactory;
import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.enterprise.communications.ServiceContainerConfigurationConstants;
import org.rhq.enterprise.communications.util.SecurityUtil;
+import org.rhq.enterprise.gui.client.RemoteClientServlet;
import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator;
import org.rhq.enterprise.server.auth.SessionManager;
@@ -142,9 +143,6 @@ public class StartupBean {
log.info("All business tier deployments are complete - finishing the startup...");
- // As a security measure, make sure the installer has been undeployed
- systemManager.undeployInstaller();
-
// get singletons right now so we load the classes immediately into our classloader
AlertConditionCacheCoordinator.getInstance();
SessionManager.getInstance();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
index 9d9155c..52cd33d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
@@ -620,7 +620,9 @@ public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemot
/**
* Ensures the installer is no longer deployed.
+ * @deprecated
*/
+ @Deprecated
public void undeployInstaller() {
// No need for this anymore - the new RHQ installer in AS7 detects it already installed things and will point the user to login screen
// We leave this in here in case we want to re-introduce the ability to uninstall the installer.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java
index 53fe6e0..50da8ed 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java
@@ -117,6 +117,7 @@ public interface SystemManagerLocal {
* Ensures the installer has been undeployed. Installer must be undeployed
* to ensure the server deployment is secure.
*/
+ @Deprecated
void undeployInstaller();
/**
11 years, 5 months
[rhq] Branch 'release/jon3.1.x' - pom.xml release.sh
by snegrea
pom.xml | 5 +++++
release.sh | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 0911976c5e78b263b3c98d654ec3a4d84f6fbe0f
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Nov 30 10:33:32 2012 -0600
Set maven versions plugin to 1.3.1. in project pom.xml and keep the release script generic.
diff --git a/pom.xml b/pom.xml
index 273ada9..0ac5512 100644
--- a/pom.xml
+++ b/pom.xml
@@ -727,6 +727,11 @@
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
+ <artifactId>versions-maven-plugin</artifactId>
+ <version>1.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs.version}</version>
</plugin>
diff --git a/release.sh b/release.sh
index a51f812..6b99187 100755
--- a/release.sh
+++ b/release.sh
@@ -349,7 +349,7 @@ run_release_version_and_tag_process()
[ "$?" -ne 0 ] && abort "Failed to cleanup snbapshot jars produced by test build from module target dirs. Please see above Maven output for details, fix any issues, then try again."
echo "3) Increment version on all poms."
- mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set org.codehaus.mojo:versions-maven-plugin:1.3.1:use-releases -DnewVersion=$RELEASE_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
+ mvn versions:set versions:use-releases -DnewVersion=$RELEASE_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
[ "$?" -ne 0 ] && abort "Version set failed. Please see output for details, fix any issues, then try again."
echo "4) Perform a test build with the new version."
@@ -417,7 +417,7 @@ update_development_version()
fi
echo "1) Set version to the current development version"
- mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set org.codehaus.mojo:versions-maven-plugin:1.3.1:use-releases -DnewVersion=$DEVELOPMENT_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
+ mvn versions:set versions:use-releases -DnewVersion=$DEVELOPMENT_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
[ "$?" -ne 0 ] && abort "Version set failed. Please see output for details, fix any issues, then try again."
echo "2) Commit the change in version."
11 years, 5 months
[rhq] Branch 'release/jon3.1.x' - release.sh
by snegrea
release.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit ece928eec904fa2430557daf10178104578e8b8b
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Nov 30 10:07:44 2012 -0600
Use maven versions plugin 1.3.1. Latest version (2.0) has issues replacing variables that are stored in the parent pom.
diff --git a/release.sh b/release.sh
index 6b99187..a51f812 100755
--- a/release.sh
+++ b/release.sh
@@ -349,7 +349,7 @@ run_release_version_and_tag_process()
[ "$?" -ne 0 ] && abort "Failed to cleanup snbapshot jars produced by test build from module target dirs. Please see above Maven output for details, fix any issues, then try again."
echo "3) Increment version on all poms."
- mvn versions:set versions:use-releases -DnewVersion=$RELEASE_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
+ mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set org.codehaus.mojo:versions-maven-plugin:1.3.1:use-releases -DnewVersion=$RELEASE_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
[ "$?" -ne 0 ] && abort "Version set failed. Please see output for details, fix any issues, then try again."
echo "4) Perform a test build with the new version."
@@ -417,7 +417,7 @@ update_development_version()
fi
echo "1) Set version to the current development version"
- mvn versions:set versions:use-releases -DnewVersion=$DEVELOPMENT_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
+ mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set org.codehaus.mojo:versions-maven-plugin:1.3.1:use-releases -DnewVersion=$DEVELOPMENT_VERSION -DallowSnapshots=false -DgenerateBackupPoms=false
[ "$?" -ne 0 ] && abort "Version set failed. Please see output for details, fix any issues, then try again."
echo "2) Commit the change in version."
11 years, 5 months
[rhq] Branch 'rhq-on-as7' - 8 commits - .classpath modules/core modules/enterprise modules/integration-tests modules/plugins pom.xml
by mazz
.classpath | 2
modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java | 34 -
modules/enterprise/agent/ant-run.xml | 4
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java | 37 -
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java | 37 -
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java | 16
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java | 110 +--
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java | 74 ++
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml | 45 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml | 49 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml | 23
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml | 23
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml | 48 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml | 40 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml | 298 ----------
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml | 18
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml | 18
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml | 29
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml | 24
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml | 24
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml | 42 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml | 41 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml | 17
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml | 49 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml | 67 --
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml | 7
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml | 10
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml | 8
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml | 19
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml | 29
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml | 92 ---
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml | 110 ---
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml | 20
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml | 54 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml | 45 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml | 49 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml | 23
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml | 23
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml | 48 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml | 40 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml | 298 ++++++++++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml | 18
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml | 18
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml | 29
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml | 24
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml | 24
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml | 42 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml | 41 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml | 17
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml | 49 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml | 67 ++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml | 7
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml | 10
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml | 19
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml | 29
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml | 92 +++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml | 110 +++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml | 20
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml | 54 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml | 8
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java | 51 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java | 11
modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java | 5
modules/plugins/jboss-as-5/pom.xml | 10
pom.xml | 5
81 files changed, 1567 insertions(+), 1410 deletions(-)
New commits:
commit 2a697b6c844152ae08dcbb1373c0f2b7e13e7dca
Merge: b63b3f9 24a906c
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Nov 30 11:05:22 2012 -0500
Merge remote-tracking branch 'origin/master' into rhq-on-as7
commit 24a906cb902960a614df13165776cfd5f42516e7
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Nov 30 10:55:40 2012 -0500
Add support (hopefully) for EAP 5.2 in as5.itest profile.
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 365f544..a15b24f 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -479,17 +479,15 @@
<get src="${as5.url}" dest="${as5.zipfile}"
usetimestamp="true" verbose="true"/>
<unzip src="${as5.zipfile}" dest="${java.io.tmpdir}"/>
+ <!-- This works for AS versions -->
<move file="${java.io.tmpdir}/jboss-${as5.version}"
tofile="${jboss5.home}" failonerror="false"
overwrite="false"/>
- <move file="${java.io.tmpdir}/jboss-eap-5.0/jboss-as"
+ <!-- This works for EAP versions -->
+ <move file="${java.io.tmpdir}/jboss-eap-${as5.version}/jboss-as"
tofile="${jboss5.home}" failonerror="false"
overwrite="false"/>
- <delete dir="${java.io.tmpdir}/jboss-eap-5.0" failonerror="false"/>
- <move file="${java.io.tmpdir}/jboss-eap-5.1/jboss-as"
- tofile="${jboss5.home}" failonerror="false"
- overwrite="false"/>
- <delete dir="${java.io.tmpdir}/jboss-eap-5.1" failonerror="false"/>
+ <delete dir="${java.io.tmpdir}/jboss-eap-${as5.version}" failonerror="false"/>
<chmod perm="u+rx">
<fileset dir="${jboss5.home}/bin" includes="*.sh"/>
commit dbd0327e0395c4d8a94be5282435aeaa7e5efd52
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Nov 30 10:53:38 2012 -0500
The metadata update integration tests were not actually running. We had
false postives because the BeforeMethod was throwing an exception. When this
happens Arquillian (1.0.2) swallows it and passes the test (not good). Made
several changes to these test classes to get them running although there may
be test interaction issues still. Checking in now to see how things go
in a full jenkins run.
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
index 22834fa..2bf2f31 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
@@ -16,6 +16,13 @@ import org.rhq.test.AssertUtils;
public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+
+ disableAfterClassStandIn = true;
+ }
+
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" })
void registerMetricsPlugin() throws Exception {
createPlugin("metric-test-plugin", "1.0", "plugin_v1.xml");
@@ -38,7 +45,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(1);
AssertUtils.assertPropertiesMatch("Failed to persist properties for a trait metric definition", expected,
- traitDef, asList("id", "resourceType"));
+ traitDef, asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
@@ -53,7 +60,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(2);
AssertUtils.assertPropertiesMatch("Failed to persist properties for numeric metric definition", expected,
- measurementDef, asList("id", "resourceType"));
+ measurementDef, asList("id", "resourceType", "schedules", "alertCondition"));
MeasurementDefinition perMinuteDef = loadMeasurementDef("metric2", "MetricServer1", "metric2 per Minute");
@@ -66,7 +73,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
AssertUtils.assertPropertiesMatch(
"Failed to create and persist per minute metric definition for numeric metric definition", expected,
- perMinuteDef, asList("id", "resourceType"));
+ perMinuteDef, asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
@@ -82,7 +89,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(4);
AssertUtils.assertPropertiesMatch("Failed to create calltime metric definition", expected, calltimeDef,
- asList("id", "resourceType"));
+ asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
@@ -98,7 +105,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serverAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "alertCondition", "schedules"));
MeasurementDefinition serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService1",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -110,7 +117,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService2",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -123,7 +130,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
}
@@ -151,7 +158,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(1);
AssertUtils.assertPropertiesMatch("Failed to change trait definition to a measurement defintion", expected,
- measurementDef, asList("id", "resourceType"));
+ measurementDef, asList("id", "resourceType", "schedules", "alertCondition"));
MeasurementDefinition perMinuteDef = loadMeasurementDef("metric1", "MetricServer3", "metric1 per Minute");
expected.setDisplayName("metric1 per Minute");
@@ -163,7 +170,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
AssertUtils.assertPropertiesMatch(
"Failed to create and persist per minute metric definition for updated metric definition", expected,
- perMinuteDef, asList("id", "resourceType"));
+ perMinuteDef, asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.UpradePlugin" }, dependsOnMethods = { "upgradeMetricsPlugin" })
@@ -195,7 +202,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serverAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
MeasurementDefinition serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService1",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -208,7 +215,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService2",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -220,7 +227,13 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
+ }
+
+ // this needs to be the last test executed in the class, it does cleanup
+ @Test(priority = 10, alwaysRun = true, dependsOnGroups = { "Metrics.UpradePlugin" })
+ public void afterClassWorkTest() throws Exception {
+ afterClassWork();
}
MeasurementDefinition loadMeasurementDef(String name, String resourceType) {
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
index 7c9a6d3..cfaf7a8 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
@@ -28,8 +28,6 @@ import org.dbunit.dataset.datatype.IDataTypeFactory;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.dbunit.dataset.xml.FlatXmlProducer;
import org.dbunit.operation.DatabaseOperation;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.xml.sax.InputSource;
@@ -51,30 +49,28 @@ import org.rhq.enterprise.server.util.LookupUtil;
public class MetadataBeanTest extends AbstractEJB3Test {
private List<Integer> pluginIds = new ArrayList<Integer>();
-
- // Arquillian (1.0.2) executes @BeforeGroups only as client (remote). So, we can't get DS here.
- // Also, it is called for each test. For now call from BeforeMethod.
- //
- //@BeforeGroups(groups = { "plugin.metadata" }, dependsOnGroups = { "integration.ejb3" })
- public void beforeGroups() throws Exception {
- setupDB();
- }
+ protected boolean disableAfterClassStandIn = false;
// Arquillian (1.0.2) executes @AfterClass after each test. So, instead turn it into a low priority
// test that should execute last.
/**
+ * !! Important !! This should be disabled if the subclass has tests in groups other than plugin.metadata because<br/>
+ * !! priority applies only to the tests in the same grouping.<br/>
+ * <br/>
* Need to delete rows from RHQ_PLUGINS because subsequent tests in server/jar would otherwise fail. Some tests look
* at what plugins are in the database, and then look for corresponding plugin files on the file system. MetadataTest
* however removes the generated plugin files during each test run.
*/
@Test(priority = 10, alwaysRun = true, groups = { "plugin.metadata" })
void afterClassStandIn() throws Exception {
- // Although its documented that AfterXXX don't execute in-container (only as client), in practice this is not true
- // and we perform in-container work here.
- if (!inContainer()) {
- return;
+ if (!disableAfterClassStandIn) {
+ afterClassWork();
+ } else {
+ System.out.println("Skipping MetadataBeanTest.afterClassStandIn, it is disabled by a subclass.");
}
+ }
+ protected void afterClassWork() throws Exception {
PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
Subject overlord = LookupUtil.getSubjectManager().getOverlord();
pluginMgr.deletePlugins(overlord, pluginIds);
@@ -83,14 +79,13 @@ public class MetadataBeanTest extends AbstractEJB3Test {
new PurgeResourceTypesJob().executeJobCode(null);
}
- @BeforeMethod(groups = { "plugin.metadata" }, dependsOnGroups = { "integration.ejb3" })
- protected void before() throws Exception {
+ @Override
+ protected void beforeMethod() throws Exception {
if (!inContainer()) {
return;
}
- // @BeforeGroups currently executed only as client (remote) only with Arquillian/testNg, so call from here instead
- beforeGroups();
+ setupDB();
TestBundleServerPluginService bundleService = new TestBundleServerPluginService();
prepareCustomServerPluginService(bundleService);
@@ -103,8 +98,8 @@ public class MetadataBeanTest extends AbstractEJB3Test {
* at what plugins are in the database, and then look for corresponding plugin files on the file system. MetadataTest
* however removes the generated plugin files during each test run.
*/
- @AfterMethod(alwaysRun = true, groups = { "plugin.metadata" })
- protected void after() throws Exception {
+ @Override
+ protected void afterMethod() throws Exception {
if (!inContainer()) {
return;
}
@@ -220,6 +215,8 @@ public class MetadataBeanTest extends AbstractEJB3Test {
criteria.addFilterName(resourceTypeName);
criteria.addFilterPluginName(plugin);
criteria.setStrict(true);
+ criteria.fetchBundleConfiguration(true);
+ criteria.fetchDriftDefinitionTemplates(true);
MethodUtils.invokeMethod(criteria, fetch, true);
List<ResourceType> resourceTypes = resourceTypeMgr.findResourceTypesByCriteria(subjectMgr.getOverlord(),
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java
index c282777..ff279d9 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java
@@ -46,10 +46,18 @@ public class PluginManagerBeanTest extends MetadataBeanTest {
private SubjectManagerLocal subjectMgr;
private PluginManagerLocal pluginMgr;
- public void registerPlugins() throws Exception {
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+
subjectMgr = LookupUtil.getSubjectManager();
pluginMgr = LookupUtil.getPluginManager();
+ disableAfterClassStandIn = true;
+ }
+
+ public void registerPlugins() throws Exception {
+
List<Plugin> plugins = getEntityManager()
.createQuery(
"from Plugin where name IN ('PluginManagerBeanTestPlugin1', 'PluginManagerBeanTestPlugin2', 'PluginManagerBeanTestPlugin3')")
@@ -217,6 +225,12 @@ public class PluginManagerBeanTest extends MetadataBeanTest {
assertEquals("Failed to purge plugins from the database", 1, pluginMgr.getPlugins().size());
}
+ // this needs to be the last test executed in the class, it does cleanup
+ @Test(priority = 10, alwaysRun = true, dependsOnMethods = { "pluginPurgeCheckShouldUseExactMatchesInQuery" })
+ public void afterClassWorkTest() throws Exception {
+ afterClassWork();
+ }
+
private Plugin getPlugin(String name) {
Plugin plugin = pluginMgr.getPlugin(name);
assertNotNull("Failed to find plugin [" + name + "].", plugin);
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
index 0e142e9..5f2acd8 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
@@ -50,9 +50,17 @@ import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
+@Test(groups = { "plugin.metadata" })
public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
- @Test(groups = { "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+
+ disableAfterClassStandIn = true;
+ }
+
+ @Test(groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void testRemovalOfObsoleteBundleAndDriftConfig() throws Exception {
// create the initial type that has bundle and drift definitions
createPlugin("test-plugin.jar", "1.0", "remove_bundle_drift_config_v1.xml");
@@ -107,7 +115,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(groups = { "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ @Test(groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void registerPluginWithDuplicateDriftDefinitions() {
try {
createPlugin("test-plugin.jar", "1.0", "dup_drift.xml");
@@ -118,14 +126,13 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "registerPluginWithDuplicateDriftDefinitions" }, groups = {
- "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ "plugin.resource.metadata.test", "NewPlugin" })
public void registerPlugin() throws Exception {
createPlugin("test-plugin.jar", "1.0", "plugin_v1.xml");
}
-
@Test(dependsOnMethods = { "registerPluginWithDuplicateDriftDefinitions" }, groups = {
- "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ "plugin.resource.metadata.test", "NewPlugin" })
public void registerParentResouceTypePlugin() throws Exception {
createPlugin("parent_resource_type-plugin.jar", "1.0", "parent_resource_type-plugin.xml");
assertResourceTypeAssociationEquals("Server A First Level", "ParentResourceTypeTestPlugin",
@@ -136,15 +143,13 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
"childResourceTypes", asList("Service C First Level"));
}
-
- @Test(dependsOnMethods = { "registerPlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "registerPlugin" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistNewTypes() {
List<String> newTypes = asList("ServerA", "ServerB");
assertTypesPersisted("Failed to persist new types", newTypes, "TestPlugin");
}
- // @Test(dependsOnMethods = {"persistNewTypes"}, groups = {"plugin.resource.metadata.test", "plugin.metadata", "NewPlugin"})
+ // @Test(dependsOnMethods = {"persistNewTypes"}, groups = {"plugin.resource.metadata.test", "NewPlugin"})
// public void persistSubcategories() throws Exception {
// assertResourceTypeAssociationEquals(
// "ServerA",
@@ -154,34 +159,29 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
// );
// }
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistMeasurementDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "metricDefinitions",
asList("metric1", "metric2", "rhq.availability"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistEventDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "eventDefinitions",
asList("logAEntry", "logBEntry"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistOperationDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "operationDefinitions", asList("start", "stop"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistProcessScans() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "processScans", asList("serverA"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistDriftDefinitionTemplates() throws Exception {
ResourceType type = assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "driftDefinitionTemplates",
asList("drift-pc", "drift-fs"));
@@ -220,8 +220,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistBundleTargetConfigurations() throws Exception {
String resourceTypeName = "ServerA";
String plugin = "TestPlugin";
@@ -256,64 +255,55 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistChildTypes() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "childResourceTypes", asList("Child1", "Child2"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistPluginConfigurationDefinition() throws Exception {
assertAssociationExists("ServerA", "pluginConfigurationDefinition");
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistPackageTypes() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "packageTypes",
asList("ServerA.Content.1", "ServerA.Content.2"));
}
- @Test(groups = { "plugin.resource.metadata.test", "plugin.metadata", "UpgradePlugin" }, dependsOnGroups = { "NewPlugin" })
+ @Test(groups = { "plugin.resource.metadata.test", "UpgradePlugin" }, dependsOnGroups = { "NewPlugin" })
public void upgradePlugin() throws Exception {
createPlugin("test-plugin.jar", "2.0", "plugin_v2.xml");
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeOperationDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "operationDefinitions",
asList("start", "shutdown", "restart"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeChildResources() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "childResourceTypes", asList("Child1", "Child3"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeParentTypeOfChild() throws Exception {
assertResourceTypeAssociationEquals("ServerB", "TestPlugin", "childResourceTypes", asList("Child2"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeEventDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "eventDefinitions",
asList("logAEntry", "logCEntry"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeProcessScans() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "processScans", asList("processA", "processB"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeDriftDefinitionTemplates() throws Exception {
ResourceType type = assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "driftDefinitionTemplates",
asList("drift-rc", "drift-mt"));
@@ -343,8 +333,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeBundleTargetConfigurations() throws Exception {
String resourceTypeName = "ServerA";
String plugin = "TestPlugin";
@@ -379,8 +368,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradePackageTypes() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "packageTypes",
asList("ServerA.Content.1", "ServerA.Content.3"));
@@ -400,7 +388,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteOperationDefsForRemovedType() throws Exception {
OperationManagerLocal operationMgr = LookupUtil.getOperationManager();
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
@@ -416,7 +404,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteEventDefsForRemovedType() throws Exception {
List<?> results = getEntityManager()
.createQuery("from EventDefinition e where e.name = :ename and e.resourceType.name = :rname")
@@ -426,7 +414,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteParent() throws Exception {
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
ResourceTypeManagerLocal resourceTypeMgr = LookupUtil.getResourceTypeManager();
@@ -460,7 +448,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteTypeAndAllItsDescedantTypes() throws Exception {
List<?> typesNotRemoved = getEntityManager()
.createQuery("from ResourceType t where t.plugin = :plugin and t.name in (:resourceTypes)")
@@ -472,7 +460,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteProcessScans() {
List<?> processScans = getEntityManager()
.createQuery("from ProcessScan p where p.name = :name1 or p.name = :name2").setParameter("name1", "scan1")
@@ -482,7 +470,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteSubcategories() {
List<?> subcategories = getEntityManager()
.createQuery("from ResourceSubCategory r where r.name = :name1 or r.name = :name2 or r.name = :name3")
@@ -492,7 +480,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteResources() {
ResourceManagerLocal resourceMgr = LookupUtil.getResourceManager();
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
@@ -518,7 +506,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteBundles() {
List<?> bundles = getEntityManager().createQuery("from Bundle b where b.bundleType.name = :name")
.setParameter("name", "Test Bundle").getResultList();
@@ -527,7 +515,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteBundleTypes() {
List<?> bundleTypes = getEntityManager().createQuery("from BundleType b where b.name = :name")
.setParameter("name", "Test Bundle").getResultList();
@@ -536,7 +524,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deletePackages() {
List<?> packages = getEntityManager().createQuery("from Package p where p.name = :name")
.setParameter("name", "ServerC::test-package").getResultList();
@@ -545,7 +533,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deletePackageTypes() {
List<?> packageTypes = getEntityManager().createQuery("from PackageType p where p.name = :name")
.setParameter("name", "ServerC.Content").getResultList();
@@ -554,7 +542,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteResourceGroups() {
List<?> groups = getEntityManager()
.createQuery("from ResourceGroup g where g.name = :name and g.resourceType.name = :typeName")
@@ -564,7 +552,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteAlertTemplates() {
List<?> templates = getEntityManager()
.createQuery("from AlertDefinition a where a.name = :name and a.resourceType.name = :typeName")
@@ -574,7 +562,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteMeasurementDefinitions() {
List<?> measurementDefs = getEntityManager().createQuery("from MeasurementDefinition m where m.name = :name")
.setParameter("name", "ServerC::metric1").getResultList();
@@ -582,6 +570,12 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
assertEquals("Measurement definitions should have been deleted", 0, measurementDefs.size());
}
+ // this needs to be the last test executed in the class, it does cleanup
+ @Test(priority = 10, alwaysRun = true, dependsOnGroups = { "RemoveTypes" })
+ public void afterClassWorkTest() throws Exception {
+ afterClassWork();
+ }
+
void assertTypesPersisted(String msg, List<String> types, String plugin) {
List<String> typesNotFound = new ArrayList<String>();
ResourceTypeManagerLocal resourceTypeMgr = LookupUtil.getResourceTypeManager();
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
index 8984027..6fc8350 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
@@ -121,6 +121,62 @@ public abstract class AbstractEJB3Test extends Arquillian {
.addAsResource("org/rhq/enterprise/server/configuration/metadata/configuration_metadata_manager_bean_test_v2.xml");
testClassesJar.addAsResource("org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml");
testClassesJar.addAsResource("org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml");
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/MetadataTest.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml");
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml");
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml");
+
testClassesJar
.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginScanningExtensionMetadataTest/child1_plugin_v1.xml");
testClassesJar
@@ -129,6 +185,24 @@ public abstract class AbstractEJB3Test extends Arquillian {
.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginScanningExtensionMetadataTest/parent_plugin_v1.xml");
testClassesJar
.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginScanningExtensionMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml");
+
testClassesJar.addAsResource("perftest/AvailabilityInsertPurgeTest-testOne-data.xml.zip");
testClassesJar.addAsResource("serverplugins/simple-generic-serverplugin.xml");
testClassesJar.addAsResource("test/deployment/1.0-feb-2.xml");
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 3b9ad64..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="AlertMetadataManagerBeanTestPlugin"
- displayName="AlertMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="AlertServer"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index f2664dc..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<plugin name="AlertMetadataManagerBeanTestPlugin"
- displayName="AlertMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 79f9296..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<plugin name="ContentMetadataManagerBeanTestPlugin"
- displayName="ContentMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ContentServer">
- <content name="ContentServer.Content.1" category="deployable"/>
- </server>
-
- <server name="ContentServer1"/>
-
- <server name="ContentServer2">
- <content name="ContentServer2.Content.1" category="executableScript"/>
- </server>
-
- <server name="ContentServer3">
- <content name="ContentServer3.Content.1" category="deployable"/>
- <content name="ContentServer3.Content.2" category="deployable"/>
- <content name="ContentServer3.Content.3" category="deployable"/>
- </server>
-
- <server name="ContentServer4">
- <content name="ContentServer4.Content.1" category="deployable"/>
- </server>
-
- <server name="ContentServer5">
- <content name="ContentServer5.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="x"/>
- </configuration>
- </content>
- <content name="ContentServer5.Content.2" category="deployable">
- <configuration>
- <c:simple-property name="x"/>
- </configuration>
- </content>
- </server>
-
- <server name="ContentServer6"/>
-
- <server name="ContentServer7">
- <bundle type="ContentServer.Bundle.1"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index f0cd7b8..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<plugin name="ContentMetadataManagerBeanTestPlugin"
- displayName="ContentMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ContentServer">
- <content name="ContentServer.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="version"/>
- </configuration>
- </content>
- </server>
-
- <server name="ContentServer1">
- <content name="ContentServer1.Content.1" category="deployable"/>
- <content name="ContentServer1.Content.2" category="configuration"/>
- </server>
-
- <server name="ContentServer2"/>
-
- <server name="ContentServer3">
- <content name="ContentServer3.Content.2" category="deployable"/>
- <content name="ContentServer3.Content.3" category="deployable"/>
- </server>
-
- <server name="ContentServer4">
- <content name="ContentServer4.Content.1" category="deployable"/>
- <content name="ContentServer4.Content.2" category="deployable"/>
- </server>
-
- <server name="ContentServer5">
- <content name="ContentServer5.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="x"/>
- <c:simple-property name="y"/>
- </configuration>
- </content>
- <content name="ContentServer5.Content.2" category="deployable"/>
- </server>
-
- <server name="ContentServer6">
- <bundle type="ContentServer6.Bundle.1"/>
- </server>
-
- <server name="ContentServer7">
- <bundle type="ContentServer.Bundle.2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 2786b05..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<plugin name="EventMetadataManagerBeanTestPlugin"
- displayName="MeasurementMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="EventServer1">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer2"/>
-
- <server name="EventServer3">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer4">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index f4f765f..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<plugin name="EventMetadataManagerBeanTestPlugin"
- displayName="ContentMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="EventServer1">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer2">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer3"/>
-
- <server name="EventServer4">
- <event name="event1" description="EVENT ONE"/>
- <event name="event3" description="Event 3"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 0202079..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<plugin name="MeasurementMetadataManagerBeanTestPlugin"
- displayName="MeasurementMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="MetricServer1">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
- description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
- units="megabytes" measurementType="trendsup"/>
- <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
- description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
- units="milliseconds" destinationType="myMethod"/>
- </server>
- <server name="MetricServer2"/>
- <server name="MetricServer3">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
-
- <service name="MetricService1">
- <metric property="rhq.availability" defaultInterval="120000" defaultOn="false" />
- </service>
- <service name="MetricService2" />
- </server>
- <server name="MetricServer4">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- </server>
- <server name="MetricServer5">
- <!--
- Need to use names for these metrics that are unique across the plugin because the resource
- type will be deleted and the metric definition cannot be looked up by resource type. We will
- instead look them up by name only.
- -->
- <metric displayName="metric1" property="MetricServer5.metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- <metric displayName="metric3" property="MetricServer5.metric3" dataType="calltime" displayType="detail"
- description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
- units="milliseconds" destinationType="myMethod"/>
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index d949778..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<plugin name="MeasurementMetadataManagerBeanTestPlugin"
- displayName="MeasurementMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="MetricServer1">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
- description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
- units="megabytes" measurementType="trendsup"/>
- <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
- description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
- units="milliseconds" destinationType="myMethod"/>
- <metric displayName="cannotBeSet" property="rhq.availability"
- description="cannotBeSet" defaultInterval="120000" defaultOn="true"/>
- </server>
- <server name="MetricServer2">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- </server>
- <server name="MetricServer3">
- <metric displayName="metric1" property="metric1" dataType="measurement" displayType="detail"
- description="Metric One" category="performance" defaultInterval="60000" defaultOn="false"
- units="milliseconds" measurementType="trendsup"/>
-
- <service name="MetricService1">
- <metric displayName="cannotBeSet" property="rhq.availability"
- description="cannotBeSet" defaultInterval="240000" defaultOn="true" />
- </service>
- <service name="MetricService2">
- <metric displayName="cannotBeSet" property="rhq.availability"
- description="cannotBeSet" defaultInterval="480000" defaultOn="true" />
- </service>
- </server>
- <server name="MetricServer4"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
deleted file mode 100644
index e914562..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
+++ /dev/null
@@ -1,298 +0,0 @@
-<dataset>
- <rhq_config_def/>
- <rhq_config_prop_grp_def/>
- <rhq_config_prop_def/>
- <rhq_config_pd_osrc/>
- <rhq_conf_prop_def_enum/>
- <rhq_config_prop_constr/>
- <rhq_config/>
- <rhq_config_property/>
- <rhq_config_template/>
- <rhq_raw_config/>
- <rhq_affinity_group/>
- <rhq_server/>
- <rhq_agent/>
- <rhq_partition_event/>
- <rhq_partition_details/>
- <rhq_failover_list/>
- <rhq_failover_details/>
- <rhq_principal id="2" PRINCIPAL="rhqadmin" PASSWORD="x1XwrxKuPvYUILiOnOZTLg=="/>
- <rhq_subject
- ID="1"
- NAME="admin"
- FIRST_NAME="Super"
- LAST_NAME="User"
- FSYSTEM="1"/>
- <rhq_subject
- ID="2"
- NAME="rhqadmin"
- FIRST_NAME="RHQ"
- LAST_NAME="Administrator"
- EMAIL_ADDRESS="nobody@localhost"
- FSYSTEM="0"/>
- <rhq_resource_type/>
- <rhq_resource_subcat/>
- <rhq_resource_type_parents/>
- <rhq_process_scan/>
- <rhq_prd_ver/>
- <rhq_resource/>
- <rhq_resource_error/>
- <rhq_group_def/>
- <rhq_resource_group/>
- <rhq_resource_group_res_imp_map/>
- <rhq_resource_group_res_exp_map/>
- <rhq_config_group_update/>
- <rhq_config_update/>
- <rhq_tagging/>
- <rhq_tagging_resource_map/>
- <rhq_tagging_res_group_map/>
- <rhq_role
- ID="1"
- NAME="Super User Role"
- FSYSTEM="1"
- DESCRIPTION="System superuser role that provides full access to everything. This role cannot be modified."/>
- <rhq_role
- ID="2"
- NAME="All Resources Role"
- FSYSTEM="0"
- DESCRIPTION="Provides full access to all resources in inventory. Cannot modify users, roles or server settings."/>
- <rhq_role_resource_group_map/>
- <rhq_role_ldap_group/>
- <rhq_permission ROLE_ID="1" OPERATION="0"/> <!-- Permission.MANAGE_SECURITY -->
- <rhq_permission ROLE_ID="1" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
- <rhq_permission ROLE_ID="1" OPERATION="2"/> <!-- Permission.MANAGE_SETTINGS -->
- <rhq_permission ROLE_ID="1" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
- <rhq_permission ROLE_ID="1" OPERATION="15"/> <!-- Permission.MANAGE_REPOSITORIES -->
- <!-- resource permissions start here-->
- <rhq_permission ROLE_ID="1" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
- <rhq_permission ROLE_ID="1" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
- <rhq_permission ROLE_ID="1" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
- <rhq_permission ROLE_ID="1" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
- <rhq_permission ROLE_ID="1" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
- <rhq_permission ROLE_ID="1" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
- <rhq_permission ROLE_ID="1" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
- <rhq_permission ROLE_ID="1" OPERATION="10"/> <!-- Permission.CONTROL -->
- <rhq_permission ROLE_ID="1" OPERATION="11"/> <!-- Permission.CONFIGURE -->
- <rhq_permission ROLE_ID="1" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
-
- <!-- give all-resources-role all permissions (resource perms is mainly just to show on view-role page) -->
- <rhq_permission ROLE_ID="2" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
- <rhq_permission ROLE_ID="2" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
- <!-- resource permissions start here-->
- <rhq_permission ROLE_ID="2" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
- <rhq_permission ROLE_ID="2" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
- <rhq_permission ROLE_ID="2" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
- <rhq_permission ROLE_ID="2" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
- <rhq_permission ROLE_ID="2" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
- <rhq_permission ROLE_ID="2" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
- <rhq_permission ROLE_ID="2" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
- <rhq_permission ROLE_ID="2" OPERATION="10"/> <!-- Permission.CONTROL -->
- <rhq_permission ROLE_ID="2" OPERATION="11"/> <!-- Permission.CONFIGURE -->
- <rhq_permission ROLE_ID="2" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
- <rhq_subject_role_map SUBJECT_ID="1" ROLE_ID="1"/>
- <rhq_subject_role_map SUBJECT_ID="2" ROLE_ID="1"/>
- <rhq_subject_role_ldap_map/>
- <rhq_saved_search/>
- <rhq_dashboard/>
- <rhq_dashboard_portlet/>
- <rhq_operation_def/>
- <rhq_operation_history/>
- <rhq_operation_schedule/>
- <rhq_event_def/>
- <rhq_event_source/>
- <rhq_event/>
- <rhq_alert_definition/>
- <rhq_alert_dampen_event/>
- <rhq_alert_condition/>
- <rhq_alert/>
- <rhq_alert_notif_log/>
- <rhq_alert_condition_log/>
- <rhq_alert_notification/>
- <rhq_plugin/>
- <rhq_measurement_def/>
- <rhq_measurement_sched/>
- <rhq_measurement_bline/>
- <rhq_measurement_data_num_1h/>
- <rhq_measurement_data_num_6h/>
- <rhq_measurement_data_num_1d/>
- <rhq_measurement_data_trait/>
- <rhq_calltime_data_key/>
- <rhq_calltime_data_value/>
- <rhq_availability/>
- <rhq_resource_avail/>
- <rhq_measurement_oob/>
- <rhq_measurement_oob_tmp/>
- <rhq_numbers i="0"/>
- <rhq_numbers i="1"/>
- <rhq_numbers i="2"/>
- <rhq_numbers i="3"/>
- <rhq_numbers i="4"/>
- <rhq_numbers i="5"/>
- <rhq_numbers i="6"/>
- <rhq_numbers i="7"/>
- <rhq_numbers i="8"/>
- <rhq_numbers i="9"/>
- <rhq_numbers i="10"/>
- <rhq_numbers i="11"/>
- <rhq_numbers i="12"/>
- <rhq_numbers i="13"/>
- <rhq_numbers i="14"/>
- <rhq_numbers i="15"/>
- <rhq_numbers i="16"/>
- <rhq_numbers i="17"/>
- <rhq_numbers i="18"/>
- <rhq_numbers i="19"/>
- <rhq_numbers i="20"/>
- <rhq_numbers i="21"/>
- <rhq_numbers i="22"/>
- <rhq_numbers i="23"/>
- <rhq_numbers i="24"/>
- <rhq_numbers i="25"/>
- <rhq_numbers i="26"/>
- <rhq_numbers i="27"/>
- <rhq_numbers i="28"/>
- <rhq_numbers i="29"/>
- <rhq_numbers i="30"/>
- <rhq_numbers i="31"/>
- <rhq_numbers i="32"/>
- <rhq_numbers i="33"/>
- <rhq_numbers i="34"/>
- <rhq_numbers i="35"/>
- <rhq_numbers i="36"/>
- <rhq_numbers i="37"/>
- <rhq_numbers i="38"/>
- <rhq_numbers i="39"/>
- <rhq_numbers i="40"/>
- <rhq_numbers i="41"/>
- <rhq_numbers i="42"/>
- <rhq_numbers i="43"/>
- <rhq_numbers i="44"/>
- <rhq_numbers i="45"/>
- <rhq_numbers i="46"/>
- <rhq_numbers i="47"/>
- <rhq_numbers i="48"/>
- <rhq_numbers i="49"/>
- <rhq_numbers i="50"/>
- <rhq_numbers i="51"/>
- <rhq_numbers i="52"/>
- <rhq_numbers i="53"/>
- <rhq_numbers i="54"/>
- <rhq_numbers i="55"/>
- <rhq_numbers i="56"/>
- <rhq_numbers i="57"/>
- <rhq_numbers i="58"/>
- <rhq_numbers i="59"/>
- <rhq_meas_data_num_r00/>
- <rhq_meas_data_num_r01/>
- <rhq_meas_data_num_r02/>
- <rhq_meas_data_num_r03/>
- <rhq_meas_data_num_r04/>
- <rhq_meas_data_num_r05/>
- <rhq_meas_data_num_r06/>
- <rhq_meas_data_num_r07/>
- <rhq_meas_data_num_r08/>
- <rhq_meas_data_num_r09/>
- <rhq_meas_data_num_r10/>
- <rhq_meas_data_num_r11/>
- <rhq_meas_data_num_r12/>
- <rhq_meas_data_num_r13/>
- <rhq_meas_data_num_r14/>
- <rhq_architecture id="1" name="noarch"/>
- <rhq_architecture id="2" name="i386"/>
- <rhq_architecture id="3" name="i486"/>
- <rhq_architecture id="4" name="i586"/>
- <rhq_architecture id="5" name="i686"/>
- <rhq_architecture id="6" name="alpha"/>
- <rhq_architecture id="7" name="alphaev6"/>
- <rhq_architecture id="8" name="ia64"/>
- <rhq_architecture id="9" name="sparc"/>
- <rhq_architecture id="10" name="sparcv9"/>
- <rhq_architecture id="11" name="sparc64"/>
- <rhq_architecture id="12" name="src"/>
- <rhq_architecture id="13" name="s390"/>
- <rhq_architecture id="14" name="athlon"/>
- <rhq_architecture id="15" name="s390x"/>
- <rhq_architecture id="16" name="ppc"/>
- <rhq_architecture id="17" name="ppc64"/>
- <rhq_architecture id="18" name="pSeries"/>
- <rhq_architecture id="19" name="iSeries"/>
- <rhq_architecture id="20" name="x86_64"/>
- <rhq_architecture id="21" name="ppc64iseries"/>
- <rhq_architecture id="22" name="ppc64pseries"/>
- <rhq_architecture id="23" name="sparc-solaris"/>
- <rhq_architecture id="24" name="sparc.sun4u-solaris"/>
- <rhq_architecture id="25" name="tar"/>
- <rhq_architecture id="26" name="ia32e"/>
- <rhq_architecture id="27" name="amd64"/>
- <rhq_architecture id="28" name="i386-solaris"/>
- <rhq_architecture id="29" name="nosrc"/>
- <rhq_architecture id="30" name="sparc-solaris-patch"/>
- <rhq_architecture id="31" name="i386-solaris-patch"/>
- <rhq_architecture id="32" name="sparc-solaris-patch-cluster"/>
- <rhq_architecture id="33" name="i386-solaris-patch-cluster"/>
- <rhq_architecture id="34" name="noarch-solaris"/>
- <rhq_architecture id="35" name="noarch-solaris-patch"/>
- <rhq_architecture id="36" name="noarch-solaris-patch-cluster"/>
- <rhq_architecture id="37" name="solaris-patch"/>
- <rhq_architecture id="38" name="solaris-patch-cluster"/>
- <rhq_repo_group_type id="1" name="family"/>
- <rhq_repo_group/>
- <rhq_content_source_type/>
- <rhq_content_source/>
- <rhq_repo/>
- <rhq_repo_relation_type id="1" name="parent"/>
- <rhq_repo_relation_type id="2" name="clone"/>
- <rhq_repo_relation/>
- <rhq_package_type/>
- <rhq_package/>
- <rhq_package_bits/>
- <rhq_package_version/>
- <rhq_content_req/>
- <rhq_installed_package/>
- <rhq_installed_pkg_hist/>
- <rhq_content_src_sync/>
- <rhq_repo_sync/>
- <rhq_package_inst_step/>
- <rhq_repo_resource_map/>
- <rhq_repo_content_src_map/>
- <rhq_repo_repo_group_map/>
- <rhq_repo_repo_relation_map/>
- <rhq_repo_pkg_version_map/>
- <rhq_pkg_ver_content_src_map/>
- <rhq_pkg_prd_map/>
- <rhq_distribution_type id="1" name="kickstart" description="Linux kickstart distribution"/>
- <rhq_distribution_type id="2" name="jumpstart" description="solaris jumpstart distribution"/>
- <rhq_distribution/>
- <rhq_repo_distribution/>
- <rhq_distribution_file/>
- <rhq_advisory/>
- <rhq_advisory_package/>
- <rhq_cve/>
- <rhq_advisory_cve/>
- <rhq_advisory_buglist/>
- <rhq_repo_advisory/>
- <rhq_bundle_type/>
- <rhq_bundle/>
- <rhq_bundle_version/>
- <rhq_bundle_version_repo/>
- <rhq_bundle_file/>
- <rhq_bundle_destination/>
- <rhq_bundle_deployment/>
- <rhq_bundle_res_deploy/>
- <rhq_bundle_res_dep_hist/>
- <rhq_tagging_bundle_map/>
- <rhq_tagging_bundle_version_map/>
- <rhq_tagging_bundle_deploy_map/>
- <rhq_tagging_bundle_dest_map/>
- <rhq_create_res_hist/>
- <rhq_delete_res_hist/>
- <rhq_drift_def_template/>
- <rhq_drift_definition/>
- <rhq_drift_change_set/>
- <jms_messages/>
- <jms_transactions/>
- <jms_users/>
- <jms_roles/>
- <jms_subscriptions/>
-</dataset>
-
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
deleted file mode 100644
index befc699..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<plugin name="PluginExtensionMetadataChild1TestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Child 1 Test Plugin"
- package="org.rhq.plugins.test.child1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="OuterServerA">
- <server name="Child1ServerA"
- description="Child 1 Server type that extends Parent Server type"
- discovery="Child1DiscoveryComponent"
- class="Child1Component"
- sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
deleted file mode 100644
index 0dafa9b..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<plugin name="PluginExtensionMetadataChild2TestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Child 2 Test Plugin"
- package="org.rhq.plugins.test.child2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
-
- <server name="Child2ServerA"
- description="Child 2 Server type that extends Parent Server type"
- discovery="Child2DiscoveryComponent"
- class="Child2Component"
- sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
-
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
deleted file mode 100644
index 627c5a8..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
- version="1.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op" timeout="123456" description="a op"></operation>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
deleted file mode 100644
index 2c0e9d8..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
- version="2.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
deleted file mode 100644
index 08ea056..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataChildTestPlugin"
- version="1.0"
- displayName="Multiple Plugin Extension Single Descriptor Metadata Child Test Plugin"
- package="org.rhq.plugins.test.child"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="OuterServerA">
- <server name="Child1ServerA"
- description="Child 1 Server type that extends Parent Server type"
- discovery="Child1DiscoveryComponent"
- class="Child1Component"
- sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
- </server>
-
- <server name="OuterServerB">
- <server name="Child2ServerA"
- description="Child 2 Server type that extends Parent Server type"
- discovery="Child2DiscoveryComponent"
- class="Child2Component"
- sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
deleted file mode 100644
index be977e7..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- version="1.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op" timeout="123456" description="a op"></operation>
-
- <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
- <service name="InnerServiceA">
- <metric property="inner-A-metric" />
- </service>
- -->
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
deleted file mode 100644
index 9f02834..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- version="2.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
-
- <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
- <service name="InnerServiceA">
- <metric property="inner-A-metric" />
- </service>
- -->
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 93a15ef..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<plugin name="OperationMetadataManagerBeanTestPlugin"
- displayName="OperationMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="OperationServer1">
- <operation name="OperationServer1.Operation1"/>
- </server>
- <server name="OperationServer11">
- <operation name="OperationServer11.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- <c:simple-property name="param2"/>
- </parameters>
- </operation>
- </server>
-
- <server name="OperationServer2"/>
- <server name="OperationServer21">
- <operation name="OperationServer21.Operation1"/>
- </server>
- <server name="OperationServer22">
- <operation name="OperationServer22.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- <c:simple-property name="param2"/>
- </parameters>
- </operation>
- </server>
- <server name="OperationServer23">
- <operation name="OperationServer23.Operation1"/>
- </server>
- <server name="OperationServer24">
- <operation name="OperationServer24.Operation1"/>
- <operation name="OperationServer24.Operation2">
- <results>
- <c:simple-property name="exitCode"/>
- </results>
- </operation>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index a86fbcf..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<plugin name="OperationMetadataManagerBeanTestPlugin"
- displayName="OperationMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="OperationServer1">
- <operation name="OperationServer1.Operation1"/>
- </server>
- <server name="OperationServer11">
- <operation name="OperationServer11.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- <c:simple-property name="param2"/>
- </parameters>
- </operation>
- </server>
-
- <server name="OperationServer2">
- <operation name="OperationServer2.Operation1"/>
- </server>
- <server name="OperationServer21"/>
- <server name="OperationServer22">
- <operation name="OperationServer22.Operation1"/>
- </server>
- <server name="OperationServer23">
- <operation name="OperationServer23.Operation1">
- <results>
- <c:simple-property name="exitCode"/>
- </results>
- </operation>
- </server>
- <server name="OperationServer24">
- <operation name="OperationServer24.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- </parameters>
- </operation>
- <operation name="OperationServer24.Operation2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
deleted file mode 100644
index ddedf10..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<plugin name="PluginExtensionMetadataChildTestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Child Test Plugin"
- package="org.rhq.plugins.test.child"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ChildServerA"
- description="Child Server type that extends Parent Server type"
- discovery="ChildDiscoveryComponent"
- class="ChildComponent"
- sourcePlugin="PluginExtensionMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
deleted file mode 100644
index e640187..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<plugin name="PluginExtensionMetadataParentTestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <subcategories>
- <subcategory name="A-subcat" displayName="a subcat"/>
- </subcategories>
-
- <plugin-configuration>
- <c:group name="A-pc-group" hiddenByDefault="true">
- <c:simple-property name="A-pc-prop" description="test plugin config prop" required="false" />
- </c:group>
- </plugin-configuration>
-
- <process-scan name="A-process-scan" query="process|basename|match=A.exe"/>
- <operation name="A-op" timeout="123456" description="a op"></operation>
- <metric property="A-metric" defaultInterval="123456"></metric>
- <event name="A-event" description="a event"></event>
-
- <resource-configuration>
- <c:simple-property name="A-rc-prop" description="test resource config prop" required="false" />
- </resource-configuration>
-
- <drift-definition name="A-drift-def">
- <basedir>
- <value-context>pluginConfiguration</value-context>
- <value-name>A-pc-prop</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="A-bundle-basedir">
- <value-context>resourceConfiguration</value-context>
- <value-name>A-rc-prop</value-name>
- </destination-base-dir>
- </bundle-target>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
deleted file mode 100644
index b0d4027..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<plugin name="PluginExtensionMetadataParentTestPlugin"
- version="2.0"
- displayName="Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <subcategories>
- <subcategory name="A-subcat" displayName="a subcat"/>
- </subcategories>
-
- <plugin-configuration>
- <c:group name="A-pc-group" hiddenByDefault="false">
- <c:simple-property name="A-pc-prop-CHANGED" description="A-pc-prop desc 1" required="true" />
- </c:group>
- <c:group name="A-pc-group-NEW" hiddenByDefault="true">
- <c:simple-property name="A-pc-prop-NEW" description="A-pc-prop desc 2" required="false" />
- </c:group>
- </plugin-configuration>
-
- <process-scan name="A-process-scan" query="process|basename|match=CHANGED.exe"/> <!-- CHANGED, but same name -->
- <process-scan name="A-process-scan-NEW" query="process|basename|match=NEW.exe"/>
- <operation name="A-op" timeout="987654" description="a changed op"></operation> <!-- CHANGED, but same name -->
- <operation name="A-op-NEW" timeout="111111" description="a new op"></operation>
- <metric property="A-metric" defaultInterval="555555"></metric> <!-- CHANGED, but same name -->
- <metric property="A-metric-NEW" defaultInterval="98765"></metric>
- <event name="A-event-CHANGED" description="a changed event"></event>
- <event name="A-event-NEW" description="a new event"></event>
-
- <resource-configuration>
- <c:simple-property name="A-rc-prop-CHANGED" description="test resource config prop 1" required="true" />
- <c:simple-property name="A-rc-prop-NEW" description="test resource config prop 2" required="false" />
- </resource-configuration>
-
- <drift-definition name="A-drift-def-CHANGED">
- <basedir>
- <value-context>pluginConfiguration</value-context>
- <value-name>A-pc-prop</value-name>
- </basedir>
- </drift-definition>
- <drift-definition name="A-drift-def-NEW">
- <basedir>
- <value-context>resourceConfiguration</value-context>
- <value-name>A-rc-prop</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="A-bundle-basedir-CHANGED">
- <value-context>resourceConfiguration</value-context>
- <value-name>A-rc-prop</value-name>
- </destination-base-dir>
- <destination-base-dir name="A-bundle-basedir-NEW">
- <value-context>pluginConfiguration</value-context>
- <value-name>A-pc-prop</value-name>
- </destination-base-dir>
- </bundle-target>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
deleted file mode 100644
index 6680aa6..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin1"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="TestServer1"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
deleted file mode 100644
index c6f8736..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin2"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <depends plugin="PluginManagerBeanTestPlugin1" useClasses="true"/>
-
- <server name="TestServer2"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
deleted file mode 100644
index e885167..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin3.1"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="TestServer3.1"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
deleted file mode 100644
index 78184bf..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin3"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="TestServer3"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
deleted file mode 100644
index bd9728b..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerWithDupDrift" description="has duplicate drift config names and thus is invalid">
- <drift-definition name="drift-one">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/a</value-name>
- </basedir>
- </drift-definition>
- <drift-definition name="drift-one">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/b</value-name>
- </basedir>
- </drift-definition>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
deleted file mode 100644
index 853e423..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<plugin name="ParentResourceTypeTestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="Server A First Level" description="Server A description">
- <server name="Server B Second Level" description="Server B description"/>
- <service name="Service A Second Level" description="Service A description"/>
- </server>
-
- <server name="Server C First Level" description="Server C description">
- <runs-inside>
- <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
- </runs-inside>
- </server>
-
- <service name="Service B First Level" description="Service B description">
- <runs-inside>
- <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
- </runs-inside>
- </service>
-
- <service name="Service C First Level" description="Service C description">
- <runs-inside>
- <parent-resource-type name="Service A Second Level" plugin="ParentResourceTypeTestPlugin"/>
- </runs-inside>
- </service>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 88cd39c..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerA" description="Server A description">
- <subcategories>
- <subcategory name="Resources" description="Resources subcategory"/>
- <subcategory name="Applications" description="Applications subcategory"/>
- </subcategories>
-
- <plugin-configuration>
- <c:simple-property name="connectionPropertyX" default="x"/>
- <c:simple-property name="connectionPropertyY" default="y"/>
- </plugin-configuration>
-
- <process-scan name="serverA" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
-
- <operation name="start">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <operation name="stop">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
- <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
-
- <event name="logAEntry" description="an entry was appended to a log file"/>
- <event name="logBEntry" description="an entry was appended to a log file"/>
-
- <content name="ServerA.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="ServerA.Content.1.version"/>
- </configuration>
- </content>
-
- <content name="ServerA.Content.2" category="deployable">
- <configuration>
- <c:simple-property name="ServerA.Content.2.version"/>
- </configuration>
- </content>
-
- <drift-definition name="drift-pc">
- <basedir>
- <value-context>pluginConfiguration</value-context>
- <value-name>connectionPropertyX</value-name>
- </basedir>
- <interval>123456</interval>
- <includes>
- <include path="foo/bar" pattern="**/*.blech"/>
- </includes>
- <excludes>
- <exclude path="/wot/gorilla" pattern="*.xml" />
- <exclude path="/hello"/>
- </excludes>
- </drift-definition>
-
- <drift-definition name="drift-fs">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="bundleTarget-pc" description="pc-description">
- <value-context>pluginConfiguration</value-context>
- <value-name>connectionPropertyY</value-name>
- </destination-base-dir>
- <destination-base-dir name="bundleTarget-fs"> <!-- note: no description, so we can test for proper null handling -->
- <value-context>fileSystem</value-context>
- <value-name>/wot/gorilla</value-name>
- </destination-base-dir>
- </bundle-target>
-
- <service name="Child1" description="Child 1 description"/>
- <service name="Child2" description="Child 2 description"/>
- </server>
-
- <server name="ServerB" description="Server B description"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index a89f679..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerA" description="Server A description">
-
- <subcategories>
- <subcategory name="Resources" description="Resources subcategory"/>
- <subcategory name="Applications" description="Applications subcategory"/>
- </subcategories>
-
- <plugin-configuration>
- <c:simple-property name="connectionPropertyX" default="x"/>
- <c:simple-property name="connectionPropertyY" default="y"/>
- </plugin-configuration>
-
- <process-scan name="processA" query="process|basename|match=^java.*,arg|org.jboss.MainA|match=.*"/>
- <process-scan name="processB" query="process|basename|match=^java.*,arg|org.jboss.MainB|match=.*"/>
-
- <operation name="start">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <operation name="shutdown">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <operation name="restart">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
- <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
-
- <event name="logAEntry" description="an entry was appended to a log file"/>
- <event name="logCEntry" description="an entry was appended to a log file"/>
-
- <content name="ServerA.Content.1" category="configuration">
- <configuration>
- <c:simple-property name="ServerA.Content.1.property1"/>
- <c:simple-property name="ServerA.Content.1.property2"/>
- </configuration>
- </content>
-
- <content name="ServerA.Content.3" category="deployable">
- <configuration>
- <c:simple-property name="ServerA.Content.3.version"/>
- </configuration>
- </content>
-
- <drift-definition name="drift-rc">
- <basedir>
- <!-- this resource doesn't really have this resource config prop
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>resourceConfiguration</value-context>
- <value-name>resourceConfig1</value-name>
- </basedir>
- </drift-definition>
-
- <drift-definition name="drift-mt">
- <basedir>
- <!-- this resource doesn't really have this metric trait
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>measurementTrait</value-context>
- <value-name>trait1</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="bundleTarget-rc" description="rc-description">
- <!-- this resource doesn't really have this resource config prop
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>resourceConfiguration</value-context>
- <value-name>resourceConfig1</value-name>
- </destination-base-dir>
- <destination-base-dir name="bundleTarget-mt" description="mt-description">
- <!-- this resource doesn't really have this metric trait
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>measurementTrait</value-context>
- <value-name>trait1</value-name>
- </destination-base-dir>
- </bundle-target>
-
- <service name="Child1"/>
- <service name="Child3"/>
- </server>
-
- <server name="ServerB" description="Server B description">
- <service name="Child2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
deleted file mode 100644
index 460954b..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerWithBundleAndDriftConfig">
- <drift-definition name="drift1">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/dirA</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="destdir1">
- <value-context>fileSystem</value-context>
- <value-name>/dirB</value-name>
- </destination-base-dir>
- </bundle-target>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
deleted file mode 100644
index c92919d..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerWithBundleAndDriftConfig">
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
deleted file mode 100644
index 60a9f93..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerC" description="Server C description">
-
- <subcategories>
- <subcategory name="ServerC.Category1">
- <subcategory name="ServerC.NestedCategory1"/>
- </subcategory>
- <subcategory name="ServerC.Category2"/>
- </subcategories>
-
- <bundle type="Test Bundle"/>
-
- <process-scan name="scan1" query="process|basename|match=^java.*,arg|org.rhq.serverC1|match=.*"/>
- <process-scan name="scan2" query="process|basename|match=^java.*,arg|org.rhq.serverC2|match=.*"/>
-
- <operation name="run">
- <parameters>
- <c:simple-property name="script"/>
- </parameters>
- <results>
- <c:simple-property name="errors"/>
- </results>
- </operation>
-
- <metric displayName="Metric 1" property="ServerC::metric1" displayType="summary" defaultInterval="300000"/>
-
- <event name="serverCEvent" description="an entry was appended to a log file"/>
-
- <content name="ServerC.Content" category="deployable">
- <configuration>
- <c:simple-property name="ServerC.Content.version"/>
- </configuration>
- </content>
- </server>
-
- <server name="ServerD">
- <service name="ServerD.Child1">
- <service name="ServerD.GrandChild1"/>
- </service>
- </server>
-
- <server name="ServerE">
- <service name="ServiceE1">
- <service name="ServiceE2">
- <service name="ServiceE3">
- <service name="serviceE4"/>
- </service>
- </service>
- </service>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
deleted file mode 100644
index 6b0cdb0..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerD">
- <service name="ServerD.GrandChild1"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..3b9ad64
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,8 @@
+<plugin name="AlertMetadataManagerBeanTestPlugin"
+ displayName="AlertMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="AlertServer"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..f2664dc
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,7 @@
+<plugin name="AlertMetadataManagerBeanTestPlugin"
+ displayName="AlertMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..79f9296
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,45 @@
+<plugin name="ContentMetadataManagerBeanTestPlugin"
+ displayName="ContentMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ContentServer">
+ <content name="ContentServer.Content.1" category="deployable"/>
+ </server>
+
+ <server name="ContentServer1"/>
+
+ <server name="ContentServer2">
+ <content name="ContentServer2.Content.1" category="executableScript"/>
+ </server>
+
+ <server name="ContentServer3">
+ <content name="ContentServer3.Content.1" category="deployable"/>
+ <content name="ContentServer3.Content.2" category="deployable"/>
+ <content name="ContentServer3.Content.3" category="deployable"/>
+ </server>
+
+ <server name="ContentServer4">
+ <content name="ContentServer4.Content.1" category="deployable"/>
+ </server>
+
+ <server name="ContentServer5">
+ <content name="ContentServer5.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="x"/>
+ </configuration>
+ </content>
+ <content name="ContentServer5.Content.2" category="deployable">
+ <configuration>
+ <c:simple-property name="x"/>
+ </configuration>
+ </content>
+ </server>
+
+ <server name="ContentServer6"/>
+
+ <server name="ContentServer7">
+ <bundle type="ContentServer.Bundle.1"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..f0cd7b8
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,49 @@
+<plugin name="ContentMetadataManagerBeanTestPlugin"
+ displayName="ContentMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ContentServer">
+ <content name="ContentServer.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="version"/>
+ </configuration>
+ </content>
+ </server>
+
+ <server name="ContentServer1">
+ <content name="ContentServer1.Content.1" category="deployable"/>
+ <content name="ContentServer1.Content.2" category="configuration"/>
+ </server>
+
+ <server name="ContentServer2"/>
+
+ <server name="ContentServer3">
+ <content name="ContentServer3.Content.2" category="deployable"/>
+ <content name="ContentServer3.Content.3" category="deployable"/>
+ </server>
+
+ <server name="ContentServer4">
+ <content name="ContentServer4.Content.1" category="deployable"/>
+ <content name="ContentServer4.Content.2" category="deployable"/>
+ </server>
+
+ <server name="ContentServer5">
+ <content name="ContentServer5.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="x"/>
+ <c:simple-property name="y"/>
+ </configuration>
+ </content>
+ <content name="ContentServer5.Content.2" category="deployable"/>
+ </server>
+
+ <server name="ContentServer6">
+ <bundle type="ContentServer6.Bundle.1"/>
+ </server>
+
+ <server name="ContentServer7">
+ <bundle type="ContentServer.Bundle.2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..2786b05
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,23 @@
+<plugin name="EventMetadataManagerBeanTestPlugin"
+ displayName="MeasurementMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="EventServer1">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer2"/>
+
+ <server name="EventServer3">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer4">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..f4f765f
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,23 @@
+<plugin name="EventMetadataManagerBeanTestPlugin"
+ displayName="ContentMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="EventServer1">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer2">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer3"/>
+
+ <server name="EventServer4">
+ <event name="event1" description="EVENT ONE"/>
+ <event name="event3" description="Event 3"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..0202079
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,48 @@
+<plugin name="MeasurementMetadataManagerBeanTestPlugin"
+ displayName="MeasurementMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="MetricServer1">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
+ description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
+ units="megabytes" measurementType="trendsup"/>
+ <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
+ description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
+ units="milliseconds" destinationType="myMethod"/>
+ </server>
+ <server name="MetricServer2"/>
+ <server name="MetricServer3">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+
+ <service name="MetricService1">
+ <metric property="rhq.availability" defaultInterval="120000" defaultOn="false" />
+ </service>
+ <service name="MetricService2" />
+ </server>
+ <server name="MetricServer4">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ </server>
+ <server name="MetricServer5">
+ <!--
+ Need to use names for these metrics that are unique across the plugin because the resource
+ type will be deleted and the metric definition cannot be looked up by resource type. We will
+ instead look them up by name only.
+ -->
+ <metric displayName="metric1" property="MetricServer5.metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ <metric displayName="metric3" property="MetricServer5.metric3" dataType="calltime" displayType="detail"
+ description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
+ units="milliseconds" destinationType="myMethod"/>
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..d949778
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,40 @@
+<plugin name="MeasurementMetadataManagerBeanTestPlugin"
+ displayName="MeasurementMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="MetricServer1">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
+ description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
+ units="megabytes" measurementType="trendsup"/>
+ <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
+ description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
+ units="milliseconds" destinationType="myMethod"/>
+ <metric displayName="cannotBeSet" property="rhq.availability"
+ description="cannotBeSet" defaultInterval="120000" defaultOn="true"/>
+ </server>
+ <server name="MetricServer2">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ </server>
+ <server name="MetricServer3">
+ <metric displayName="metric1" property="metric1" dataType="measurement" displayType="detail"
+ description="Metric One" category="performance" defaultInterval="60000" defaultOn="false"
+ units="milliseconds" measurementType="trendsup"/>
+
+ <service name="MetricService1">
+ <metric displayName="cannotBeSet" property="rhq.availability"
+ description="cannotBeSet" defaultInterval="240000" defaultOn="true" />
+ </service>
+ <service name="MetricService2">
+ <metric displayName="cannotBeSet" property="rhq.availability"
+ description="cannotBeSet" defaultInterval="480000" defaultOn="true" />
+ </service>
+ </server>
+ <server name="MetricServer4"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
new file mode 100644
index 0000000..e914562
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
@@ -0,0 +1,298 @@
+<dataset>
+ <rhq_config_def/>
+ <rhq_config_prop_grp_def/>
+ <rhq_config_prop_def/>
+ <rhq_config_pd_osrc/>
+ <rhq_conf_prop_def_enum/>
+ <rhq_config_prop_constr/>
+ <rhq_config/>
+ <rhq_config_property/>
+ <rhq_config_template/>
+ <rhq_raw_config/>
+ <rhq_affinity_group/>
+ <rhq_server/>
+ <rhq_agent/>
+ <rhq_partition_event/>
+ <rhq_partition_details/>
+ <rhq_failover_list/>
+ <rhq_failover_details/>
+ <rhq_principal id="2" PRINCIPAL="rhqadmin" PASSWORD="x1XwrxKuPvYUILiOnOZTLg=="/>
+ <rhq_subject
+ ID="1"
+ NAME="admin"
+ FIRST_NAME="Super"
+ LAST_NAME="User"
+ FSYSTEM="1"/>
+ <rhq_subject
+ ID="2"
+ NAME="rhqadmin"
+ FIRST_NAME="RHQ"
+ LAST_NAME="Administrator"
+ EMAIL_ADDRESS="nobody@localhost"
+ FSYSTEM="0"/>
+ <rhq_resource_type/>
+ <rhq_resource_subcat/>
+ <rhq_resource_type_parents/>
+ <rhq_process_scan/>
+ <rhq_prd_ver/>
+ <rhq_resource/>
+ <rhq_resource_error/>
+ <rhq_group_def/>
+ <rhq_resource_group/>
+ <rhq_resource_group_res_imp_map/>
+ <rhq_resource_group_res_exp_map/>
+ <rhq_config_group_update/>
+ <rhq_config_update/>
+ <rhq_tagging/>
+ <rhq_tagging_resource_map/>
+ <rhq_tagging_res_group_map/>
+ <rhq_role
+ ID="1"
+ NAME="Super User Role"
+ FSYSTEM="1"
+ DESCRIPTION="System superuser role that provides full access to everything. This role cannot be modified."/>
+ <rhq_role
+ ID="2"
+ NAME="All Resources Role"
+ FSYSTEM="0"
+ DESCRIPTION="Provides full access to all resources in inventory. Cannot modify users, roles or server settings."/>
+ <rhq_role_resource_group_map/>
+ <rhq_role_ldap_group/>
+ <rhq_permission ROLE_ID="1" OPERATION="0"/> <!-- Permission.MANAGE_SECURITY -->
+ <rhq_permission ROLE_ID="1" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
+ <rhq_permission ROLE_ID="1" OPERATION="2"/> <!-- Permission.MANAGE_SETTINGS -->
+ <rhq_permission ROLE_ID="1" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
+ <rhq_permission ROLE_ID="1" OPERATION="15"/> <!-- Permission.MANAGE_REPOSITORIES -->
+ <!-- resource permissions start here-->
+ <rhq_permission ROLE_ID="1" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
+ <rhq_permission ROLE_ID="1" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
+ <rhq_permission ROLE_ID="1" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
+ <rhq_permission ROLE_ID="1" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <rhq_permission ROLE_ID="1" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
+ <rhq_permission ROLE_ID="1" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
+ <rhq_permission ROLE_ID="1" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
+ <rhq_permission ROLE_ID="1" OPERATION="10"/> <!-- Permission.CONTROL -->
+ <rhq_permission ROLE_ID="1" OPERATION="11"/> <!-- Permission.CONFIGURE -->
+ <rhq_permission ROLE_ID="1" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
+
+ <!-- give all-resources-role all permissions (resource perms is mainly just to show on view-role page) -->
+ <rhq_permission ROLE_ID="2" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
+ <rhq_permission ROLE_ID="2" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
+ <!-- resource permissions start here-->
+ <rhq_permission ROLE_ID="2" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
+ <rhq_permission ROLE_ID="2" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
+ <rhq_permission ROLE_ID="2" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
+ <rhq_permission ROLE_ID="2" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <rhq_permission ROLE_ID="2" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
+ <rhq_permission ROLE_ID="2" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
+ <rhq_permission ROLE_ID="2" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
+ <rhq_permission ROLE_ID="2" OPERATION="10"/> <!-- Permission.CONTROL -->
+ <rhq_permission ROLE_ID="2" OPERATION="11"/> <!-- Permission.CONFIGURE -->
+ <rhq_permission ROLE_ID="2" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
+ <rhq_subject_role_map SUBJECT_ID="1" ROLE_ID="1"/>
+ <rhq_subject_role_map SUBJECT_ID="2" ROLE_ID="1"/>
+ <rhq_subject_role_ldap_map/>
+ <rhq_saved_search/>
+ <rhq_dashboard/>
+ <rhq_dashboard_portlet/>
+ <rhq_operation_def/>
+ <rhq_operation_history/>
+ <rhq_operation_schedule/>
+ <rhq_event_def/>
+ <rhq_event_source/>
+ <rhq_event/>
+ <rhq_alert_definition/>
+ <rhq_alert_dampen_event/>
+ <rhq_alert_condition/>
+ <rhq_alert/>
+ <rhq_alert_notif_log/>
+ <rhq_alert_condition_log/>
+ <rhq_alert_notification/>
+ <rhq_plugin/>
+ <rhq_measurement_def/>
+ <rhq_measurement_sched/>
+ <rhq_measurement_bline/>
+ <rhq_measurement_data_num_1h/>
+ <rhq_measurement_data_num_6h/>
+ <rhq_measurement_data_num_1d/>
+ <rhq_measurement_data_trait/>
+ <rhq_calltime_data_key/>
+ <rhq_calltime_data_value/>
+ <rhq_availability/>
+ <rhq_resource_avail/>
+ <rhq_measurement_oob/>
+ <rhq_measurement_oob_tmp/>
+ <rhq_numbers i="0"/>
+ <rhq_numbers i="1"/>
+ <rhq_numbers i="2"/>
+ <rhq_numbers i="3"/>
+ <rhq_numbers i="4"/>
+ <rhq_numbers i="5"/>
+ <rhq_numbers i="6"/>
+ <rhq_numbers i="7"/>
+ <rhq_numbers i="8"/>
+ <rhq_numbers i="9"/>
+ <rhq_numbers i="10"/>
+ <rhq_numbers i="11"/>
+ <rhq_numbers i="12"/>
+ <rhq_numbers i="13"/>
+ <rhq_numbers i="14"/>
+ <rhq_numbers i="15"/>
+ <rhq_numbers i="16"/>
+ <rhq_numbers i="17"/>
+ <rhq_numbers i="18"/>
+ <rhq_numbers i="19"/>
+ <rhq_numbers i="20"/>
+ <rhq_numbers i="21"/>
+ <rhq_numbers i="22"/>
+ <rhq_numbers i="23"/>
+ <rhq_numbers i="24"/>
+ <rhq_numbers i="25"/>
+ <rhq_numbers i="26"/>
+ <rhq_numbers i="27"/>
+ <rhq_numbers i="28"/>
+ <rhq_numbers i="29"/>
+ <rhq_numbers i="30"/>
+ <rhq_numbers i="31"/>
+ <rhq_numbers i="32"/>
+ <rhq_numbers i="33"/>
+ <rhq_numbers i="34"/>
+ <rhq_numbers i="35"/>
+ <rhq_numbers i="36"/>
+ <rhq_numbers i="37"/>
+ <rhq_numbers i="38"/>
+ <rhq_numbers i="39"/>
+ <rhq_numbers i="40"/>
+ <rhq_numbers i="41"/>
+ <rhq_numbers i="42"/>
+ <rhq_numbers i="43"/>
+ <rhq_numbers i="44"/>
+ <rhq_numbers i="45"/>
+ <rhq_numbers i="46"/>
+ <rhq_numbers i="47"/>
+ <rhq_numbers i="48"/>
+ <rhq_numbers i="49"/>
+ <rhq_numbers i="50"/>
+ <rhq_numbers i="51"/>
+ <rhq_numbers i="52"/>
+ <rhq_numbers i="53"/>
+ <rhq_numbers i="54"/>
+ <rhq_numbers i="55"/>
+ <rhq_numbers i="56"/>
+ <rhq_numbers i="57"/>
+ <rhq_numbers i="58"/>
+ <rhq_numbers i="59"/>
+ <rhq_meas_data_num_r00/>
+ <rhq_meas_data_num_r01/>
+ <rhq_meas_data_num_r02/>
+ <rhq_meas_data_num_r03/>
+ <rhq_meas_data_num_r04/>
+ <rhq_meas_data_num_r05/>
+ <rhq_meas_data_num_r06/>
+ <rhq_meas_data_num_r07/>
+ <rhq_meas_data_num_r08/>
+ <rhq_meas_data_num_r09/>
+ <rhq_meas_data_num_r10/>
+ <rhq_meas_data_num_r11/>
+ <rhq_meas_data_num_r12/>
+ <rhq_meas_data_num_r13/>
+ <rhq_meas_data_num_r14/>
+ <rhq_architecture id="1" name="noarch"/>
+ <rhq_architecture id="2" name="i386"/>
+ <rhq_architecture id="3" name="i486"/>
+ <rhq_architecture id="4" name="i586"/>
+ <rhq_architecture id="5" name="i686"/>
+ <rhq_architecture id="6" name="alpha"/>
+ <rhq_architecture id="7" name="alphaev6"/>
+ <rhq_architecture id="8" name="ia64"/>
+ <rhq_architecture id="9" name="sparc"/>
+ <rhq_architecture id="10" name="sparcv9"/>
+ <rhq_architecture id="11" name="sparc64"/>
+ <rhq_architecture id="12" name="src"/>
+ <rhq_architecture id="13" name="s390"/>
+ <rhq_architecture id="14" name="athlon"/>
+ <rhq_architecture id="15" name="s390x"/>
+ <rhq_architecture id="16" name="ppc"/>
+ <rhq_architecture id="17" name="ppc64"/>
+ <rhq_architecture id="18" name="pSeries"/>
+ <rhq_architecture id="19" name="iSeries"/>
+ <rhq_architecture id="20" name="x86_64"/>
+ <rhq_architecture id="21" name="ppc64iseries"/>
+ <rhq_architecture id="22" name="ppc64pseries"/>
+ <rhq_architecture id="23" name="sparc-solaris"/>
+ <rhq_architecture id="24" name="sparc.sun4u-solaris"/>
+ <rhq_architecture id="25" name="tar"/>
+ <rhq_architecture id="26" name="ia32e"/>
+ <rhq_architecture id="27" name="amd64"/>
+ <rhq_architecture id="28" name="i386-solaris"/>
+ <rhq_architecture id="29" name="nosrc"/>
+ <rhq_architecture id="30" name="sparc-solaris-patch"/>
+ <rhq_architecture id="31" name="i386-solaris-patch"/>
+ <rhq_architecture id="32" name="sparc-solaris-patch-cluster"/>
+ <rhq_architecture id="33" name="i386-solaris-patch-cluster"/>
+ <rhq_architecture id="34" name="noarch-solaris"/>
+ <rhq_architecture id="35" name="noarch-solaris-patch"/>
+ <rhq_architecture id="36" name="noarch-solaris-patch-cluster"/>
+ <rhq_architecture id="37" name="solaris-patch"/>
+ <rhq_architecture id="38" name="solaris-patch-cluster"/>
+ <rhq_repo_group_type id="1" name="family"/>
+ <rhq_repo_group/>
+ <rhq_content_source_type/>
+ <rhq_content_source/>
+ <rhq_repo/>
+ <rhq_repo_relation_type id="1" name="parent"/>
+ <rhq_repo_relation_type id="2" name="clone"/>
+ <rhq_repo_relation/>
+ <rhq_package_type/>
+ <rhq_package/>
+ <rhq_package_bits/>
+ <rhq_package_version/>
+ <rhq_content_req/>
+ <rhq_installed_package/>
+ <rhq_installed_pkg_hist/>
+ <rhq_content_src_sync/>
+ <rhq_repo_sync/>
+ <rhq_package_inst_step/>
+ <rhq_repo_resource_map/>
+ <rhq_repo_content_src_map/>
+ <rhq_repo_repo_group_map/>
+ <rhq_repo_repo_relation_map/>
+ <rhq_repo_pkg_version_map/>
+ <rhq_pkg_ver_content_src_map/>
+ <rhq_pkg_prd_map/>
+ <rhq_distribution_type id="1" name="kickstart" description="Linux kickstart distribution"/>
+ <rhq_distribution_type id="2" name="jumpstart" description="solaris jumpstart distribution"/>
+ <rhq_distribution/>
+ <rhq_repo_distribution/>
+ <rhq_distribution_file/>
+ <rhq_advisory/>
+ <rhq_advisory_package/>
+ <rhq_cve/>
+ <rhq_advisory_cve/>
+ <rhq_advisory_buglist/>
+ <rhq_repo_advisory/>
+ <rhq_bundle_type/>
+ <rhq_bundle/>
+ <rhq_bundle_version/>
+ <rhq_bundle_version_repo/>
+ <rhq_bundle_file/>
+ <rhq_bundle_destination/>
+ <rhq_bundle_deployment/>
+ <rhq_bundle_res_deploy/>
+ <rhq_bundle_res_dep_hist/>
+ <rhq_tagging_bundle_map/>
+ <rhq_tagging_bundle_version_map/>
+ <rhq_tagging_bundle_deploy_map/>
+ <rhq_tagging_bundle_dest_map/>
+ <rhq_create_res_hist/>
+ <rhq_delete_res_hist/>
+ <rhq_drift_def_template/>
+ <rhq_drift_definition/>
+ <rhq_drift_change_set/>
+ <jms_messages/>
+ <jms_transactions/>
+ <jms_users/>
+ <jms_roles/>
+ <jms_subscriptions/>
+</dataset>
+
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
new file mode 100644
index 0000000..befc699
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
@@ -0,0 +1,19 @@
+<plugin name="PluginExtensionMetadataChild1TestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Child 1 Test Plugin"
+ package="org.rhq.plugins.test.child1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="OuterServerA">
+ <server name="Child1ServerA"
+ description="Child 1 Server type that extends Parent Server type"
+ discovery="Child1DiscoveryComponent"
+ class="Child1Component"
+ sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
new file mode 100644
index 0000000..0dafa9b
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
@@ -0,0 +1,19 @@
+<plugin name="PluginExtensionMetadataChild2TestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Child 2 Test Plugin"
+ package="org.rhq.plugins.test.child2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+
+ <server name="Child2ServerA"
+ description="Child 2 Server type that extends Parent Server type"
+ discovery="Child2DiscoveryComponent"
+ class="Child2Component"
+ sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
new file mode 100644
index 0000000..627c5a8
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
@@ -0,0 +1,18 @@
+<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
+ version="1.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op" timeout="123456" description="a op"></operation>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
new file mode 100644
index 0000000..2c0e9d8
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
@@ -0,0 +1,18 @@
+<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
+ version="2.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
new file mode 100644
index 0000000..08ea056
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
@@ -0,0 +1,29 @@
+<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataChildTestPlugin"
+ version="1.0"
+ displayName="Multiple Plugin Extension Single Descriptor Metadata Child Test Plugin"
+ package="org.rhq.plugins.test.child"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="OuterServerA">
+ <server name="Child1ServerA"
+ description="Child 1 Server type that extends Parent Server type"
+ discovery="Child1DiscoveryComponent"
+ class="Child1Component"
+ sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+ </server>
+
+ <server name="OuterServerB">
+ <server name="Child2ServerA"
+ description="Child 2 Server type that extends Parent Server type"
+ discovery="Child2DiscoveryComponent"
+ class="Child2Component"
+ sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
new file mode 100644
index 0000000..be977e7
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
@@ -0,0 +1,24 @@
+<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ version="1.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op" timeout="123456" description="a op"></operation>
+
+ <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
+ <service name="InnerServiceA">
+ <metric property="inner-A-metric" />
+ </service>
+ -->
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
new file mode 100644
index 0000000..9f02834
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
@@ -0,0 +1,24 @@
+<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ version="2.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
+
+ <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
+ <service name="InnerServiceA">
+ <metric property="inner-A-metric" />
+ </service>
+ -->
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..93a15ef
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,42 @@
+<plugin name="OperationMetadataManagerBeanTestPlugin"
+ displayName="OperationMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="OperationServer1">
+ <operation name="OperationServer1.Operation1"/>
+ </server>
+ <server name="OperationServer11">
+ <operation name="OperationServer11.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ <c:simple-property name="param2"/>
+ </parameters>
+ </operation>
+ </server>
+
+ <server name="OperationServer2"/>
+ <server name="OperationServer21">
+ <operation name="OperationServer21.Operation1"/>
+ </server>
+ <server name="OperationServer22">
+ <operation name="OperationServer22.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ <c:simple-property name="param2"/>
+ </parameters>
+ </operation>
+ </server>
+ <server name="OperationServer23">
+ <operation name="OperationServer23.Operation1"/>
+ </server>
+ <server name="OperationServer24">
+ <operation name="OperationServer24.Operation1"/>
+ <operation name="OperationServer24.Operation2">
+ <results>
+ <c:simple-property name="exitCode"/>
+ </results>
+ </operation>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..a86fbcf
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,41 @@
+<plugin name="OperationMetadataManagerBeanTestPlugin"
+ displayName="OperationMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="OperationServer1">
+ <operation name="OperationServer1.Operation1"/>
+ </server>
+ <server name="OperationServer11">
+ <operation name="OperationServer11.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ <c:simple-property name="param2"/>
+ </parameters>
+ </operation>
+ </server>
+
+ <server name="OperationServer2">
+ <operation name="OperationServer2.Operation1"/>
+ </server>
+ <server name="OperationServer21"/>
+ <server name="OperationServer22">
+ <operation name="OperationServer22.Operation1"/>
+ </server>
+ <server name="OperationServer23">
+ <operation name="OperationServer23.Operation1">
+ <results>
+ <c:simple-property name="exitCode"/>
+ </results>
+ </operation>
+ </server>
+ <server name="OperationServer24">
+ <operation name="OperationServer24.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ </parameters>
+ </operation>
+ <operation name="OperationServer24.Operation2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
new file mode 100644
index 0000000..ddedf10
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
@@ -0,0 +1,17 @@
+<plugin name="PluginExtensionMetadataChildTestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Child Test Plugin"
+ package="org.rhq.plugins.test.child"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ChildServerA"
+ description="Child Server type that extends Parent Server type"
+ discovery="ChildDiscoveryComponent"
+ class="ChildComponent"
+ sourcePlugin="PluginExtensionMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
new file mode 100644
index 0000000..e640187
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
@@ -0,0 +1,49 @@
+<plugin name="PluginExtensionMetadataParentTestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <subcategories>
+ <subcategory name="A-subcat" displayName="a subcat"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:group name="A-pc-group" hiddenByDefault="true">
+ <c:simple-property name="A-pc-prop" description="test plugin config prop" required="false" />
+ </c:group>
+ </plugin-configuration>
+
+ <process-scan name="A-process-scan" query="process|basename|match=A.exe"/>
+ <operation name="A-op" timeout="123456" description="a op"></operation>
+ <metric property="A-metric" defaultInterval="123456"></metric>
+ <event name="A-event" description="a event"></event>
+
+ <resource-configuration>
+ <c:simple-property name="A-rc-prop" description="test resource config prop" required="false" />
+ </resource-configuration>
+
+ <drift-definition name="A-drift-def">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>A-pc-prop</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="A-bundle-basedir">
+ <value-context>resourceConfiguration</value-context>
+ <value-name>A-rc-prop</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
new file mode 100644
index 0000000..b0d4027
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
@@ -0,0 +1,67 @@
+<plugin name="PluginExtensionMetadataParentTestPlugin"
+ version="2.0"
+ displayName="Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <subcategories>
+ <subcategory name="A-subcat" displayName="a subcat"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:group name="A-pc-group" hiddenByDefault="false">
+ <c:simple-property name="A-pc-prop-CHANGED" description="A-pc-prop desc 1" required="true" />
+ </c:group>
+ <c:group name="A-pc-group-NEW" hiddenByDefault="true">
+ <c:simple-property name="A-pc-prop-NEW" description="A-pc-prop desc 2" required="false" />
+ </c:group>
+ </plugin-configuration>
+
+ <process-scan name="A-process-scan" query="process|basename|match=CHANGED.exe"/> <!-- CHANGED, but same name -->
+ <process-scan name="A-process-scan-NEW" query="process|basename|match=NEW.exe"/>
+ <operation name="A-op" timeout="987654" description="a changed op"></operation> <!-- CHANGED, but same name -->
+ <operation name="A-op-NEW" timeout="111111" description="a new op"></operation>
+ <metric property="A-metric" defaultInterval="555555"></metric> <!-- CHANGED, but same name -->
+ <metric property="A-metric-NEW" defaultInterval="98765"></metric>
+ <event name="A-event-CHANGED" description="a changed event"></event>
+ <event name="A-event-NEW" description="a new event"></event>
+
+ <resource-configuration>
+ <c:simple-property name="A-rc-prop-CHANGED" description="test resource config prop 1" required="true" />
+ <c:simple-property name="A-rc-prop-NEW" description="test resource config prop 2" required="false" />
+ </resource-configuration>
+
+ <drift-definition name="A-drift-def-CHANGED">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>A-pc-prop</value-name>
+ </basedir>
+ </drift-definition>
+ <drift-definition name="A-drift-def-NEW">
+ <basedir>
+ <value-context>resourceConfiguration</value-context>
+ <value-name>A-rc-prop</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="A-bundle-basedir-CHANGED">
+ <value-context>resourceConfiguration</value-context>
+ <value-name>A-rc-prop</value-name>
+ </destination-base-dir>
+ <destination-base-dir name="A-bundle-basedir-NEW">
+ <value-context>pluginConfiguration</value-context>
+ <value-name>A-pc-prop</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
new file mode 100644
index 0000000..6680aa6
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
@@ -0,0 +1,7 @@
+<plugin name="PluginManagerBeanTestPlugin1"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="TestServer1"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
new file mode 100644
index 0000000..c6f8736
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
@@ -0,0 +1,10 @@
+<plugin name="PluginManagerBeanTestPlugin2"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <depends plugin="PluginManagerBeanTestPlugin1" useClasses="true"/>
+
+ <server name="TestServer2"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
new file mode 100644
index 0000000..e885167
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
@@ -0,0 +1,8 @@
+<plugin name="PluginManagerBeanTestPlugin3.1"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="TestServer3.1"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
new file mode 100644
index 0000000..78184bf
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
@@ -0,0 +1,8 @@
+<plugin name="PluginManagerBeanTestPlugin3"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="TestServer3"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
new file mode 100644
index 0000000..bd9728b
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
@@ -0,0 +1,19 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerWithDupDrift" description="has duplicate drift config names and thus is invalid">
+ <drift-definition name="drift-one">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/a</value-name>
+ </basedir>
+ </drift-definition>
+ <drift-definition name="drift-one">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/b</value-name>
+ </basedir>
+ </drift-definition>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
new file mode 100644
index 0000000..853e423
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
@@ -0,0 +1,29 @@
+<plugin name="ParentResourceTypeTestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="Server A First Level" description="Server A description">
+ <server name="Server B Second Level" description="Server B description"/>
+ <service name="Service A Second Level" description="Service A description"/>
+ </server>
+
+ <server name="Server C First Level" description="Server C description">
+ <runs-inside>
+ <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
+ </runs-inside>
+ </server>
+
+ <service name="Service B First Level" description="Service B description">
+ <runs-inside>
+ <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
+ </runs-inside>
+ </service>
+
+ <service name="Service C First Level" description="Service C description">
+ <runs-inside>
+ <parent-resource-type name="Service A Second Level" plugin="ParentResourceTypeTestPlugin"/>
+ </runs-inside>
+ </service>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..88cd39c
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,92 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerA" description="Server A description">
+ <subcategories>
+ <subcategory name="Resources" description="Resources subcategory"/>
+ <subcategory name="Applications" description="Applications subcategory"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:simple-property name="connectionPropertyX" default="x"/>
+ <c:simple-property name="connectionPropertyY" default="y"/>
+ </plugin-configuration>
+
+ <process-scan name="serverA" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
+
+ <operation name="start">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <operation name="stop">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
+ <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
+
+ <event name="logAEntry" description="an entry was appended to a log file"/>
+ <event name="logBEntry" description="an entry was appended to a log file"/>
+
+ <content name="ServerA.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerA.Content.1.version"/>
+ </configuration>
+ </content>
+
+ <content name="ServerA.Content.2" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerA.Content.2.version"/>
+ </configuration>
+ </content>
+
+ <drift-definition name="drift-pc">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>connectionPropertyX</value-name>
+ </basedir>
+ <interval>123456</interval>
+ <includes>
+ <include path="foo/bar" pattern="**/*.blech"/>
+ </includes>
+ <excludes>
+ <exclude path="/wot/gorilla" pattern="*.xml" />
+ <exclude path="/hello"/>
+ </excludes>
+ </drift-definition>
+
+ <drift-definition name="drift-fs">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="bundleTarget-pc" description="pc-description">
+ <value-context>pluginConfiguration</value-context>
+ <value-name>connectionPropertyY</value-name>
+ </destination-base-dir>
+ <destination-base-dir name="bundleTarget-fs"> <!-- note: no description, so we can test for proper null handling -->
+ <value-context>fileSystem</value-context>
+ <value-name>/wot/gorilla</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ <service name="Child1" description="Child 1 description"/>
+ <service name="Child2" description="Child 2 description"/>
+ </server>
+
+ <server name="ServerB" description="Server B description"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..a89f679
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,110 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerA" description="Server A description">
+
+ <subcategories>
+ <subcategory name="Resources" description="Resources subcategory"/>
+ <subcategory name="Applications" description="Applications subcategory"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:simple-property name="connectionPropertyX" default="x"/>
+ <c:simple-property name="connectionPropertyY" default="y"/>
+ </plugin-configuration>
+
+ <process-scan name="processA" query="process|basename|match=^java.*,arg|org.jboss.MainA|match=.*"/>
+ <process-scan name="processB" query="process|basename|match=^java.*,arg|org.jboss.MainB|match=.*"/>
+
+ <operation name="start">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <operation name="shutdown">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <operation name="restart">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
+ <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
+
+ <event name="logAEntry" description="an entry was appended to a log file"/>
+ <event name="logCEntry" description="an entry was appended to a log file"/>
+
+ <content name="ServerA.Content.1" category="configuration">
+ <configuration>
+ <c:simple-property name="ServerA.Content.1.property1"/>
+ <c:simple-property name="ServerA.Content.1.property2"/>
+ </configuration>
+ </content>
+
+ <content name="ServerA.Content.3" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerA.Content.3.version"/>
+ </configuration>
+ </content>
+
+ <drift-definition name="drift-rc">
+ <basedir>
+ <!-- this resource doesn't really have this resource config prop
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>resourceConfiguration</value-context>
+ <value-name>resourceConfig1</value-name>
+ </basedir>
+ </drift-definition>
+
+ <drift-definition name="drift-mt">
+ <basedir>
+ <!-- this resource doesn't really have this metric trait
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>measurementTrait</value-context>
+ <value-name>trait1</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="bundleTarget-rc" description="rc-description">
+ <!-- this resource doesn't really have this resource config prop
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>resourceConfiguration</value-context>
+ <value-name>resourceConfig1</value-name>
+ </destination-base-dir>
+ <destination-base-dir name="bundleTarget-mt" description="mt-description">
+ <!-- this resource doesn't really have this metric trait
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>measurementTrait</value-context>
+ <value-name>trait1</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ <service name="Child1"/>
+ <service name="Child3"/>
+ </server>
+
+ <server name="ServerB" description="Server B description">
+ <service name="Child2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
new file mode 100644
index 0000000..460954b
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
@@ -0,0 +1,20 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerWithBundleAndDriftConfig">
+ <drift-definition name="drift1">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/dirA</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="destdir1">
+ <value-context>fileSystem</value-context>
+ <value-name>/dirB</value-name>
+ </destination-base-dir>
+ </bundle-target>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
new file mode 100644
index 0000000..c92919d
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
@@ -0,0 +1,7 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerWithBundleAndDriftConfig">
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
new file mode 100644
index 0000000..60a9f93
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
@@ -0,0 +1,54 @@
+<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerC" description="Server C description">
+
+ <subcategories>
+ <subcategory name="ServerC.Category1">
+ <subcategory name="ServerC.NestedCategory1"/>
+ </subcategory>
+ <subcategory name="ServerC.Category2"/>
+ </subcategories>
+
+ <bundle type="Test Bundle"/>
+
+ <process-scan name="scan1" query="process|basename|match=^java.*,arg|org.rhq.serverC1|match=.*"/>
+ <process-scan name="scan2" query="process|basename|match=^java.*,arg|org.rhq.serverC2|match=.*"/>
+
+ <operation name="run">
+ <parameters>
+ <c:simple-property name="script"/>
+ </parameters>
+ <results>
+ <c:simple-property name="errors"/>
+ </results>
+ </operation>
+
+ <metric displayName="Metric 1" property="ServerC::metric1" displayType="summary" defaultInterval="300000"/>
+
+ <event name="serverCEvent" description="an entry was appended to a log file"/>
+
+ <content name="ServerC.Content" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerC.Content.version"/>
+ </configuration>
+ </content>
+ </server>
+
+ <server name="ServerD">
+ <service name="ServerD.Child1">
+ <service name="ServerD.GrandChild1"/>
+ </service>
+ </server>
+
+ <server name="ServerE">
+ <service name="ServiceE1">
+ <service name="ServiceE2">
+ <service name="ServiceE3">
+ <service name="serviceE4"/>
+ </service>
+ </service>
+ </service>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
new file mode 100644
index 0000000..6b0cdb0
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
@@ -0,0 +1,8 @@
+<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerD">
+ <service name="ServerD.GrandChild1"/>
+ </server>
+</plugin>
\ No newline at end of file
commit 4e826fb67ab76b81338a88983405cd10602b48f9
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 27 17:17:35 2012 -0500
Make a note that this src branch should go away after the jndi asccess
tests have been fixed. The new home is in server/itests-2.
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
index abfd376..05c59b6 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
+++ b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
@@ -51,7 +51,12 @@ import org.rhq.jndi.AllowRhqServerInternalsAccessPermission;
import org.rhq.test.PortScout;
/**
+ *
+ * !!!!!!! THIS TEST CLASS HAS BEEN MOVED TO ENTERPRISE/SERVER/ITESTS-2 !!!!!!
*
+ * TODO: since this class has been updated and now differs from the version in itests-2 it is left here for
+ * reference. Also, the jndi access strategy needs to be updated for AS7. When all is settled, this
+ * whole src branch should be deleted.
*
* @author Lukas Krejci
*/
commit b450670dad5fee5909ca21a417249d76c24911aa
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 27 17:16:52 2012 -0500
Fix version of javax mail to be the version provided by AS7.
diff --git a/.classpath b/.classpath
index 4470eb3..996b0fc 100644
--- a/.classpath
+++ b/.classpath
@@ -229,7 +229,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1.jar" sourcepath="/M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/mc4j/org-mc4j-ems/1.3/org-mc4j-ems-1.3.jar" sourcepath="/M2_REPO/mc4j/org-mc4j-ems/1.3/org-mc4j-ems-1.3-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/opensymphony/quartz/quartz/1.6.5/quartz-1.6.5.jar" sourcepath="/M2_REPO/org/opensymphony/quartz/quartz/1.6.5/quartz-1.6.5-sources.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/javax/mail/mail/1.4.4/mail-1.4.4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.3.3.Final/richfaces-api-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-api/3.1.3.GA/richfaces-api-3.1.3.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.3.Final/richfaces-impl-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0.GA/richfaces-impl-3.3.0.GA-sources.jar"/>
commit 257e056801c29bc241b7c292008326be14faffb9
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Thu Nov 29 14:54:08 2012 +0100
[BZ-871873] Availability check change is not automatically picked up
Set availability schedule data if present in ResourceMeasurementScheduleRequest
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
index 3bb1f99..8e8c399 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
@@ -123,6 +123,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
super(MeasurementAgentService.class);
}
+ @Override
public void initialize() {
LOG.info("Initializing Measurement Manager...");
@@ -167,6 +168,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
class MeasurementCollectionRequester implements Runnable {
+ @Override
public void run() {
try {
while (!collectorThreadPool.isShutdown()) {
@@ -288,6 +290,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
}
+ @Override
public void shutdown() {
PluginContainer pluginContainer = PluginContainer.getInstance();
@@ -311,6 +314,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
}
+ @Override
public void setConfiguration(PluginContainerConfiguration configuration) {
this.configuration = configuration;
}
@@ -324,16 +328,22 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
*
* @param scheduleRequests
*/
+ @Override
public synchronized void updateCollection(Set<ResourceMeasurementScheduleRequest> scheduleRequests) {
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
for (ResourceMeasurementScheduleRequest resourceRequest : scheduleRequests) {
ResourceContainer resourceContainer = im.getResourceContainer(resourceRequest.getResourceId());
if (resourceContainer != null) {
- resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules()); // this is where we want to update rather than overwrite, right?
-
- // resourceContainer.setMeasurementSchedule(resourceRequest.getMeasurementSchedules());
+ // Update (not overwrite) measurement schedule data ...
+ resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules());
+ // ... and then reschedule collection
scheduleCollection(resourceRequest.getResourceId(), resourceRequest.getMeasurementSchedules());
+ if (resourceRequest.getAvailabilitySchedule() != null) {
+ // Set availability schedule data if present
+ // This method also triggers a reschedule of availability check
+ resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
+ }
} else {
// This will happen when the server sends down schedules to an agent with a cleaned inventory
// Its ok to skip these because the agent will request a reschedule once its been able to synchronize
@@ -359,16 +369,20 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
*
* @param scheduleRequests
*/
+ @Override
public synchronized void scheduleCollection(Set<ResourceMeasurementScheduleRequest> scheduleRequests) {
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
for (ResourceMeasurementScheduleRequest resourceRequest : scheduleRequests) {
ResourceContainer resourceContainer = im.getResourceContainer(resourceRequest.getResourceId());
if (resourceContainer != null) {
- // resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules()); // this is where we want to update rather than overwrite, right?
+ // Set measurement schedule data ...
resourceContainer.setMeasurementSchedule(resourceRequest.getMeasurementSchedules());
- resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
+ // ... and then reschedule collection
scheduleCollection(resourceRequest.getResourceId(), resourceRequest.getMeasurementSchedules());
+ // Set availability schedule data
+ // This method also triggers a reschedule of availability check
+ resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
} else {
// This will happen when the server sends down schedules to an agent with a cleaned inventory
// It's ok to skip these because the agent will request a reschedule once its been able to synchronize
@@ -415,6 +429,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
}
+ @Override
public synchronized void unscheduleCollection(Set<Integer> resourceIds) {
Iterator<ScheduledMeasurementInfo> itr = this.scheduledRequests.iterator();
while (itr.hasNext()) {
@@ -442,6 +457,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
// spinder 12/16/11. BZ 760139. Modified to return empty sets instead of 'null' even for erroneous conditions.
// Server side logging or erroneous runtime conditions still occurs, but callers to getRealTimeMeasurementValues
// won't have to additionally check for null values now. This is a safe and better pattern.
+ @Override
public Set<MeasurementData> getRealTimeMeasurementValue(int resourceId, Set<MeasurementScheduleRequest> requests) {
if (requests.size() == 0) {
// There's no need to even call getValues() on the ResourceComponent if the list of metric names is empty.
@@ -498,6 +514,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
return values;
}
+ @Override
public long getNextExpectedCollectionTime() {
ScheduledMeasurementInfo nextScheduledMeasurement = this.scheduledRequests.peek();
if (nextScheduledMeasurement == null) {
@@ -629,6 +646,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
return perMinuteValue;
}
+ @Override
public Map<String, Object> getMeasurementScheduleInfoForResource(int resourceId) {
Map<String, Object> results = null;
@@ -692,10 +710,12 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
// -- MBean monitoring methods
+ @Override
public long getMeasurementsCollected() {
return this.collectedMeasurements.get();
}
+ @Override
public long getMeasurementsCollectedPerMinute() {
long now = System.currentTimeMillis();
@@ -718,14 +738,17 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
return ret;
}
+ @Override
public long getCurrentlyScheduleMeasurements() {
return this.scheduledRequests.size();
}
+ @Override
public long getTotalTimeCollectingMeasurements() {
return this.totalTimeCollecting.get();
}
+ @Override
public long getLateCollections() {
return lateCollections.get();
}
@@ -751,6 +774,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
this.failedCollection.addAndGet(count);
}
+ @Override
public long getFailedCollections() {
return failedCollection.get();
}
commit 62c3c8ee54a41df94f65bb185dc0d12f76ae0c22
Author: Simeon Pinder <spinder(a)fulliautomatix.conchfritter.com>
Date: Thu Nov 29 08:55:48 2012 -0500
[BZ 880795] upgrade augeas library to 0.9.0-4.
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index a765b43..4085efd 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -12,11 +12,11 @@ Ant Script that provides ways to package the Agent.
<property name="settings.localRepository" location="${user.home}/.m2/repository"/>
<property name="project.version" value="2.0.0-SNAPSHOT"/>
<property name="sigar.version" value="1.6.5.132-3"/>
- <property name="augeas.version" value="0.9.0"/>
+ <property name="augeas.version" value="0.9.0-4"/>
<property name="augeas.classifier" value="el5"/>
<property name="augeas.zip.location" value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/>
<property name="augeas.zip.mask" value="*-${augeas.classifier}.zip"/>
- <property name="augeas.zip.version" value="0.9.0"/>
+ <property name="augeas.zip.version" value="0.9.0-4"/>
<property name="getopt.version" value="1.0.13"/>
<property name="jaxb-api.version" value="2.1"/>
<property name="jaxb-impl.version" value="2.1"/>
diff --git a/pom.xml b/pom.xml
index 3c844b6..57be9a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,9 +129,9 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<testng.version>6.5.2</testng.version>
- <augeas.version>0.9.0</augeas.version>
+ <augeas.version>0.9.0-4</augeas.version>
<augeas.classifier>el5</augeas.classifier>
- <augeas.zip.version>0.9.0</augeas.zip.version>
+ <augeas.zip.version>0.9.0-4</augeas.zip.version>
<augeas.zip.location>${settings.localRepository}/net/augeas/augeas-native/${augeas.version}</augeas.zip.location>
<augeas.zip.mask>*-${augeas.classifier}.zip</augeas.zip.mask>
<ant.contrib.version>1.0b3</ant.contrib.version>
@@ -1247,7 +1247,6 @@
</snapshots>
</repository>
-
</repositories>
<pluginRepositories>
commit cd40200ad13c0abf7adcf1e021db81c1c8d967a8
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 29 11:56:01 2012 +0100
Add support for searching of resources, groups and group definitions by name via ?q=
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
index f3bcdff..d051585 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
@@ -22,13 +22,13 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
+import org.rhq.core.domain.criteria.ResourceGroupDefinitionCriteria;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.GroupDefinition;
import org.rhq.core.domain.resource.group.ResourceGroup;
-import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
@@ -64,9 +64,12 @@ public class GroupHandlerBean extends AbstractRestBean implements GroupHandlerLo
@EJB
GroupDefinitionManagerLocal definitionManager;
- public Response getGroups(@Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getGroups(String q, @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
ResourceGroupCriteria criteria = new ResourceGroupCriteria();
+ if (q!=null) {
+ criteria.addFilterName(q);
+ }
List<ResourceGroup> groups = resourceGroupManager.findResourceGroupsByCriteria(caller,criteria);
List<GroupRest> list = new ArrayList<GroupRest>(groups.size());
@@ -299,10 +302,14 @@ public class GroupHandlerBean extends AbstractRestBean implements GroupHandlerLo
}
@Override
- public Response getGroupDefinitions(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroupDefinitions(String q, @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo) {
- PageList<GroupDefinition> gdlist = definitionManager.getGroupDefinitions(caller,new PageControl());
+ ResourceGroupDefinitionCriteria criteria = new ResourceGroupDefinitionCriteria();
+ if (q!=null) {
+ criteria.addFilterName(q);
+ }
+ PageList<GroupDefinition> gdlist = definitionManager.findGroupDefinitionsByCriteria(caller, criteria);
List<GroupDefinitionRest> list = new ArrayList<GroupDefinitionRest>(gdlist.getTotalSize());
for (GroupDefinition def: gdlist) {
GroupDefinitionRest definitionRest = buildGDRestFromDefinition(def);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
index 39e0c2a..1cfc171 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
@@ -44,7 +44,8 @@ public interface GroupHandlerLocal {
@GET
@Path("/")
@ApiOperation(value = "List all groups", multiValueResponse = true)
- public Response getGroups(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroups(@ApiParam("String to search in the group name") @QueryParam("q") String q,
+ @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
@Cache(isPrivate = true,maxAge = 60)
@@ -129,7 +130,8 @@ public interface GroupHandlerLocal {
@GET
@Path("/definitions")
@ApiOperation(value="List all existing GroupDefinitions",multiValueResponse = true)
- public Response getGroupDefinitions(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroupDefinitions(@ApiParam("String to search in the group definition name") @QueryParam("q") String q,
+ @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
@GZIP
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
index c0efed4..9709fd6 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
@@ -33,9 +33,6 @@ import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.HttpHeaders;
@@ -48,6 +45,7 @@ import javax.ws.rs.core.UriInfo;
import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.criteria.AlertCriteria;
import org.rhq.core.domain.criteria.AvailabilityCriteria;
+import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.discovery.AvailabilityReport;
import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.AvailabilityType;
@@ -93,7 +91,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
private EntityManager entityManager;
@Override
- public Response getResource(int id, @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getResource(int id, Request request, HttpHeaders headers, UriInfo uriInfo) {
Resource res;
res = fetchResource(id);
@@ -121,13 +119,39 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response getPlatforms(@Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getResourcesByQuery(String q, Request request, HttpHeaders headers,
+ UriInfo uriInfo) {
+ ResourceCriteria criteria = new ResourceCriteria();
+ criteria.addFilterName(q);
+ List<Resource> ret = resMgr.findResourcesByCriteria(caller,criteria);
+
+ Response.ResponseBuilder builder = getResponseBuilderForResourceList(headers,uriInfo,ret);
+
+ return builder.build();
+ }
+
+ @Override
+ public Response getPlatforms(Request request, HttpHeaders headers, UriInfo uriInfo) {
PageControl pc = new PageControl();
List<Resource> ret = resMgr.findResourcesByCategory(caller, ResourceCategory.PLATFORM,
InventoryStatus.COMMITTED, pc);
- List<ResourceWithType> rwtList = new ArrayList<ResourceWithType>(ret.size());
- for (Resource r : ret) {
+ Response.ResponseBuilder builder = getResponseBuilderForResourceList(headers, uriInfo, ret);
+
+ return builder.build();
+ }
+
+ /**
+ * Translate the passed list of resources into a response according to the acceptable mime types etc.
+ * @param headers HttpHeaders from the request
+ * @param uriInfo Uri from the request
+ * @param resources List of resources
+ * @return An initialized ResponseBuilder
+ */
+ private Response.ResponseBuilder getResponseBuilderForResourceList(HttpHeaders headers, UriInfo uriInfo,
+ List<Resource> resources) {
+ List<ResourceWithType> rwtList = new ArrayList<ResourceWithType>(resources.size());
+ for (Resource r : resources) {
putToCache(r.getId(), Resource.class, r);
ResourceWithType rwt = fillRWT(r, uriInfo);
rwtList.add(rwt);
@@ -143,8 +167,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
};
builder = Response.ok(list);
}
-
- return builder.build();
+ return builder;
}
@Override
@@ -267,7 +290,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
public Response getSchedules(int resourceId, String scheduleType, boolean enabledOnly, String name,
- @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ Request request, HttpHeaders headers, UriInfo uriInfo) {
// allow metric as input
if (scheduleType.equals("metric"))
@@ -333,7 +356,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response getChildren(int id, @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getChildren(int id, Request request, HttpHeaders headers, UriInfo uriInfo) {
PageControl pc = new PageControl();
Resource parent;
parent = fetchResource(id);
@@ -387,7 +410,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response createPlatform(@PathParam("name") String name, StringValue typeValue, @Context UriInfo uriInfo) {
+ public Response createPlatform(String name, StringValue typeValue, UriInfo uriInfo) {
String typeName = typeValue.getValue();
ResourceType type = resourceTypeManager.getResourceTypeByNameAndPlugin(typeName,"Platforms");
@@ -462,8 +485,8 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response createResource(@PathParam("name") String name, StringValue typeValue,
- @QueryParam("plugin") String plugin, int parentId, UriInfo uriInfo) {
+ public Response createResource(String name, StringValue typeValue,
+ String plugin, int parentId, UriInfo uriInfo) {
Resource parent = resMgr.getResourceById(caller,parentId);
if (parent==null)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
index b30f8ce..935f875 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
@@ -56,7 +56,7 @@ import org.rhq.enterprise.server.rest.domain.*;
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
@Path("/resource")
@Local
-@Api(value="Resource related", description = "This endpoint deals with single resources, not groups")
+@Api(value="Resource related", description = "This endpoint deals with individual resources, not resource groups")
public interface ResourceHandlerLocal {
static String NO_RESOURCE_FOR_ID = "If no resource with the passed id exists";
@@ -75,6 +75,13 @@ public interface ResourceHandlerLocal {
@Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
+ @GET
+ @Path("/")
+ @ApiOperation(value = "Search for resources by the given search string", responseClass = "ResourceWithType")
+ Response getResourcesByQuery(@ApiParam("String to search in the resource name") @QueryParam("q")String q,
+ @Context Request request, @Context HttpHeaders headers,
+ @Context UriInfo uriInfo);
+
@GZIP
@GET
@Path("/platforms")
@@ -170,7 +177,7 @@ public interface ResourceHandlerLocal {
@ApiOperation(value = "Create a resource with a given type below a certain parent")
@POST
@Path("{name}")
- public javax.ws.rs.core.Response createResource(
+ public Response createResource(
@ApiParam("Name of the new resource") @PathParam("name") String name,
@ApiParam("Name of the Resource tpye") StringValue type,
@ApiParam("Name of the plugin providing the type") @QueryParam("plugin") String plugin,
11 years, 5 months
[rhq] 4 commits - .classpath modules/enterprise modules/integration-tests modules/plugins
by Jay Shaughnessy
.classpath | 2
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java | 37 -
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java | 37 -
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java | 16
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java | 110 +--
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java | 74 ++
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml | 45 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml | 49 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml | 23
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml | 23
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml | 48 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml | 40 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml | 298 ----------
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml | 18
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml | 18
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml | 29
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml | 24
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml | 24
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml | 42 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml | 41 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml | 17
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml | 49 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml | 67 --
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml | 7
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml | 10
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml | 8
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml | 19
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml | 29
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml | 92 ---
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml | 110 ---
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml | 20
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml | 54 -
modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml | 45 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml | 49 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml | 23
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml | 23
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml | 48 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml | 40 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml | 298 ++++++++++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml | 19
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml | 18
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml | 18
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml | 29
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml | 24
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml | 24
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml | 42 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml | 41 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml | 17
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml | 49 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml | 67 ++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml | 7
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml | 10
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml | 8
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml | 19
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml | 29
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml | 92 +++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml | 110 +++
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml | 20
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml | 7
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml | 54 +
modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml | 8
modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java | 5
modules/plugins/jboss-as-5/pom.xml | 10
74 files changed, 1473 insertions(+), 1378 deletions(-)
New commits:
commit 24a906cb902960a614df13165776cfd5f42516e7
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Nov 30 10:55:40 2012 -0500
Add support (hopefully) for EAP 5.2 in as5.itest profile.
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 365f544..a15b24f 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -479,17 +479,15 @@
<get src="${as5.url}" dest="${as5.zipfile}"
usetimestamp="true" verbose="true"/>
<unzip src="${as5.zipfile}" dest="${java.io.tmpdir}"/>
+ <!-- This works for AS versions -->
<move file="${java.io.tmpdir}/jboss-${as5.version}"
tofile="${jboss5.home}" failonerror="false"
overwrite="false"/>
- <move file="${java.io.tmpdir}/jboss-eap-5.0/jboss-as"
+ <!-- This works for EAP versions -->
+ <move file="${java.io.tmpdir}/jboss-eap-${as5.version}/jboss-as"
tofile="${jboss5.home}" failonerror="false"
overwrite="false"/>
- <delete dir="${java.io.tmpdir}/jboss-eap-5.0" failonerror="false"/>
- <move file="${java.io.tmpdir}/jboss-eap-5.1/jboss-as"
- tofile="${jboss5.home}" failonerror="false"
- overwrite="false"/>
- <delete dir="${java.io.tmpdir}/jboss-eap-5.1" failonerror="false"/>
+ <delete dir="${java.io.tmpdir}/jboss-eap-${as5.version}" failonerror="false"/>
<chmod perm="u+rx">
<fileset dir="${jboss5.home}/bin" includes="*.sh"/>
commit dbd0327e0395c4d8a94be5282435aeaa7e5efd52
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Nov 30 10:53:38 2012 -0500
The metadata update integration tests were not actually running. We had
false postives because the BeforeMethod was throwing an exception. When this
happens Arquillian (1.0.2) swallows it and passes the test (not good). Made
several changes to these test classes to get them running although there may
be test interaction issues still. Checking in now to see how things go
in a full jenkins run.
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
index 22834fa..2bf2f31 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
@@ -16,6 +16,13 @@ import org.rhq.test.AssertUtils;
public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+
+ disableAfterClassStandIn = true;
+ }
+
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" })
void registerMetricsPlugin() throws Exception {
createPlugin("metric-test-plugin", "1.0", "plugin_v1.xml");
@@ -38,7 +45,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(1);
AssertUtils.assertPropertiesMatch("Failed to persist properties for a trait metric definition", expected,
- traitDef, asList("id", "resourceType"));
+ traitDef, asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
@@ -53,7 +60,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(2);
AssertUtils.assertPropertiesMatch("Failed to persist properties for numeric metric definition", expected,
- measurementDef, asList("id", "resourceType"));
+ measurementDef, asList("id", "resourceType", "schedules", "alertCondition"));
MeasurementDefinition perMinuteDef = loadMeasurementDef("metric2", "MetricServer1", "metric2 per Minute");
@@ -66,7 +73,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
AssertUtils.assertPropertiesMatch(
"Failed to create and persist per minute metric definition for numeric metric definition", expected,
- perMinuteDef, asList("id", "resourceType"));
+ perMinuteDef, asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
@@ -82,7 +89,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(4);
AssertUtils.assertPropertiesMatch("Failed to create calltime metric definition", expected, calltimeDef,
- asList("id", "resourceType"));
+ asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
@@ -98,7 +105,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serverAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "alertCondition", "schedules"));
MeasurementDefinition serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService1",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -110,7 +117,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService2",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -123,7 +130,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
}
@@ -151,7 +158,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayOrder(1);
AssertUtils.assertPropertiesMatch("Failed to change trait definition to a measurement defintion", expected,
- measurementDef, asList("id", "resourceType"));
+ measurementDef, asList("id", "resourceType", "schedules", "alertCondition"));
MeasurementDefinition perMinuteDef = loadMeasurementDef("metric1", "MetricServer3", "metric1 per Minute");
expected.setDisplayName("metric1 per Minute");
@@ -163,7 +170,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
AssertUtils.assertPropertiesMatch(
"Failed to create and persist per minute metric definition for updated metric definition", expected,
- perMinuteDef, asList("id", "resourceType"));
+ perMinuteDef, asList("id", "resourceType", "schedules", "alertCondition"));
}
@Test(groups = { "plugin.metadata", "Metrics.UpradePlugin" }, dependsOnMethods = { "upgradeMetricsPlugin" })
@@ -195,7 +202,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serverAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
MeasurementDefinition serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService1",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -208,7 +215,7 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
serviceAvailDef = loadMeasurementDef("rhq.availability", "MetricService2",
MeasurementDefinition.AVAILABILITY_DISPLAY_NAME);
@@ -220,7 +227,13 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDescription(MeasurementDefinition.AVAILABILITY_DESCRIPTION);
AssertUtils.assertPropertiesMatch("Failed to create avail metric definition", expected, serviceAvailDef,
- asList("id", "resourceType", "destinationType", "displayOrder"));
+ asList("id", "resourceType", "destinationType", "displayOrder", "schedules", "alertCondition"));
+ }
+
+ // this needs to be the last test executed in the class, it does cleanup
+ @Test(priority = 10, alwaysRun = true, dependsOnGroups = { "Metrics.UpradePlugin" })
+ public void afterClassWorkTest() throws Exception {
+ afterClassWork();
}
MeasurementDefinition loadMeasurementDef(String name, String resourceType) {
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
index 7c9a6d3..cfaf7a8 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
@@ -28,8 +28,6 @@ import org.dbunit.dataset.datatype.IDataTypeFactory;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.dbunit.dataset.xml.FlatXmlProducer;
import org.dbunit.operation.DatabaseOperation;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.xml.sax.InputSource;
@@ -51,30 +49,28 @@ import org.rhq.enterprise.server.util.LookupUtil;
public class MetadataBeanTest extends AbstractEJB3Test {
private List<Integer> pluginIds = new ArrayList<Integer>();
-
- // Arquillian (1.0.2) executes @BeforeGroups only as client (remote). So, we can't get DS here.
- // Also, it is called for each test. For now call from BeforeMethod.
- //
- //@BeforeGroups(groups = { "plugin.metadata" }, dependsOnGroups = { "integration.ejb3" })
- public void beforeGroups() throws Exception {
- setupDB();
- }
+ protected boolean disableAfterClassStandIn = false;
// Arquillian (1.0.2) executes @AfterClass after each test. So, instead turn it into a low priority
// test that should execute last.
/**
+ * !! Important !! This should be disabled if the subclass has tests in groups other than plugin.metadata because<br/>
+ * !! priority applies only to the tests in the same grouping.<br/>
+ * <br/>
* Need to delete rows from RHQ_PLUGINS because subsequent tests in server/jar would otherwise fail. Some tests look
* at what plugins are in the database, and then look for corresponding plugin files on the file system. MetadataTest
* however removes the generated plugin files during each test run.
*/
@Test(priority = 10, alwaysRun = true, groups = { "plugin.metadata" })
void afterClassStandIn() throws Exception {
- // Although its documented that AfterXXX don't execute in-container (only as client), in practice this is not true
- // and we perform in-container work here.
- if (!inContainer()) {
- return;
+ if (!disableAfterClassStandIn) {
+ afterClassWork();
+ } else {
+ System.out.println("Skipping MetadataBeanTest.afterClassStandIn, it is disabled by a subclass.");
}
+ }
+ protected void afterClassWork() throws Exception {
PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
Subject overlord = LookupUtil.getSubjectManager().getOverlord();
pluginMgr.deletePlugins(overlord, pluginIds);
@@ -83,14 +79,13 @@ public class MetadataBeanTest extends AbstractEJB3Test {
new PurgeResourceTypesJob().executeJobCode(null);
}
- @BeforeMethod(groups = { "plugin.metadata" }, dependsOnGroups = { "integration.ejb3" })
- protected void before() throws Exception {
+ @Override
+ protected void beforeMethod() throws Exception {
if (!inContainer()) {
return;
}
- // @BeforeGroups currently executed only as client (remote) only with Arquillian/testNg, so call from here instead
- beforeGroups();
+ setupDB();
TestBundleServerPluginService bundleService = new TestBundleServerPluginService();
prepareCustomServerPluginService(bundleService);
@@ -103,8 +98,8 @@ public class MetadataBeanTest extends AbstractEJB3Test {
* at what plugins are in the database, and then look for corresponding plugin files on the file system. MetadataTest
* however removes the generated plugin files during each test run.
*/
- @AfterMethod(alwaysRun = true, groups = { "plugin.metadata" })
- protected void after() throws Exception {
+ @Override
+ protected void afterMethod() throws Exception {
if (!inContainer()) {
return;
}
@@ -220,6 +215,8 @@ public class MetadataBeanTest extends AbstractEJB3Test {
criteria.addFilterName(resourceTypeName);
criteria.addFilterPluginName(plugin);
criteria.setStrict(true);
+ criteria.fetchBundleConfiguration(true);
+ criteria.fetchDriftDefinitionTemplates(true);
MethodUtils.invokeMethod(criteria, fetch, true);
List<ResourceType> resourceTypes = resourceTypeMgr.findResourceTypesByCriteria(subjectMgr.getOverlord(),
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java
index c282777..ff279d9 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest.java
@@ -46,10 +46,18 @@ public class PluginManagerBeanTest extends MetadataBeanTest {
private SubjectManagerLocal subjectMgr;
private PluginManagerLocal pluginMgr;
- public void registerPlugins() throws Exception {
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+
subjectMgr = LookupUtil.getSubjectManager();
pluginMgr = LookupUtil.getPluginManager();
+ disableAfterClassStandIn = true;
+ }
+
+ public void registerPlugins() throws Exception {
+
List<Plugin> plugins = getEntityManager()
.createQuery(
"from Plugin where name IN ('PluginManagerBeanTestPlugin1', 'PluginManagerBeanTestPlugin2', 'PluginManagerBeanTestPlugin3')")
@@ -217,6 +225,12 @@ public class PluginManagerBeanTest extends MetadataBeanTest {
assertEquals("Failed to purge plugins from the database", 1, pluginMgr.getPlugins().size());
}
+ // this needs to be the last test executed in the class, it does cleanup
+ @Test(priority = 10, alwaysRun = true, dependsOnMethods = { "pluginPurgeCheckShouldUseExactMatchesInQuery" })
+ public void afterClassWorkTest() throws Exception {
+ afterClassWork();
+ }
+
private Plugin getPlugin(String name) {
Plugin plugin = pluginMgr.getPlugin(name);
assertNotNull("Failed to find plugin [" + name + "].", plugin);
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
index 0e142e9..5f2acd8 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
@@ -50,9 +50,17 @@ import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
+@Test(groups = { "plugin.metadata" })
public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
- @Test(groups = { "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+
+ disableAfterClassStandIn = true;
+ }
+
+ @Test(groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void testRemovalOfObsoleteBundleAndDriftConfig() throws Exception {
// create the initial type that has bundle and drift definitions
createPlugin("test-plugin.jar", "1.0", "remove_bundle_drift_config_v1.xml");
@@ -107,7 +115,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(groups = { "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ @Test(groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void registerPluginWithDuplicateDriftDefinitions() {
try {
createPlugin("test-plugin.jar", "1.0", "dup_drift.xml");
@@ -118,14 +126,13 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "registerPluginWithDuplicateDriftDefinitions" }, groups = {
- "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ "plugin.resource.metadata.test", "NewPlugin" })
public void registerPlugin() throws Exception {
createPlugin("test-plugin.jar", "1.0", "plugin_v1.xml");
}
-
@Test(dependsOnMethods = { "registerPluginWithDuplicateDriftDefinitions" }, groups = {
- "plugin.resource.metadata.test", "plugin.metadata", "NewPlugin" })
+ "plugin.resource.metadata.test", "NewPlugin" })
public void registerParentResouceTypePlugin() throws Exception {
createPlugin("parent_resource_type-plugin.jar", "1.0", "parent_resource_type-plugin.xml");
assertResourceTypeAssociationEquals("Server A First Level", "ParentResourceTypeTestPlugin",
@@ -136,15 +143,13 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
"childResourceTypes", asList("Service C First Level"));
}
-
- @Test(dependsOnMethods = { "registerPlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "registerPlugin" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistNewTypes() {
List<String> newTypes = asList("ServerA", "ServerB");
assertTypesPersisted("Failed to persist new types", newTypes, "TestPlugin");
}
- // @Test(dependsOnMethods = {"persistNewTypes"}, groups = {"plugin.resource.metadata.test", "plugin.metadata", "NewPlugin"})
+ // @Test(dependsOnMethods = {"persistNewTypes"}, groups = {"plugin.resource.metadata.test", "NewPlugin"})
// public void persistSubcategories() throws Exception {
// assertResourceTypeAssociationEquals(
// "ServerA",
@@ -154,34 +159,29 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
// );
// }
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistMeasurementDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "metricDefinitions",
asList("metric1", "metric2", "rhq.availability"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistEventDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "eventDefinitions",
asList("logAEntry", "logBEntry"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistOperationDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "operationDefinitions", asList("start", "stop"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistProcessScans() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "processScans", asList("serverA"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistDriftDefinitionTemplates() throws Exception {
ResourceType type = assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "driftDefinitionTemplates",
asList("drift-pc", "drift-fs"));
@@ -220,8 +220,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistBundleTargetConfigurations() throws Exception {
String resourceTypeName = "ServerA";
String plugin = "TestPlugin";
@@ -256,64 +255,55 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistChildTypes() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "childResourceTypes", asList("Child1", "Child2"));
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistPluginConfigurationDefinition() throws Exception {
assertAssociationExists("ServerA", "pluginConfigurationDefinition");
}
- @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "NewPlugin" })
+ @Test(dependsOnMethods = { "persistNewTypes" }, groups = { "plugin.resource.metadata.test", "NewPlugin" })
public void persistPackageTypes() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "packageTypes",
asList("ServerA.Content.1", "ServerA.Content.2"));
}
- @Test(groups = { "plugin.resource.metadata.test", "plugin.metadata", "UpgradePlugin" }, dependsOnGroups = { "NewPlugin" })
+ @Test(groups = { "plugin.resource.metadata.test", "UpgradePlugin" }, dependsOnGroups = { "NewPlugin" })
public void upgradePlugin() throws Exception {
createPlugin("test-plugin.jar", "2.0", "plugin_v2.xml");
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeOperationDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "operationDefinitions",
asList("start", "shutdown", "restart"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeChildResources() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "childResourceTypes", asList("Child1", "Child3"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeParentTypeOfChild() throws Exception {
assertResourceTypeAssociationEquals("ServerB", "TestPlugin", "childResourceTypes", asList("Child2"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeEventDefinitions() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "eventDefinitions",
asList("logAEntry", "logCEntry"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeProcessScans() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "processScans", asList("processA", "processB"));
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeDriftDefinitionTemplates() throws Exception {
ResourceType type = assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "driftDefinitionTemplates",
asList("drift-rc", "drift-mt"));
@@ -343,8 +333,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradeBundleTargetConfigurations() throws Exception {
String resourceTypeName = "ServerA";
String plugin = "TestPlugin";
@@ -379,8 +368,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
}
- @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "plugin.metadata",
- "UpgradePlugin" })
+ @Test(dependsOnMethods = { "upgradePlugin" }, groups = { "plugin.resource.metadata.test", "UpgradePlugin" })
public void upgradePackageTypes() throws Exception {
assertResourceTypeAssociationEquals("ServerA", "TestPlugin", "packageTypes",
asList("ServerA.Content.1", "ServerA.Content.3"));
@@ -400,7 +388,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteOperationDefsForRemovedType() throws Exception {
OperationManagerLocal operationMgr = LookupUtil.getOperationManager();
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
@@ -416,7 +404,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteEventDefsForRemovedType() throws Exception {
List<?> results = getEntityManager()
.createQuery("from EventDefinition e where e.name = :ename and e.resourceType.name = :rname")
@@ -426,7 +414,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteParent() throws Exception {
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
ResourceTypeManagerLocal resourceTypeMgr = LookupUtil.getResourceTypeManager();
@@ -460,7 +448,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteTypeAndAllItsDescedantTypes() throws Exception {
List<?> typesNotRemoved = getEntityManager()
.createQuery("from ResourceType t where t.plugin = :plugin and t.name in (:resourceTypes)")
@@ -472,7 +460,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteProcessScans() {
List<?> processScans = getEntityManager()
.createQuery("from ProcessScan p where p.name = :name1 or p.name = :name2").setParameter("name1", "scan1")
@@ -482,7 +470,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteSubcategories() {
List<?> subcategories = getEntityManager()
.createQuery("from ResourceSubCategory r where r.name = :name1 or r.name = :name2 or r.name = :name3")
@@ -492,7 +480,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteResources() {
ResourceManagerLocal resourceMgr = LookupUtil.getResourceManager();
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
@@ -518,7 +506,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteBundles() {
List<?> bundles = getEntityManager().createQuery("from Bundle b where b.bundleType.name = :name")
.setParameter("name", "Test Bundle").getResultList();
@@ -527,7 +515,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteBundleTypes() {
List<?> bundleTypes = getEntityManager().createQuery("from BundleType b where b.name = :name")
.setParameter("name", "Test Bundle").getResultList();
@@ -536,7 +524,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deletePackages() {
List<?> packages = getEntityManager().createQuery("from Package p where p.name = :name")
.setParameter("name", "ServerC::test-package").getResultList();
@@ -545,7 +533,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deletePackageTypes() {
List<?> packageTypes = getEntityManager().createQuery("from PackageType p where p.name = :name")
.setParameter("name", "ServerC.Content").getResultList();
@@ -554,7 +542,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteResourceGroups() {
List<?> groups = getEntityManager()
.createQuery("from ResourceGroup g where g.name = :name and g.resourceType.name = :typeName")
@@ -564,7 +552,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteAlertTemplates() {
List<?> templates = getEntityManager()
.createQuery("from AlertDefinition a where a.name = :name and a.resourceType.name = :typeName")
@@ -574,7 +562,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
}
@Test(dependsOnMethods = { "upgradePluginWithTypesRemoved" }, groups = { "plugin.resource.metadata.test",
- "plugin.metadata", "RemoveTypes" })
+ "RemoveTypes" })
public void deleteMeasurementDefinitions() {
List<?> measurementDefs = getEntityManager().createQuery("from MeasurementDefinition m where m.name = :name")
.setParameter("name", "ServerC::metric1").getResultList();
@@ -582,6 +570,12 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
assertEquals("Measurement definitions should have been deleted", 0, measurementDefs.size());
}
+ // this needs to be the last test executed in the class, it does cleanup
+ @Test(priority = 10, alwaysRun = true, dependsOnGroups = { "RemoveTypes" })
+ public void afterClassWorkTest() throws Exception {
+ afterClassWork();
+ }
+
void assertTypesPersisted(String msg, List<String> types, String plugin) {
List<String> typesNotFound = new ArrayList<String>();
ResourceTypeManagerLocal resourceTypeMgr = LookupUtil.getResourceTypeManager();
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
index 8984027..6fc8350 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
@@ -121,6 +121,62 @@ public abstract class AbstractEJB3Test extends Arquillian {
.addAsResource("org/rhq/enterprise/server/configuration/metadata/configuration_metadata_manager_bean_test_v2.xml");
testClassesJar.addAsResource("org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml");
testClassesJar.addAsResource("org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml");
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/MetadataTest.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml");
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml");
+ testClassesJar.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml");
+
testClassesJar
.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginScanningExtensionMetadataTest/child1_plugin_v1.xml");
testClassesJar
@@ -129,6 +185,24 @@ public abstract class AbstractEJB3Test extends Arquillian {
.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginScanningExtensionMetadataTest/parent_plugin_v1.xml");
testClassesJar
.addAsResource("org/rhq/enterprise/server/resource/metadata/PluginScanningExtensionMetadataTest/parent_plugin_v2.xml");
+
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml");
+ testClassesJar
+ .addAsResource("org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml");
+
testClassesJar.addAsResource("perftest/AvailabilityInsertPurgeTest-testOne-data.xml.zip");
testClassesJar.addAsResource("serverplugins/simple-generic-serverplugin.xml");
testClassesJar.addAsResource("test/deployment/1.0-feb-2.xml");
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 3b9ad64..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="AlertMetadataManagerBeanTestPlugin"
- displayName="AlertMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="AlertServer"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index f2664dc..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<plugin name="AlertMetadataManagerBeanTestPlugin"
- displayName="AlertMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 79f9296..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<plugin name="ContentMetadataManagerBeanTestPlugin"
- displayName="ContentMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ContentServer">
- <content name="ContentServer.Content.1" category="deployable"/>
- </server>
-
- <server name="ContentServer1"/>
-
- <server name="ContentServer2">
- <content name="ContentServer2.Content.1" category="executableScript"/>
- </server>
-
- <server name="ContentServer3">
- <content name="ContentServer3.Content.1" category="deployable"/>
- <content name="ContentServer3.Content.2" category="deployable"/>
- <content name="ContentServer3.Content.3" category="deployable"/>
- </server>
-
- <server name="ContentServer4">
- <content name="ContentServer4.Content.1" category="deployable"/>
- </server>
-
- <server name="ContentServer5">
- <content name="ContentServer5.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="x"/>
- </configuration>
- </content>
- <content name="ContentServer5.Content.2" category="deployable">
- <configuration>
- <c:simple-property name="x"/>
- </configuration>
- </content>
- </server>
-
- <server name="ContentServer6"/>
-
- <server name="ContentServer7">
- <bundle type="ContentServer.Bundle.1"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index f0cd7b8..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<plugin name="ContentMetadataManagerBeanTestPlugin"
- displayName="ContentMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ContentServer">
- <content name="ContentServer.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="version"/>
- </configuration>
- </content>
- </server>
-
- <server name="ContentServer1">
- <content name="ContentServer1.Content.1" category="deployable"/>
- <content name="ContentServer1.Content.2" category="configuration"/>
- </server>
-
- <server name="ContentServer2"/>
-
- <server name="ContentServer3">
- <content name="ContentServer3.Content.2" category="deployable"/>
- <content name="ContentServer3.Content.3" category="deployable"/>
- </server>
-
- <server name="ContentServer4">
- <content name="ContentServer4.Content.1" category="deployable"/>
- <content name="ContentServer4.Content.2" category="deployable"/>
- </server>
-
- <server name="ContentServer5">
- <content name="ContentServer5.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="x"/>
- <c:simple-property name="y"/>
- </configuration>
- </content>
- <content name="ContentServer5.Content.2" category="deployable"/>
- </server>
-
- <server name="ContentServer6">
- <bundle type="ContentServer6.Bundle.1"/>
- </server>
-
- <server name="ContentServer7">
- <bundle type="ContentServer.Bundle.2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 2786b05..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<plugin name="EventMetadataManagerBeanTestPlugin"
- displayName="MeasurementMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="EventServer1">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer2"/>
-
- <server name="EventServer3">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer4">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index f4f765f..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<plugin name="EventMetadataManagerBeanTestPlugin"
- displayName="ContentMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="EventServer1">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer2">
- <event name="event1" description="Event 1"/>
- <event name="event2" description="Event 2"/>
- </server>
-
- <server name="EventServer3"/>
-
- <server name="EventServer4">
- <event name="event1" description="EVENT ONE"/>
- <event name="event3" description="Event 3"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 0202079..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<plugin name="MeasurementMetadataManagerBeanTestPlugin"
- displayName="MeasurementMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="MetricServer1">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
- description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
- units="megabytes" measurementType="trendsup"/>
- <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
- description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
- units="milliseconds" destinationType="myMethod"/>
- </server>
- <server name="MetricServer2"/>
- <server name="MetricServer3">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
-
- <service name="MetricService1">
- <metric property="rhq.availability" defaultInterval="120000" defaultOn="false" />
- </service>
- <service name="MetricService2" />
- </server>
- <server name="MetricServer4">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- </server>
- <server name="MetricServer5">
- <!--
- Need to use names for these metrics that are unique across the plugin because the resource
- type will be deleted and the metric definition cannot be looked up by resource type. We will
- instead look them up by name only.
- -->
- <metric displayName="metric1" property="MetricServer5.metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- <metric displayName="metric3" property="MetricServer5.metric3" dataType="calltime" displayType="detail"
- description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
- units="milliseconds" destinationType="myMethod"/>
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index d949778..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<plugin name="MeasurementMetadataManagerBeanTestPlugin"
- displayName="MeasurementMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="MetricServer1">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
- description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
- units="megabytes" measurementType="trendsup"/>
- <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
- description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
- units="milliseconds" destinationType="myMethod"/>
- <metric displayName="cannotBeSet" property="rhq.availability"
- description="cannotBeSet" defaultInterval="120000" defaultOn="true"/>
- </server>
- <server name="MetricServer2">
- <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
- description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
- units="milliseconds"/>
- </server>
- <server name="MetricServer3">
- <metric displayName="metric1" property="metric1" dataType="measurement" displayType="detail"
- description="Metric One" category="performance" defaultInterval="60000" defaultOn="false"
- units="milliseconds" measurementType="trendsup"/>
-
- <service name="MetricService1">
- <metric displayName="cannotBeSet" property="rhq.availability"
- description="cannotBeSet" defaultInterval="240000" defaultOn="true" />
- </service>
- <service name="MetricService2">
- <metric displayName="cannotBeSet" property="rhq.availability"
- description="cannotBeSet" defaultInterval="480000" defaultOn="true" />
- </service>
- </server>
- <server name="MetricServer4"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
deleted file mode 100644
index e914562..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
+++ /dev/null
@@ -1,298 +0,0 @@
-<dataset>
- <rhq_config_def/>
- <rhq_config_prop_grp_def/>
- <rhq_config_prop_def/>
- <rhq_config_pd_osrc/>
- <rhq_conf_prop_def_enum/>
- <rhq_config_prop_constr/>
- <rhq_config/>
- <rhq_config_property/>
- <rhq_config_template/>
- <rhq_raw_config/>
- <rhq_affinity_group/>
- <rhq_server/>
- <rhq_agent/>
- <rhq_partition_event/>
- <rhq_partition_details/>
- <rhq_failover_list/>
- <rhq_failover_details/>
- <rhq_principal id="2" PRINCIPAL="rhqadmin" PASSWORD="x1XwrxKuPvYUILiOnOZTLg=="/>
- <rhq_subject
- ID="1"
- NAME="admin"
- FIRST_NAME="Super"
- LAST_NAME="User"
- FSYSTEM="1"/>
- <rhq_subject
- ID="2"
- NAME="rhqadmin"
- FIRST_NAME="RHQ"
- LAST_NAME="Administrator"
- EMAIL_ADDRESS="nobody@localhost"
- FSYSTEM="0"/>
- <rhq_resource_type/>
- <rhq_resource_subcat/>
- <rhq_resource_type_parents/>
- <rhq_process_scan/>
- <rhq_prd_ver/>
- <rhq_resource/>
- <rhq_resource_error/>
- <rhq_group_def/>
- <rhq_resource_group/>
- <rhq_resource_group_res_imp_map/>
- <rhq_resource_group_res_exp_map/>
- <rhq_config_group_update/>
- <rhq_config_update/>
- <rhq_tagging/>
- <rhq_tagging_resource_map/>
- <rhq_tagging_res_group_map/>
- <rhq_role
- ID="1"
- NAME="Super User Role"
- FSYSTEM="1"
- DESCRIPTION="System superuser role that provides full access to everything. This role cannot be modified."/>
- <rhq_role
- ID="2"
- NAME="All Resources Role"
- FSYSTEM="0"
- DESCRIPTION="Provides full access to all resources in inventory. Cannot modify users, roles or server settings."/>
- <rhq_role_resource_group_map/>
- <rhq_role_ldap_group/>
- <rhq_permission ROLE_ID="1" OPERATION="0"/> <!-- Permission.MANAGE_SECURITY -->
- <rhq_permission ROLE_ID="1" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
- <rhq_permission ROLE_ID="1" OPERATION="2"/> <!-- Permission.MANAGE_SETTINGS -->
- <rhq_permission ROLE_ID="1" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
- <rhq_permission ROLE_ID="1" OPERATION="15"/> <!-- Permission.MANAGE_REPOSITORIES -->
- <!-- resource permissions start here-->
- <rhq_permission ROLE_ID="1" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
- <rhq_permission ROLE_ID="1" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
- <rhq_permission ROLE_ID="1" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
- <rhq_permission ROLE_ID="1" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
- <rhq_permission ROLE_ID="1" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
- <rhq_permission ROLE_ID="1" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
- <rhq_permission ROLE_ID="1" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
- <rhq_permission ROLE_ID="1" OPERATION="10"/> <!-- Permission.CONTROL -->
- <rhq_permission ROLE_ID="1" OPERATION="11"/> <!-- Permission.CONFIGURE -->
- <rhq_permission ROLE_ID="1" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
-
- <!-- give all-resources-role all permissions (resource perms is mainly just to show on view-role page) -->
- <rhq_permission ROLE_ID="2" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
- <rhq_permission ROLE_ID="2" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
- <!-- resource permissions start here-->
- <rhq_permission ROLE_ID="2" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
- <rhq_permission ROLE_ID="2" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
- <rhq_permission ROLE_ID="2" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
- <rhq_permission ROLE_ID="2" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
- <rhq_permission ROLE_ID="2" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
- <rhq_permission ROLE_ID="2" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
- <rhq_permission ROLE_ID="2" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
- <rhq_permission ROLE_ID="2" OPERATION="10"/> <!-- Permission.CONTROL -->
- <rhq_permission ROLE_ID="2" OPERATION="11"/> <!-- Permission.CONFIGURE -->
- <rhq_permission ROLE_ID="2" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
- <rhq_subject_role_map SUBJECT_ID="1" ROLE_ID="1"/>
- <rhq_subject_role_map SUBJECT_ID="2" ROLE_ID="1"/>
- <rhq_subject_role_ldap_map/>
- <rhq_saved_search/>
- <rhq_dashboard/>
- <rhq_dashboard_portlet/>
- <rhq_operation_def/>
- <rhq_operation_history/>
- <rhq_operation_schedule/>
- <rhq_event_def/>
- <rhq_event_source/>
- <rhq_event/>
- <rhq_alert_definition/>
- <rhq_alert_dampen_event/>
- <rhq_alert_condition/>
- <rhq_alert/>
- <rhq_alert_notif_log/>
- <rhq_alert_condition_log/>
- <rhq_alert_notification/>
- <rhq_plugin/>
- <rhq_measurement_def/>
- <rhq_measurement_sched/>
- <rhq_measurement_bline/>
- <rhq_measurement_data_num_1h/>
- <rhq_measurement_data_num_6h/>
- <rhq_measurement_data_num_1d/>
- <rhq_measurement_data_trait/>
- <rhq_calltime_data_key/>
- <rhq_calltime_data_value/>
- <rhq_availability/>
- <rhq_resource_avail/>
- <rhq_measurement_oob/>
- <rhq_measurement_oob_tmp/>
- <rhq_numbers i="0"/>
- <rhq_numbers i="1"/>
- <rhq_numbers i="2"/>
- <rhq_numbers i="3"/>
- <rhq_numbers i="4"/>
- <rhq_numbers i="5"/>
- <rhq_numbers i="6"/>
- <rhq_numbers i="7"/>
- <rhq_numbers i="8"/>
- <rhq_numbers i="9"/>
- <rhq_numbers i="10"/>
- <rhq_numbers i="11"/>
- <rhq_numbers i="12"/>
- <rhq_numbers i="13"/>
- <rhq_numbers i="14"/>
- <rhq_numbers i="15"/>
- <rhq_numbers i="16"/>
- <rhq_numbers i="17"/>
- <rhq_numbers i="18"/>
- <rhq_numbers i="19"/>
- <rhq_numbers i="20"/>
- <rhq_numbers i="21"/>
- <rhq_numbers i="22"/>
- <rhq_numbers i="23"/>
- <rhq_numbers i="24"/>
- <rhq_numbers i="25"/>
- <rhq_numbers i="26"/>
- <rhq_numbers i="27"/>
- <rhq_numbers i="28"/>
- <rhq_numbers i="29"/>
- <rhq_numbers i="30"/>
- <rhq_numbers i="31"/>
- <rhq_numbers i="32"/>
- <rhq_numbers i="33"/>
- <rhq_numbers i="34"/>
- <rhq_numbers i="35"/>
- <rhq_numbers i="36"/>
- <rhq_numbers i="37"/>
- <rhq_numbers i="38"/>
- <rhq_numbers i="39"/>
- <rhq_numbers i="40"/>
- <rhq_numbers i="41"/>
- <rhq_numbers i="42"/>
- <rhq_numbers i="43"/>
- <rhq_numbers i="44"/>
- <rhq_numbers i="45"/>
- <rhq_numbers i="46"/>
- <rhq_numbers i="47"/>
- <rhq_numbers i="48"/>
- <rhq_numbers i="49"/>
- <rhq_numbers i="50"/>
- <rhq_numbers i="51"/>
- <rhq_numbers i="52"/>
- <rhq_numbers i="53"/>
- <rhq_numbers i="54"/>
- <rhq_numbers i="55"/>
- <rhq_numbers i="56"/>
- <rhq_numbers i="57"/>
- <rhq_numbers i="58"/>
- <rhq_numbers i="59"/>
- <rhq_meas_data_num_r00/>
- <rhq_meas_data_num_r01/>
- <rhq_meas_data_num_r02/>
- <rhq_meas_data_num_r03/>
- <rhq_meas_data_num_r04/>
- <rhq_meas_data_num_r05/>
- <rhq_meas_data_num_r06/>
- <rhq_meas_data_num_r07/>
- <rhq_meas_data_num_r08/>
- <rhq_meas_data_num_r09/>
- <rhq_meas_data_num_r10/>
- <rhq_meas_data_num_r11/>
- <rhq_meas_data_num_r12/>
- <rhq_meas_data_num_r13/>
- <rhq_meas_data_num_r14/>
- <rhq_architecture id="1" name="noarch"/>
- <rhq_architecture id="2" name="i386"/>
- <rhq_architecture id="3" name="i486"/>
- <rhq_architecture id="4" name="i586"/>
- <rhq_architecture id="5" name="i686"/>
- <rhq_architecture id="6" name="alpha"/>
- <rhq_architecture id="7" name="alphaev6"/>
- <rhq_architecture id="8" name="ia64"/>
- <rhq_architecture id="9" name="sparc"/>
- <rhq_architecture id="10" name="sparcv9"/>
- <rhq_architecture id="11" name="sparc64"/>
- <rhq_architecture id="12" name="src"/>
- <rhq_architecture id="13" name="s390"/>
- <rhq_architecture id="14" name="athlon"/>
- <rhq_architecture id="15" name="s390x"/>
- <rhq_architecture id="16" name="ppc"/>
- <rhq_architecture id="17" name="ppc64"/>
- <rhq_architecture id="18" name="pSeries"/>
- <rhq_architecture id="19" name="iSeries"/>
- <rhq_architecture id="20" name="x86_64"/>
- <rhq_architecture id="21" name="ppc64iseries"/>
- <rhq_architecture id="22" name="ppc64pseries"/>
- <rhq_architecture id="23" name="sparc-solaris"/>
- <rhq_architecture id="24" name="sparc.sun4u-solaris"/>
- <rhq_architecture id="25" name="tar"/>
- <rhq_architecture id="26" name="ia32e"/>
- <rhq_architecture id="27" name="amd64"/>
- <rhq_architecture id="28" name="i386-solaris"/>
- <rhq_architecture id="29" name="nosrc"/>
- <rhq_architecture id="30" name="sparc-solaris-patch"/>
- <rhq_architecture id="31" name="i386-solaris-patch"/>
- <rhq_architecture id="32" name="sparc-solaris-patch-cluster"/>
- <rhq_architecture id="33" name="i386-solaris-patch-cluster"/>
- <rhq_architecture id="34" name="noarch-solaris"/>
- <rhq_architecture id="35" name="noarch-solaris-patch"/>
- <rhq_architecture id="36" name="noarch-solaris-patch-cluster"/>
- <rhq_architecture id="37" name="solaris-patch"/>
- <rhq_architecture id="38" name="solaris-patch-cluster"/>
- <rhq_repo_group_type id="1" name="family"/>
- <rhq_repo_group/>
- <rhq_content_source_type/>
- <rhq_content_source/>
- <rhq_repo/>
- <rhq_repo_relation_type id="1" name="parent"/>
- <rhq_repo_relation_type id="2" name="clone"/>
- <rhq_repo_relation/>
- <rhq_package_type/>
- <rhq_package/>
- <rhq_package_bits/>
- <rhq_package_version/>
- <rhq_content_req/>
- <rhq_installed_package/>
- <rhq_installed_pkg_hist/>
- <rhq_content_src_sync/>
- <rhq_repo_sync/>
- <rhq_package_inst_step/>
- <rhq_repo_resource_map/>
- <rhq_repo_content_src_map/>
- <rhq_repo_repo_group_map/>
- <rhq_repo_repo_relation_map/>
- <rhq_repo_pkg_version_map/>
- <rhq_pkg_ver_content_src_map/>
- <rhq_pkg_prd_map/>
- <rhq_distribution_type id="1" name="kickstart" description="Linux kickstart distribution"/>
- <rhq_distribution_type id="2" name="jumpstart" description="solaris jumpstart distribution"/>
- <rhq_distribution/>
- <rhq_repo_distribution/>
- <rhq_distribution_file/>
- <rhq_advisory/>
- <rhq_advisory_package/>
- <rhq_cve/>
- <rhq_advisory_cve/>
- <rhq_advisory_buglist/>
- <rhq_repo_advisory/>
- <rhq_bundle_type/>
- <rhq_bundle/>
- <rhq_bundle_version/>
- <rhq_bundle_version_repo/>
- <rhq_bundle_file/>
- <rhq_bundle_destination/>
- <rhq_bundle_deployment/>
- <rhq_bundle_res_deploy/>
- <rhq_bundle_res_dep_hist/>
- <rhq_tagging_bundle_map/>
- <rhq_tagging_bundle_version_map/>
- <rhq_tagging_bundle_deploy_map/>
- <rhq_tagging_bundle_dest_map/>
- <rhq_create_res_hist/>
- <rhq_delete_res_hist/>
- <rhq_drift_def_template/>
- <rhq_drift_definition/>
- <rhq_drift_change_set/>
- <jms_messages/>
- <jms_transactions/>
- <jms_users/>
- <jms_roles/>
- <jms_subscriptions/>
-</dataset>
-
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
deleted file mode 100644
index befc699..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<plugin name="PluginExtensionMetadataChild1TestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Child 1 Test Plugin"
- package="org.rhq.plugins.test.child1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="OuterServerA">
- <server name="Child1ServerA"
- description="Child 1 Server type that extends Parent Server type"
- discovery="Child1DiscoveryComponent"
- class="Child1Component"
- sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
deleted file mode 100644
index 0dafa9b..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<plugin name="PluginExtensionMetadataChild2TestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Child 2 Test Plugin"
- package="org.rhq.plugins.test.child2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
-
- <server name="Child2ServerA"
- description="Child 2 Server type that extends Parent Server type"
- discovery="Child2DiscoveryComponent"
- class="Child2Component"
- sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
-
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
deleted file mode 100644
index 627c5a8..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
- version="1.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op" timeout="123456" description="a op"></operation>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
deleted file mode 100644
index 2c0e9d8..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
- version="2.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
deleted file mode 100644
index 08ea056..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataChildTestPlugin"
- version="1.0"
- displayName="Multiple Plugin Extension Single Descriptor Metadata Child Test Plugin"
- package="org.rhq.plugins.test.child"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="OuterServerA">
- <server name="Child1ServerA"
- description="Child 1 Server type that extends Parent Server type"
- discovery="Child1DiscoveryComponent"
- class="Child1Component"
- sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
- </server>
-
- <server name="OuterServerB">
- <server name="Child2ServerA"
- description="Child 2 Server type that extends Parent Server type"
- discovery="Child2DiscoveryComponent"
- class="Child2Component"
- sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
deleted file mode 100644
index be977e7..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- version="1.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op" timeout="123456" description="a op"></operation>
-
- <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
- <service name="InnerServiceA">
- <metric property="inner-A-metric" />
- </service>
- -->
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
deleted file mode 100644
index 9f02834..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
- version="2.0"
- displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
-
- <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
- <service name="InnerServiceA">
- <metric property="inner-A-metric" />
- </service>
- -->
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 93a15ef..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<plugin name="OperationMetadataManagerBeanTestPlugin"
- displayName="OperationMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="OperationServer1">
- <operation name="OperationServer1.Operation1"/>
- </server>
- <server name="OperationServer11">
- <operation name="OperationServer11.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- <c:simple-property name="param2"/>
- </parameters>
- </operation>
- </server>
-
- <server name="OperationServer2"/>
- <server name="OperationServer21">
- <operation name="OperationServer21.Operation1"/>
- </server>
- <server name="OperationServer22">
- <operation name="OperationServer22.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- <c:simple-property name="param2"/>
- </parameters>
- </operation>
- </server>
- <server name="OperationServer23">
- <operation name="OperationServer23.Operation1"/>
- </server>
- <server name="OperationServer24">
- <operation name="OperationServer24.Operation1"/>
- <operation name="OperationServer24.Operation2">
- <results>
- <c:simple-property name="exitCode"/>
- </results>
- </operation>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index a86fbcf..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<plugin name="OperationMetadataManagerBeanTestPlugin"
- displayName="OperationMetadataManagerBean Test Plugin"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="OperationServer1">
- <operation name="OperationServer1.Operation1"/>
- </server>
- <server name="OperationServer11">
- <operation name="OperationServer11.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- <c:simple-property name="param2"/>
- </parameters>
- </operation>
- </server>
-
- <server name="OperationServer2">
- <operation name="OperationServer2.Operation1"/>
- </server>
- <server name="OperationServer21"/>
- <server name="OperationServer22">
- <operation name="OperationServer22.Operation1"/>
- </server>
- <server name="OperationServer23">
- <operation name="OperationServer23.Operation1">
- <results>
- <c:simple-property name="exitCode"/>
- </results>
- </operation>
- </server>
- <server name="OperationServer24">
- <operation name="OperationServer24.Operation1">
- <parameters>
- <c:simple-property name="param1"/>
- </parameters>
- </operation>
- <operation name="OperationServer24.Operation2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
deleted file mode 100644
index ddedf10..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<plugin name="PluginExtensionMetadataChildTestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Child Test Plugin"
- package="org.rhq.plugins.test.child"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ChildServerA"
- description="Child Server type that extends Parent Server type"
- discovery="ChildDiscoveryComponent"
- class="ChildComponent"
- sourcePlugin="PluginExtensionMetadataParentTestPlugin"
- sourceType="ParentServerA">
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
deleted file mode 100644
index e640187..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<plugin name="PluginExtensionMetadataParentTestPlugin"
- version="1.0"
- displayName="Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <subcategories>
- <subcategory name="A-subcat" displayName="a subcat"/>
- </subcategories>
-
- <plugin-configuration>
- <c:group name="A-pc-group" hiddenByDefault="true">
- <c:simple-property name="A-pc-prop" description="test plugin config prop" required="false" />
- </c:group>
- </plugin-configuration>
-
- <process-scan name="A-process-scan" query="process|basename|match=A.exe"/>
- <operation name="A-op" timeout="123456" description="a op"></operation>
- <metric property="A-metric" defaultInterval="123456"></metric>
- <event name="A-event" description="a event"></event>
-
- <resource-configuration>
- <c:simple-property name="A-rc-prop" description="test resource config prop" required="false" />
- </resource-configuration>
-
- <drift-definition name="A-drift-def">
- <basedir>
- <value-context>pluginConfiguration</value-context>
- <value-name>A-pc-prop</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="A-bundle-basedir">
- <value-context>resourceConfiguration</value-context>
- <value-name>A-rc-prop</value-name>
- </destination-base-dir>
- </bundle-target>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
deleted file mode 100644
index b0d4027..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<plugin name="PluginExtensionMetadataParentTestPlugin"
- version="2.0"
- displayName="Plugin Extension Metadata Parent Test Plugin"
- package="org.rhq.plugins.test.parent"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="ParentServerA"
- description="Parent Server type that can be extended by a Child Server type"
- discovery="ParentDiscoveryComponent"
- class="ParentComponent">
-
- <subcategories>
- <subcategory name="A-subcat" displayName="a subcat"/>
- </subcategories>
-
- <plugin-configuration>
- <c:group name="A-pc-group" hiddenByDefault="false">
- <c:simple-property name="A-pc-prop-CHANGED" description="A-pc-prop desc 1" required="true" />
- </c:group>
- <c:group name="A-pc-group-NEW" hiddenByDefault="true">
- <c:simple-property name="A-pc-prop-NEW" description="A-pc-prop desc 2" required="false" />
- </c:group>
- </plugin-configuration>
-
- <process-scan name="A-process-scan" query="process|basename|match=CHANGED.exe"/> <!-- CHANGED, but same name -->
- <process-scan name="A-process-scan-NEW" query="process|basename|match=NEW.exe"/>
- <operation name="A-op" timeout="987654" description="a changed op"></operation> <!-- CHANGED, but same name -->
- <operation name="A-op-NEW" timeout="111111" description="a new op"></operation>
- <metric property="A-metric" defaultInterval="555555"></metric> <!-- CHANGED, but same name -->
- <metric property="A-metric-NEW" defaultInterval="98765"></metric>
- <event name="A-event-CHANGED" description="a changed event"></event>
- <event name="A-event-NEW" description="a new event"></event>
-
- <resource-configuration>
- <c:simple-property name="A-rc-prop-CHANGED" description="test resource config prop 1" required="true" />
- <c:simple-property name="A-rc-prop-NEW" description="test resource config prop 2" required="false" />
- </resource-configuration>
-
- <drift-definition name="A-drift-def-CHANGED">
- <basedir>
- <value-context>pluginConfiguration</value-context>
- <value-name>A-pc-prop</value-name>
- </basedir>
- </drift-definition>
- <drift-definition name="A-drift-def-NEW">
- <basedir>
- <value-context>resourceConfiguration</value-context>
- <value-name>A-rc-prop</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="A-bundle-basedir-CHANGED">
- <value-context>resourceConfiguration</value-context>
- <value-name>A-rc-prop</value-name>
- </destination-base-dir>
- <destination-base-dir name="A-bundle-basedir-NEW">
- <value-context>pluginConfiguration</value-context>
- <value-name>A-pc-prop</value-name>
- </destination-base-dir>
- </bundle-target>
-
- </server>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
deleted file mode 100644
index 6680aa6..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin1"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="TestServer1"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
deleted file mode 100644
index c6f8736..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin2"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <depends plugin="PluginManagerBeanTestPlugin1" useClasses="true"/>
-
- <server name="TestServer2"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
deleted file mode 100644
index e885167..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin3.1"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="TestServer3.1"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
deleted file mode 100644
index 78184bf..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="PluginManagerBeanTestPlugin3"
- package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="TestServer3"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
deleted file mode 100644
index bd9728b..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerWithDupDrift" description="has duplicate drift config names and thus is invalid">
- <drift-definition name="drift-one">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/a</value-name>
- </basedir>
- </drift-definition>
- <drift-definition name="drift-one">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/b</value-name>
- </basedir>
- </drift-definition>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
deleted file mode 100644
index 853e423..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<plugin name="ParentResourceTypeTestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <server name="Server A First Level" description="Server A description">
- <server name="Server B Second Level" description="Server B description"/>
- <service name="Service A Second Level" description="Service A description"/>
- </server>
-
- <server name="Server C First Level" description="Server C description">
- <runs-inside>
- <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
- </runs-inside>
- </server>
-
- <service name="Service B First Level" description="Service B description">
- <runs-inside>
- <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
- </runs-inside>
- </service>
-
- <service name="Service C First Level" description="Service C description">
- <runs-inside>
- <parent-resource-type name="Service A Second Level" plugin="ParentResourceTypeTestPlugin"/>
- </runs-inside>
- </service>
-
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
deleted file mode 100644
index 88cd39c..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerA" description="Server A description">
- <subcategories>
- <subcategory name="Resources" description="Resources subcategory"/>
- <subcategory name="Applications" description="Applications subcategory"/>
- </subcategories>
-
- <plugin-configuration>
- <c:simple-property name="connectionPropertyX" default="x"/>
- <c:simple-property name="connectionPropertyY" default="y"/>
- </plugin-configuration>
-
- <process-scan name="serverA" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
-
- <operation name="start">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <operation name="stop">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
- <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
-
- <event name="logAEntry" description="an entry was appended to a log file"/>
- <event name="logBEntry" description="an entry was appended to a log file"/>
-
- <content name="ServerA.Content.1" category="deployable">
- <configuration>
- <c:simple-property name="ServerA.Content.1.version"/>
- </configuration>
- </content>
-
- <content name="ServerA.Content.2" category="deployable">
- <configuration>
- <c:simple-property name="ServerA.Content.2.version"/>
- </configuration>
- </content>
-
- <drift-definition name="drift-pc">
- <basedir>
- <value-context>pluginConfiguration</value-context>
- <value-name>connectionPropertyX</value-name>
- </basedir>
- <interval>123456</interval>
- <includes>
- <include path="foo/bar" pattern="**/*.blech"/>
- </includes>
- <excludes>
- <exclude path="/wot/gorilla" pattern="*.xml" />
- <exclude path="/hello"/>
- </excludes>
- </drift-definition>
-
- <drift-definition name="drift-fs">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="bundleTarget-pc" description="pc-description">
- <value-context>pluginConfiguration</value-context>
- <value-name>connectionPropertyY</value-name>
- </destination-base-dir>
- <destination-base-dir name="bundleTarget-fs"> <!-- note: no description, so we can test for proper null handling -->
- <value-context>fileSystem</value-context>
- <value-name>/wot/gorilla</value-name>
- </destination-base-dir>
- </bundle-target>
-
- <service name="Child1" description="Child 1 description"/>
- <service name="Child2" description="Child 2 description"/>
- </server>
-
- <server name="ServerB" description="Server B description"/>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
deleted file mode 100644
index a89f679..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerA" description="Server A description">
-
- <subcategories>
- <subcategory name="Resources" description="Resources subcategory"/>
- <subcategory name="Applications" description="Applications subcategory"/>
- </subcategories>
-
- <plugin-configuration>
- <c:simple-property name="connectionPropertyX" default="x"/>
- <c:simple-property name="connectionPropertyY" default="y"/>
- </plugin-configuration>
-
- <process-scan name="processA" query="process|basename|match=^java.*,arg|org.jboss.MainA|match=.*"/>
- <process-scan name="processB" query="process|basename|match=^java.*,arg|org.jboss.MainB|match=.*"/>
-
- <operation name="start">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <operation name="shutdown">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <operation name="restart">
- <parameters>
- <c:simple-property name="immediate" type="boolean"/>
- </parameters>
- <results>
- <c:simple-property name="exitCode" type="integer"/>
- </results>
- </operation>
-
- <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
- <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
-
- <event name="logAEntry" description="an entry was appended to a log file"/>
- <event name="logCEntry" description="an entry was appended to a log file"/>
-
- <content name="ServerA.Content.1" category="configuration">
- <configuration>
- <c:simple-property name="ServerA.Content.1.property1"/>
- <c:simple-property name="ServerA.Content.1.property2"/>
- </configuration>
- </content>
-
- <content name="ServerA.Content.3" category="deployable">
- <configuration>
- <c:simple-property name="ServerA.Content.3.version"/>
- </configuration>
- </content>
-
- <drift-definition name="drift-rc">
- <basedir>
- <!-- this resource doesn't really have this resource config prop
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>resourceConfiguration</value-context>
- <value-name>resourceConfig1</value-name>
- </basedir>
- </drift-definition>
-
- <drift-definition name="drift-mt">
- <basedir>
- <!-- this resource doesn't really have this metric trait
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>measurementTrait</value-context>
- <value-name>trait1</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="bundleTarget-rc" description="rc-description">
- <!-- this resource doesn't really have this resource config prop
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>resourceConfiguration</value-context>
- <value-name>resourceConfig1</value-name>
- </destination-base-dir>
- <destination-base-dir name="bundleTarget-mt" description="mt-description">
- <!-- this resource doesn't really have this metric trait
- but today we do not check for validity so this is OK. In the future, if we do
- check, our tests will fail and we'll need to change this test drift config -->
- <value-context>measurementTrait</value-context>
- <value-name>trait1</value-name>
- </destination-base-dir>
- </bundle-target>
-
- <service name="Child1"/>
- <service name="Child3"/>
- </server>
-
- <server name="ServerB" description="Server B description">
- <service name="Child2"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
deleted file mode 100644
index 460954b..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerWithBundleAndDriftConfig">
- <drift-definition name="drift1">
- <basedir>
- <value-context>fileSystem</value-context>
- <value-name>/dirA</value-name>
- </basedir>
- </drift-definition>
-
- <bundle-target>
- <destination-base-dir name="destdir1">
- <value-context>fileSystem</value-context>
- <value-name>/dirB</value-name>
- </destination-base-dir>
- </bundle-target>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
deleted file mode 100644
index c92919d..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerWithBundleAndDriftConfig">
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
deleted file mode 100644
index 60a9f93..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerC" description="Server C description">
-
- <subcategories>
- <subcategory name="ServerC.Category1">
- <subcategory name="ServerC.NestedCategory1"/>
- </subcategory>
- <subcategory name="ServerC.Category2"/>
- </subcategories>
-
- <bundle type="Test Bundle"/>
-
- <process-scan name="scan1" query="process|basename|match=^java.*,arg|org.rhq.serverC1|match=.*"/>
- <process-scan name="scan2" query="process|basename|match=^java.*,arg|org.rhq.serverC2|match=.*"/>
-
- <operation name="run">
- <parameters>
- <c:simple-property name="script"/>
- </parameters>
- <results>
- <c:simple-property name="errors"/>
- </results>
- </operation>
-
- <metric displayName="Metric 1" property="ServerC::metric1" displayType="summary" defaultInterval="300000"/>
-
- <event name="serverCEvent" description="an entry was appended to a log file"/>
-
- <content name="ServerC.Content" category="deployable">
- <configuration>
- <c:simple-property name="ServerC.Content.version"/>
- </configuration>
- </content>
- </server>
-
- <server name="ServerD">
- <service name="ServerD.Child1">
- <service name="ServerD.GrandChild1"/>
- </service>
- </server>
-
- <server name="ServerE">
- <service name="ServiceE1">
- <service name="ServiceE2">
- <service name="ServiceE3">
- <service name="serviceE4"/>
- </service>
- </service>
- </service>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
deleted file mode 100644
index 6b0cdb0..0000000
--- a/modules/enterprise/server/itests-2/src/test/resources/obsolete/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
- <server name="ServerD">
- <service name="ServerD.GrandChild1"/>
- </server>
-</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..3b9ad64
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,8 @@
+<plugin name="AlertMetadataManagerBeanTestPlugin"
+ displayName="AlertMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="AlertServer"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..f2664dc
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/AlertMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,7 @@
+<plugin name="AlertMetadataManagerBeanTestPlugin"
+ displayName="AlertMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..79f9296
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,45 @@
+<plugin name="ContentMetadataManagerBeanTestPlugin"
+ displayName="ContentMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ContentServer">
+ <content name="ContentServer.Content.1" category="deployable"/>
+ </server>
+
+ <server name="ContentServer1"/>
+
+ <server name="ContentServer2">
+ <content name="ContentServer2.Content.1" category="executableScript"/>
+ </server>
+
+ <server name="ContentServer3">
+ <content name="ContentServer3.Content.1" category="deployable"/>
+ <content name="ContentServer3.Content.2" category="deployable"/>
+ <content name="ContentServer3.Content.3" category="deployable"/>
+ </server>
+
+ <server name="ContentServer4">
+ <content name="ContentServer4.Content.1" category="deployable"/>
+ </server>
+
+ <server name="ContentServer5">
+ <content name="ContentServer5.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="x"/>
+ </configuration>
+ </content>
+ <content name="ContentServer5.Content.2" category="deployable">
+ <configuration>
+ <c:simple-property name="x"/>
+ </configuration>
+ </content>
+ </server>
+
+ <server name="ContentServer6"/>
+
+ <server name="ContentServer7">
+ <bundle type="ContentServer.Bundle.1"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..f0cd7b8
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ContentMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,49 @@
+<plugin name="ContentMetadataManagerBeanTestPlugin"
+ displayName="ContentMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ContentServer">
+ <content name="ContentServer.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="version"/>
+ </configuration>
+ </content>
+ </server>
+
+ <server name="ContentServer1">
+ <content name="ContentServer1.Content.1" category="deployable"/>
+ <content name="ContentServer1.Content.2" category="configuration"/>
+ </server>
+
+ <server name="ContentServer2"/>
+
+ <server name="ContentServer3">
+ <content name="ContentServer3.Content.2" category="deployable"/>
+ <content name="ContentServer3.Content.3" category="deployable"/>
+ </server>
+
+ <server name="ContentServer4">
+ <content name="ContentServer4.Content.1" category="deployable"/>
+ <content name="ContentServer4.Content.2" category="deployable"/>
+ </server>
+
+ <server name="ContentServer5">
+ <content name="ContentServer5.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="x"/>
+ <c:simple-property name="y"/>
+ </configuration>
+ </content>
+ <content name="ContentServer5.Content.2" category="deployable"/>
+ </server>
+
+ <server name="ContentServer6">
+ <bundle type="ContentServer6.Bundle.1"/>
+ </server>
+
+ <server name="ContentServer7">
+ <bundle type="ContentServer.Bundle.2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..2786b05
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,23 @@
+<plugin name="EventMetadataManagerBeanTestPlugin"
+ displayName="MeasurementMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="EventServer1">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer2"/>
+
+ <server name="EventServer3">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer4">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..f4f765f
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/EventMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,23 @@
+<plugin name="EventMetadataManagerBeanTestPlugin"
+ displayName="ContentMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="EventServer1">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer2">
+ <event name="event1" description="Event 1"/>
+ <event name="event2" description="Event 2"/>
+ </server>
+
+ <server name="EventServer3"/>
+
+ <server name="EventServer4">
+ <event name="event1" description="EVENT ONE"/>
+ <event name="event3" description="Event 3"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..0202079
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,48 @@
+<plugin name="MeasurementMetadataManagerBeanTestPlugin"
+ displayName="MeasurementMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="MetricServer1">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
+ description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
+ units="megabytes" measurementType="trendsup"/>
+ <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
+ description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
+ units="milliseconds" destinationType="myMethod"/>
+ </server>
+ <server name="MetricServer2"/>
+ <server name="MetricServer3">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+
+ <service name="MetricService1">
+ <metric property="rhq.availability" defaultInterval="120000" defaultOn="false" />
+ </service>
+ <service name="MetricService2" />
+ </server>
+ <server name="MetricServer4">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ </server>
+ <server name="MetricServer5">
+ <!--
+ Need to use names for these metrics that are unique across the plugin because the resource
+ type will be deleted and the metric definition cannot be looked up by resource type. We will
+ instead look them up by name only.
+ -->
+ <metric displayName="metric1" property="MetricServer5.metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ <metric displayName="metric3" property="MetricServer5.metric3" dataType="calltime" displayType="detail"
+ description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
+ units="milliseconds" destinationType="myMethod"/>
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..d949778
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,40 @@
+<plugin name="MeasurementMetadataManagerBeanTestPlugin"
+ displayName="MeasurementMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="MetricServer1">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ <metric displayName="metric2" property="metric2" dataType="measurement" displayType="detail"
+ description="Metric 2" category="performance" defaultInterval="30000" defaultOn="true"
+ units="megabytes" measurementType="trendsup"/>
+ <metric displayName="metric3" property="metric3" dataType="calltime" displayType="detail"
+ description="Metric 3" category="throughput" defaultInterval="30000" defaultOn="true"
+ units="milliseconds" destinationType="myMethod"/>
+ <metric displayName="cannotBeSet" property="rhq.availability"
+ description="cannotBeSet" defaultInterval="120000" defaultOn="true"/>
+ </server>
+ <server name="MetricServer2">
+ <metric displayName="metric1" property="metric1" dataType="trait" displayType="summary"
+ description="Metric 1" category="availability" defaultInterval="30000" defaultOn="true"
+ units="milliseconds"/>
+ </server>
+ <server name="MetricServer3">
+ <metric displayName="metric1" property="metric1" dataType="measurement" displayType="detail"
+ description="Metric One" category="performance" defaultInterval="60000" defaultOn="false"
+ units="milliseconds" measurementType="trendsup"/>
+
+ <service name="MetricService1">
+ <metric displayName="cannotBeSet" property="rhq.availability"
+ description="cannotBeSet" defaultInterval="240000" defaultOn="true" />
+ </service>
+ <service name="MetricService2">
+ <metric displayName="cannotBeSet" property="rhq.availability"
+ description="cannotBeSet" defaultInterval="480000" defaultOn="true" />
+ </service>
+ </server>
+ <server name="MetricServer4"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
new file mode 100644
index 0000000..e914562
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
@@ -0,0 +1,298 @@
+<dataset>
+ <rhq_config_def/>
+ <rhq_config_prop_grp_def/>
+ <rhq_config_prop_def/>
+ <rhq_config_pd_osrc/>
+ <rhq_conf_prop_def_enum/>
+ <rhq_config_prop_constr/>
+ <rhq_config/>
+ <rhq_config_property/>
+ <rhq_config_template/>
+ <rhq_raw_config/>
+ <rhq_affinity_group/>
+ <rhq_server/>
+ <rhq_agent/>
+ <rhq_partition_event/>
+ <rhq_partition_details/>
+ <rhq_failover_list/>
+ <rhq_failover_details/>
+ <rhq_principal id="2" PRINCIPAL="rhqadmin" PASSWORD="x1XwrxKuPvYUILiOnOZTLg=="/>
+ <rhq_subject
+ ID="1"
+ NAME="admin"
+ FIRST_NAME="Super"
+ LAST_NAME="User"
+ FSYSTEM="1"/>
+ <rhq_subject
+ ID="2"
+ NAME="rhqadmin"
+ FIRST_NAME="RHQ"
+ LAST_NAME="Administrator"
+ EMAIL_ADDRESS="nobody@localhost"
+ FSYSTEM="0"/>
+ <rhq_resource_type/>
+ <rhq_resource_subcat/>
+ <rhq_resource_type_parents/>
+ <rhq_process_scan/>
+ <rhq_prd_ver/>
+ <rhq_resource/>
+ <rhq_resource_error/>
+ <rhq_group_def/>
+ <rhq_resource_group/>
+ <rhq_resource_group_res_imp_map/>
+ <rhq_resource_group_res_exp_map/>
+ <rhq_config_group_update/>
+ <rhq_config_update/>
+ <rhq_tagging/>
+ <rhq_tagging_resource_map/>
+ <rhq_tagging_res_group_map/>
+ <rhq_role
+ ID="1"
+ NAME="Super User Role"
+ FSYSTEM="1"
+ DESCRIPTION="System superuser role that provides full access to everything. This role cannot be modified."/>
+ <rhq_role
+ ID="2"
+ NAME="All Resources Role"
+ FSYSTEM="0"
+ DESCRIPTION="Provides full access to all resources in inventory. Cannot modify users, roles or server settings."/>
+ <rhq_role_resource_group_map/>
+ <rhq_role_ldap_group/>
+ <rhq_permission ROLE_ID="1" OPERATION="0"/> <!-- Permission.MANAGE_SECURITY -->
+ <rhq_permission ROLE_ID="1" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
+ <rhq_permission ROLE_ID="1" OPERATION="2"/> <!-- Permission.MANAGE_SETTINGS -->
+ <rhq_permission ROLE_ID="1" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
+ <rhq_permission ROLE_ID="1" OPERATION="15"/> <!-- Permission.MANAGE_REPOSITORIES -->
+ <!-- resource permissions start here-->
+ <rhq_permission ROLE_ID="1" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
+ <rhq_permission ROLE_ID="1" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
+ <rhq_permission ROLE_ID="1" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
+ <rhq_permission ROLE_ID="1" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <rhq_permission ROLE_ID="1" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
+ <rhq_permission ROLE_ID="1" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
+ <rhq_permission ROLE_ID="1" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
+ <rhq_permission ROLE_ID="1" OPERATION="10"/> <!-- Permission.CONTROL -->
+ <rhq_permission ROLE_ID="1" OPERATION="11"/> <!-- Permission.CONFIGURE -->
+ <rhq_permission ROLE_ID="1" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
+
+ <!-- give all-resources-role all permissions (resource perms is mainly just to show on view-role page) -->
+ <rhq_permission ROLE_ID="2" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
+ <rhq_permission ROLE_ID="2" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
+ <!-- resource permissions start here-->
+ <rhq_permission ROLE_ID="2" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
+ <rhq_permission ROLE_ID="2" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
+ <rhq_permission ROLE_ID="2" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
+ <rhq_permission ROLE_ID="2" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <rhq_permission ROLE_ID="2" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
+ <rhq_permission ROLE_ID="2" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
+ <rhq_permission ROLE_ID="2" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
+ <rhq_permission ROLE_ID="2" OPERATION="10"/> <!-- Permission.CONTROL -->
+ <rhq_permission ROLE_ID="2" OPERATION="11"/> <!-- Permission.CONFIGURE -->
+ <rhq_permission ROLE_ID="2" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
+ <rhq_subject_role_map SUBJECT_ID="1" ROLE_ID="1"/>
+ <rhq_subject_role_map SUBJECT_ID="2" ROLE_ID="1"/>
+ <rhq_subject_role_ldap_map/>
+ <rhq_saved_search/>
+ <rhq_dashboard/>
+ <rhq_dashboard_portlet/>
+ <rhq_operation_def/>
+ <rhq_operation_history/>
+ <rhq_operation_schedule/>
+ <rhq_event_def/>
+ <rhq_event_source/>
+ <rhq_event/>
+ <rhq_alert_definition/>
+ <rhq_alert_dampen_event/>
+ <rhq_alert_condition/>
+ <rhq_alert/>
+ <rhq_alert_notif_log/>
+ <rhq_alert_condition_log/>
+ <rhq_alert_notification/>
+ <rhq_plugin/>
+ <rhq_measurement_def/>
+ <rhq_measurement_sched/>
+ <rhq_measurement_bline/>
+ <rhq_measurement_data_num_1h/>
+ <rhq_measurement_data_num_6h/>
+ <rhq_measurement_data_num_1d/>
+ <rhq_measurement_data_trait/>
+ <rhq_calltime_data_key/>
+ <rhq_calltime_data_value/>
+ <rhq_availability/>
+ <rhq_resource_avail/>
+ <rhq_measurement_oob/>
+ <rhq_measurement_oob_tmp/>
+ <rhq_numbers i="0"/>
+ <rhq_numbers i="1"/>
+ <rhq_numbers i="2"/>
+ <rhq_numbers i="3"/>
+ <rhq_numbers i="4"/>
+ <rhq_numbers i="5"/>
+ <rhq_numbers i="6"/>
+ <rhq_numbers i="7"/>
+ <rhq_numbers i="8"/>
+ <rhq_numbers i="9"/>
+ <rhq_numbers i="10"/>
+ <rhq_numbers i="11"/>
+ <rhq_numbers i="12"/>
+ <rhq_numbers i="13"/>
+ <rhq_numbers i="14"/>
+ <rhq_numbers i="15"/>
+ <rhq_numbers i="16"/>
+ <rhq_numbers i="17"/>
+ <rhq_numbers i="18"/>
+ <rhq_numbers i="19"/>
+ <rhq_numbers i="20"/>
+ <rhq_numbers i="21"/>
+ <rhq_numbers i="22"/>
+ <rhq_numbers i="23"/>
+ <rhq_numbers i="24"/>
+ <rhq_numbers i="25"/>
+ <rhq_numbers i="26"/>
+ <rhq_numbers i="27"/>
+ <rhq_numbers i="28"/>
+ <rhq_numbers i="29"/>
+ <rhq_numbers i="30"/>
+ <rhq_numbers i="31"/>
+ <rhq_numbers i="32"/>
+ <rhq_numbers i="33"/>
+ <rhq_numbers i="34"/>
+ <rhq_numbers i="35"/>
+ <rhq_numbers i="36"/>
+ <rhq_numbers i="37"/>
+ <rhq_numbers i="38"/>
+ <rhq_numbers i="39"/>
+ <rhq_numbers i="40"/>
+ <rhq_numbers i="41"/>
+ <rhq_numbers i="42"/>
+ <rhq_numbers i="43"/>
+ <rhq_numbers i="44"/>
+ <rhq_numbers i="45"/>
+ <rhq_numbers i="46"/>
+ <rhq_numbers i="47"/>
+ <rhq_numbers i="48"/>
+ <rhq_numbers i="49"/>
+ <rhq_numbers i="50"/>
+ <rhq_numbers i="51"/>
+ <rhq_numbers i="52"/>
+ <rhq_numbers i="53"/>
+ <rhq_numbers i="54"/>
+ <rhq_numbers i="55"/>
+ <rhq_numbers i="56"/>
+ <rhq_numbers i="57"/>
+ <rhq_numbers i="58"/>
+ <rhq_numbers i="59"/>
+ <rhq_meas_data_num_r00/>
+ <rhq_meas_data_num_r01/>
+ <rhq_meas_data_num_r02/>
+ <rhq_meas_data_num_r03/>
+ <rhq_meas_data_num_r04/>
+ <rhq_meas_data_num_r05/>
+ <rhq_meas_data_num_r06/>
+ <rhq_meas_data_num_r07/>
+ <rhq_meas_data_num_r08/>
+ <rhq_meas_data_num_r09/>
+ <rhq_meas_data_num_r10/>
+ <rhq_meas_data_num_r11/>
+ <rhq_meas_data_num_r12/>
+ <rhq_meas_data_num_r13/>
+ <rhq_meas_data_num_r14/>
+ <rhq_architecture id="1" name="noarch"/>
+ <rhq_architecture id="2" name="i386"/>
+ <rhq_architecture id="3" name="i486"/>
+ <rhq_architecture id="4" name="i586"/>
+ <rhq_architecture id="5" name="i686"/>
+ <rhq_architecture id="6" name="alpha"/>
+ <rhq_architecture id="7" name="alphaev6"/>
+ <rhq_architecture id="8" name="ia64"/>
+ <rhq_architecture id="9" name="sparc"/>
+ <rhq_architecture id="10" name="sparcv9"/>
+ <rhq_architecture id="11" name="sparc64"/>
+ <rhq_architecture id="12" name="src"/>
+ <rhq_architecture id="13" name="s390"/>
+ <rhq_architecture id="14" name="athlon"/>
+ <rhq_architecture id="15" name="s390x"/>
+ <rhq_architecture id="16" name="ppc"/>
+ <rhq_architecture id="17" name="ppc64"/>
+ <rhq_architecture id="18" name="pSeries"/>
+ <rhq_architecture id="19" name="iSeries"/>
+ <rhq_architecture id="20" name="x86_64"/>
+ <rhq_architecture id="21" name="ppc64iseries"/>
+ <rhq_architecture id="22" name="ppc64pseries"/>
+ <rhq_architecture id="23" name="sparc-solaris"/>
+ <rhq_architecture id="24" name="sparc.sun4u-solaris"/>
+ <rhq_architecture id="25" name="tar"/>
+ <rhq_architecture id="26" name="ia32e"/>
+ <rhq_architecture id="27" name="amd64"/>
+ <rhq_architecture id="28" name="i386-solaris"/>
+ <rhq_architecture id="29" name="nosrc"/>
+ <rhq_architecture id="30" name="sparc-solaris-patch"/>
+ <rhq_architecture id="31" name="i386-solaris-patch"/>
+ <rhq_architecture id="32" name="sparc-solaris-patch-cluster"/>
+ <rhq_architecture id="33" name="i386-solaris-patch-cluster"/>
+ <rhq_architecture id="34" name="noarch-solaris"/>
+ <rhq_architecture id="35" name="noarch-solaris-patch"/>
+ <rhq_architecture id="36" name="noarch-solaris-patch-cluster"/>
+ <rhq_architecture id="37" name="solaris-patch"/>
+ <rhq_architecture id="38" name="solaris-patch-cluster"/>
+ <rhq_repo_group_type id="1" name="family"/>
+ <rhq_repo_group/>
+ <rhq_content_source_type/>
+ <rhq_content_source/>
+ <rhq_repo/>
+ <rhq_repo_relation_type id="1" name="parent"/>
+ <rhq_repo_relation_type id="2" name="clone"/>
+ <rhq_repo_relation/>
+ <rhq_package_type/>
+ <rhq_package/>
+ <rhq_package_bits/>
+ <rhq_package_version/>
+ <rhq_content_req/>
+ <rhq_installed_package/>
+ <rhq_installed_pkg_hist/>
+ <rhq_content_src_sync/>
+ <rhq_repo_sync/>
+ <rhq_package_inst_step/>
+ <rhq_repo_resource_map/>
+ <rhq_repo_content_src_map/>
+ <rhq_repo_repo_group_map/>
+ <rhq_repo_repo_relation_map/>
+ <rhq_repo_pkg_version_map/>
+ <rhq_pkg_ver_content_src_map/>
+ <rhq_pkg_prd_map/>
+ <rhq_distribution_type id="1" name="kickstart" description="Linux kickstart distribution"/>
+ <rhq_distribution_type id="2" name="jumpstart" description="solaris jumpstart distribution"/>
+ <rhq_distribution/>
+ <rhq_repo_distribution/>
+ <rhq_distribution_file/>
+ <rhq_advisory/>
+ <rhq_advisory_package/>
+ <rhq_cve/>
+ <rhq_advisory_cve/>
+ <rhq_advisory_buglist/>
+ <rhq_repo_advisory/>
+ <rhq_bundle_type/>
+ <rhq_bundle/>
+ <rhq_bundle_version/>
+ <rhq_bundle_version_repo/>
+ <rhq_bundle_file/>
+ <rhq_bundle_destination/>
+ <rhq_bundle_deployment/>
+ <rhq_bundle_res_deploy/>
+ <rhq_bundle_res_dep_hist/>
+ <rhq_tagging_bundle_map/>
+ <rhq_tagging_bundle_version_map/>
+ <rhq_tagging_bundle_deploy_map/>
+ <rhq_tagging_bundle_dest_map/>
+ <rhq_create_res_hist/>
+ <rhq_delete_res_hist/>
+ <rhq_drift_def_template/>
+ <rhq_drift_definition/>
+ <rhq_drift_change_set/>
+ <jms_messages/>
+ <jms_transactions/>
+ <jms_users/>
+ <jms_roles/>
+ <jms_subscriptions/>
+</dataset>
+
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
new file mode 100644
index 0000000..befc699
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child1_plugin_v1.xml
@@ -0,0 +1,19 @@
+<plugin name="PluginExtensionMetadataChild1TestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Child 1 Test Plugin"
+ package="org.rhq.plugins.test.child1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="OuterServerA">
+ <server name="Child1ServerA"
+ description="Child 1 Server type that extends Parent Server type"
+ discovery="Child1DiscoveryComponent"
+ class="Child1Component"
+ sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
new file mode 100644
index 0000000..0dafa9b
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/child2_plugin_v1.xml
@@ -0,0 +1,19 @@
+<plugin name="PluginExtensionMetadataChild2TestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Child 2 Test Plugin"
+ package="org.rhq.plugins.test.child2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+
+ <server name="Child2ServerA"
+ description="Child 2 Server type that extends Parent Server type"
+ discovery="Child2DiscoveryComponent"
+ class="Child2Component"
+ sourcePlugin="MultiplePluginExtensionMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
new file mode 100644
index 0000000..627c5a8
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v1.xml
@@ -0,0 +1,18 @@
+<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
+ version="1.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op" timeout="123456" description="a op"></operation>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
new file mode 100644
index 0000000..2c0e9d8
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionMetadataTest/parent_plugin_v2.xml
@@ -0,0 +1,18 @@
+<plugin name="MultiplePluginExtensionMetadataParentTestPlugin"
+ version="2.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
new file mode 100644
index 0000000..08ea056
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/child_plugin_v1.xml
@@ -0,0 +1,29 @@
+<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataChildTestPlugin"
+ version="1.0"
+ displayName="Multiple Plugin Extension Single Descriptor Metadata Child Test Plugin"
+ package="org.rhq.plugins.test.child"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="OuterServerA">
+ <server name="Child1ServerA"
+ description="Child 1 Server type that extends Parent Server type"
+ discovery="Child1DiscoveryComponent"
+ class="Child1Component"
+ sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+ </server>
+
+ <server name="OuterServerB">
+ <server name="Child2ServerA"
+ description="Child 2 Server type that extends Parent Server type"
+ discovery="Child2DiscoveryComponent"
+ class="Child2Component"
+ sourcePlugin="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
new file mode 100644
index 0000000..be977e7
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v1.xml
@@ -0,0 +1,24 @@
+<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ version="1.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op" timeout="123456" description="a op"></operation>
+
+ <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
+ <service name="InnerServiceA">
+ <metric property="inner-A-metric" />
+ </service>
+ -->
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
new file mode 100644
index 0000000..9f02834
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/MultiplePluginExtensionSinglePluginDescriptorMetadataTest/parent_plugin_v2.xml
@@ -0,0 +1,24 @@
+<plugin name="MultiplePluginExtensionSinglePluginDescriptorMetadataParentTestPlugin"
+ version="2.0"
+ displayName="Multiple Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <operation name="A-op-NEW" timeout="987654" description="a new op"></operation>
+
+ <!-- BZ 789420 - if that bug isn't fixed and you uncomment this, the child plugin will fail to register properly
+ <service name="InnerServiceA">
+ <metric property="inner-A-metric" />
+ </service>
+ -->
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..93a15ef
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,42 @@
+<plugin name="OperationMetadataManagerBeanTestPlugin"
+ displayName="OperationMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="OperationServer1">
+ <operation name="OperationServer1.Operation1"/>
+ </server>
+ <server name="OperationServer11">
+ <operation name="OperationServer11.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ <c:simple-property name="param2"/>
+ </parameters>
+ </operation>
+ </server>
+
+ <server name="OperationServer2"/>
+ <server name="OperationServer21">
+ <operation name="OperationServer21.Operation1"/>
+ </server>
+ <server name="OperationServer22">
+ <operation name="OperationServer22.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ <c:simple-property name="param2"/>
+ </parameters>
+ </operation>
+ </server>
+ <server name="OperationServer23">
+ <operation name="OperationServer23.Operation1"/>
+ </server>
+ <server name="OperationServer24">
+ <operation name="OperationServer24.Operation1"/>
+ <operation name="OperationServer24.Operation2">
+ <results>
+ <c:simple-property name="exitCode"/>
+ </results>
+ </operation>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..a86fbcf
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/OperationMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,41 @@
+<plugin name="OperationMetadataManagerBeanTestPlugin"
+ displayName="OperationMetadataManagerBean Test Plugin"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="OperationServer1">
+ <operation name="OperationServer1.Operation1"/>
+ </server>
+ <server name="OperationServer11">
+ <operation name="OperationServer11.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ <c:simple-property name="param2"/>
+ </parameters>
+ </operation>
+ </server>
+
+ <server name="OperationServer2">
+ <operation name="OperationServer2.Operation1"/>
+ </server>
+ <server name="OperationServer21"/>
+ <server name="OperationServer22">
+ <operation name="OperationServer22.Operation1"/>
+ </server>
+ <server name="OperationServer23">
+ <operation name="OperationServer23.Operation1">
+ <results>
+ <c:simple-property name="exitCode"/>
+ </results>
+ </operation>
+ </server>
+ <server name="OperationServer24">
+ <operation name="OperationServer24.Operation1">
+ <parameters>
+ <c:simple-property name="param1"/>
+ </parameters>
+ </operation>
+ <operation name="OperationServer24.Operation2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
new file mode 100644
index 0000000..ddedf10
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/child_plugin_v1.xml
@@ -0,0 +1,17 @@
+<plugin name="PluginExtensionMetadataChildTestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Child Test Plugin"
+ package="org.rhq.plugins.test.child"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ChildServerA"
+ description="Child Server type that extends Parent Server type"
+ discovery="ChildDiscoveryComponent"
+ class="ChildComponent"
+ sourcePlugin="PluginExtensionMetadataParentTestPlugin"
+ sourceType="ParentServerA">
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
new file mode 100644
index 0000000..e640187
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v1.xml
@@ -0,0 +1,49 @@
+<plugin name="PluginExtensionMetadataParentTestPlugin"
+ version="1.0"
+ displayName="Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <subcategories>
+ <subcategory name="A-subcat" displayName="a subcat"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:group name="A-pc-group" hiddenByDefault="true">
+ <c:simple-property name="A-pc-prop" description="test plugin config prop" required="false" />
+ </c:group>
+ </plugin-configuration>
+
+ <process-scan name="A-process-scan" query="process|basename|match=A.exe"/>
+ <operation name="A-op" timeout="123456" description="a op"></operation>
+ <metric property="A-metric" defaultInterval="123456"></metric>
+ <event name="A-event" description="a event"></event>
+
+ <resource-configuration>
+ <c:simple-property name="A-rc-prop" description="test resource config prop" required="false" />
+ </resource-configuration>
+
+ <drift-definition name="A-drift-def">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>A-pc-prop</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="A-bundle-basedir">
+ <value-context>resourceConfiguration</value-context>
+ <value-name>A-rc-prop</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
new file mode 100644
index 0000000..b0d4027
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginExtensionMetadataTest/parent_plugin_v2.xml
@@ -0,0 +1,67 @@
+<plugin name="PluginExtensionMetadataParentTestPlugin"
+ version="2.0"
+ displayName="Plugin Extension Metadata Parent Test Plugin"
+ package="org.rhq.plugins.test.parent"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="ParentServerA"
+ description="Parent Server type that can be extended by a Child Server type"
+ discovery="ParentDiscoveryComponent"
+ class="ParentComponent">
+
+ <subcategories>
+ <subcategory name="A-subcat" displayName="a subcat"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:group name="A-pc-group" hiddenByDefault="false">
+ <c:simple-property name="A-pc-prop-CHANGED" description="A-pc-prop desc 1" required="true" />
+ </c:group>
+ <c:group name="A-pc-group-NEW" hiddenByDefault="true">
+ <c:simple-property name="A-pc-prop-NEW" description="A-pc-prop desc 2" required="false" />
+ </c:group>
+ </plugin-configuration>
+
+ <process-scan name="A-process-scan" query="process|basename|match=CHANGED.exe"/> <!-- CHANGED, but same name -->
+ <process-scan name="A-process-scan-NEW" query="process|basename|match=NEW.exe"/>
+ <operation name="A-op" timeout="987654" description="a changed op"></operation> <!-- CHANGED, but same name -->
+ <operation name="A-op-NEW" timeout="111111" description="a new op"></operation>
+ <metric property="A-metric" defaultInterval="555555"></metric> <!-- CHANGED, but same name -->
+ <metric property="A-metric-NEW" defaultInterval="98765"></metric>
+ <event name="A-event-CHANGED" description="a changed event"></event>
+ <event name="A-event-NEW" description="a new event"></event>
+
+ <resource-configuration>
+ <c:simple-property name="A-rc-prop-CHANGED" description="test resource config prop 1" required="true" />
+ <c:simple-property name="A-rc-prop-NEW" description="test resource config prop 2" required="false" />
+ </resource-configuration>
+
+ <drift-definition name="A-drift-def-CHANGED">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>A-pc-prop</value-name>
+ </basedir>
+ </drift-definition>
+ <drift-definition name="A-drift-def-NEW">
+ <basedir>
+ <value-context>resourceConfiguration</value-context>
+ <value-name>A-rc-prop</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="A-bundle-basedir-CHANGED">
+ <value-context>resourceConfiguration</value-context>
+ <value-name>A-rc-prop</value-name>
+ </destination-base-dir>
+ <destination-base-dir name="A-bundle-basedir-NEW">
+ <value-context>pluginConfiguration</value-context>
+ <value-name>A-pc-prop</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ </server>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
new file mode 100644
index 0000000..6680aa6
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_1.xml
@@ -0,0 +1,7 @@
+<plugin name="PluginManagerBeanTestPlugin1"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="TestServer1"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
new file mode 100644
index 0000000..c6f8736
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_2.xml
@@ -0,0 +1,10 @@
+<plugin name="PluginManagerBeanTestPlugin2"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <depends plugin="PluginManagerBeanTestPlugin1" useClasses="true"/>
+
+ <server name="TestServer2"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
new file mode 100644
index 0000000..e885167
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.1.xml
@@ -0,0 +1,8 @@
+<plugin name="PluginManagerBeanTestPlugin3.1"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="TestServer3.1"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
new file mode 100644
index 0000000..78184bf
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/PluginManagerBeanTest/plugin_3.xml
@@ -0,0 +1,8 @@
+<plugin name="PluginManagerBeanTestPlugin3"
+ package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="TestServer3"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
new file mode 100644
index 0000000..bd9728b
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/dup_drift.xml
@@ -0,0 +1,19 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerWithDupDrift" description="has duplicate drift config names and thus is invalid">
+ <drift-definition name="drift-one">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/a</value-name>
+ </basedir>
+ </drift-definition>
+ <drift-definition name="drift-one">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/b</value-name>
+ </basedir>
+ </drift-definition>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
new file mode 100644
index 0000000..853e423
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/parent_resource_type-plugin.xml
@@ -0,0 +1,29 @@
+<plugin name="ParentResourceTypeTestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+ <server name="Server A First Level" description="Server A description">
+ <server name="Server B Second Level" description="Server B description"/>
+ <service name="Service A Second Level" description="Service A description"/>
+ </server>
+
+ <server name="Server C First Level" description="Server C description">
+ <runs-inside>
+ <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
+ </runs-inside>
+ </server>
+
+ <service name="Service B First Level" description="Service B description">
+ <runs-inside>
+ <parent-resource-type name="Server B Second Level" plugin="ParentResourceTypeTestPlugin"/>
+ </runs-inside>
+ </service>
+
+ <service name="Service C First Level" description="Service C description">
+ <runs-inside>
+ <parent-resource-type name="Service A Second Level" plugin="ParentResourceTypeTestPlugin"/>
+ </runs-inside>
+ </service>
+
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
new file mode 100644
index 0000000..88cd39c
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v1.xml
@@ -0,0 +1,92 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerA" description="Server A description">
+ <subcategories>
+ <subcategory name="Resources" description="Resources subcategory"/>
+ <subcategory name="Applications" description="Applications subcategory"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:simple-property name="connectionPropertyX" default="x"/>
+ <c:simple-property name="connectionPropertyY" default="y"/>
+ </plugin-configuration>
+
+ <process-scan name="serverA" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
+
+ <operation name="start">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <operation name="stop">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
+ <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
+
+ <event name="logAEntry" description="an entry was appended to a log file"/>
+ <event name="logBEntry" description="an entry was appended to a log file"/>
+
+ <content name="ServerA.Content.1" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerA.Content.1.version"/>
+ </configuration>
+ </content>
+
+ <content name="ServerA.Content.2" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerA.Content.2.version"/>
+ </configuration>
+ </content>
+
+ <drift-definition name="drift-pc">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>connectionPropertyX</value-name>
+ </basedir>
+ <interval>123456</interval>
+ <includes>
+ <include path="foo/bar" pattern="**/*.blech"/>
+ </includes>
+ <excludes>
+ <exclude path="/wot/gorilla" pattern="*.xml" />
+ <exclude path="/hello"/>
+ </excludes>
+ </drift-definition>
+
+ <drift-definition name="drift-fs">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="bundleTarget-pc" description="pc-description">
+ <value-context>pluginConfiguration</value-context>
+ <value-name>connectionPropertyY</value-name>
+ </destination-base-dir>
+ <destination-base-dir name="bundleTarget-fs"> <!-- note: no description, so we can test for proper null handling -->
+ <value-context>fileSystem</value-context>
+ <value-name>/wot/gorilla</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ <service name="Child1" description="Child 1 description"/>
+ <service name="Child2" description="Child 2 description"/>
+ </server>
+
+ <server name="ServerB" description="Server B description"/>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
new file mode 100644
index 0000000..a89f679
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/plugin_v2.xml
@@ -0,0 +1,110 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerA" description="Server A description">
+
+ <subcategories>
+ <subcategory name="Resources" description="Resources subcategory"/>
+ <subcategory name="Applications" description="Applications subcategory"/>
+ </subcategories>
+
+ <plugin-configuration>
+ <c:simple-property name="connectionPropertyX" default="x"/>
+ <c:simple-property name="connectionPropertyY" default="y"/>
+ </plugin-configuration>
+
+ <process-scan name="processA" query="process|basename|match=^java.*,arg|org.jboss.MainA|match=.*"/>
+ <process-scan name="processB" query="process|basename|match=^java.*,arg|org.jboss.MainB|match=.*"/>
+
+ <operation name="start">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <operation name="shutdown">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <operation name="restart">
+ <parameters>
+ <c:simple-property name="immediate" type="boolean"/>
+ </parameters>
+ <results>
+ <c:simple-property name="exitCode" type="integer"/>
+ </results>
+ </operation>
+
+ <metric displayName="Metric 1" property="metric1" displayType="summary" defaultInterval="300000"/>
+ <metric displayName="Metric 2" property="metric2" displayType="summary" defaultInterval="300000" dataType="trait"/>
+
+ <event name="logAEntry" description="an entry was appended to a log file"/>
+ <event name="logCEntry" description="an entry was appended to a log file"/>
+
+ <content name="ServerA.Content.1" category="configuration">
+ <configuration>
+ <c:simple-property name="ServerA.Content.1.property1"/>
+ <c:simple-property name="ServerA.Content.1.property2"/>
+ </configuration>
+ </content>
+
+ <content name="ServerA.Content.3" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerA.Content.3.version"/>
+ </configuration>
+ </content>
+
+ <drift-definition name="drift-rc">
+ <basedir>
+ <!-- this resource doesn't really have this resource config prop
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>resourceConfiguration</value-context>
+ <value-name>resourceConfig1</value-name>
+ </basedir>
+ </drift-definition>
+
+ <drift-definition name="drift-mt">
+ <basedir>
+ <!-- this resource doesn't really have this metric trait
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>measurementTrait</value-context>
+ <value-name>trait1</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="bundleTarget-rc" description="rc-description">
+ <!-- this resource doesn't really have this resource config prop
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>resourceConfiguration</value-context>
+ <value-name>resourceConfig1</value-name>
+ </destination-base-dir>
+ <destination-base-dir name="bundleTarget-mt" description="mt-description">
+ <!-- this resource doesn't really have this metric trait
+ but today we do not check for validity so this is OK. In the future, if we do
+ check, our tests will fail and we'll need to change this test drift config -->
+ <value-context>measurementTrait</value-context>
+ <value-name>trait1</value-name>
+ </destination-base-dir>
+ </bundle-target>
+
+ <service name="Child1"/>
+ <service name="Child3"/>
+ </server>
+
+ <server name="ServerB" description="Server B description">
+ <service name="Child2"/>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
new file mode 100644
index 0000000..460954b
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v1.xml
@@ -0,0 +1,20 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerWithBundleAndDriftConfig">
+ <drift-definition name="drift1">
+ <basedir>
+ <value-context>fileSystem</value-context>
+ <value-name>/dirA</value-name>
+ </basedir>
+ </drift-definition>
+
+ <bundle-target>
+ <destination-base-dir name="destdir1">
+ <value-context>fileSystem</value-context>
+ <value-name>/dirB</value-name>
+ </destination-base-dir>
+ </bundle-target>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
new file mode 100644
index 0000000..c92919d
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_bundle_drift_config_v2.xml
@@ -0,0 +1,7 @@
+<plugin name="TestPlugin" displayName="Test Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerWithBundleAndDriftConfig">
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
new file mode 100644
index 0000000..60a9f93
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v1.xml
@@ -0,0 +1,54 @@
+<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerC" description="Server C description">
+
+ <subcategories>
+ <subcategory name="ServerC.Category1">
+ <subcategory name="ServerC.NestedCategory1"/>
+ </subcategory>
+ <subcategory name="ServerC.Category2"/>
+ </subcategories>
+
+ <bundle type="Test Bundle"/>
+
+ <process-scan name="scan1" query="process|basename|match=^java.*,arg|org.rhq.serverC1|match=.*"/>
+ <process-scan name="scan2" query="process|basename|match=^java.*,arg|org.rhq.serverC2|match=.*"/>
+
+ <operation name="run">
+ <parameters>
+ <c:simple-property name="script"/>
+ </parameters>
+ <results>
+ <c:simple-property name="errors"/>
+ </results>
+ </operation>
+
+ <metric displayName="Metric 1" property="ServerC::metric1" displayType="summary" defaultInterval="300000"/>
+
+ <event name="serverCEvent" description="an entry was appended to a log file"/>
+
+ <content name="ServerC.Content" category="deployable">
+ <configuration>
+ <c:simple-property name="ServerC.Content.version"/>
+ </configuration>
+ </content>
+ </server>
+
+ <server name="ServerD">
+ <service name="ServerD.Child1">
+ <service name="ServerD.GrandChild1"/>
+ </service>
+ </server>
+
+ <server name="ServerE">
+ <service name="ServiceE1">
+ <service name="ServiceE2">
+ <service name="ServiceE3">
+ <service name="serviceE4"/>
+ </service>
+ </service>
+ </service>
+ </server>
+</plugin>
\ No newline at end of file
diff --git a/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
new file mode 100644
index 0000000..6b0cdb0
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/resources/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest/remove_types_v2.xml
@@ -0,0 +1,8 @@
+<plugin name="RemoveTypesPlugin" displayName="Remove Types Plugin" package="org.rhq.plugins.test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+ <server name="ServerD">
+ <service name="ServerD.GrandChild1"/>
+ </server>
+</plugin>
\ No newline at end of file
commit 4e826fb67ab76b81338a88983405cd10602b48f9
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 27 17:17:35 2012 -0500
Make a note that this src branch should go away after the jndi asccess
tests have been fixed. The new home is in server/itests-2.
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
index abfd376..05c59b6 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
+++ b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
@@ -51,7 +51,12 @@ import org.rhq.jndi.AllowRhqServerInternalsAccessPermission;
import org.rhq.test.PortScout;
/**
+ *
+ * !!!!!!! THIS TEST CLASS HAS BEEN MOVED TO ENTERPRISE/SERVER/ITESTS-2 !!!!!!
*
+ * TODO: since this class has been updated and now differs from the version in itests-2 it is left here for
+ * reference. Also, the jndi access strategy needs to be updated for AS7. When all is settled, this
+ * whole src branch should be deleted.
*
* @author Lukas Krejci
*/
commit b450670dad5fee5909ca21a417249d76c24911aa
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 27 17:16:52 2012 -0500
Fix version of javax mail to be the version provided by AS7.
diff --git a/.classpath b/.classpath
index 4470eb3..996b0fc 100644
--- a/.classpath
+++ b/.classpath
@@ -229,7 +229,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1.jar" sourcepath="/M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/mc4j/org-mc4j-ems/1.3/org-mc4j-ems-1.3.jar" sourcepath="/M2_REPO/mc4j/org-mc4j-ems/1.3/org-mc4j-ems-1.3-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/opensymphony/quartz/quartz/1.6.5/quartz-1.6.5.jar" sourcepath="/M2_REPO/org/opensymphony/quartz/quartz/1.6.5/quartz-1.6.5-sources.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/javax/mail/mail/1.4.4/mail-1.4.4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.3.3.Final/richfaces-api-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-api/3.1.3.GA/richfaces-api-3.1.3.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.3.Final/richfaces-impl-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0.GA/richfaces-impl-3.3.0.GA-sources.jar"/>
11 years, 5 months
[rhq] Branch 'feature/cassandra-backend' - 29 commits - .classpath etc/agentspawn etc/classloaders-test etc/rhq-plugin-archetype etc/samples modules/common modules/core modules/enterprise modules/helpers modules/integration-tests modules/jopr modules/plugins modules/test-utils pom.xml
by John Sanda
.classpath | 21
dev/null |binary
etc/agentspawn/pom.xml | 8
etc/classloaders-test/plugin1/pom.xml | 8
etc/classloaders-test/plugin2/pom.xml | 7
etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml | 16
etc/samples/custom-serverplugin/pom.xml | 7
etc/samples/simplereport-serverplugin/pom.xml | 8
etc/samples/skeleton-plugin/pom.xml | 8
modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java | 12
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java | 7
modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java | 34
modules/enterprise/agent/ant-run.xml | 4
modules/enterprise/gui/rest-war/pom.xml | 7
modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml | 168 +--
modules/enterprise/remoting/client-api/src/test/java/org/rhq/enterprise/clienapi/RhqDownloadsScriptSourceProviderTest.java | 3
modules/enterprise/scripting/javascript/pom.xml | 6
modules/enterprise/scripting/python/pom.xml | 6
modules/enterprise/server/itests-2/pom.xml | 26
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java | 19
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java | 51
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java | 11
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java | 38
modules/enterprise/server/xml-schemas/pom.xml | 7
modules/helpers/pluginAnnotations/pom.xml | 8
modules/helpers/pluginGen/pom.xml | 8
modules/helpers/pom.xml | 10
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/upgrade/UpgradeTestBase.java | 9
modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java | 138 +-
modules/integration-tests/apache-plugin-test/src/test/resources/log4j.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml | 2
modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml | 2
modules/integration-tests/jndi-access/jndi-access-test/pom.xml | 198 +--
modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java | 25
modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml | 12
modules/jopr/LICENSE | 31
modules/jopr/LICENSE_GPL | 339 ------
modules/jopr/LICENSE_LGPL | 504 ---------
modules/jopr/dist/agent/pom.xml | 111 --
modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml | 36
modules/jopr/dist/pom.xml | 23
modules/jopr/dist/server/pom.xml | 213 ---
modules/jopr/dist/server/src/main/scripts/dist.build.xml | 68 -
modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml | 30
modules/jopr/etc/jbas5-ejb-client/client.bat | 102 -
modules/jopr/etc/jbas5-ejb-client/client.sh | 86 -
modules/jopr/etc/jbas5-ejb-client/pom.xml | 280 -----
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java | 181 ---
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java | 69 -
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java | 66 -
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java | 58 -
modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java | 132 --
modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml | 54
modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml | 301 -----
modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh | 3
modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java | 182 ---
modules/jopr/etc/jbas5-jnp-client/README | 16
modules/jopr/etc/jbas5-jnp-client/classpath.txt | 57 -
modules/jopr/etc/jbas5-jnp-client/client.bat | 83 -
modules/jopr/etc/jbas5-jnp-client/client.sh | 87 -
modules/jopr/etc/jbas5-jnp-client/pom.xml | 212 ---
modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java | 90 -
modules/jopr/modules-plugins-pom.xml | 74 -
modules/jopr/modules-pom.xml | 124 --
modules/jopr/pom.xml | 49
modules/jopr/release.sh | 341 ------
modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml | 331 ------
modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java | 541 ----------
modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java | 387 -------
modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java | 43
modules/plugins/JBossOSGi/pom.xml | 209 ---
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java | 152 --
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java | 81 -
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java | 277 -----
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java | 132 --
modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java | 106 -
modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml | 62 -
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java | 22
modules/plugins/hardware/pom.xml | 10
modules/plugins/hudson/pom.xml | 8
modules/plugins/irc/pom.xml | 7
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml | 6
modules/plugins/jboss-as-5/src/test/java/org/rhq/plugins/jbossas5/itest/ApplicationServerComponentTest.java | 6
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java | 71 +
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/netservices/src/main/resources/META-INF/rhq-plugin.xml | 3
modules/plugins/onewire/pom.xml | 31
modules/plugins/pattern-generator/pom.xml | 14
modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java | 12
modules/plugins/raw-config-test/pom.xml | 10
modules/plugins/services/pom.xml | 12
modules/plugins/snmptrapd/pom.xml | 7
modules/plugins/twitter/pom.xml | 12
modules/test-utils/pom.xml | 11
modules/test-utils/src/main/java/org/rhq/test/PortScout.java | 69 +
pom.xml | 18
106 files changed, 658 insertions(+), 6935 deletions(-)
New commits:
commit 5f1390e654c9f95e6a8403bc95d1f2e97b4809e2
Merge: 12f4039 257e056
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Nov 30 09:41:10 2012 -0500
Merge branch 'master' into feature/cassandra-backend
commit 257e056801c29bc241b7c292008326be14faffb9
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Thu Nov 29 14:54:08 2012 +0100
[BZ-871873] Availability check change is not automatically picked up
Set availability schedule data if present in ResourceMeasurementScheduleRequest
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
index 3bb1f99..8e8c399 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/measurement/MeasurementManager.java
@@ -123,6 +123,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
super(MeasurementAgentService.class);
}
+ @Override
public void initialize() {
LOG.info("Initializing Measurement Manager...");
@@ -167,6 +168,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
class MeasurementCollectionRequester implements Runnable {
+ @Override
public void run() {
try {
while (!collectorThreadPool.isShutdown()) {
@@ -288,6 +290,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
}
+ @Override
public void shutdown() {
PluginContainer pluginContainer = PluginContainer.getInstance();
@@ -311,6 +314,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
}
+ @Override
public void setConfiguration(PluginContainerConfiguration configuration) {
this.configuration = configuration;
}
@@ -324,16 +328,22 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
*
* @param scheduleRequests
*/
+ @Override
public synchronized void updateCollection(Set<ResourceMeasurementScheduleRequest> scheduleRequests) {
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
for (ResourceMeasurementScheduleRequest resourceRequest : scheduleRequests) {
ResourceContainer resourceContainer = im.getResourceContainer(resourceRequest.getResourceId());
if (resourceContainer != null) {
- resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules()); // this is where we want to update rather than overwrite, right?
-
- // resourceContainer.setMeasurementSchedule(resourceRequest.getMeasurementSchedules());
+ // Update (not overwrite) measurement schedule data ...
+ resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules());
+ // ... and then reschedule collection
scheduleCollection(resourceRequest.getResourceId(), resourceRequest.getMeasurementSchedules());
+ if (resourceRequest.getAvailabilitySchedule() != null) {
+ // Set availability schedule data if present
+ // This method also triggers a reschedule of availability check
+ resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
+ }
} else {
// This will happen when the server sends down schedules to an agent with a cleaned inventory
// Its ok to skip these because the agent will request a reschedule once its been able to synchronize
@@ -359,16 +369,20 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
*
* @param scheduleRequests
*/
+ @Override
public synchronized void scheduleCollection(Set<ResourceMeasurementScheduleRequest> scheduleRequests) {
InventoryManager im = PluginContainer.getInstance().getInventoryManager();
for (ResourceMeasurementScheduleRequest resourceRequest : scheduleRequests) {
ResourceContainer resourceContainer = im.getResourceContainer(resourceRequest.getResourceId());
if (resourceContainer != null) {
- // resourceContainer.updateMeasurementSchedule(resourceRequest.getMeasurementSchedules()); // this is where we want to update rather than overwrite, right?
+ // Set measurement schedule data ...
resourceContainer.setMeasurementSchedule(resourceRequest.getMeasurementSchedules());
- resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
+ // ... and then reschedule collection
scheduleCollection(resourceRequest.getResourceId(), resourceRequest.getMeasurementSchedules());
+ // Set availability schedule data
+ // This method also triggers a reschedule of availability check
+ resourceContainer.setAvailabilitySchedule(resourceRequest.getAvailabilitySchedule());
} else {
// This will happen when the server sends down schedules to an agent with a cleaned inventory
// It's ok to skip these because the agent will request a reschedule once its been able to synchronize
@@ -415,6 +429,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
}
}
+ @Override
public synchronized void unscheduleCollection(Set<Integer> resourceIds) {
Iterator<ScheduledMeasurementInfo> itr = this.scheduledRequests.iterator();
while (itr.hasNext()) {
@@ -442,6 +457,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
// spinder 12/16/11. BZ 760139. Modified to return empty sets instead of 'null' even for erroneous conditions.
// Server side logging or erroneous runtime conditions still occurs, but callers to getRealTimeMeasurementValues
// won't have to additionally check for null values now. This is a safe and better pattern.
+ @Override
public Set<MeasurementData> getRealTimeMeasurementValue(int resourceId, Set<MeasurementScheduleRequest> requests) {
if (requests.size() == 0) {
// There's no need to even call getValues() on the ResourceComponent if the list of metric names is empty.
@@ -498,6 +514,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
return values;
}
+ @Override
public long getNextExpectedCollectionTime() {
ScheduledMeasurementInfo nextScheduledMeasurement = this.scheduledRequests.peek();
if (nextScheduledMeasurement == null) {
@@ -629,6 +646,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
return perMinuteValue;
}
+ @Override
public Map<String, Object> getMeasurementScheduleInfoForResource(int resourceId) {
Map<String, Object> results = null;
@@ -692,10 +710,12 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
// -- MBean monitoring methods
+ @Override
public long getMeasurementsCollected() {
return this.collectedMeasurements.get();
}
+ @Override
public long getMeasurementsCollectedPerMinute() {
long now = System.currentTimeMillis();
@@ -718,14 +738,17 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
return ret;
}
+ @Override
public long getCurrentlyScheduleMeasurements() {
return this.scheduledRequests.size();
}
+ @Override
public long getTotalTimeCollectingMeasurements() {
return this.totalTimeCollecting.get();
}
+ @Override
public long getLateCollections() {
return lateCollections.get();
}
@@ -751,6 +774,7 @@ public class MeasurementManager extends AgentService implements MeasurementAgent
this.failedCollection.addAndGet(count);
}
+ @Override
public long getFailedCollections() {
return failedCollection.get();
}
commit 62c3c8ee54a41df94f65bb185dc0d12f76ae0c22
Author: Simeon Pinder <spinder(a)fulliautomatix.conchfritter.com>
Date: Thu Nov 29 08:55:48 2012 -0500
[BZ 880795] upgrade augeas library to 0.9.0-4.
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index a765b43..4085efd 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -12,11 +12,11 @@ Ant Script that provides ways to package the Agent.
<property name="settings.localRepository" location="${user.home}/.m2/repository"/>
<property name="project.version" value="2.0.0-SNAPSHOT"/>
<property name="sigar.version" value="1.6.5.132-3"/>
- <property name="augeas.version" value="0.9.0"/>
+ <property name="augeas.version" value="0.9.0-4"/>
<property name="augeas.classifier" value="el5"/>
<property name="augeas.zip.location" value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/>
<property name="augeas.zip.mask" value="*-${augeas.classifier}.zip"/>
- <property name="augeas.zip.version" value="0.9.0"/>
+ <property name="augeas.zip.version" value="0.9.0-4"/>
<property name="getopt.version" value="1.0.13"/>
<property name="jaxb-api.version" value="2.1"/>
<property name="jaxb-impl.version" value="2.1"/>
diff --git a/pom.xml b/pom.xml
index 3c844b6..57be9a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,9 +129,9 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<testng.version>6.5.2</testng.version>
- <augeas.version>0.9.0</augeas.version>
+ <augeas.version>0.9.0-4</augeas.version>
<augeas.classifier>el5</augeas.classifier>
- <augeas.zip.version>0.9.0</augeas.zip.version>
+ <augeas.zip.version>0.9.0-4</augeas.zip.version>
<augeas.zip.location>${settings.localRepository}/net/augeas/augeas-native/${augeas.version}</augeas.zip.location>
<augeas.zip.mask>*-${augeas.classifier}.zip</augeas.zip.mask>
<ant.contrib.version>1.0b3</ant.contrib.version>
@@ -1247,7 +1247,6 @@
</snapshots>
</repository>
-
</repositories>
<pluginRepositories>
commit cd40200ad13c0abf7adcf1e021db81c1c8d967a8
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 29 11:56:01 2012 +0100
Add support for searching of resources, groups and group definitions by name via ?q=
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
index f3bcdff..d051585 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
@@ -22,13 +22,13 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
+import org.rhq.core.domain.criteria.ResourceGroupDefinitionCriteria;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.GroupDefinition;
import org.rhq.core.domain.resource.group.ResourceGroup;
-import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
@@ -64,9 +64,12 @@ public class GroupHandlerBean extends AbstractRestBean implements GroupHandlerLo
@EJB
GroupDefinitionManagerLocal definitionManager;
- public Response getGroups(@Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getGroups(String q, @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
ResourceGroupCriteria criteria = new ResourceGroupCriteria();
+ if (q!=null) {
+ criteria.addFilterName(q);
+ }
List<ResourceGroup> groups = resourceGroupManager.findResourceGroupsByCriteria(caller,criteria);
List<GroupRest> list = new ArrayList<GroupRest>(groups.size());
@@ -299,10 +302,14 @@ public class GroupHandlerBean extends AbstractRestBean implements GroupHandlerLo
}
@Override
- public Response getGroupDefinitions(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroupDefinitions(String q, @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo) {
- PageList<GroupDefinition> gdlist = definitionManager.getGroupDefinitions(caller,new PageControl());
+ ResourceGroupDefinitionCriteria criteria = new ResourceGroupDefinitionCriteria();
+ if (q!=null) {
+ criteria.addFilterName(q);
+ }
+ PageList<GroupDefinition> gdlist = definitionManager.findGroupDefinitionsByCriteria(caller, criteria);
List<GroupDefinitionRest> list = new ArrayList<GroupDefinitionRest>(gdlist.getTotalSize());
for (GroupDefinition def: gdlist) {
GroupDefinitionRest definitionRest = buildGDRestFromDefinition(def);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
index 39e0c2a..1cfc171 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerLocal.java
@@ -44,7 +44,8 @@ public interface GroupHandlerLocal {
@GET
@Path("/")
@ApiOperation(value = "List all groups", multiValueResponse = true)
- public Response getGroups(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroups(@ApiParam("String to search in the group name") @QueryParam("q") String q,
+ @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
@Cache(isPrivate = true,maxAge = 60)
@@ -129,7 +130,8 @@ public interface GroupHandlerLocal {
@GET
@Path("/definitions")
@ApiOperation(value="List all existing GroupDefinitions",multiValueResponse = true)
- public Response getGroupDefinitions(@Context Request request, @Context HttpHeaders headers,
+ public Response getGroupDefinitions(@ApiParam("String to search in the group definition name") @QueryParam("q") String q,
+ @Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
@GZIP
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
index c0efed4..9709fd6 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
@@ -33,9 +33,6 @@ import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.HttpHeaders;
@@ -48,6 +45,7 @@ import javax.ws.rs.core.UriInfo;
import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.criteria.AlertCriteria;
import org.rhq.core.domain.criteria.AvailabilityCriteria;
+import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.discovery.AvailabilityReport;
import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.AvailabilityType;
@@ -93,7 +91,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
private EntityManager entityManager;
@Override
- public Response getResource(int id, @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getResource(int id, Request request, HttpHeaders headers, UriInfo uriInfo) {
Resource res;
res = fetchResource(id);
@@ -121,13 +119,39 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response getPlatforms(@Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getResourcesByQuery(String q, Request request, HttpHeaders headers,
+ UriInfo uriInfo) {
+ ResourceCriteria criteria = new ResourceCriteria();
+ criteria.addFilterName(q);
+ List<Resource> ret = resMgr.findResourcesByCriteria(caller,criteria);
+
+ Response.ResponseBuilder builder = getResponseBuilderForResourceList(headers,uriInfo,ret);
+
+ return builder.build();
+ }
+
+ @Override
+ public Response getPlatforms(Request request, HttpHeaders headers, UriInfo uriInfo) {
PageControl pc = new PageControl();
List<Resource> ret = resMgr.findResourcesByCategory(caller, ResourceCategory.PLATFORM,
InventoryStatus.COMMITTED, pc);
- List<ResourceWithType> rwtList = new ArrayList<ResourceWithType>(ret.size());
- for (Resource r : ret) {
+ Response.ResponseBuilder builder = getResponseBuilderForResourceList(headers, uriInfo, ret);
+
+ return builder.build();
+ }
+
+ /**
+ * Translate the passed list of resources into a response according to the acceptable mime types etc.
+ * @param headers HttpHeaders from the request
+ * @param uriInfo Uri from the request
+ * @param resources List of resources
+ * @return An initialized ResponseBuilder
+ */
+ private Response.ResponseBuilder getResponseBuilderForResourceList(HttpHeaders headers, UriInfo uriInfo,
+ List<Resource> resources) {
+ List<ResourceWithType> rwtList = new ArrayList<ResourceWithType>(resources.size());
+ for (Resource r : resources) {
putToCache(r.getId(), Resource.class, r);
ResourceWithType rwt = fillRWT(r, uriInfo);
rwtList.add(rwt);
@@ -143,8 +167,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
};
builder = Response.ok(list);
}
-
- return builder.build();
+ return builder;
}
@Override
@@ -267,7 +290,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
public Response getSchedules(int resourceId, String scheduleType, boolean enabledOnly, String name,
- @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ Request request, HttpHeaders headers, UriInfo uriInfo) {
// allow metric as input
if (scheduleType.equals("metric"))
@@ -333,7 +356,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response getChildren(int id, @Context Request request, @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+ public Response getChildren(int id, Request request, HttpHeaders headers, UriInfo uriInfo) {
PageControl pc = new PageControl();
Resource parent;
parent = fetchResource(id);
@@ -387,7 +410,7 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response createPlatform(@PathParam("name") String name, StringValue typeValue, @Context UriInfo uriInfo) {
+ public Response createPlatform(String name, StringValue typeValue, UriInfo uriInfo) {
String typeName = typeValue.getValue();
ResourceType type = resourceTypeManager.getResourceTypeByNameAndPlugin(typeName,"Platforms");
@@ -462,8 +485,8 @@ public class ResourceHandlerBean extends AbstractRestBean implements ResourceHan
}
@Override
- public Response createResource(@PathParam("name") String name, StringValue typeValue,
- @QueryParam("plugin") String plugin, int parentId, UriInfo uriInfo) {
+ public Response createResource(String name, StringValue typeValue,
+ String plugin, int parentId, UriInfo uriInfo) {
Resource parent = resMgr.getResourceById(caller,parentId);
if (parent==null)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
index b30f8ce..935f875 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerLocal.java
@@ -56,7 +56,7 @@ import org.rhq.enterprise.server.rest.domain.*;
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
@Path("/resource")
@Local
-@Api(value="Resource related", description = "This endpoint deals with single resources, not groups")
+@Api(value="Resource related", description = "This endpoint deals with individual resources, not resource groups")
public interface ResourceHandlerLocal {
static String NO_RESOURCE_FOR_ID = "If no resource with the passed id exists";
@@ -75,6 +75,13 @@ public interface ResourceHandlerLocal {
@Context Request request, @Context HttpHeaders headers,
@Context UriInfo uriInfo);
+ @GET
+ @Path("/")
+ @ApiOperation(value = "Search for resources by the given search string", responseClass = "ResourceWithType")
+ Response getResourcesByQuery(@ApiParam("String to search in the resource name") @QueryParam("q")String q,
+ @Context Request request, @Context HttpHeaders headers,
+ @Context UriInfo uriInfo);
+
@GZIP
@GET
@Path("/platforms")
@@ -170,7 +177,7 @@ public interface ResourceHandlerLocal {
@ApiOperation(value = "Create a resource with a given type below a certain parent")
@POST
@Path("{name}")
- public javax.ws.rs.core.Response createResource(
+ public Response createResource(
@ApiParam("Name of the new resource") @PathParam("name") String name,
@ApiParam("Name of the Resource tpye") StringValue type,
@ApiParam("Name of the plugin providing the type") @QueryParam("plugin") String plugin,
commit 1a86bb955de70ba26b866291de0348000fd95381
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 28 13:49:41 2012 -0500
remove the duplicate dependency for javassist
diff --git a/pom.xml b/pom.xml
index 9703ef0..3c844b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -611,11 +611,6 @@
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>${javassist.version}</version>
- </dependency>
</dependencies>
</dependencyManagement>
commit 66a8ce5b90d3b20bda5fc1018acf9cfa48af7e3b
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 28 16:10:19 2012 +0100
Get the REST-API to work again.
* Login module is now called 'Database' and no longer 'DatabaseServer'
* Application is relative to /rest , so only put the /1 part in here
* Use the servlet api version 3 descriptor and trim non-needed entries.
* Change the way the cache is obtained. Fix some javadoc.
diff --git a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
index a0a4280..043e8f8 100644
--- a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
+++ b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
@@ -25,7 +25,7 @@ import org.jboss.dmr.ModelNode;
/**
* Provides convenience methods associated with security domain management.
- *
+ *
* @author John Mazzitelli
*/
public class SecurityDomainJBossASClient extends JBossASClient {
@@ -66,12 +66,12 @@ public class SecurityDomainJBossASClient extends JBossASClient {
/**
* Convenience method that builds a request which can create a new security-domain
* using the SecureIdentity authentication method. This is used when you want
- * to obfuscate a database password in the configuration.
+ * to obfuscate a database password in the configuration.
*
* @param securityDomainName the name of the new security domain
* @param username the username associated with the security domain
* @param password the value of the password to store in the configuration (e.g. the obfuscated password itself)
- *
+ *
* @throws Exception if failed to create security domain
*/
public void createNewSecureIdentitySecurityDomainRequest(String securityDomainName, String username, String password)
@@ -107,7 +107,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
/**
* Convenience method that builds a request which can create a new security domain
* using the database server authentication method. This is used when you want to directly
- * authenticate against a db entry.
+ * authenticate against a db entry.
*
* @param securityDomainName the name of the new security domain
* @param dsJndiName the jndi name for the datasource to query against
@@ -127,7 +127,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
ModelNode addAuthNode = createRequest(ADD, addr.clone().add(AUTHENTICATION, CLASSIC));
ModelNode loginModulesNode = addAuthNode.get(LOGIN_MODULES);
ModelNode loginModule = new ModelNode();
- loginModule.get(CODE).set("DatabaseServer");
+ loginModule.get(CODE).set("Database");
loginModule.get(FLAG).set("required");
ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
moduleOptions.setEmptyList();
@@ -150,7 +150,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
/**
* Convenience method that builds a request which can create a new security domain
* using the database server authentication method. This is used when you want to directly
- * authenticate against a db entry.
+ * authenticate against a db entry.
*
* @param securityDomainName the name of the new security domain
* @param loginModuleFQCN fully qualified class name to be set as the login-module "code".
diff --git a/modules/enterprise/gui/rest-war/pom.xml b/modules/enterprise/gui/rest-war/pom.xml
index 2457c92..0664930 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -32,16 +32,13 @@
</dependency>
<!-- 3rd Party Deps -->
-
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
-
-
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
diff --git a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
index 2b583c2..014c421 100644
--- a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
@@ -1,129 +1,73 @@
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
- <display-name>RHQ Rest interface</display-name>
-
- <context-param>
- <param-name>resteasy.jndi.resources</param-name>
- <param-value>rhq/StatusHandlerBean/local,rhq/ResourceHandlerBean/local,rhq/MetricHandlerBean/local,rhq/UserHandlerBean/local,rhq/AlertHandlerBean/local,rhq/OperationsHandlerBean/local,rhq/GroupHandlerBean/local,rhq/EventHandlerBean/local</param-value>
- <description>List of jndi names of EJBs local interfaces that define REST stuff</description>
- </context-param>
- <context-param>
- <param-name>resteasy.providers</param-name>
- <param-value>org.rhq.enterprise.server.rest.CustomExceptionMapper</param-value>
- <description>Maps Exceptions to HTTP response codes</description>
- </context-param>
- <context-param>
- <param-name>resteasy.servlet.mapping.prefix</param-name>
- <param-value>/1</param-value>
- <description>Prefix of the REST api</description>
- </context-param>
- <context-param>
- <param-name>resteasy.media.type.mappings</param-name>
- <param-value>html : text/html, json : application/json, xml : application/xml, csv : text/csv, txt: text/plain, yaml: application/yaml</param-value>
- </context-param>
- <filter>
- <filter-name>JsonPFilter</filter-name>
- <filter-class>org.rhq.enterprise.rest.JsonPFilter</filter-class>
- <init-param>
- <param-name>filter.jsonp.callback</param-name>
- <param-value>jsonp</param-value>
- <description>Name of the callback to use for JsonP (?jsonp=...)</description>
- </init-param>
- </filter>
-
- <filter>
- <filter-name>RhqRtFilter</filter-name>
- <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class>
- </filter>
-
-<!-- Simple request header dumper for debugging purposes
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <display-name>RHQ Rest interface</display-name>
+
+ <context-param>
+ <param-name>resteasy.media.type.mappings</param-name>
+ <param-value>html : text/html, json : application/json, xml : application/xml, csv : text/csv, txt: text/plain,
+ yaml: application/yaml
+ </param-value>
+ </context-param>
<filter>
- <filter-name>DumperFilter</filter-name>
- <filter-class>org.rhq.enterprise.rest.HeaderDumperFilter</filter-class>
+ <filter-name>JsonPFilter</filter-name>
+ <filter-class>org.rhq.enterprise.rest.JsonPFilter</filter-class>
+ <init-param>
+ <description>Name of the callback to use for JsonP (?jsonp=...)</description>
+ <param-name>filter.jsonp.callback</param-name>
+ <param-value>jsonp</param-value>
+ </init-param>
</filter>
--->
- <!--
- <filter>
+ <filter>
+ <filter-name>RhqRtFilter</filter-name>
+ <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class>
+ </filter>
- <filter-name>AuthFilter</filter-name>
- <filter-class>org.rhq.enterprise.rest.AuthFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>AuthFilter</filter-name>
- <servlet-name>Resteasy</servlet-name>
- </filter-mapping>
+ <!-- Simple request header dumper for debugging purposes
+ <filter>
+ <filter-name>DumperFilter</filter-name>
+ <filter-class>org.rhq.enterprise.rest.HeaderDumperFilter</filter-class>
+ </filter>
-->
- <filter-mapping>
- <filter-name>JsonPFilter</filter-name>
- <url-pattern>/1/*</url-pattern>
- </filter-mapping>
-<!--
<filter-mapping>
- <filter-name>DumperFilter</filter-name>
+ <filter-name>JsonPFilter</filter-name>
<url-pattern>/1/*</url-pattern>
</filter-mapping>
--->
-
+ <!--
<filter-mapping>
- <filter-name>RhqRtFilter</filter-name>
- <url-pattern>/1/*</url-pattern>
+ <filter-name>DumperFilter</filter-name>
+ <url-pattern>/1/*</url-pattern>
</filter-mapping>
+ -->
- <servlet>
- <servlet-name>Resteasy</servlet-name>
- <servlet-class>
- org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
- </servlet-class>
-
- <init-param>
- <param-name>resteasy.scan</param-name>
- <param-value>false</param-value>
- </init-param>
-
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.rhq.enterprise.server.rest.RHQApplication</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Resteasy</servlet-name>
- <url-pattern>/1/*</url-pattern>
- </servlet-mapping>
-
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>REST</web-resource-name>
- <url-pattern>/*</url-pattern>
-<!--
- <http-method>DELETE</http-method>
- <http-method>PUT</http-method>
- <http-method>HEAD</http-method>
- <http-method>OPTIONS</http-method>
- <http-method>TRACE</http-method>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
--->
- </web-resource-collection>
- <auth-constraint>
- <role-name>all</role-name>
- </auth-constraint>
- </security-constraint>
+ <filter-mapping>
+ <filter-name>RhqRtFilter</filter-name>
+ <url-pattern>/1/*</url-pattern>
+ </filter-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>RHQ REST</realm-name>
- </login-config>
- <security-role>
- <description>This is valid for all principals, as we do internal checks</description>
- <role-name>all</role-name>
- </security-role>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>REST</web-resource-name>
+ <url-pattern>/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>all</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>RHQ REST</realm-name>
+ </login-config>
+
+ <security-role>
+ <description>This is valid for all principals, as we do internal checks</description>
+ <role-name>all</role-name>
+ </security-role>
</web-app>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
index dd21f15..1e8b99f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
@@ -65,10 +65,11 @@ import org.rhq.enterprise.server.rest.domain.ResourceWithType;
* For the cache and its eviction policies see standalone-full.xml (in
* the RHQ Server's AS7/standalone/configuration directory, as modified
* by the installer.)
- *
+ *
* @author Heiko W. Rupp
* @author Jay Shaughnessy
*/
+(a)javax.annotation.Resource(name = "ISPN", mappedName = "java:jboss/infinispan/rhq")
@SuppressWarnings("unchecked")
public class AbstractRestBean {
@@ -76,7 +77,7 @@ public class AbstractRestBean {
static private final CacheKey META_KEY = new CacheKey("rhq.rest.resourceMeta", 0);
- @javax.annotation.Resource(lookup = "java:jboss/infinispan/rhq")
+ @javax.annotation.Resource( name = "ISPN")
protected CacheContainer container;
protected Cache<CacheKey, Object> cache;
@@ -90,7 +91,7 @@ public class AbstractRestBean {
@PostConstruct
public void start() {
- this.cache = this.container.getCache();
+ this.cache = this.container.getCache("REST-API");
}
/**
@@ -140,7 +141,7 @@ public class AbstractRestBean {
* @param id Id of the object to load.
* @param clazz Wanted return type
* @return Object if found and the caller has access to it.
- * @see #getFqn(int, Class)
+ * @see #getFromCache(int, Class)
*/
protected <T> T getFromCache(int id, Class<T> clazz) {
CacheKey key = new CacheKey(clazz, id);
@@ -152,10 +153,10 @@ public class AbstractRestBean {
* We need to be careful here as we must not return objects the current
* caller has no access to. We do this by checking the "readers" attribute
* of the selected node to see if the caller has put the object there
- * @param fqn FullyQualified name (=path in cache) of the object to retrieve
+ * @param key FullyQualified name (=path in cache) of the object to retrieve
* @param clazz Return type
* @return The desired object if found and valid for the current caller. Null otherwise.
- * @see #putToCache(org.jboss.cache.Fqn, Object)
+ * @see #putToCache(CacheKey, Object)
*/
protected <T> T getFromCache(CacheKey key, Class<T> clazz) {
Object o = null;
@@ -190,7 +191,7 @@ public class AbstractRestBean {
* @param clazz Type to put in
* @param o Object to put
* @return true if put was successful
- * @see #putToCache(org.jboss.cache.Fqn, Object)
+ * @see #putToCache(CacheKey, Object)
*/
protected <T> boolean putToCache(int id, Class<T> clazz, T o) {
CacheKey key = new CacheKey(clazz, id);
@@ -200,10 +201,10 @@ public class AbstractRestBean {
/**
* Put an object into the cache. We need to record the caller so that we can later
* check if the caller can access that object or not.
- * @param fqn Fully qualified name (=path to object)
+ * @param key Fully qualified name (=path to object)
* @param o Object to put
* @return true if put was successful
- * @see #getFromCache(org.jboss.cache.Fqn, Class)
+ * @see #getFromCache(CacheKey, Class)
*/
@SuppressWarnings("unchecked")
protected <T> boolean putToCache(CacheKey key, T o) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
index 162fbae..d174067 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RHQApplication.java
@@ -32,7 +32,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
*
* @author Heiko W. Rupp
*/
-@ApplicationPath("/rest")
+@ApplicationPath("/1")
public class RHQApplication extends javax.ws.rs.core.Application {
Log log = LogFactory.getLog(RHQApplication.class);
commit bce7a7e69cf497285e8b1be94504e16b59b9d2b9
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 28 10:58:30 2012 -0500
remove the old, now unused, modules/jopr
diff --git a/modules/jopr/LICENSE b/modules/jopr/LICENSE
deleted file mode 100644
index c91e9b6..0000000
--- a/modules/jopr/LICENSE
+++ /dev/null
@@ -1,31 +0,0 @@
-RHQ Management Platform and other included Red Hat Software
-Copyright (C) 2006-2009 Red Hat, Inc. and others
-All rights reserved.
-
-This program is free software; you can redistribute it and/or
-modify it under the following terms.
-
-Parts of this project are available under the terms of the
-GNU General Public License, version 2, as published by the Free
-Software Foundation. Other parts are available under 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. Which license a module is under is defined
-by the header text of the code within a module.
-
-It is the intention of this license that plugins to this platform
-can be distributed under other licenses as they link only to the
-modules that are also available under the GNU Lesser General
-Public 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 and the GNU Lesser General Public License
-for more details.
-
-You should have received a copies 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.
diff --git a/modules/jopr/LICENSE_GPL b/modules/jopr/LICENSE_GPL
deleted file mode 100644
index d511905..0000000
--- a/modules/jopr/LICENSE_GPL
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/modules/jopr/LICENSE_LGPL b/modules/jopr/LICENSE_LGPL
deleted file mode 100644
index 5ab7695..0000000
--- a/modules/jopr/LICENSE_LGPL
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/modules/jopr/dist/agent/pom.xml b/modules/jopr/dist/agent/pom.xml
deleted file mode 100644
index 9fab897..0000000
--- a/modules/jopr/dist/agent/pom.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<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/maven-v4_0_0.xsd">
-
- <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- THE AGENT BUILD IS NOT CURRENTLY NEEDED. WE'LL KEEP THIS HERE ONLY FOR REFERENCE OR FUTURE MODIFICATION IF WE NEED
- TO MAKE JOPR SPECIFIC AGENT CHANGES.
-
- NOTE - The Jopr Agent is the RHQ Agent, unchanged, and is packaged in the RHQ (Server) Distribution.
-
- NOTE - The rt-filter connectors that were packaged with Jopr are now packaged in the RHQ (Server) Distribution.
-
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-dist-parent</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-agent</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Jopr Agent</name>
- <description>The Jopr Agent</description>
-
- <dependencies>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-enterprise-agent</artifactId>
- <version>${rhq.version}</version>
- <type>zip</type>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <finalName>${project.artifactId}-${project.version}</finalName>
- <outputDirectory>target/${project.build.finalName}</outputDirectory>
-
- <plugins>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
-
- <execution>
- <id>build-dist</id>
- <phase>generate-resources</phase>
- <configuration>
- <target>
- <property name="jopr.trunk.dir" location="../../.." />
- <property name="rhq.agent.dist.zipfile" location="${settings.localRepository}/org/rhq/rhq-enterprise-agent/${rhq.version}/rhq-enterprise-agent-${rhq.version}.zip" />
- <property name="rhq.connectors.dist.zipfile" location="${settings.localRepository}/org/rhq/rhq-enterprise-agent/${rhq.version}/rhq-product_connectors-${rhq.version}.zip" />
- <property name="jopr.agent.dist.dir" location="${project.build.outputDirectory}" />
- <echo>RHQ Agent dist zipfile=${rhq.agent.dist.zipfile}</echo>
- <echo>RHQ Product Connectors dist zipfile=${rhq.connectors.dist.zipfile}</echo>
- <echo>Jopr Agent dist output dir=${jopr.agent.dist.dir}</echo>
- <unzip src="${rhq.agent.dist.zipfile}" dest="target" />
- <copy todir="${jopr.agent.dist.dir}">
- <fileset dir="target/rhq-agent-${rhq.version}" />
- </copy>
- <unzip src="${rhq.connectors.dist.zipfile}" dest="target" />
- <copy todir="${jopr.agent.dist.dir}/product_connectors">
- <!-- none currently
- <fileset dir="${jopr.trunk.dir}/etc/product_connectors" />
- -->
- <fileset dir="target/rhq-product_connectors-${rhq.version}" />
- </copy>
- <copy todir="${jopr.agent.dist.dir}">
- <fileset dir="${jopr.trunk.dir}" includes="LICENSE*" />
- </copy>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/scripts/jopr-agent.assembly.xml</descriptor>
- </descriptors>
- <finalName>${project.build.finalName}</finalName>
- </configuration>
- <executions>
- <execution>
- <id>assemble-jopr-agent-zip</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
-
- </build>
-
-</project>
\ No newline at end of file
diff --git a/modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml b/modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml
deleted file mode 100644
index a77b0f9..0000000
--- a/modules/jopr/dist/agent/src/main/scripts/jopr-agent.assembly.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<assembly>
- <id>jopr-agent</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <baseDirectory>${project.build.finalName}</baseDirectory>
- <fileSets>
- <fileSet>
- <directory>target/${project.build.finalName}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.sh</exclude>
- <exclude>**/*.so</exclude>
- <exclude>**/*.sl</exclude>
- <exclude>**/*.dylib</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>target/${project.build.finalName}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- <include>**/*.so</include>
- <include>**/*.sl</include>
- <include>**/*.dylib</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/modules/jopr/dist/pom.xml b/modules/jopr/dist/pom.xml
deleted file mode 100644
index 699fe82..0000000
--- a/modules/jopr/dist/pom.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-dist-parent</artifactId>
- <packaging>pom</packaging>
-
- <name>Jopr Distros</name>
- <description>parent POM for all Jopr distributions</description>
-
- <modules>
- <!-- Note, The Jopr Agent is the RHQ Agent verbatim. There is no need currently to make any tweaks. -->
- <module>server</module>
- </modules>
-
-</project>
\ No newline at end of file
diff --git a/modules/jopr/dist/server/pom.xml b/modules/jopr/dist/server/pom.xml
deleted file mode 100644
index 778f92f..0000000
--- a/modules/jopr/dist/server/pom.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-dist-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-server</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Jopr Server</name>
- <description>The Jopr Server</description>
-
- <properties>
- <!-- dependency versions -->
- <product.shortName>Jopr</product.shortName>
- <product.name>Jopr</product.name>
- <product.fullName>Jopr</product.fullName>
- <product.url.domain>redhat.com</product.url.domain>
- <product.sales.email>sales(a)redhat.com</product.sales.email>
- <product.support.email>support(a)redhat.com</product.support.email>
- <product.version>${project.version}</product.version>
- <product.help.doc.root>http://jopr.org/confluence/display/JOPR2/</product.help.doc.root>
- <product.help.installation>Installation</product.help.installation>
- <product.help.guide.server>Running+the+Jopr+Server</product.help.guide.server>
- <product.help.guide.agent>Running+the+Jopr+Agent</product.help.guide.agent>
- <product.help.FAQ>FAQ</product.help.FAQ>
- <product.help.config.props>http://jopr.org/confluence/display/JOPR2/Startup+Properties#StartupProper...</product.help.config.props>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-enterprise-server-container</artifactId>
- <version>${rhq.version}</version>
- <type>zip</type>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <finalName>${project.artifactId}-${project.version}</finalName>
- <outputDirectory>target/${project.build.finalName}</outputDirectory>
-
- <resources>
-
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- </resource>
-
- <resource>
- <directory>src/main/resources-filtered</directory>
- <filtering>true</filtering>
- </resource>
-
- <resource>
- <directory>target/resources-filtered</directory>
- <filtering>true</filtering>
- </resource>
-
- </resources>
-
- <plugins>
-
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>move-src</id>
- <phase>process-resources</phase>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!-- Package the Jopr plugins with the RHQ plugins -->
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-plugins</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-hibernate-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-jboss-as-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-rhq-server-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-tomcat-plugin</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/jbossas/standalone/deployments/rhq.ear.rej/rhq-downloads/rhq-plugins</outputDirectory>
- </configuration>
- </execution>
-
- <!-- if jboss-software plugin is not needed in the binary distribution, comment this out -->
- <execution>
- <id>copy-jopr-serverplugins</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
-
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>jopr-serverplugin-jboss-software</artifactId>
- <version>${project.version}</version>
- </artifactItem>
-
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/jbossas/standalone/deployments/rhq.ear.rej/rhq-serverplugins</outputDirectory>
- </configuration>
- </execution>
- <!-- -->
-
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
-
- <execution>
- <id>build-dist</id>
- <phase>generate-resources</phase>
- <configuration>
- <target>
- <echo>settings.localRepository=${settings.localRepository}</echo>
- <echo>project.build.outputDirectory=${project.build.outputDirectory}</echo>
- <ant antfile="src/main/scripts/dist.build.xml" target="run">
- <property name="settings.localRepository" value="${settings.localRepository}" />
- <property name="project.build.outputDirectory" value="${project.build.outputDirectory}" />
-
- <!-- dependency versions -->
- <property name="rhq.version" value="${rhq.version}" />
-
- <!-- default server settings - these are not used currently; here just for future use, if needed -->
- <property name="rhq.server.http.port" value="${rhq.server.http.port}" />
- <property name="rhq.server.https.port" value="${rhq.server.https.port}" />
- <property name="rhq.ds.connection-url" value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.driver-class" value="${rhq.ds.driver-class}" />
- <property name="rhq.ds.user-name" value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password" value="${rhq.ds.password}" />
- <property name="rhq.ds.type-mapping" value="${rhq.ds.type-mapping}" />
- </ant>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/scripts/jopr-server.assembly.xml</descriptor>
- </descriptors>
- <finalName>${project.build.finalName}</finalName>
- </configuration>
- <executions>
- <execution>
- <id>assemble-jopr-server-zip</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
-
- </build>
-
-</project>
diff --git a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq-installer.war/images/logo.png b/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq-installer.war/images/logo.png
deleted file mode 100644
index bb4094c..0000000
Binary files a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq-installer.war/images/logo.png and /dev/null differ
diff --git a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/images/logo_header.gif b/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/images/logo_header.gif
deleted file mode 100644
index bb4094c..0000000
Binary files a/modules/jopr/dist/server/src/main/resources-binary/jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/images/logo_header.gif and /dev/null differ
diff --git a/modules/jopr/dist/server/src/main/scripts/dist.build.xml b/modules/jopr/dist/server/src/main/scripts/dist.build.xml
deleted file mode 100644
index 43c4e40..0000000
--- a/modules/jopr/dist/server/src/main/scripts/dist.build.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<project name="jopr-server" basedir="." default="run">
-
- <target name="init">
- <property name="jboss.home" location="${project.build.outputDirectory}/jbossas" />
- <property name="jboss.deploy.dir" location="${jboss.home}/server/default/deploy" />
- <property name="resources-filtered.dir" location="${basedir}/target/resources-filtered" />
- </target>
-
- <target name="run" depends="init">
-
- <echo>*** Building Jopr Server dist... ***</echo>
-
- <echo>Unzipping the RHQ Server distro zipfile...</echo>
- <antcall target="unzip-rhq-server" />
-
- <copy todir="${resources-filtered.dir}" encoding="UTF-8" outputencoding="UTF-8">
- <fileset dir="${project.build.outputDirectory}">
- <include name="jbossas/server/default/deploy/rhq.ear.rej/rhq-portal.war/WEB-INF/classes/ApplicationResources.properties.unfiltered" />
- <include name="jbossas/server/default/deploy/rhq-installer.war/WEB-INF/classes/InstallerMessages*.properties.unfiltered" />
- </fileset>
- <mapper type="glob" from="*.unfiltered" to="*" />
- </copy>
-
- <!-- NOTE: We copy the binary resources ourselves, because the Maven resources-plugin will
- not overwrite existing files unless filtering is enabled, and enabling filtering
- on binary files would cause the files to get corrupted. See
- http://jira.codehaus.org/browse/MRESOURCES-43 -->
- <echo>Replacing RHQ logos and message bundles with Jopr versions...</echo>
- <copy todir="${project.build.outputDirectory}">
- <fileset dir="${basedir}/src/main/resources-binary" />
- </copy>
-
- <!-- if there are any content source plugins we do not want in the distro, remove them here -->
- <!--
- <echo>Temporarily deleting the unused content source server plugins...</echo>
- <delete>
- <fileset dir="${jboss.deploy.dir}" includes="**/rhq-serverplugin-yum*" />
- </delete>
- -->
-
- <echo>Adding LICENSE files...</echo>
- <copy todir="${project.build.outputDirectory}" overwrite="true">
- <fileset dir="${basedir}/../../.." includes="LICENSE*" />
- </copy>
-
- </target>
-
- <target name="unzip-rhq-server">
- <property name="rhq-server.zip" location="${settings.localRepository}/org/rhq/rhq-enterprise-server-container/${rhq.version}/rhq-enterprise-server-container-${rhq.version}.zip" />
- <unzip src="${rhq-server.zip}" dest="${basedir}/target" />
-
- <echo>Removing RHQ LICENSE files...</echo>
- <delete>
- <fileset dir="${basedir}/target/rhq-server-${rhq.version}" includes="**/LICENSE*" />
- </delete>
-
- <move todir="${project.build.outputDirectory}">
- <fileset dir="${basedir}/target/rhq-server-${rhq.version}" />
- </move>
- <delete dir="${basedir}/target/rhq-server-${rhq.version}" />
-
- </target>
-
-</project>
diff --git a/modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml b/modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml
deleted file mode 100644
index d6d0506..0000000
--- a/modules/jopr/dist/server/src/main/scripts/jopr-server.assembly.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<assembly>
- <id>jopr-server</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <baseDirectory>${project.build.finalName}</baseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.outputDirectory}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.sh</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>${project.build.outputDirectory}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/*.sh</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/modules/jopr/etc/jbas5-ejb-client/client.bat b/modules/jopr/etc/jbas5-ejb-client/client.bat
deleted file mode 100644
index fa807a4..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/client.bat
+++ /dev/null
@@ -1,102 +0,0 @@
-@echo off
-rem -------------------------------------------------------------------------
-rem a script for a JBoss remote EJB client
-rem -------------------------------------------------------------------------
-
-rem $Id$
-
-if not "%ECHO%" == "" echo %ECHO%
-if "%OS%" == "Windows_NT" setlocal
-
-set MAIN_JAR_NAME=jbas5-ejb-client-1.0.jar
-set MAIN_CLASS=test.EjbClient
-
-set JBOSS_HOME=C:\opt\jboss-eap-5.0.0-SNAPSHOT
-
-set DIRNAME=.\
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
-set PROGNAME=run.bat
-if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-
-rem Find MAIN_JAR, or we can't continue
-
-set MAIN_JAR=%DIRNAME%\target\%MAIN_JAR_NAME%
-if exist "%MAIN_JAR%" goto FOUND_MAIN_JAR
-echo Could not locate %MAIN_JAR%. Please check that you are in the
-echo bin directory when running this script.
-goto END
-
-:FOUND_MAIN_JAR
-
-if not "%JAVA_HOME%" == "" goto HAVE_JAVA_HOME
-
-set JAVA=java
-
-echo JAVA_HOME is not set. Unexpected results may occur.
-echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-goto SKIP_SET_JAVA_HOME
-
-:HAVE_JAVA_HOME
-
-set JAVA=%JAVA_HOME%\bin\java
-
-:SKIP_SET_JAVA_HOME
-
-rem only include jbossall-client.jar in classpath, if
-rem JBOSS_CLASSPATH was not yet set
-if not "%JBOSS_CLASSPATH%" == "" goto HAVE_JB_CP
-set JBOSS_CLASSPATH=%JBOSS_HOME%\client\jbossall-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-dependency.jar
-rem Below is temporary!!!
-if not "%USE_PROFILESERVICE_CLIENT%" == "" goto USE_FULL_PROFILESERVICE
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-profileservice-client.jar
-goto DONE_WITH_PROFILE_SERVICE
-:USE_FULL_PROFILESERVICE
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-profileservice.jar
-:DONE_WITH_PROFILESERVICE
-goto HAVE_JB_CP
-
-rem For the call to new InitialContext() (using org.jnp.interfaces.NamingContextFactory)...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
-rem For the call to InitialContext.lookup()...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
-rem For remote invocations on the ProfileService proxy (e.g. ProfileService.getDomains())...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-common-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-core-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api.jar
-rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api-impl.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-spi-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-impl-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-security-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-dependency.jar
-rem Below is temporary!!!
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-profileservice.jar
-
-:HAVE_JB_CP
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%MAIN_JAR%
-
-rem Setup JBoss sepecific properties
-set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
-
-@echo on
-"%JAVA%" %JAVA_OPTS% -Xmx200M "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" %MAIN_CLASS% %*
-
-:END
diff --git a/modules/jopr/etc/jbas5-ejb-client/client.sh b/modules/jopr/etc/jbas5-ejb-client/client.sh
deleted file mode 100755
index 637de7c..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/client.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-# -------------------------------------------------------------------------
-# a script for a JBoss remote EJB client
-# -------------------------------------------------------------------------
-
-# $Id $
-
-MAIN_JAR_NAME=jbas5-ejb-client-1.0.jar
-MAIN_CLASS=test.EjbClient
-
-JBOSS_HOME=/home/metlos/Projects/java/jbossas-5-EAP/build/output/jboss-5.0.0.Beta
-
-DIRNAME="."
-
-# Find MAIN_JAR, or we can't continue
-
-MAIN_JAR="$DIRNAME/target/$MAIN_JAR_NAME"
-if [ ! -e "$MAIN_JAR" ]; then
- echo Could not locate $MAIN_JAR. Please check that you are in the
- echo bin directory when running this script.
- exit
-fi
-
-JAVA=java
-
-if [ "x" = "x$JAVA_HOME" ]; then
- echo JAVA_HOME is not set. Unexpected results may occur.
- echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-else
- JAVA="$JAVA_HOME/bin/java"
-fi
-
-# only include jbossall-client.jar in classpath, if
-# JBOSS_CLASSPATH was not yet set
-if [ "x" = "x$JBOSS_CLASSPATH" ]; then
- JBOSS_CLASSPATH="$JBOSS_HOME/client/jbossall-client.jar"
- JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-dependency.jar"
- # Below is temporary!!!
- if [ "x" = "x$USE_PROFILESERVICE_CLIENT" ]; then
- JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/common/lib/jboss-profileservice.jar"
- else
- JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-profileservice-client.jar"
- fi
-fi
-
-# These seem to be skipped in the client.bat
-# rem For the call to new InitialContext() (using org.jnp.interfaces.NamingContextFactory)...
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
-# rem For the call to InitialContext.lookup()...
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
-# rem For remote invocations on the ProfileService proxy (e.g. ProfileService.getDomains())...
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-common-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-core-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api.jar
-# rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api-impl.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-spi-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-impl-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-security-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
-#
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
-#
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-dependency.jar
-# rem Below is temporary!!!
-# set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-profileservice.jar
-
-JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$MAIN_JAR"
-
-# Setup JBoss sepecific properties
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
-echo "$JAVA" $JAVA_OPTS -Xmx200M "-Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS" -classpath "$JBOSS_CLASSPATH" $MAIN_CLASS $@
-"$JAVA" $JAVA_OPTS -Xmx200M "-Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS" -classpath "$JBOSS_CLASSPATH" $MAIN_CLASS $@
diff --git a/modules/jopr/etc/jbas5-ejb-client/pom.xml b/modules/jopr/etc/jbas5-ejb-client/pom.xml
deleted file mode 100644
index c39c8a8..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/pom.xml
+++ /dev/null
@@ -1,280 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>test</groupId>
- <artifactId>jbas5-ejb-client</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
-
- <name>JBAS5 EJB Client</name>
- <description>a simple client for testing connecting to a JBAS5 instance via JNP, looking up the ProfileService EJB3 beans, and invoking some methods on them</description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>${jbossas.version}</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <!-- aka jboss-client.jar -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jbossas.version}</version>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-core</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-spi</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-security</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>runtime</includeScope>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>test.EjbClient</mainClass>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
-
-</project>
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java
deleted file mode 100644
index a834dad..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/EjbClient.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package test;
-
-import java.lang.reflect.Proxy;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
-import org.jboss.profileservice.spi.DeploymentOption;
-import org.jboss.profileservice.spi.ProfileService;
-
-import java.net.URL;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import java.util.List;
-
-public class EjbClient
-{
- private static final String JNDI_LOGIN_INITIAL_CONTEXT_FACTORY = "org.jboss.security.jndi.JndiLoginInitialContextFactory";
- private static final String NAMING_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
-
- private static final String SECURE_PROFILE_SERVICE_JNDI_NAME = "SecureProfileService/remote";
- private static final String SECURE_MANAGEMENT_VIEW_JNDI_NAME = "SecureManagementView/remote";
-
- private static final String SECURE_DEPLOYMENT_MANAGER_JNDI_NAME = "SecureDeploymentManager/remote";
-
- private static final String PROFILE_SERVICE_JNDI_NAME = "ProfileService";
- private static final String MANAGEMENT_VIEW_JNDI_NAME = "ManagementView";
- private static final String DEPLOYMENT_MANAGER_JNDI_NAME = "DeploymentManager";
-
- private static final String PROFILE_SERVICE_PRINCIPAL = "admin";
- private static final String PROFILE_SERVICE_CREDENTIALS = "admin";
-
- public static void main(String[] args)
- throws Exception
- {
- List<String> options = Arrays.asList(args);
-
- boolean unsecure = options.contains("unsecure");
- boolean testDeployment = options.contains("test-deployment");
- boolean testAuth = options.contains("test-auth");
- boolean useJaas = options.contains("jaas");
-
- //System.setProperty("org.jboss.security.SecurityAssociation.ThreadLocal", "false");
-
- Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, "jnp://127.0.0.1:1099/");
- if (unsecure || useJaas) {
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, NAMING_CONTEXT_FACTORY);
- } else {
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, JNDI_LOGIN_INITIAL_CONTEXT_FACTORY);
- env.setProperty(Context.SECURITY_PRINCIPAL, PROFILE_SERVICE_PRINCIPAL);
- env.setProperty(Context.SECURITY_CREDENTIALS, PROFILE_SERVICE_CREDENTIALS);
- }
-
- InitialContext initialContext = createInitialContext(env);
- ProfileService profileService;
- ManagementView managementView;
- DeploymentManager deploymentManager;
-
- if (unsecure) {
- profileService = (ProfileService)lookup(initialContext, PROFILE_SERVICE_JNDI_NAME);
- managementView = profileService.getViewManager();
- deploymentManager = profileService.getDeploymentManager();
- } else if (useJaas) {
- profileService = (ProfileService)lookup(initialContext, PROFILE_SERVICE_JNDI_NAME);
- managementView = (ManagementView)lookup(initialContext, MANAGEMENT_VIEW_JNDI_NAME);
- deploymentManager = (DeploymentManager)lookup(initialContext, DEPLOYMENT_MANAGER_JNDI_NAME);
-
- //apply the jaas security
- ClassLoader classLoader = EjbClient.class.getClassLoader();
- profileService = (ProfileService) Proxy.newProxyInstance(classLoader,
- new Class<?>[] { ProfileService.class },
- new JaasAuthenticationInvocationHandler(profileService, PROFILE_SERVICE_PRINCIPAL, PROFILE_SERVICE_CREDENTIALS));
-
- managementView = (ManagementView) Proxy.newProxyInstance(classLoader,
- new Class<?>[] { ManagementView.class },
- new JaasAuthenticationInvocationHandler(managementView, PROFILE_SERVICE_PRINCIPAL, PROFILE_SERVICE_CREDENTIALS));
-
- deploymentManager = (DeploymentManager) Proxy.newProxyInstance(classLoader,
- new Class<?>[] { DeploymentManager.class },
- new JaasAuthenticationInvocationHandler(deploymentManager, PROFILE_SERVICE_PRINCIPAL, PROFILE_SERVICE_CREDENTIALS));
- } else {
- profileService = (ProfileService)lookup(initialContext, SECURE_PROFILE_SERVICE_JNDI_NAME);
- managementView = (ManagementView)lookup(initialContext, SECURE_MANAGEMENT_VIEW_JNDI_NAME);
- deploymentManager = (DeploymentManager)lookup(initialContext, SECURE_DEPLOYMENT_MANAGER_JNDI_NAME);
- }
-
- profileService.getDomains();
- profileService.getProfileKeys();
- managementView.load();
- managementView.getDeploymentNames();
- deploymentManager.getProfiles();
-
- if (testDeployment) {
- tryToDeploySomething(deploymentManager);
- }
-
- if (testAuth) {
- Worker worker = new Worker(managementView);
- worker.run();
- for (int i = 0; i < 50; i++) {
- Thread.sleep(100);
- worker = new Worker(managementView);
- Thread thread = new Thread(worker);
- thread.start();
- }
- Thread.sleep(50);
- worker = new Worker(managementView);
- worker.run();
- }
- }
-
- private static InitialContext createInitialContext(Properties env) throws NamingException
- {
- System.out.println("Creating JNDI InitialContext with env [" + env + "]...");
- InitialContext initialContext = new InitialContext(env);
- System.out.println("Created JNDI InitialContext [" + initialContext + "].");
- return initialContext;
- }
-
- private static Object lookup(InitialContext initialContext, String name) throws NamingException
- {
- System.out.println("Looking up name '" + name + "' from InitialContext...");
- Object obj = initialContext.lookup(name);
- System.out.println("Found Object: " + obj);
- return obj;
- }
-
- private static void tryToDeploySomething(DeploymentManager deploymentManager) {
- File tmpFile = null;
-
- try {
- tmpFile = File.createTempFile("ejb-client-test", ".war");
- InputStream dummyWar = EjbClient.class.getClassLoader().getResourceAsStream("dummy.war");
- BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(tmpFile));
- byte[] buffer = new byte[16384];
-
- int cnt = 0;
- while ((cnt = dummyWar.read(buffer)) >= 0) {
- out.write(buffer, 0, cnt);
- }
- dummyWar.close();
- out.close();
- } catch (IOException e) {
- return;
- }
- try {
- URL url = tmpFile.toURI().toURL();
- DeploymentProgress progress = deploymentManager.distribute(tmpFile.getName(), url, new DeploymentOption[] {});
- progress.run();
-
- if (!progress.getDeploymentStatus().isFailed()) {
- System.out.println("Jar distribution succeeded.");
- String[] deploymentNames = progress.getDeploymentID().getRepositoryNames();
- progress = deploymentManager.start(deploymentNames);
- progress.run();
- System.out.println("Deployment succeeded.");
- } else {
- System.out.println("Jar distribution failed.");
- }
- } catch (Exception e) {
- System.out.println("Deployment failed.");
- e.printStackTrace();
- } finally {
- tmpFile.delete();
- }
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java
deleted file mode 100644
index cc5b350..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossCallbackHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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 test;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-
-/**
- * @author Ian Springer
- */
-public class JBossCallbackHandler implements CallbackHandler {
- private String username;
- private char[] password;
-
- public JBossCallbackHandler(String username, String password)
- {
- this.username = username;
- this.password = password.toCharArray();
- }
-
- public void handle(Callback[] callbacks) throws
- IOException, UnsupportedCallbackException
- {
- for (Callback callback : callbacks)
- {
- //System.out.println("Handling Callback [" + callback + "]...");
- if (callback instanceof NameCallback)
- {
-
- NameCallback nameCallback = (NameCallback)callback;
- nameCallback.setName(this.username);
- }
- else if (callback instanceof PasswordCallback)
- {
- PasswordCallback passwordCallback = (PasswordCallback)callback;
- passwordCallback.setPassword(this.password);
- }
- else
- {
- throw new UnsupportedCallbackException(callback, "Unrecognized Callback: " + callback);
- }
- }
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java
deleted file mode 100644
index 6aaac94..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JBossConfiguration.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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 test;
-
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.security.auth.login.Configuration;
-import javax.security.auth.login.AppConfigurationEntry;
-
-/**
- * A JAAS configuration for a JBoss client. This is the programmatic equivalent of the following auth.conf file:
- *
- * <code>
- * jboss
- * {
- * org.jboss.security.ClientLoginModule required
- * multi-threaded=true;
- * };
- * </code>
- *
- * @author Ian Springer
- */
-public class JBossConfiguration extends Configuration {
- public static final String JBOSS_ENTRY_NAME = "jboss";
-
- private static final String JBOSS_LOGIN_MODULE_CLASS_NAME = "org.jboss.security.ClientLoginModule";
- private static final String MULTI_THREADED_OPTION = "multi-threaded";
-
- public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
- if (JBOSS_ENTRY_NAME.equals(name)) {
- Map options = new HashMap(1);
- options.put(MULTI_THREADED_OPTION, Boolean.TRUE.toString());
- AppConfigurationEntry appConfigurationEntry =
- new AppConfigurationEntry(JBOSS_LOGIN_MODULE_CLASS_NAME,
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
- return new AppConfigurationEntry[] {appConfigurationEntry};
- } else {
- throw new IllegalArgumentException("Unknown entry name: " + name);
- }
- }
-
- public void refresh() {
- return;
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java
deleted file mode 100644
index 1b336e1..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/JaasAuthenticationInvocationHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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 test;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-
-import javax.security.auth.login.LoginException;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.Configuration;
-
-/**
- * @author Ian Springer
- */
-public class JaasAuthenticationInvocationHandler implements InvocationHandler {
- private Object target;
- private LoginContext loginContext;
-
- public JaasAuthenticationInvocationHandler(Object target, String username, String password) {
- this.target = target;
- JBossCallbackHandler jaasCallbackHandler = new JBossCallbackHandler(username, password);
- Configuration jaasConfig = new JBossConfiguration();
- try {
- this.loginContext = new LoginContext(JBossConfiguration.JBOSS_ENTRY_NAME, null, jaasCallbackHandler,
- jaasConfig);
- }
- catch (LoginException e) {
- throw new RuntimeException(e);
- }
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- this.loginContext.login();
- Object returnValue = method.invoke(this.target, args);
- this.loginContext.logout();
- return returnValue;
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java b/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java
deleted file mode 100644
index a0fdbe7..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/java/test/Worker.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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 test;
-
-import java.util.Set;
-import java.util.Map;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.KnownComponentTypes;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.DeploymentTemplateInfo;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.metatype.api.values.SimpleValue;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SimplePrincipal;
-import org.jboss.security.SecurityContextAssociation;
-import org.jboss.security.SecurityContext;
-import org.jboss.security.SecurityIdentity;
-
-/**
- * @author Ian Springer
- */
-public class Worker implements Runnable
-{
- private ManagementView managementView;
-
- public Worker(ManagementView managementView)
- {
- this.managementView = managementView;
- }
-
- public void run()
- {
- System.out.println("Starting worker " + Thread.currentThread() + "...");
- try
- {
- // Uncomment the below line to reproduce https://jira.jboss.org/jira/browse/JOPR-263.
- resetSecurityAssociation();
-
- this.managementView.load();
- ComponentType QUEUE_COMPONENT_TYPE = KnownComponentTypes.JMSDestination.Queue.getType();
- Set<ManagedComponent> queueComponents =
- this.managementView.getComponentsForType(QUEUE_COMPONENT_TYPE);
- ManagedComponent queueComponent = queueComponents.iterator().next();
- queueComponent.getRunState();
-
- // Modify a property...
- queueComponent.getProperties();
- ManagedProperty maxSizeProp = queueComponent.getProperty("maxSize");
- SimpleValueSupport maxSizeValue = (SimpleValueSupport)maxSizeProp.getValue();
- maxSizeValue.setValue(99);
- this.managementView.updateComponent(queueComponent);
-
- // Run some operations...
- Set<ManagedOperation> operations = queueComponent.getOperations();
- try
- {
- for (ManagedOperation operation : operations) {
- if (operation.getName().equals("stop")) {
- operation.invoke();
- }
- }
- }
- catch (Exception e)
- {
- System.out.println("Exception when invoking stop(): " + e);
- }
- for (ManagedOperation operation : operations) {
- if (operation.getName().equals("start")) {
- operation.invoke();
- }
- }
-
- // Create a new MO...
- DeploymentTemplateInfo template = this.managementView.getTemplate("QueueTemplate");
- Map<String,ManagedProperty> props = template.getProperties();
- ManagedProperty jndiNameProp = props.get("JNDIName");
- String currentThreadName = Thread.currentThread().getName();
- SimpleValue newValue = new SimpleValueSupport(SimpleMetaType.STRING, currentThreadName);
- jndiNameProp.setValue(newValue);
- this.managementView.applyTemplate(currentThreadName, template);
- this.managementView.process();
-
- // Now delete the MO...
- queueComponent = this.managementView.getComponent(currentThreadName, QUEUE_COMPONENT_TYPE);
- this.managementView.removeComponent(queueComponent);
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- private void resetSecurityAssociation()
- {
- System.out.println("BEFORE RESET: principal=" + SecurityAssociation.getPrincipal()
- + ", credential=" + SecurityAssociation.getCredential()
- + ", callerPrincipal=" + SecurityAssociation.getCallerPrincipal()
- + ", subject=" + SecurityAssociation.getSubject()
- + ", runAsIdentity=" + SecurityAssociation.peekRunAsIdentity()
- + ", securityContext=" + SecurityContextAssociation.getSecurityContext());
- //SecurityAssociation.clear();
- SecurityAssociation.setPrincipal(new SimplePrincipal("admin"));
- SecurityAssociation.setCredential("admin");
- System.out.println("AFTER RESET: principal=" + SecurityAssociation.getPrincipal()
- + ", credential=" + SecurityAssociation.getCredential()
- + ", callerPrincipal=" + SecurityAssociation.getCallerPrincipal()
- + ", subject=" + SecurityAssociation.getSubject()
- + ", runAsIdentity=" + SecurityAssociation.peekRunAsIdentity()
- + ", securityContext=" + SecurityContextAssociation.getSecurityContext());
- }
-}
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/dummy.war b/modules/jopr/etc/jbas5-ejb-client/src/main/resources/dummy.war
deleted file mode 100644
index 943491d..0000000
Binary files a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/dummy.war and /dev/null differ
diff --git a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml b/modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml
deleted file mode 100644
index b9b5e68..0000000
--- a/modules/jopr/etc/jbas5-ejb-client/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Messagen -->
-
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
-
- <!--<param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>-->
- </layout>
- </appender>
-
- <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
- <param name="File" value="target/test.log"/>
- <param name="Append" value="false"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Messagen -->
- <!--
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
- -->
- <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
- </layout>
- </appender>
-
- <category name="org.jboss.security">
- <priority value="TRACE"/>
- </category>
-
- <root>
- <priority value="INFO"/>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/jars/ejb2-test.jar b/modules/jopr/etc/jbas5-ejb2-mdb-test/jars/ejb2-test.jar
deleted file mode 100644
index a3aeb57..0000000
Binary files a/modules/jopr/etc/jbas5-ejb2-mdb-test/jars/ejb2-test.jar and /dev/null differ
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml b/modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml
deleted file mode 100644
index abb38ef..0000000
--- a/modules/jopr/etc/jbas5-ejb2-mdb-test/pom.xml
+++ /dev/null
@@ -1,301 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>test</groupId>
- <artifactId>jbas5-ejb2-mdb-test</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
-
- <name>JBAS5 EJB2 MDB Test</name>
- <description></description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>5.1.0.CR1</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4-jboss</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>5.1.0.CR1</version>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-core</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-spi</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-security</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-dependency</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-reflect</artifactId>
- </dependency>
-
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-serialization</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-core-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-client-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice</artifactId>
- <classifier>client</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>jmx-invoker-adaptor-client</classifier>
- </dependency>
-
- <dependency>
- <groupId>jboss.messaging</groupId>
- <artifactId>jboss-messaging-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- </dependency>
-
- <dependency>
- <groupId>apache-log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>runtime</includeScope>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>test.Main</mainClass>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
-
-</project>
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh b/modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh
deleted file mode 100755
index b80b85d..0000000
--- a/modules/jopr/etc/jbas5-ejb2-mdb-test/run.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-java -jar target/jbas5-ejb2-mdb-test-1.0.jar "jars/ejb2-test.jar"
diff --git a/modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java b/modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java
deleted file mode 100644
index 83d3a57..0000000
--- a/modules/jopr/etc/jbas5-ejb2-mdb-test/src/main/java/test/Main.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package test;
-
-import java.io.File;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.profileservice.spi.ProfileService;
-
-/**
- * @author Lukas Krejci
- *
- */
-public class Main {
-
- private static String ARCHIVE_NAME = null;
- private static String TEST_JAR_PATH = null;
-
- private static final int MESSAGES_SENT = 10;
- private static final String QUEUE_NAME = "queue/A";
- private static final String MDB_NAME = "StrictlyPooledMDB";
-
- public static void main(String[] args) {
- try {
- TEST_JAR_PATH = args[0];
- File f = new File(TEST_JAR_PATH);
- ARCHIVE_NAME = f.getName();
-
- ManagementView mgtView = getManagementView();
- mgtView.load();
-
- deployTestJar();
-
- mgtView.load();
-
- InitialContext ctx = getInitialContext();
-
- System.out.println("Sending " + MESSAGES_SENT + " messages to " + QUEUE_NAME);
-
- QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
- Queue queue = (Queue) ctx.lookup(QUEUE_NAME);
-
- QueueConnection connection = factory.createQueueConnection();
- connection.start();
-
- QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-
- QueueSender sender = session.createSender(queue);
-
- TextMessage message = session.createTextMessage();
-
- for (int i = 0; i < MESSAGES_SENT; ++i) {
- message.setText("Message no. " + i);
- sender.send(message);
- }
-
- sender.close();
- session.close();
- connection.close();
-
- Thread.sleep(2000);
-
- Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("EJB", "MDB"));
- boolean found = false;
- for (ManagedComponent comp : comps) {
- System.out.println(comp.getName());
- if (comp.getName().contains(MDB_NAME)) {
- found = true;
-
- //check the CreateCount property
- ManagedProperty createCountProp = comp.getProperty("CreateCount");
- System.out.println("CreateCount = " + createCountProp.getValue());
-
- //check the MessageCount property
- ManagedProperty messageCountProp = comp.getProperty("MessageCount");
- System.out.println("MessageCount = " + messageCountProp.getValue());
- break;
- }
- }
- if (!found) {
- System.out.println("Couldn't find the session bean in management view.");
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- undeploy();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private static InitialContext getInitialContext() throws Exception {
- Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
-
- InitialContext ctx = new InitialContext(env);
- return ctx;
- }
-
- private static ProfileService getProfileService() throws Exception {
- InitialContext ctx = getInitialContext();
- ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
- return ps;
- }
-
- private static ManagementView getManagementView() throws Exception {
- ManagementView activeView = getProfileService().getViewManager();
- // Init the VFS to setup the vfs* protocol handlers
- //VFS.init();
-
- return activeView;
- }
-
- private static DeploymentManager getDeploymentManager() throws Exception {
- DeploymentManager manager = getProfileService().getDeploymentManager();
-
- return manager;
- }
-
- private static void deployTestJar() throws Exception {
- DeploymentManager deploymentManager = getDeploymentManager();
-
- File archiveFile = new File(TEST_JAR_PATH);
-
- DeploymentProgress progress = deploymentManager.distribute(ARCHIVE_NAME, archiveFile.toURI().toURL(), false);
- progress.run();
-
- DeploymentStatus status = progress.getDeploymentStatus();
-
- if (status.isFailed()) {
- throw new IllegalStateException("Failed to distribute " + archiveFile.getAbsolutePath() + " with message: "
- + status.getMessage());
- }
-
- String[] deploymentNames = progress.getDeploymentID().getRepositoryNames();
-
- progress = deploymentManager.start(deploymentNames);
- progress.run();
-
- status = progress.getDeploymentStatus();
-
- if (status.isFailed()) {
- throw new IllegalStateException("Failed to start " + archiveFile.getAbsolutePath() + " with message: "
- + status.getMessage());
- }
- }
-
-
- public static void undeploy() throws Exception {
- DeploymentManager deploymentManager = getDeploymentManager();
-
- DeploymentProgress progress = deploymentManager.remove(ARCHIVE_NAME);
- progress.run();
-
- DeploymentStatus status = progress.getDeploymentStatus();
-
- if (status.isFailed()) {
- throw new IllegalStateException("Failed to undeploy " + ARCHIVE_NAME + " with message: "
- + status.getMessage());
- }
- }
-}
diff --git a/modules/jopr/etc/jbas5-jnp-client/README b/modules/jopr/etc/jbas5-jnp-client/README
deleted file mode 100644
index afd0676..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/README
+++ /dev/null
@@ -1,16 +0,0 @@
-To build run the following command:
-
- mvn install
-
-To set up your environment set the JBOSS_HOME directory:
-
- export JBOSS_HOME=/home/rbuck/dev/servers/jboss-eap/5.1.2-ER2/jboss-as
-
-To run the client perform the following command:
-
- ./client.sh
-
-To run the client against a different port or address run the command like this:
-
- ./client.sh jnp://127.0.0.1:1099
-
diff --git a/modules/jopr/etc/jbas5-jnp-client/classpath.txt b/modules/jopr/etc/jbas5-jnp-client/classpath.txt
deleted file mode 100644
index aac756f..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/classpath.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-This is what Scott recommended using for JBAS 5.1:
-
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-common-core.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jnp-client.jar"/>
- <classpathentry kind="var" path="JBOSS/lib/jboss-profileservice-spi.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-logging-jdk.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-logging-log4j.jar"/>
- <classpathentry kind="var" path="JBOSS/client/log4j.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-logging-spi.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-aop-client.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-remoting.jar"/>
- <classpathentry kind="var" path="JBOSS/common/lib/jboss-security-aspects.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-aspect-jdk50-client.jar"/>
- <classpathentry kind="var" path="JBOSS/client/trove.jar"/>
- <classpathentry kind="var" path="JBOSS/client/javassist.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-mdr.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-security-spi.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jbosssx-client.jar"/>
- <classpathentry kind="var" path="JBOSS/client/jboss-javaee.jar"/>
- <classpathentry kind="var" path="JBOSS/client/concurrent.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
-
-And this is what EMS uses for JBAS 3.x/4.x:
-
- public String[] getConnectionClasspathEntries() {
- return
- new String[] {
- // 3.x + jars
- "lib/jboss-jmx.jar",
- "client/jboss-common.jar",
- "lib/jboss-system.jar",
- "client/jbossall-client.jar",
- "client/log4j.jar",
- "*/*/lib/jboss.jar",
- "client/concurrent.jar",
- "client/jboss-jsr77-client.jar",
- // 3.2.3 jars
- "*/*/lib/jboss-transaction.jar",
- "lib/xercesImpl.jar",
- "lib/xml-apis.jar",
- // 4.0 jars
- "lib/dom4j.jar",
- "client/jnp-client.jar",
- "client/jmx-rmi-connector-client.jar",
- "client/jboss-j2ee.jar",
- "*/*/lib/jboss-management.jar",
- "*/*/lib/jbosssx.jar",
- "client/jbosssx-client.jar",
- "lib/endorsed/xercesImpl.jar",
- "lib/endorsed/xml-apis.jar",
- "*/*/lib/hibernate3.jar"
- };
- }
diff --git a/modules/jopr/etc/jbas5-jnp-client/client.bat b/modules/jopr/etc/jbas5-jnp-client/client.bat
deleted file mode 100644
index 78ddfe3..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/client.bat
+++ /dev/null
@@ -1,83 +0,0 @@
-@echo off
-rem -------------------------------------------------------------------------
-rem a script for a JBoss remote RMI client
-rem -------------------------------------------------------------------------
-
-rem $Id$
-
-if not "%ECHO%" == "" echo %ECHO%
-if "%OS%" == "Windows_NT" setlocal
-
-set MAIN_JAR_NAME=jbas5-jnp-client-1.0.jar
-set MAIN_CLASS=test.RmiClient
-
-set JBOSS_HOME=C:\opt\jboss-eap-5.0.0-SNAPSHOT
-
-set DIRNAME=.\
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
-set PROGNAME=run.bat
-if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-
-rem Find MAIN_JAR, or we can't continue
-
-set MAIN_JAR=%DIRNAME%\target\%MAIN_JAR_NAME%
-if exist "%MAIN_JAR%" goto FOUND_MAIN_JAR
-echo Could not locate %MAIN_JAR%. Please check that you are in the
-echo bin directory when running this script.
-goto END
-
-:FOUND_MAIN_JAR
-
-if not "%JAVA_HOME%" == "" goto HAVE_JAVA_HOME
-
-set JAVA=java
-
-echo JAVA_HOME is not set. Unexpected results may occur.
-echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
-goto SKIP_SET_JAVA_HOME
-
-:HAVE_JAVA_HOME
-
-set JAVA=%JAVA_HOME%\bin\java
-
-:SKIP_SET_JAVA_HOME
-
-rem only include jbossall-client.jar in classpath, if
-rem JBOSS_CLASSPATH was not yet set
-if not "%JBOSS_CLASSPATH%" == "" goto HAVE_JB_CP
-set JBOSS_CLASSPATH=%JBOSS_HOME%\client\jbossall-client.jar
-goto HAVE_JB_CP
-
-rem For the call to new InitialContext() (using org.jnp.interfaces.NamingContextFactory)...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
-rem For the call to InitialContext.lookup()...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
-rem For remote invocations on the ProfileService proxy (e.g. ProfileService.getViewManager())...
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
-
-:HAVE_JB_CP
-
-set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%MAIN_JAR%
-
-rem Setup JBoss sepecific properties
-set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
-
-@echo on
-"%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" %MAIN_CLASS% %*
-
-:END
diff --git a/modules/jopr/etc/jbas5-jnp-client/client.sh b/modules/jopr/etc/jbas5-jnp-client/client.sh
deleted file mode 100755
index 6087710..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/client.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-# -------------------------------------------------------------------------
-# a script for a JBoss remote RMI client
-# -------------------------------------------------------------------------
-
-# $Id: client.sh 558 2009-05-05 03:52:49Z ips $
-
-
-MAIN_JAR_NAME=jbas5-jnp-client-1.0.jar
-MAIN_CLASS=test.RmiClient
-
-if [ -z "$JBOSS_HOME" ]; then
- echo "JBOSS_HOME environment variable is undefined." >&2
- exit 1
-fi
-
-if [ ! -d "$JBOSS_HOME" ]; then
- echo "Dir specified by JBOSS_HOME variable ($JBOSS_HOME) does not exist." >&2
- exit 1
-fi
-JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8788"
-
-
-# Find MAIN_JAR, or we can't continue
-
-MAIN_JAR=target/$MAIN_JAR_NAME
-if [ ! -f "$MAIN_JAR" ]; then
- echo "Could not locate $MAIN_JAR. Please check that you are in the bin directory when running this script." >&2
- exit 1
-fi
-
-if [ "`uname`" == "Darwin" ]; then
- JAVA_HOME=/usr
-fi
-
-if [ "$JAVA_HOME" == "" ]; then
- JAVA=java
- echo "JAVA_HOME is not set. Unexpected results may occur. Set JAVA_HOME to the directory of your local JDK to avoid this message."
-fi
-
-
-JAVA=$JAVA_HOME/bin/java
-
-
-# only include jbossall-client.jar in classpath, if
-# JBOSS_CLASSPATH was not yet set
-#if not "%JBOSS_CLASSPATH%" == "" GOTO HAVE_JB_CP
-JBOSS_CLASSPATH=$JBOSS_HOME/client/jbossall-client.jar
-# AS 6.0 M1 and later needs the following two jars
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-classpool.jar
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-classpool-scoped.jar
-# AS 6.0 M4 and later needs the following two jars
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/common/lib/jboss-as-profileservice.jar
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-profileservice-spi.jar
-
-# For the call to new InitialContext() (using org.jnp.interfaces.NamingContextFactory)...
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jnp-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/common/lib/jboss-security-aspects.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jbosssx-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-aop-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-common-core.jar
-# For the call to InitialContext.lookup()...
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-#oting.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-aspect-jdk50-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/trove.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/javassist.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-security-spi.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-javaee.jar
-# For remote invocations on the ProfileService proxy (e.g. ProfileService.getViewManager())...
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/concurrent.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-client.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-mdr.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/client/jboss-integration.jar
-
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-managed.jar
-#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JBOSS_HOME/lib/jboss-metatype.jar
-
-#:HAVE_JB_CP
-
-JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$MAIN_JAR
-
-# Setup JBoss sepecific properties
-JBOSS_ENDORSED_DIRS=$JBOSS_HOME/lib/endorsed
-
-set -x
-"$JAVA" $JAVA_OPTS "-Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS" -classpath "$JBOSS_CLASSPATH" $MAIN_CLASS $*
-
diff --git a/modules/jopr/etc/jbas5-jnp-client/pom.xml b/modules/jopr/etc/jbas5-jnp-client/pom.xml
deleted file mode 100644
index a8d7f7e..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/pom.xml
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>test</groupId>
- <artifactId>jbas5-jnp-client</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
-
- <name>JBAS5 JNP Client</name>
- <description>a simple client for testing connecting to a JBAS5 instance via JNP and looking up the ProfileService</description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>${jbossas.version}</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <!-- aka jboss-client.jar -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeScope>runtime</includeScope>
- <excludeTransitive>true</excludeTransitive>
- <outputDirectory>target/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>test.RmiClient</mainClass>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>jboss</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
-
-</project>
diff --git a/modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java b/modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java
deleted file mode 100644
index de32923..0000000
--- a/modules/jopr/etc/jbas5-jnp-client/src/main/java/test/RmiClient.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package test;
-
-import java.util.Collection;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.profileservice.spi.Profile;
-import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.profileservice.spi.ProfileService;
-
-public class RmiClient
-{
- private static final String NAMING_CONTEXT_FACTORY = "org.jboss.security.jndi.JndiLoginInitialContextFactory";
- //private static final String NAMING_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
-
- private static final String PROFILE_SERVICE_JNDI_NAME = "ProfileService";
-
- public static void main(String[] args)
- throws Exception
- {
- String jnpUrl = (args.length == 1) ? args[0] : "jnp://127.0.0.1:1099";
-
- Properties env = new Properties();
- env.setProperty(Context.PROVIDER_URL, jnpUrl);
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, NAMING_CONTEXT_FACTORY);
- env.setProperty(Context.SECURITY_PRINCIPAL, "admin");
- env.setProperty(Context.SECURITY_CREDENTIALS, "admin");
- env.setProperty("jnp.disableDiscovery", "true");
- env.setProperty("jnp.timeout", "120");
- env.setProperty("jnp.sotimeout", "120");
- InitialContext initialContext = new InitialContext(env);
-
- ProfileService profileService = (ProfileService)initialContext.lookup(PROFILE_SERVICE_JNDI_NAME);
- System.err.println("ProfileService: " + profileService);
- ManagementView managementView = profileService.getViewManager();
- System.err.println("ManagementView: " + managementView);
- DeploymentManager deploymentManager = profileService.getDeploymentManager();
- System.err.println("DeploymentManager: " + deploymentManager);
-
- profileService.getDomains();
- Collection<ProfileKey> profileKeys = profileService.getActiveProfileKeys();
- for (ProfileKey profileKey : profileKeys) {
- try {
- Profile profile = profileService.getActiveProfile(profileKey);
- System.err.println("Active profile for key [" + profileKey + "]: " + profile);
- } catch (Exception e) {
- System.err.println("Failed to get active profile for key [" + profileKey + "] - cause: " + e);
- }
- }
-
- managementView.load();
- managementView.getDeploymentNames();
-
- deploymentManager.loadProfile(new ProfileKey(ProfileKey.DEFAULT));
- deploymentManager.getProfiles();
-
- ComponentType localTxDataSourceType = new ComponentType("DataSource", "LocalTx");
- ManagedComponent defaultDSComponent = managementView.getComponent("DefaultDS", localTxDataSourceType);
- ManagedProperty maxPoolSizeProp = defaultDSComponent.getProperty("query-timeout");
- SimpleValueSupport maxPoolSizeValue = (SimpleValueSupport)maxPoolSizeProp.getValue();
- System.err.println("getValue(): " + maxPoolSizeValue.getValue());
-
- System.err.println("setValue(33)");
- maxPoolSizeValue.setValue(33);
- managementView.updateComponent(defaultDSComponent);
- managementView.load();
- defaultDSComponent = managementView.getComponent("DefaultDS", localTxDataSourceType);
- maxPoolSizeProp = defaultDSComponent.getProperty("query-timeout");
- maxPoolSizeValue = ((SimpleValueSupport)maxPoolSizeProp.getValue());
- System.err.println("getValue(): " + maxPoolSizeValue.getValue());
-
- System.err.println("setValue(null)");
- maxPoolSizeValue.setValue(null);
- managementView.updateComponent(defaultDSComponent);
- managementView.load();
- defaultDSComponent = managementView.getComponent("DefaultDS", localTxDataSourceType);
- maxPoolSizeProp = defaultDSComponent.getProperty("query-timeout");
- maxPoolSizeValue = ((SimpleValueSupport)maxPoolSizeProp.getValue());
- System.err.println("getValue(): " + maxPoolSizeValue.getValue());
- }
-}
-
diff --git a/modules/jopr/modules-plugins-pom.xml b/modules/jopr/modules-plugins-pom.xml
deleted file mode 100644
index 1bb52cf..0000000
--- a/modules/jopr/modules-plugins-pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <!-- Plugin poms should not set their parent pom to this artifact. Instead, set to "jopr-modules-parent". This is due to
- the fact that this pom runs integration tests *on* the plugins. This pom must process in the reactor after the
- plugins themselves, as such, it can't be their parent. -->
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-plugins-parent</artifactId>
- <version>2.3.0.EmbJopr.1.3.0-1</version>
- <packaging>pom</packaging>
- <name>Jopr Plugins</name>
- <description>parent POM for all Jopr plugins</description>
-
- <dependencies>
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-jmx-plugin</artifactId>
- <version>${rhq.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <!-- plugins - order is important -->
- <modules>
- <module>tomcat</module>
- <module>jboss-as</module>
- <module>hibernate</module>
- <module>rhq-server</module>
- <module>jboss-cache</module>
- <module>jboss-as-5</module>
- <module>jboss-cache-v3</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>integration-test</phase>
- <configuration>
- <tasks>
- <property name="test.classpath" refid="maven.test.classpath" />
- <echo>Validating plugins...</echo>
- <java classname="org.rhq.core.pc.plugin.PluginValidator" failonerror="true" fork="true">
- <classpath>
- <pathelement path="${test.classpath}" />
- <pathelement location="hibernate/target/jopr-hibernate-plugin-${project.version}.jar" />
- <pathelement location="tomcat/target/jopr-tomcat-plugin-${project.version}.jar" />
- <pathelement location="jboss-as/target/jopr-jboss-as-plugin-${project.version}.jar" />
- <!-- TODO: Figure out why this is causing NoClassDefFoundErrors and fix it. -->
- <!--<pathelement location="jboss-as-5/target/jopr-jboss-as-5-plugin-${project.version}.jar" />-->
- <pathelement location="rhq-server/target/jopr-rhq-server-plugin-${project.version}.jar" />
- </classpath>
- <sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.SimpleLog" />
- </java>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/modules/jopr/modules-pom.xml b/modules/jopr/modules-pom.xml
deleted file mode 100644
index de9ca10..0000000
--- a/modules/jopr/modules-pom.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <packaging>pom</packaging>
-
- <name>Jopr Modules</name>
- <description>parent POM for all Jopr modules</description>
-
- <properties>
- <!-- dependency versions -->
- <hibernate-all.version>1.0.0.Alpha9</hibernate-all.version>
- <persistence-api.version>1.0</persistence-api.version>
- </properties>
-
- <!-- These dependencies are (mostly) common to the plugin artifacts built under the
- Jopr umbrella. They are not specific to the build a one particular artifact but
- placed here to simplify the child poms. -->
- <dependencies>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-util</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-plugin-api</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-native-system</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- by PC -->
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-plugin-container</artifactId>
- <version>${rhq.version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- Third-party libs -->
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
- <scope>provided</scope>
- </dependency>
-
- <!-- TODO: This is a fix for the Javac bug requiring annotations to be available when compiling dependent classes. It is fixed in JDK 6. -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>${persistence-api.version}</version>
- <scope>provided</scope> <!-- by ON container -->
- </dependency>
-
- <!-- TODO: This is a fix for the Javac bug requiring annotations to be available when compiling dependent classes; it is fixed in JDK 6. -->
- <dependency>
- <groupId>jboss.jboss-embeddable-ejb3</groupId>
- <artifactId>hibernate-all</artifactId>
- <version>${hibernate-all.version}</version>
- <scope>provided</scope> <!-- by ON container -->
- </dependency>
-
- </dependencies>
-
- <modules>
- <module>common</module>
- <module>plugins</module>
- </modules>
-
- <profiles>
-
- <!-- enterprise-only stuff -->
- <profile>
- <id>enterprise</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>serverplugins</module>
- </modules>
- </profile>
-
- <!-- same as enterprise profile, except includes dist -->
- <profile>
- <id>dist</id>
- <modules>
- <module>serverplugins</module>
- <module>dist</module>
- </modules>
- </profile>
-
- </profiles>
-</project>
diff --git a/modules/jopr/pom.xml b/modules/jopr/pom.xml
deleted file mode 100644
index de109aa..0000000
--- a/modules/jopr/pom.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <!-- NOTE: We extend the RHQ parent pom, because we essentially want all the same
- base settings - plugins, dependencies, etc. -->
- <parent>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-parent</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Jopr</name>
- <description>parent POM for all Jopr (non-RHQ) modules</description>
- <url>http://www.jboss.org/jopr/</url>
- <inceptionYear>2008</inceptionYear>
-
- <organization>
- <name>JBoss, by Red Hat</name>
- <url>http://jboss.com/</url>
- </organization>
-
- <issueManagement>
- <system>jira</system>
- <url>https://jira.jboss.org/jira/browse/JOPR</url>
- </issueManagement>
-
- <properties>
- <rhq.groupId>org.rhq</rhq.groupId>
- <rhq.version>${project.parent.version}</rhq.version>
- <rhq.product.name>RHQ</rhq.product.name>
- <rhq.earName>rhq.ear</rhq.earName>
- <!-- the below path is relative to {rhq-trunk} -->
- <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
- <!-- set the below prop to true to enable misc extra build output -->
- <rhq.debug>false</rhq.debug>
- </properties>
-
- <modules>
- <module>modules</module>
- </modules>
-
-</project>
diff --git a/modules/jopr/release.sh b/modules/jopr/release.sh
deleted file mode 100755
index 54f26ab..0000000
--- a/modules/jopr/release.sh
+++ /dev/null
@@ -1,341 +0,0 @@
-#!/bin/sh
-
-# Constants
-
-PROJECT_NAME="jopr"
-PROJECT_DISPLAY_NAME="Jopr"
-PROJECT_SVN_URL="https://svn.jboss.org/repos/jopr"
-TAG_PREFIX="Jopr"
-MINIMUM_MAVEN_VERSION="2.0.10"
-
-
-# Functions
-
-abort()
-{
- echo >&2
- for ARG in "$@"; do
- echo "$ARG" >&2
- done
- exit 1
-}
-
-usage()
-{
- EXE=`basename $0`
- abort "Usage: $EXE community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION" "Example: $EXE community 2.3.1 2.3.2-SNAPSHOT"
-}
-
-
-# Process command line args.
-
-if [ "$#" -ne 3 ]; then
- usage
-fi
-RELEASE_TYPE="$1"
-if [ "$RELEASE_TYPE" != "community" ] && [ "$RELEASE_TYPE" != "enterprise" ]; then
- usage
-fi
-RELEASE_VERSION="$2"
-TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
-RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
-DEVELOPMENT_VERSION="$3"
-
-
-# Make sure JAVA_HOME points to a valid JDK 1.6+ install.
-
-if [ -z "$JAVA_HOME" ]; then
- abort "JAVA_HOME environment variable is not set - JAVA_HOME must point to a JDK (not JRE) 6 install dir."
-fi
-
-if [ ! -d "$JAVA_HOME" ]; then
- abort "JAVA_HOME ($JAVA_HOME) does not exist or is not a directory - JAVA_HOME must point to a JDK (not JRE) 6 install dir."
-fi
-
-echo "Prepending $JAVA_HOME/bin to PATH..."
-PATH="$JAVA_HOME/bin:$PATH"
-
-if ! which java >/dev/null 2>&1; then
- abort "java not found in PATH ($PATH) - JAVA_HOME must point to a JDK (not JRE) 6 install dir."
-fi
-
-if ! which javac >/dev/null 2>&1; then
- abort "javac not found in PATH ($PATH) - JAVA_HOME must point to a JDK (not JRE) 6 install dir."
-fi
-
-if ! javap java.util.Deque >/dev/null 2>&1; then
- abort "java.util.Deque not found - Java version appears to be less than 1.6 - Jave version must be 1.6 or later."
-fi
-
-
-# Make sure JAVA5_HOME points to a valid JDK 1.5 install.
-# We need this to validate only Java 5 or earlier APIs are used in all modules, except the CLI, which requires Java 6.
-
-if [ -z "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME environment variable is not set - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if [ ! -d "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME ($JAVA5_HOME) does not exist or is not a directory - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if [ ! -x "$JAVA5_HOME/bin/java" ]; then
- abort "$JAVA5_HOME/bin/java does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if [ ! -x "$JAVA5_HOME/bin/javac" ]; then
- abort "$JAVA5_HOME/bin/javac does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
-fi
-
-if ! "$JAVA5_HOME/bin/javap" java.lang.Enum >/dev/null 2>&1; then
- abort "java.lang.Enum not found - JAVA5_HOME ($JAVA5_HOME) version appears to be less than 1.5 - version must be 1.5.x."
-fi
-
-if "$JAVA5_HOME/bin/javap" java.util.Deque >/dev/null 2>&1; then
- abort "java.util.Deque found - JAVA5_HOME ($JAVA5_HOME) version appears to be greater than or equal to 1.6 - version must be 1.5.x."
-fi
-
-
-# Make sure M2_HOME points to a valid Maven 2 install.
-
-if [ -z "$M2_HOME" ]; then
- abort "M2_HOME environment variable is not set - M2_HOME must point to a Maven, $MINIMUM_MAVEN_VERSION or later, install dir."
-fi
-
-if [ ! -d "$M2_HOME" ]; then
- abort "M2_HOME ($M2_HOME) does not exist or is not a directory - M2_HOME must point to a Maven, $MINIMUM_MAVEN_VERSION or later, install dir."
-fi
-
-echo "Prepending $M2_HOME/bin to PATH..."
-PATH="$M2_HOME/bin:$PATH"
-
-if ! which mvn >/dev/null 2>&1; then
- abort "mvn not found in PATH ($PATH) - M2_HOME must point to a Maven, $MINIMUM_MAVEN_VERSION or later, install dir."
-fi
-
-
-# Make sure SUBVERSION_HOME points to a valid Subversion install.
-
-if [ -z "$SUBVERSION_HOME" ]; then
- abort "SUBVERSION_HOME environment variable is not set." >&2
-fi
-
-if [ ! -d "$SUBVERSION_HOME" ]; then
- abort "SUBVERSION_HOME ($SUBVERSION_HOME) does not exist or is not a directory."
-fi
-
-echo "Prepending $SUBVERSION_HOME/bin to PATH..."
-PATH="$SUBVERSION_HOME/bin:$PATH"
-
-if ! which svn >/dev/null 2>&1; then
- abort "svn not found in PATH ($PATH) - SUBVERSION_HOME must point to an SVN install dir."
-fi
-
-echo "Prepending $SUBVERSION_HOME/lib to LD_LIBRARY_PATH..."
-LD_LIBRARY_PATH="$SUBVERSION_HOME/lib:$LD_LIBRARY_PATH"
-export LD_LIBRARY_PATH
-
-
-# Set additional required env vars.
-
-LANG=en_US.iso88591
-export LANG
-
-
-# Set various local variables.
-
-if [ -z "$BASE_DIR" ]; then
- BASE_DIR="$HOME"
-fi
-WORK_DIR="$BASE_DIR/${PROJECT_NAME}-${RELEASE_TYPE}-${RELEASE_VERSION}"
-
-RELEASE_BRANCH_CHECKOUT_DIR="$WORK_DIR/branch"
-RELEASE_TAG_CHECKOUT_DIR="$WORK_DIR/tag"
-if [ -n "$RELEASE_BRANCH" ]; then
- RELEASE_BRANCH_SVN_URL="$PROJECT_SVN_URL/branches/$RELEASE_BRANCH"
-else
- RELEASE_BRANCH_SVN_URL="$PROJECT_SVN_URL/trunk"
-fi
-RELEASE_TAG_SVN_URL="$PROJECT_SVN_URL/tags/$RELEASE_TAG"
-
-MAVEN_LOCAL_REPO_DIR="$BASE_DIR/release-m2-repo"
-MAVEN_SETTINGS_FILE="$WORK_DIR/settings.xml"
-MAVEN_OPTS="--settings "$MAVEN_SETTINGS_FILE" --debug --errors -Penterprise -Pdist -Prelease"
-if [ "$RELEASE_TYPE" = "enterprise" ]; then
- #MAVEN_OPTS="$MAVEN_OPTS ..."
-fi
-if [ -z "$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS" ]; then
- MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS="24"
-fi
-
-
-# Print out summary of environment.
-
-echo
-echo "========================= Environment Variables =============================="
-echo "JAVA_HOME=$JAVA_HOME"
-echo "M2_HOME=$M2_HOME"
-echo "SUBVERSION_HOME=$SUBVERSION_HOME"
-echo "PATH=$PATH"
-echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
-echo "LANG=$LANG"
-echo "============================ Local Variables ================================="
-echo "WORK_DIR=$WORK_DIR"
-echo "PROJECT_NAME=$PROJECT_NAME"
-echo "RELEASE_TYPE=$RELEASE_TYPE"
-echo "RELEASE_VERSION=$RELEASE_VERSION"
-echo "DEVELOPMENT_VERSION=$DEVELOPMENT_VERSION"
-echo "RELEASE_BRANCH=$RELEASE_BRANCH"
-echo "RELEASE_BRANCH_SVN_URL=$RELEASE_BRANCH_SVN_URL"
-echo "RELEASE_BRANCH_CHECKOUT_DIR=$RELEASE_BRANCH_CHECKOUT_DIR"
-echo "RELEASE_TAG=$RELEASE_TAG"
-echo "RELEASE_TAG_SVN_URL=$RELEASE_TAG_SVN_URL"
-echo "RELEASE_TAG_CHECKOUT_DIR=$RELEASE_TAG_CHECKOUT_DIR"
-echo "MAVEN_LOCAL_REPO_DIR=$MAVEN_LOCAL_REPO_DIR"
-echo "MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS=$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS"
-echo "MAVEN_SETTINGS_FILE=$MAVEN_SETTINGS_FILE"
-echo "MAVEN_OPTS=$MAVEN_OPTS"
-echo "============================ Program Versions ================================"
-mvn --version
-echo
-svn --version | head -2
-echo "=============================================================================="
-echo
-
-
-# Clean the Maven local repo.
-
-if [ -f "$MAVEN_LOCAL_REPO_DIR" ]; then
- OUTPUT=`find "$MAVEN_LOCAL_REPO_DIR" -maxdepth 0 -mtime $MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS`
- if [ -n "$OUTPUT" ]; then
-
- echo "MAVEN_LOCAL_REPO_DIR ($MAVEN_LOCAL_REPO_DIR) has existed for more than 24 hours - purging it for a clean-clean build..."
- rm -rf "$MAVEN_LOCAL_REPO_DIR"
- fi
-fi
-mkdir -p "$MAVEN_LOCAL_REPO_DIR"
-
-
-# Create the Maven settings file.
-SETTINGS=${WORK_DIR}/settings.xml
-cat <<EOF >${SETTINGS}
-<settings>
- <localRepository>$MAVEN_LOCAL_REPO_DIR</localRepository>
-
- <profiles>
- <profile>
- <id>release</id>
- <properties>
- <rhq.test.ds.connection-url>jdbc:postgresql://jon03.qa.atl2.redhat.com:5432/rhq_release</rhq.test.ds.connection-url>
- <rhq.test.ds.user-name>rhqadmin</rhq.test.ds.user-name>
- <rhq.test.ds.password>rhqadmin</rhq.test.ds.password>
- <rhq.test.ds.type-mapping>PostgreSQL</rhq.test.ds.type-mapping>
- <rhq.test.ds.driver-class>org.postgresql.Driver</rhq.test.ds.driver-class>
- <rhq.test.ds.xa-datasource-class>org.postgresql.xa.PGXADataSource</rhq.test.ds.xa-datasource-class>
- <rhq.test.ds.server-name>jon03.qa.atl2.redhat.com</rhq.test.ds.server-name>
- <rhq.test.ds.port>5432</rhq.test.ds.port>
- <rhq.test.ds.db-name>rhq_release</rhq.test.ds.db-name>
- <rhq.test.ds.hibernate-dialect>org.hibernate.dialect.PostgreSQLDialect</rhq.test.ds.hibernate-dialect>
- <!-- quartz properties -->
- <rhq.test.quartz.driverDelegateClass>org.quartz.impl.jdbcjobstore.PostgreSQLDelegate</rhq.test.quartz.driverDelegateClass>
- <rhq.test.quartz.selectWithLockSQL>SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE</rhq.test.quartz.selectWithLockSQL>
- <rhq.test.quartz.lockHandlerClass>org.quartz.impl.jdbcjobstore.StdRowLockSemaphore</rhq.test.quartz.lockHandlerClass>
- </properties>
- </profile>
- </profiles>
-</settings>
-EOF
-
-
-# Check out the branch, then run a test build before tagging.
-
-if [ -f "$RELEASE_BRANCH_CHECKOUT_DIR" ]; then
- echo "Purging contents of RELEASE_BRANCH_CHECKOUT_DIR ($RELEASE_BRANCH_CHECKOUT_DIR)..."
- rm -rf "$RELEASE_BRANCH_CHECKOUT_DIR"
-fi
-mkdir -p "$RELEASE_BRANCH_CHECKOUT_DIR"
-
-echo "Checking out branch source from $RELEASE_BRANCH_SVN_URL to $RELEASE_BRANCH_CHECKOUT_DIR (this will take about 5-10 minutes)..."
-# We only need pom.xml and modules/**. Save some time by not checking out etc/**.
-svn co -N $RELEASE_BRANCH_SVN_URL "$RELEASE_BRANCH_CHECKOUT_DIR"
-cd "$RELEASE_BRANCH_CHECKOUT_DIR"
-svn co $RELEASE_BRANCH_SVN_URL/modules
-
-echo
-echo "From another terminal, make the following changes:"
-echo
-echo " 1) In the root pom, set the pom's parent version and the rhq.version"
-echo " property to the RHQ release version you want this Jopr release to use."
-echo " 2) Comment out any snapshot deps in the jboss-as-5 and jboss-cache-v3"
-echo " poms."
-echo
-echo "After you have made these edits and saved the files, hit Enter to continue."
-read
-echo
-echo "Committing pom updates to SVN..."
-svn commit -m "$PROJECT_DISPLAY_NAME Build $RELEASE_VERSION (in progress)"
-
-echo
-echo "Building project to ensure tests pass and to boostrap local Maven repo (this will take about 10-15 minutes)..."
-# This will build everything, enforcing Java 5 APIs.
-mvn install $MAVEN_OPTS -Djava5.home=$JAVA5_HOME/jre
-if [ "$?" -ne 0 ]; then
- abort "Build failed. Please see above Maven output for details, fix any issues, then try again."
-fi
-
-echo
-echo "Test build succeeded!"
-
-
-# Tag the release.
-
-echo "Tagging the release..."
-cd "$RELEASE_BRANCH_CHECKOUT_DIR"
-mvn release:prepare $MAVEN_OPTS -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVELOPMENT_VERSION -Dresume=false -Dtag=$RELEASE_TAG -DdryRun=true
-if [ "$?" -ne 0 ]; then
- abort "Tagging failed. Please see above Maven output for details, fix any issues, then try again."
-fi
-echo
-echo "Tagging succeeded!"
-
-echo
-echo "From another terminal, make the following changes:"
-echo
-echo " 1) In the root pom, set the pom's parent version and the rhq.version"
-echo " property to the RHQ snapshot version you want Jopr to use post-release."
-echo " 2) Uncomment any snapshot deps in the jboss-as-5 and jboss-cache-v3"
-echo " poms that you commented out earlier."
-echo
-echo "After you have made these edits and saved the files, hit Enter to continue."
-read
-echo
-echo "Committing pom updates to SVN..."
-svn commit -m "$PROJECT_DISPLAY_NAME Build $RELEASE_VERSION (done)"
-
-
-# Checkout the tag and build it.
-
-if [ -f "$RELEASE_TAG_CHECKOUT_DIR" ]; then
- echo "Purging contents of RELEASE_TAG_CHECKOUT_DIR ($RELEASE_TAG_CHECKOUT_DIR)..."
- rm -rf "$RELEASE_TAG_CHECKOUT_DIR"
-fi
-mkdir -p "$RELEASE_TAG_CHECKOUT_DIR"
-
-echo "Checking out tag source from $RELEASE_TAG_SVN_URL to $RELEASE_TAG_CHECKOUT_DIR (this will take about 5-10 minutes)..."
-svn co -N $RELEASE_TAG_SVN_URL "$RELEASE_TAG_CHECKOUT_DIR"
-cd "$RELEASE_TAG_CHECKOUT_DIR"
-svn co $RELEASE_TAG_SVN_URL/modules
-
-echo "Building release from tag (this will take about 10-15 minutes)..."
-mvn install $MAVEN_OPTS -Dmaven.test.skip=true
-if [ "$?" -ne 0 ]; then
- abort "Build failed. Please see above Maven output for details, fix any issues, then try again."
-fi
-echo
-echo "Release build succeeded!"
-
-echo "=========================== Release Info ==============================="
-echo "Version: $RELEASE_VERSION"
-echo "Branch SVN URL: $RELEASE_BRANCH_SVN_URL"
-echo "Tag SVN URL: $RELEASE_TAG_SVN_URL"
-echo "========================================================================"
diff --git a/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml b/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
deleted file mode 100644
index c1b2846..0000000
--- a/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
+++ /dev/null
@@ -1,331 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-parent</artifactId>
- <version>4.5.0-SNAPSHOT</version>
- <relativePath>../../../../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-jbas5-plugin-descriptor-gen</artifactId>
- <packaging>jar</packaging>
-
- <name>Jopr JBossAS 5.x/6.x Plugin Descriptor Generator</name>
- <description>A tool that connects to a JBoss Application Server 5.x/6.x instance's Profile Service and generates an RHQ plugin descriptor with a ResourceType for each ManagedComponent type that is deployed.</description>
-
- <properties>
- <jbossas.version>6.0.0.M1</jbossas.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-parent</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-component-matrix</artifactId>
- <version>${jbossas.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-jboss-as-5-plugin</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-core-client-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
-
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>xml-apis</artifactId>
- <version>2.9.1</version>
- </dependency>
-
- <dependency>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.1.4</version>
- </dependency>
-
- <dependency>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>2.1.4</version>
- </dependency>
-<!--
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- </dependency>
--->
- <dependency>
- <groupId>gnu-getopt</groupId>
- <artifactId>getopt</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
- </dependency>
-
- <!-- The below Profile Service API deps can be temporarily set to compile scope,
- so they can be referenced when running within Enterprise Jopr. -->
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-profileservice-spi</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-metatype</artifactId>
- </dependency>
-
- <!--======= client API jars (temporary) =======-->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
- <version>${jbossas.version}</version>
- <classifier>jboss-aspect-jdk50-client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4-jboss</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- aka jboss-client.jar -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-mdr</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jbossas.version}</version>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-core</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-spi</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-security</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <!-- needed by ManagementView.getDeployment() -->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-dependency</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-profileservice</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- <version>${jbossas.version}</version>
- </dependency>
-
- <!-- The four below deps are needed by the non-EJB proxy but not by the EJB proxy. -->
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <classifier>client</classifier>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <archive>
- <manifest>
- <mainClass>org.jboss.jopr.tool.jbas5.PluginDescriptorGenerator</mainClass>
- </manifest>
- </archive>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <!-- this is used for inheritance merges -->
- <phase>package</phase>
- <!-- bind to the packaging phase -->
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
-</project>
diff --git a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java b/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java
deleted file mode 100644
index d1c7f83..0000000
--- a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/MetadataConversionUtils.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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.jboss.jopr.tool.jbas5;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionMap;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
-import org.rhq.core.domain.configuration.definition.PropertySimpleType;
-import org.rhq.core.domain.configuration.definition.constraint.FloatRangeConstraint;
-import org.rhq.core.domain.configuration.definition.constraint.IntegerRangeConstraint;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.DisplayType;
-import org.rhq.core.domain.measurement.MeasurementCategory;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.MeasurementUnits;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.resource.ResourceCategory;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.util.StringUtils;
-import org.rhq.plugins.jbossas5.util.MetaTypeUtils;
-import org.rhq.plugins.jbossas5.util.ManagedComponentUtils;
-
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.ManagedParameter;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.metatype.api.types.ArrayMetaType;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.CompositeMetaType;
-import org.jboss.metatype.api.types.MapCompositeMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.types.PropertiesMetaType;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.types.TableMetaType;
-import org.jboss.metatype.api.values.ArrayValue;
-import org.jboss.metatype.api.values.CollectionValue;
-import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.metatype.api.values.MetaValue;
-
-/**
- * Utility class for converting JBAS5 Profile Service {@link ManagedComponent}s and {@link ManagedDeployment}s to RHQ
- * {@link ResourceType}s.
- *
- * @author Ian Springer
- */
-public class MetadataConversionUtils
-{
- private static final Log LOG = LogFactory.getLog(MetadataConversionUtils.class);
-
- private static final String PLUGIN_NAME = "ProfileService";
-
- private static Map<String, PropertySimpleType> TYPE_MAP = new HashMap();
-
- static
- {
- TYPE_MAP.put(boolean.class.getName(), PropertySimpleType.BOOLEAN);
- TYPE_MAP.put(Boolean.class.getName(), PropertySimpleType.BOOLEAN);
- TYPE_MAP.put(int.class.getName(), PropertySimpleType.INTEGER);
- TYPE_MAP.put(Integer.class.getName(), PropertySimpleType.INTEGER);
- TYPE_MAP.put(long.class.getName(), PropertySimpleType.LONG);
- TYPE_MAP.put(Long.class.getName(), PropertySimpleType.LONG);
- TYPE_MAP.put(float.class.getName(), PropertySimpleType.FLOAT);
- TYPE_MAP.put(Float.class.getName(), PropertySimpleType.FLOAT);
- TYPE_MAP.put(double.class.getName(), PropertySimpleType.DOUBLE);
- TYPE_MAP.put(Double.class.getName(), PropertySimpleType.DOUBLE);
- }
-
- public static ResourceType convertDeploymentToResourceType(String deploymentTypeName, ManagedDeployment deployment)
- {
- LOG.debug("Creating ResourceType for ManagedDeployment type [" + deploymentTypeName + "]...");
- ResourceType resourceType = new ResourceType(deploymentTypeName, PLUGIN_NAME, ResourceCategory.SERVICE, null);
- Set<MeasurementDefinition> metricDefs = convertMetricPropertiesToMeasurementDefinitions(deployment);
- resourceType.setMetricDefinitions(metricDefs);
- ConfigurationDefinition resourceConfigDef = convertConfigurationPropertiesToConfigurationDefinition(deployment);
- resourceType.setResourceConfigurationDefinition(resourceConfigDef);
- return resourceType;
- }
-
- public static ResourceType convertComponentToResourceType(ManagedComponent component)
- {
- LOG.debug("Creating ResourceType for ManagedComponent type [" + component.getType() + "]...");
- ComponentType componentType = component.getType();
- String name;
- if (componentType.getSubtype().equals("*"))
- name = component.getName() + " " + componentType.getType();
- else
- name = componentType.getSubtype() + " " + componentType.getType();
- ResourceType resourceType = new ResourceType(name, PLUGIN_NAME, ResourceCategory.SERVICE, null);
- Set<OperationDefinition> opDefs = convertManagedOperationsToOperationDefinitions(component);
- for (OperationDefinition opDef : opDefs)
- resourceType.addOperationDefinition(opDef);
- Set<MeasurementDefinition> metricDefs = convertMetricPropertiesToMeasurementDefinitions(component);
- resourceType.setMetricDefinitions(metricDefs);
- ConfigurationDefinition resourceConfigDef = convertConfigurationPropertiesToConfigurationDefinition(component);
- resourceType.setResourceConfigurationDefinition(resourceConfigDef);
- return resourceType;
- }
-
- private static Set<OperationDefinition> convertManagedOperationsToOperationDefinitions(ManagedComponent component)
- {
- Set<OperationDefinition> opDefs = new TreeSet(new OperationDefinitionComparator());
- Map<String, ManagedOperation> managedOperations = new HashMap();
- for (ManagedOperation operation : component.getOperations())
- {
- ManagedOperation operationWithSameName = managedOperations.get(operation.getName());
- if (operationWithSameName == null ||
- operationWithSameName.getParameters().length < operation.getParameters().length)
- {
- if (operationWithSameName != null)
- LOG.info("Found more than one ManagedOperation named '" + operation.getName()
- + "' - converting only the one with the most parameters.");
- managedOperations.put(operation.getName(), operation);
- }
- }
- for (ManagedOperation operation : managedOperations.values())
- {
- OperationDefinition opDef = convertOperationToOperationDefinition(operation);
- opDefs.add(opDef);
- }
- return opDefs;
- }
-
- private static OperationDefinition convertOperationToOperationDefinition(ManagedOperation operation)
- {
- String desc = (!operation.getName().equals(operation.getDescription())) ? operation.getDescription() : null;
- OperationDefinition opDef = new OperationDefinition(operation.getName(), null, desc);
- opDef.setDisplayName(StringUtils.deCamelCase(operation.getName()));
- ConfigurationDefinition paramsConfigDef = convertParametersToConfigurationDefinition(operation);
- opDef.setParametersConfigurationDefinition(paramsConfigDef);
- ConfigurationDefinition resultsConfigDef = convertResultToConfigurationDefinition(operation);
- opDef.setResultsConfigurationDefinition(resultsConfigDef);
- return opDef;
- }
-
- private static ConfigurationDefinition convertParametersToConfigurationDefinition(ManagedOperation operation)
- {
- if (operation.getParameters() == null || operation.getParameters().length == 0)
- return null;
- ConfigurationDefinition configDef = new ConfigurationDefinition(operation.getName(), null);
- for (ManagedParameter parameter : operation.getParameters())
- {
- PropertyDefinition propDef = convertParameterToPropertyDefinition(parameter);
- configDef.put(propDef);
- }
- return configDef;
- }
-
- private static PropertyDefinition convertParameterToPropertyDefinition(ManagedParameter parameter)
- {
- PropertyDefinition propDef = convertMetaTypeToPropertyDefinition(parameter.getMetaType(), parameter.getName(),
- parameter.getValue());
- String desc = (!parameter.getName().equals(parameter.getDescription())) ? parameter.getDescription() : null;
- propDef.setDescription(desc);
- // TODO: Convert parameter.getLegalValues() to enum defs.
- if (propDef instanceof PropertyDefinitionSimple)
- {
- PropertyDefinitionSimple propDefSimple = (PropertyDefinitionSimple)propDef;
- addConstraints(propDefSimple, parameter.getMinimumValue(), parameter.getMaximumValue());
- }
- return propDef;
- }
-
- private static PropertyDefinitionList convertMetaTypeToPropertyDefinitionList(MetaType metaType, String name,
- MetaValue metaValue)
- {
- MetaType elementType;
- MetaValue elementValue = null;
- if (metaType.isCollection())
- {
- CollectionMetaType collectionMetaType = (CollectionMetaType)metaType;
- elementType = collectionMetaType.getElementType();
- if (metaValue != null)
- {
- CollectionValue collectionValue = (CollectionValue)metaValue;
- MetaValue[] elements = collectionValue.getElements();
- if (elements != null && elements.length != 0)
- elementValue = elements[0];
- }
- }
- else if (metaType.isArray())
- {
- ArrayMetaType arrayMetaType = (ArrayMetaType)metaType;
- elementType = arrayMetaType.getElementType();
- if (metaValue != null)
- {
- ArrayValue arrayValue = (ArrayValue)metaValue;
- if (arrayValue.getLength() != 0 && arrayValue.getValue(0) instanceof MetaValue)
- elementValue = (MetaValue)arrayValue.getValue(0);
- }
- }
- else
- {
- throw new IllegalStateException("Unsupported MetaType: " + metaType);
- }
- PropertyDefinition elementPropDef = convertMetaTypeToPropertyDefinition(elementType, "element", elementValue);
- @SuppressWarnings({"UnnecessaryLocalVariable"})
- PropertyDefinitionList propDefList = new PropertyDefinitionList(name, null, true, elementPropDef);
- return propDefList;
- }
-
- private static PropertyDefinitionMap convertMetaTypeToPropertyDefinitionMap(MetaType metaType, String name,
- MetaValue metaValue)
- {
- PropertyDefinitionMap propDefMap = new PropertyDefinitionMap(name, null, false);
- if (metaType.isComposite())
- {
- if (!(metaType instanceof MapCompositeMetaType))
- {
- CompositeMetaType compositeMetaType = (CompositeMetaType)metaType;
- for (String itemName : compositeMetaType.itemSet())
- {
- MetaType itemMetaType = compositeMetaType.getType(itemName);
- if (itemMetaType.isComposite())
- {
- // Avoid StackOverflowErrors caused by recursive CompositeMetaType metadata.
- if (itemMetaType == compositeMetaType)
- LOG.error("CompositeMetaType " + compositeMetaType
- + " contains an item whose type is a reference to the CompositeMetaType itself!");
- else
- LOG.error("CompositeMetaType " + compositeMetaType
- + " contains an item whose type is another CompositeMetaType: " + itemMetaType);
- continue;
- }
- LOG.trace("Converting item with type [" + itemMetaType + "@" + System.identityHashCode(itemMetaType)
- + "] and name [" + itemName + "]...");
- PropertyDefinition itemPropDef = convertMetaTypeToPropertyDefinition(itemMetaType, itemName, null);
- propDefMap.put(itemPropDef);
- String desc = (!itemName.equals(compositeMetaType.getDescription(itemName))) ?
- compositeMetaType.getDescription(itemName) : null;
- itemPropDef.setDescription(desc);
- }
- }
- }
- else if (metaType.isGeneric())
- {
- if (metaValue != null)
- {
- GenericValue genericValue = (GenericValue)metaValue;
- Serializable value = genericValue.getValue();
- if (value != null && value instanceof ManagedObject)
- {
- ManagedObject managedObject = (ManagedObject)value;
- for (ManagedProperty managedProp : managedObject.getProperties().values())
- {
- PropertyDefinition itemPropDef = convertManagedPropertyToPropertyDefinition(managedProp);
- propDefMap.put(itemPropDef);
- }
- }
- }
- }
- else if (metaType.isTable())
- {
- TableMetaType tableMetaType = (TableMetaType)metaType;
- CompositeMetaType itemMetaType = tableMetaType.getRowType();
- for (String itemName : tableMetaType.getIndexNames())
- {
- PropertyDefinition itemPropDef = convertMetaTypeToPropertyDefinition(itemMetaType, itemName, null);
- propDefMap.put(itemPropDef);
- }
- }
- else if (metaType instanceof PropertiesMetaType)
- {
- @SuppressWarnings({"UnusedDeclaration"})
- PropertiesMetaType propertiesMetaType = (PropertiesMetaType)metaType;
- }
- return propDefMap;
- }
-
- private static ConfigurationDefinition convertResultToConfigurationDefinition(ManagedOperation operation)
- {
- MetaType returnType = operation.getReturnType();
- if (returnType.getClassName().equals(Void.class.getName()))
- return null;
- PropertyDefinition propDef = convertMetaTypeToPropertyDefinition(returnType, "result", null);
- ConfigurationDefinition configDef = new ConfigurationDefinition(operation.getName(), operation.getDescription());
- configDef.put(propDef);
- return configDef;
- }
-
- private static Set<MeasurementDefinition> convertMetricPropertiesToMeasurementDefinitions(ManagedDeployment deployment)
- {
- return convertMetricPropertiesToMeasurementDefinitions(deployment.getProperties());
- }
-
- private static Set<MeasurementDefinition> convertMetricPropertiesToMeasurementDefinitions(ManagedComponent component)
- {
- return convertMetricPropertiesToMeasurementDefinitions(component.getProperties());
- }
-
- private static Set<MeasurementDefinition> convertMetricPropertiesToMeasurementDefinitions(Map<String, ManagedProperty> props)
- {
- Set<MeasurementDefinition> measurementDefs = new TreeSet(new MeasurementDefinitionComparator());
- if (props == null)
- return measurementDefs;
- for (ManagedProperty prop : props.values())
- {
- if (prop.hasViewUse(ViewUse.RUNTIME) || prop.hasViewUse(ViewUse.STATISTIC))
- {
- MetaType metaType = prop.getMetaType();
- if (metaType.isSimple() || metaType.isEnum())
- {
- MeasurementDefinition measurementDef = getMeasurementDefinitionForSimpleManagedProperty(prop);
- measurementDefs.add(measurementDef);
- }
- else if (prop.getMetaType().isComposite())
- {
- Set<MeasurementDefinition> compositeMeasurementDefs =
- getMeasurementDefinitionsForCompositeManagedProperty(prop);
- measurementDefs.addAll(compositeMeasurementDefs);
- }
- else
- {
- LOG.warn("Skipping property [" + prop + "] with unsupported type [" + metaType + "].");
- }
- }
- }
- return measurementDefs;
- }
-
- private static MeasurementDefinition getMeasurementDefinitionForSimpleManagedProperty(ManagedProperty prop)
- {
- MetaType metaType = prop.getMetaType();
- DataType dataType;
- if (metaType.isSimple())
- {
- SimpleMetaType simpleMetaType = (SimpleMetaType)metaType;
- dataType = (prop.hasViewUse(ViewUse.STATISTIC) && MetaTypeUtils.isNumeric(simpleMetaType)) ?
- DataType.MEASUREMENT : DataType.TRAIT;
- }
- else
- { // metaType.isEnum()
- // Enum values are always Strings.
- dataType = DataType.TRAIT;
- }
- int defaultInterval = (dataType == DataType.MEASUREMENT) ? 60000 : 600000;
- DisplayType displayType = (dataType == DataType.MEASUREMENT) ? DisplayType.DETAIL : DisplayType.SUMMARY;
- MeasurementDefinition measurementDef = new MeasurementDefinition(prop.getName(),
- MeasurementCategory.PERFORMANCE, MeasurementUnits.NONE, dataType, true, defaultInterval, displayType);
- measurementDef.setDisplayName(StringUtils.deCamelCase(prop.getName()));
- String desc = (!prop.getName().equals(prop.getDescription())) ? prop.getDescription() : null;
- measurementDef.setDescription(desc);
- return measurementDef;
- }
-
- private static Set<MeasurementDefinition> getMeasurementDefinitionsForCompositeManagedProperty(ManagedProperty property)
- {
- Set<MeasurementDefinition> measurementDefs = new HashSet();
- CompositeMetaType compositeMetaType = (CompositeMetaType)property.getMetaType();
- Set<String> itemNames = compositeMetaType.keySet();
- for (String itemName : itemNames)
- {
- MetaType itemType = compositeMetaType.getType(itemName);
- if (itemType.isSimple() || itemType.isEnum())
- {
- String metricName = property.getName() + "." + itemName;
- DataType dataType = (itemType.getClassName().equals(String.class.getName())) ?
- DataType.TRAIT : DataType.MEASUREMENT;
- MeasurementDefinition measurementDef = new MeasurementDefinition(metricName,
- MeasurementCategory.PERFORMANCE, MeasurementUnits.NONE, dataType, true, 60000,
- DisplayType.DETAIL);
- measurementDefs.add(measurementDef);
- measurementDef.setDisplayName(StringUtils.deCamelCase(itemName));
- }
- else
- {
- LOG.warn("Composite stat property [" + property.getName() + "] contains non-simple item with type ["
- + itemType + "] - skipping...");
- }
- }
- return measurementDefs;
- }
-
- private static ConfigurationDefinition convertConfigurationPropertiesToConfigurationDefinition(String configName, Map<String, ManagedProperty> managedProps)
- {
- Set<PropertyDefinition> propDefs = new TreeSet(new PropertyDefinitionComparator());
- for (ManagedProperty prop : managedProps.values())
- {
- EnumSet<ViewUse> viewUses = ManagedComponentUtils.getViewUses(prop);
- // Assume a property with no view uses is a config prop.
- if (viewUses.contains(ViewUse.CONFIGURATION) || viewUses.contains(ViewUse.RUNTIME) || viewUses.isEmpty())
- {
- PropertyDefinition propDef = convertManagedPropertyToPropertyDefinition(prop);
- propDefs.add(propDef);
- }
- }
- if (propDefs.isEmpty())
- return null;
- ConfigurationDefinition configDef = new ConfigurationDefinition(configName, null);
- for (PropertyDefinition propDef : propDefs)
- configDef.getPropertyDefinitions().put(propDef.getName(), propDef);
- return configDef;
- }
-
- private static PropertyDefinition convertManagedPropertyToPropertyDefinition(ManagedProperty prop)
- {
- PropertyDefinition propDef;
- propDef = convertMetaTypeToPropertyDefinition(prop.getMetaType(), prop.getName(), prop.getValue());
- String desc = (!prop.getName().equals(prop.getDescription())) ? prop.getDescription() : null;
- propDef.setDescription(desc);
- propDef.setRequired(prop.isMandatory());
- propDef.setReadOnly(prop.isReadOnly());
- // TODO: Convert prop.getLegalValues() to enum defs.
- if (propDef instanceof PropertyDefinitionSimple)
- {
- PropertyDefinitionSimple propDefSimple = (PropertyDefinitionSimple)propDef;
- addConstraints(propDefSimple, prop.getMinimumValue(), prop.getMaximumValue());
- }
- return propDef;
- }
-
- private static PropertyDefinition convertMetaTypeToPropertyDefinition(MetaType metaType, String propName,
- MetaValue metaValue)
- {
- PropertyDefinition propDef;
- if (metaType.isSimple() || metaType.isEnum())
- {
- PropertySimpleType propType = convertClassToPropertySimpleType(metaType.getClassName());
- propDef = new PropertyDefinitionSimple(propName, null, false, propType);
- }
- else if (metaType.isCollection() || metaType.isArray())
- {
- propDef = convertMetaTypeToPropertyDefinitionList(metaType, propName, metaValue);
- }
- else if (metaType.isComposite() || metaType.isGeneric() || metaType.isTable() ||
- metaType instanceof PropertiesMetaType)
- {
- LOG.trace("Converting map with type [" + metaType + "@" + System.identityHashCode(metaType) + "], name ["
- + propName + "], and value [" + metaValue + "]...");
- propDef = convertMetaTypeToPropertyDefinitionMap(metaType, propName, metaValue);
- }
- else
- {
- throw new IllegalStateException("Unsupported MetaType: " + metaType);
- }
- propDef.setDisplayName(StringUtils.deCamelCase(propName));
- return propDef;
- }
-
- private static ConfigurationDefinition convertConfigurationPropertiesToConfigurationDefinition(ManagedDeployment deployment)
- {
- return convertConfigurationPropertiesToConfigurationDefinition(deployment.getName() + " resource config",
- deployment.getProperties());
- }
-
- private static ConfigurationDefinition convertConfigurationPropertiesToConfigurationDefinition(ManagedComponent component)
- {
- return convertConfigurationPropertiesToConfigurationDefinition(component.getName() + " resource config",
- component.getProperties());
- }
-
- private static PropertySimpleType convertClassToPropertySimpleType(String className)
- {
- PropertySimpleType simpleType = TYPE_MAP.get(className);
- return (simpleType != null) ? simpleType : PropertySimpleType.STRING;
- }
-
- private static void addConstraints(PropertyDefinitionSimple propDefSimple, Comparable<?> minValue,
- Comparable<?> maxValue)
- {
- if (minValue != null || maxValue != null)
- {
- if (propDefSimple.getType() == PropertySimpleType.INTEGER ||
- propDefSimple.getType() == PropertySimpleType.LONG)
- {
- Long min = (minValue != null) ? ((Number)minValue).longValue() : null;
- Long max = (maxValue != null) ? ((Number)maxValue).longValue() : null;
- IntegerRangeConstraint constraint = new IntegerRangeConstraint(min, max);
- propDefSimple.addConstraints(constraint);
- }
- else if (propDefSimple.getType() == PropertySimpleType.FLOAT ||
- propDefSimple.getType() == PropertySimpleType.DOUBLE)
- {
- Double min = (minValue != null) ? ((Number)minValue).doubleValue() : null;
- Double max = (maxValue != null) ? ((Number)maxValue).doubleValue() : null;
- FloatRangeConstraint constraint = new FloatRangeConstraint(min, max);
- propDefSimple.addConstraints(constraint);
- }
- }
- }
-
- private static class OperationDefinitionComparator implements Comparator<OperationDefinition>
- {
- public int compare(OperationDefinition opDef1, OperationDefinition opDef2)
- {
- return opDef1.getName().compareTo(opDef2.getName());
- }
- }
-
- private static class MeasurementDefinitionComparator implements Comparator<MeasurementDefinition>
- {
- public int compare(MeasurementDefinition metricDef1, MeasurementDefinition metricDef2)
- {
- return metricDef1.getName().compareTo(metricDef2.getName());
- }
- }
-
- private static class PropertyDefinitionComparator implements Comparator<PropertyDefinition>
- {
- public int compare(PropertyDefinition propDef1, PropertyDefinition propDef2)
- {
- return propDef1.getName().compareTo(propDef2.getName());
- }
- }
-}
diff --git a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java b/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java
deleted file mode 100644
index 31de2a8..0000000
--- a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/PluginDescriptorGenerator.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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.jboss.jopr.tool.jbas5;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.lang.String;
-import java.math.BigInteger;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.rhq.core.clientapi.descriptor.DescriptorPackages;
-import org.rhq.core.clientapi.descriptor.configuration.ConfigurationDescriptor;
-import org.rhq.core.clientapi.descriptor.configuration.ConfigurationProperty;
-import org.rhq.core.clientapi.descriptor.configuration.ListProperty;
-import org.rhq.core.clientapi.descriptor.configuration.MapProperty;
-import org.rhq.core.clientapi.descriptor.configuration.PropertyType;
-import org.rhq.core.clientapi.descriptor.configuration.SimpleProperty;
-import org.rhq.core.clientapi.descriptor.plugin.MetricDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.OperationDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.ResourceDescriptor;
-import org.rhq.core.clientapi.descriptor.plugin.ServiceDescriptor;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionMap;
-import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
-import org.rhq.core.domain.configuration.definition.PropertySimpleType;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.plugins.jbossas5.connection.RemoteProfileServiceConnectionProvider;
-import org.rhq.plugins.jbossas5.connection.ProfileServiceConnectionProvider;
-import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
-import org.rhq.plugins.jbossas5.util.ManagedComponentUtils;
-
-import org.jboss.deployers.spi.management.KnownDeploymentTypes;
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.profileservice.spi.NoSuchDeploymentException;
-
-/**
- * Generates an RHQ plugin descriptor based on the ManagedComponent types represented in a Profile Service
- * ManagementView.
- *
- * @author Ian Springer
- */
-public class PluginDescriptorGenerator
-{
- private static final Log LOG = LogFactory.getLog(PluginDescriptorGenerator.class);
-
- private static final QName SIMPLE_PROPERTY_QNAME = new QName(RhqNamespacePrefixMapper.CONFIGURATION_NAMESPACE, "simple-property");
- private static final QName LIST_PROPERTY_QNAME = new QName(RhqNamespacePrefixMapper.CONFIGURATION_NAMESPACE, "list-property");
- private static final QName MAP_PROPERTY_QNAME = new QName(RhqNamespacePrefixMapper.CONFIGURATION_NAMESPACE, "map-property");
-
- private static Map<PropertySimpleType, PropertyType> TYPE_MAP = new HashMap();
-
- static
- {
- TYPE_MAP.put(PropertySimpleType.BOOLEAN, PropertyType.BOOLEAN);
- TYPE_MAP.put(PropertySimpleType.DIRECTORY, PropertyType.DIRECTORY);
- TYPE_MAP.put(PropertySimpleType.DOUBLE, PropertyType.DOUBLE);
- TYPE_MAP.put(PropertySimpleType.FILE, PropertyType.FILE);
- TYPE_MAP.put(PropertySimpleType.FLOAT, PropertyType.FLOAT);
- TYPE_MAP.put(PropertySimpleType.INTEGER, PropertyType.INTEGER);
- TYPE_MAP.put(PropertySimpleType.LONG, PropertyType.LONG);
- TYPE_MAP.put(PropertySimpleType.LONG_STRING, PropertyType.LONG_STRING);
- TYPE_MAP.put(PropertySimpleType.PASSWORD, PropertyType.PASSWORD);
- TYPE_MAP.put(PropertySimpleType.STRING, PropertyType.STRING);
- }
-
- public static void main(String[] args) throws Exception
- {
- if (args.length > 1)
- {
- throw new IllegalArgumentException("Too many args. Usage: " + PluginDescriptorGenerator.class.getSimpleName() + " [jnpURL]");
- }
- String namingURL = (args.length == 1) ? args[0] : "jnp://127.0.0.1:1099/";
- String principal = "admin";
- String credentials = "admin";
- ProfileServiceConnectionProvider connectionProvider =
- new RemoteProfileServiceConnectionProvider(namingURL, principal, credentials);
- ProfileServiceConnection connection = connectionProvider.connect();
- generatePluginDescriptor(connection.getManagementView(), new File("."));
- }
-
- public static void generatePluginDescriptor(ManagementView managementView, File tempDir) throws Exception
- {
- PluginDescriptor pluginDescriptor = new PluginDescriptor();
- addComponentsToDescriptor(managementView, pluginDescriptor);
- addDeploymentsToDescriptor(managementView, pluginDescriptor);
- File tempFile = File.createTempFile("rhq-plugin", ".xml", tempDir);
- writeToFile(pluginDescriptor, tempFile);
- }
-
- private static void addDeploymentsToDescriptor(ManagementView managementView, PluginDescriptor pluginDescriptor) throws Exception
- {
- Set<String> knownDeploymentTypeNames = getKnownDeploymentTypeNames();
- for (String deploymentTypeName : knownDeploymentTypeNames)
- {
- Set<String> deploymentNames = managementView.getDeploymentNamesForType(deploymentTypeName);
- if (deploymentNames == null || deploymentNames.isEmpty())
- {
- LOG.warn("No deployments of type [" + deploymentTypeName + "] found.");
- continue;
- }
- ManagedDeployment deployment = null;
- for (String deploymentName : deploymentNames)
- {
- try
- {
- // Use the first one we successfully retrieve as a representative sample of the type.
- deployment = managementView.getDeployment(deploymentName);
- break;
- }
- catch (NoSuchDeploymentException e)
- {
- LOG.warn(e);
- }
- }
- if (deployment == null)
- {
- LOG.warn("Unable to successfully retrieve a Deployment of type [" + deploymentTypeName
- + "] due to https://jira.jboss.org/jira/browse/JBAS-5640.");
- continue;
- }
- // First convert ManagedDeployment to ResourceType...
- ResourceType resourceType = MetadataConversionUtils.convertDeploymentToResourceType(deploymentTypeName,
- deployment);
- // Then convert ResourceType to JAXB ServiceDescriptor object.
- convertAndMergeResourceType(pluginDescriptor, resourceType);
- }
- }
-
- private static void addComponentsToDescriptor(ManagementView managementView, PluginDescriptor pluginDescriptor) throws Exception
- {
- Set<ComponentType> componentTypes = managementView.getComponentTypes();
- Set<ComponentType> sortedComponentTypes = new TreeSet<ComponentType>(ManagedComponentUtils.getComponentTypeComparator());
- sortedComponentTypes.addAll(componentTypes);
- for (ComponentType componentType : sortedComponentTypes)
- {
- Set<ManagedComponent> components = managementView.getComponentsForType(componentType);
- if (components == null || components.isEmpty())
- {
- LOG.warn("No components of type [" + componentType + "] found.");
- continue;
- }
- if (componentType.getSubtype().equals("*"))
- {
- for (ManagedComponent component : components)
- addComponentToDescriptor(pluginDescriptor, component);
- }
- else
- {
- // Use the first one as a representative sample of the type.
- ManagedComponent component = components.iterator().next();
- addComponentToDescriptor(pluginDescriptor, component);
- }
- }
- }
-
- private static void addComponentToDescriptor(PluginDescriptor pluginDescriptor, ManagedComponent component)
- {
- // First convert ManagedComponent to ResourceType...
- ResourceType resourceType = MetadataConversionUtils.convertComponentToResourceType(component);
- // Then convert ResourceType to JAXB ServiceDescriptor object.
- convertAndMergeResourceType(pluginDescriptor, resourceType);
- }
-
- private static void convertAndMergeResourceType(PluginDescriptor pluginDescriptor, ResourceType resourceType)
- {
- List<ServiceDescriptor> services = pluginDescriptor.getServices();
- ServiceDescriptor serviceDescriptor = new ServiceDescriptor();
- serviceDescriptor.setName(resourceType.getName());
- if (resourceType.isSingleton())
- serviceDescriptor.setSingleton(resourceType.isSingleton());
- // TODO: Handle remaining fields.
- convertAndMergeOperationDefinitions(resourceType, serviceDescriptor);
- convertAndMergeMetricDefinitions(resourceType, serviceDescriptor);
- convertAndMergeResourceConfiguration(resourceType, serviceDescriptor);
- services.add(serviceDescriptor);
- }
-
- private static void convertAndMergeResourceConfiguration(ResourceType resourceType, ServiceDescriptor serviceDescriptor)
- {
- ConfigurationDefinition resourceConfigDef = resourceType.getResourceConfigurationDefinition();
- ConfigurationDescriptor resourceConfigDescriptor = convertConfigurationDefinitionToConfigurationDescriptor(
- resourceConfigDef);
- serviceDescriptor.setResourceConfiguration(resourceConfigDescriptor);
- }
-
- private static void convertAndMergeMetricDefinitions(ResourceType resourceType, ServiceDescriptor serviceDescriptor)
- {
- List<MetricDescriptor> metricDescriptors = serviceDescriptor.getMetric();
- for (MeasurementDefinition metricDef : resourceType.getMetricDefinitions())
- {
- MetricDescriptor metricDescriptor = new MetricDescriptor();
- metricDescriptors.add(metricDescriptor);
- if (metricDef.getCategory() != null)
- metricDescriptor.setCategory(metricDef.getCategory().name().toLowerCase());
- metricDescriptor.setDataType(metricDef.getDataType().name().toLowerCase());
- metricDescriptor.setDefaultInterval(new BigInteger(String.valueOf(metricDef.getDefaultInterval())));
- metricDescriptor.setDefaultOn(metricDef.isDefaultOn());
- metricDescriptor.setDescription(metricDef.getDescription());
- metricDescriptor.setDestinationType(metricDef.getDestinationType());
- metricDescriptor.setDisplayName(metricDef.getDisplayName());
- if (metricDef.getDisplayType() != null)
- metricDescriptor.setDisplayType(metricDef.getDisplayType().name().toLowerCase());
- if (metricDef.getNumericType() != null)
- metricDescriptor.setMeasurementType(metricDef.getNumericType().name().toLowerCase());
- metricDescriptor.setProperty(metricDef.getName());
- //metricDescriptor.setUnits(metricDef.getUnits()); // TODO
- }
- }
-
- private static void convertAndMergeOperationDefinitions(ResourceType resourceType, ResourceDescriptor resourceDescriptor)
- {
- List<OperationDescriptor> operationDescriptors = resourceDescriptor.getOperation();
- for (OperationDefinition opDef : resourceType.getOperationDefinitions())
- {
- OperationDescriptor operationDescriptor = new OperationDescriptor();
- operationDescriptors.add(operationDescriptor);
- operationDescriptor.setDescription(opDef.getDescription());
- operationDescriptor.setDisplayName(opDef.getDisplayName());
- operationDescriptor.setName(opDef.getName());
- ConfigurationDefinition paramsConfigDef = opDef.getParametersConfigurationDefinition();
- ConfigurationDescriptor paramsConfigDescriptor = convertConfigurationDefinitionToConfigurationDescriptor(paramsConfigDef);
- operationDescriptor.setParameters(paramsConfigDescriptor);
- ConfigurationDefinition resultsConfigDef = opDef.getResultsConfigurationDefinition();
- ConfigurationDescriptor resultsConfigDescriptor = convertConfigurationDefinitionToConfigurationDescriptor(resultsConfigDef);
- operationDescriptor.setResults(resultsConfigDescriptor);
- operationDescriptor.setTimeout(opDef.getTimeout());
- }
- }
-
- private static ConfigurationDescriptor convertConfigurationDefinitionToConfigurationDescriptor(
- ConfigurationDefinition configDef)
- {
- if (configDef == null)
- return null;
- ConfigurationDescriptor configDescriptor = new ConfigurationDescriptor();
- configDescriptor.setNotes(configDef.getDescription());
- for (PropertyDefinition propDef : configDef.getPropertyDefinitions().values())
- {
- ConfigurationProperty configProp = convertPropertyDefinitionToConfigurationProperty(propDef);
- JAXBElement propElement = getJAXBElement(configProp);
- configDescriptor.getConfigurationProperty().add(propElement);
- }
- return configDescriptor;
- }
-
- private static ConfigurationProperty convertPropertyDefinitionToConfigurationProperty(PropertyDefinition propDef)
- {
- ConfigurationProperty configProp;
- if (propDef instanceof PropertyDefinitionSimple)
- {
- PropertyDefinitionSimple propDefSimple = (PropertyDefinitionSimple)propDef;
- SimpleProperty simpleProp = new SimpleProperty();
- simpleProp.setDefaultValue(propDefSimple.getDefaultValue());
- simpleProp.setDefaultValueDescription(propDefSimple.getDefaultValue());
- simpleProp.setInitialValue(propDefSimple.getDefaultValue());
- if (propDefSimple.getType() != PropertySimpleType.STRING)
- simpleProp.setType(TYPE_MAP.get(propDefSimple.getType()));
- configProp = simpleProp;
- }
- else if (propDef instanceof PropertyDefinitionList)
- {
- PropertyDefinitionList propDefList = (PropertyDefinitionList)propDef;
- ListProperty listProp = new ListProperty();
- //listProp.setMin(BigInteger.valueOf(propDefList.getMin()));
- //listProp.setMax(String.valueOf(propDefList.getMax()));
- ConfigurationProperty memberConfigProp = convertPropertyDefinitionToConfigurationProperty(
- propDefList.getMemberDefinition());
- JAXBElement propElement = getJAXBElement(memberConfigProp);
- listProp.setConfigurationProperty(propElement);
- configProp = listProp;
- }
- else if (propDef instanceof PropertyDefinitionMap)
- {
- PropertyDefinitionMap propDefMap = (PropertyDefinitionMap)propDef;
- MapProperty mapProp = new MapProperty();
- for (PropertyDefinition itemPropDef : propDefMap.getPropertyDefinitions())
- {
- ConfigurationProperty itemConfigProp = convertPropertyDefinitionToConfigurationProperty(itemPropDef);
- JAXBElement propElement = getJAXBElement(itemConfigProp);
- mapProp.getConfigurationProperty().add(propElement);
- }
- configProp = mapProp;
- }
- else
- {
- throw new IllegalStateException("Invalid property definition type: " + propDef.getClass().getName());
- }
- configProp.setDescription(propDef.getDescription());
- //simpleProp.setActivationPolicy(propDefSimple.getActivationPolicy()); // TODO
- configProp.setName(propDef.getName());
- //simpleProp.setPropertyOptions(); // TODO
- if (propDef.isReadOnly())
- configProp.setReadOnly(propDef.isReadOnly());
- if (!propDef.isRequired())
- configProp.setRequired(propDef.isRequired());
- if (propDef.isSummary())
- configProp.setSummary(propDef.isSummary());
- //simpleProp.setUnits(propDefSimple.getUnits()); // TODO
- return configProp;
- }
-
- private static JAXBElement<? extends ConfigurationProperty> getJAXBElement(ConfigurationProperty configProp)
- {
- JAXBElement<? extends ConfigurationProperty> propElement;
- QName qname;
- if (configProp instanceof SimpleProperty)
- qname = SIMPLE_PROPERTY_QNAME;
- else if (configProp instanceof ListProperty)
- qname = LIST_PROPERTY_QNAME;
- else if (configProp instanceof MapProperty)
- qname = MAP_PROPERTY_QNAME;
- else
- throw new IllegalStateException();
- propElement = new JAXBElement(qname, configProp.getClass(), configProp);
- return propElement;
- }
-
- private static Set<String> getKnownDeploymentTypeNames()
- {
- // Use a TreeSet so the names will be sorted.
- Set<String> knownDeploymentTypeNames = new TreeSet<String>();
- for (KnownDeploymentTypes type : KnownDeploymentTypes.values())
- {
- knownDeploymentTypeNames.add(type.getType());
- }
- return knownDeploymentTypeNames;
- }
-
- private static void writeToFile(PluginDescriptor pluginDescriptor,
- File file)
- throws Exception
- {
- LOG.info("Writing plugin descriptor to [" + file + "]...");
- OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(file));
- try {
- JAXBContext jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
- Marshaller marshaller = jaxbContext.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new RhqNamespacePrefixMapper());
- marshaller.marshal(pluginDescriptor, outputStream);
- } finally {
- outputStream.close();
- }
- }
-}
diff --git a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java b/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java
deleted file mode 100644
index 3489912..0000000
--- a/modules/jopr/tools/jbas5-plugin-descriptor-gen/src/main/java/org/jboss/jopr/tool/jbas5/RhqNamespacePrefixMapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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.jboss.jopr.tool.jbas5;
-
-import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
-
-/**
- * @author Ian Springer
- */
-public class RhqNamespacePrefixMapper extends NamespacePrefixMapper {
- public static final String PLUGIN_NAMESPACE = "urn:xmlns:rhq-plugin";
- public static final String CONFIGURATION_NAMESPACE = "urn:xmlns:rhq-configuration";
-
- public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
- if (namespaceUri.equals(PLUGIN_NAMESPACE)) {
- return "";
- } else if (namespaceUri.equals(CONFIGURATION_NAMESPACE)) {
- return "c";
- } else {
- return null;
- }
- }
-}
commit c8df0fbe5ac87ad2e5d5a731d29d64ed6c6b4494
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 28 09:50:09 2012 +0100
Get rid of the never really working JBossOSGI plugin - especially as the JBossOSGi project is long dead anyway.
diff --git a/modules/plugins/JBossOSGi/pom.xml b/modules/plugins/JBossOSGi/pom.xml
deleted file mode 100644
index 1ca9b1b..0000000
--- a/modules/plugins/JBossOSGi/pom.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<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/maven-v4_0_0.xsd"
- >
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-modules-parent</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.on</groupId>
- <artifactId>jopr-jbossOsgi-plugin</artifactId>
- <packaging>jar</packaging>
-
- <name>JBossOSGi Plugin</name>
- <description>Plugin to Manage JBossOSGi services</description>
-
-
- <profiles>
- <profile>
- <id>dev</id>
-
- <properties>
- <rhq.rootDir>../../..</rhq.rootDir>
- <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
- <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
-
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>r4v41</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>r4v41</version>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
- <version>1.0.0.Beta1</version>
-
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
-
- <execution>
- <id>deploy</id>
- <phase>compile</phase>
- <configuration>
- <target>
- <mkdir dir="${rhq.deploymentDir}"/>
- <property name="deployment.file"
- location="${rhq.deploymentDir}/${project.build.finalName}.jar"/>
- <echo>*** Updating ${deployment.file}...</echo>
- <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>deploy-jar-meta-inf</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="deployment.file"
- location="${rhq.deploymentDir}/${project.build.finalName}.jar"/>
- <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
- <unjar src="${project.build.directory}/${project.build.finalName}.jar"
- dest="${project.build.outputDirectory}">
- <patternset>
- <include name="META-INF/**"/>
- </patternset>
- </unjar>
- <jar destfile="${deployment.file}"
- manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
- update="true">
- </jar>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>undeploy</id>
- <phase>clean</phase>
- <configuration>
- <target>
- <property name="deployment.file"
- location="${rhq.deploymentDir}/${project.build.finalName}.jar"/>
- <echo>*** Deleting ${deployment.file}...</echo>
- <delete file="${deployment.file}"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
- </profiles>
-
-
- <dependencies>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-plugin-api</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-native-system</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-jmx-plugin</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>r4v41</version>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>r4v41</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
- <version>1.0.0.Beta1</version>
- </dependency>
-
- <!-- TODO add your dependencies here -->
-
- </dependencies>
-</project>
diff --git a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java
deleted file mode 100644
index 9d96ab0..0000000
--- a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleComponent.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
-import org.mc4j.ems.connection.bean.operation.EmsOperation;
-import static org.osgi.framework.Bundle.ACTIVE;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementDataTrait;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * Component class for a single OSGi Bundle
- *
- * @author Heiko W. Rupp
- */
-public class BundleComponent implements ResourceComponent<JBossOsgiServerComponent>, OperationFacet, MeasurementFacet {
-
- private final Log log = LogFactory.getLog(BundleComponent.class);
-
- ResourceContext context;
- JBossOsgiServerComponent parentComponent;
-
- public void start(ResourceContext<JBossOsgiServerComponent> resourceContext) throws Exception {
- context = resourceContext;
- parentComponent = resourceContext.getParentResourceComponent();
- }
-
- public void stop() {
- }
-
- public AvailabilityType getAvailability() {
-
- AvailabilityType res = AvailabilityType.DOWN;
-
- EmsBean bean = getBean();
- EmsAttribute att = bean.getAttribute("state");
- try {
- Integer code = (Integer) att.refresh();
- if (code != null && code == ACTIVE)
- res = AvailabilityType.UP;
- }
- catch (Exception e) {
- // Nothing to do here
- }
-
- return res;
- }
-
-
- public OperationResult invokeOperation(String name, Configuration params) throws Exception {
-
- EmsBean bean = getBean();
-
- Object[] para ;
- if ("getProperty".equals(name)) {
- para = new Object[1];
- para[0] = params.getSimple("name").getStringValue();
- }
- else {
- para = new Object[0];
- }
- if (log.isDebugEnabled())
- log.debug("Trying to invoke operation [" + name + "] on [" + context.getResourceKey() + "]");
- EmsOperation ops = bean.getOperation(name);
- Object res = null;
- if (ops!=null) {
- res = ops.invoke(para);
-
- }
- OperationResult result = new OperationResult();
- if (res!=null)
- result.setSimpleResult((String) res); // TODO cast will be bad for other return types than string
-
- // If this is a lifecycle operation ask for an avail check
- boolean availCheck = name.toLowerCase().equals("stop") || name.toLowerCase().contains("start");
- if (availCheck) {
- getResourceContext().getAvailabilityContext().requestAvailabilityCheck();
- }
-
- return result;
- }
-
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
-
- EmsBean bean = getBean();
- List<String> theMetrics = new ArrayList<String>(metrics.size());
- for (MeasurementScheduleRequest msr : metrics)
- theMetrics.add(msr.getName());
-
- bean.refreshAttributes(theMetrics);
-
- for (MeasurementScheduleRequest msr : metrics) {
- EmsAttribute attribute = bean.getAttribute(msr.getName());
- if (attribute==null)
- continue;
-
- if (msr.getDataType() == DataType.MEASUREMENT) {
- Double value = (Double) attribute.getValue();
- MeasurementDataNumeric data = new MeasurementDataNumeric(msr,value);
- report.addData(data);
- }
- else if (msr.getDataType() == DataType.TRAIT) {
- String value = (String) attribute.getValue();
- MeasurementDataTrait data = new MeasurementDataTrait(msr,value);
- report.addData(data);
- }
- }
- }
-
-
-
- private EmsBean getBean() {
- EmsConnection conn = parentComponent.getEmsConnection();
- return conn.getBean(context.getResourceKey());
- }
-
-}
diff --git a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java
deleted file mode 100644
index 88406f5..0000000
--- a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/BundleDiscovery.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jmx.ObjectNameQueryUtility;
-
-/**
- * Discovery Class for OSGi Bundles
- *
- * @author Heiko W. Rupp
- */
-public class BundleDiscovery implements ResourceDiscoveryComponent<JBossOsgiServerComponent> {
-
- private final Log log = LogFactory.getLog(BundleDiscovery.class);
-
- public Set<DiscoveredResourceDetails> discoverResources(
- ResourceDiscoveryContext<JBossOsgiServerComponent> ctx) throws Exception {
-
- Set<DiscoveredResourceDetails> details = new HashSet<DiscoveredResourceDetails>();
-
- String objectNamePattern="jboss.osgi:bundle=%name%,id=%id%";
-
- ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(objectNamePattern);
-
- EmsConnection conn = ctx.getParentResourceComponent().getEmsConnection(ctx.getParentResourceContext().getPluginConfiguration());
- List<EmsBean> beans = conn.queryBeans(queryUtility.getTranslatedQuery());
-
- for (EmsBean bean: beans) {
-
- queryUtility.setMatchedKeyValues(bean.getBeanName().getKeyProperties());
- //Skip unknown beans
- if (queryUtility.isContainsExtraKeyProperties(bean.getBeanName().getKeyProperties().keySet()))
- continue;
-
- String resourceKey = bean.getBeanName().getCanonicalName(); // The detected object name
- String name = queryUtility.formatMessage("{name}");
-
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(ctx.getResourceType(),
- resourceKey,
- name,
- null,
- "An OSGiBundle",
- null,
- null);
- details.add(detail);
-
- }
-
- log.info("Discovered " + details.size() +" bundles");
-
- return details;
- }
-}
diff --git a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java
deleted file mode 100644
index bef0f79..0000000
--- a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerComponent.java
+++ /dev/null
@@ -1,277 +0,0 @@
-
-package org.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.ConnectionFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-import org.mc4j.ems.connection.settings.ConnectionSettings;
-import org.mc4j.ems.connection.support.ConnectionProvider;
-import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.event.EventContext;
-import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.operation.OperationContext;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
-
-public class JBossOsgiServerComponent implements ResourceComponent
-, OperationFacet
-, CreateChildResourceFacet
-{
- private final Log log = LogFactory.getLog(this.getClass());
-
- private static final int CHANGEME = 1; // TODO remove or change this
-
- private EmsConnection connection;
-
- ResourceContext resourceContext;
-
- public static final String EVENT_TYPE_LOG = "log"; // See plugin descriptor
- private EventContext eventContext;
- private OsgiEventPoller eventPoller;
-
- /**
- * Controls the dampening of connection error stack traces in an attempt to control spam to the log
- * file. Each time a connection error is encountered, this will be incremented. When the connection
- * is finally established, this will be reset to zero.
- */
- private int consecutiveConnectionErrors;
-
-
-
- /**
- * Return availability of this resource
- * @see org.rhq.core.pluginapi.inventory.ResourceComponent#getAvailability()
- */
- public AvailabilityType getAvailability() {
- try {
- EmsConnection connection = loadConnection(resourceContext.getPluginConfiguration());
- EmsBean bean = connection.getBean(JBossOsgiServerDiscovery.MANAGER_OBJECT);
-
- // this is necessary to prove that that not only the connection exists but is servicing requests.
- bean.getAttribute("bundles").refresh();
- return AvailabilityType.UP;
- } catch (Exception e) {
- closeConnection();
- return AvailabilityType.DOWN;
- }
- }
-
-
-
- /**
- * Start the resource connection
- * @see org.rhq.core.pluginapi.inventory.ResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
- */
- public void start(ResourceContext context) throws InvalidPluginConfigurationException, Exception {
-
- resourceContext = context;
-
- Configuration conf = context.getPluginConfiguration();
- // TODO add code to start the resource / connection to it
-
-
- // Register getting remote log events
- eventContext = context.getEventContext();
- eventPoller = new OsgiEventPoller();
- eventContext.registerEventPoller(eventPoller, 60);
-
- }
-
-
- /**
- * Tear down the rescource connection
- * @see org.rhq.core.pluginapi.inventory.ResourceComponent#stop()
- */
- public void stop() {
-
- if (eventPoller!=null)
- eventPoller.tearDown();
- eventContext.unregisterEventPoller(EVENT_TYPE_LOG);
- }
-
-
-
-
-
- public void startOperationFacet(OperationContext context) {
-
- }
-
-
- /**
- * Invokes the passed operation on the managed resource
- * @param name Name of the operation
- * @param params The method parameters
- * @return An operation result
- * @see org.rhq.core.pluginapi.operation.OperationFacet
- */
- public OperationResult invokeOperation(String name, Configuration params) throws Exception {
-
- OperationResult res = new OperationResult();
- if ("dummyOperation".equals(name)) {
- // TODO implement me
-
- }
- return res;
- }
-
-
-
- /**
- * Create a child resource
- * @see org.rhq.core.pluginapi.inventory.CreateChildResourceFacet
- */
- public CreateResourceReport createResource(CreateResourceReport report)
- {
- // TODO supply code to create a child resource
-
- return null; // TODO change this
- }
-
- public EmsConnection getEmsConnection() {
- EmsConnection emsConnection = null;
-
- try {
- emsConnection = loadConnection(resourceContext.getPluginConfiguration());
- } catch (Exception e) {
- log.error("Component attempting to access a connection that could not be loaded");
- }
-
- return emsConnection;
- }
-
-
-
- public EmsConnection getEmsConnection(Configuration config) {
- EmsConnection emsConnection = null;
-
- try {
- emsConnection = loadConnection(config);
- } catch (Exception e) {
- log.error("Component attempting to access a connection that could not be loaded");
- }
-
- return emsConnection;
- }
-
- /**
- * This is the preferred way to use a connection from within this class; methods should not access the connection
- * property directly as it may not have been instantiated if the connection could not be made.
- *
- * <p>If the connection has already been established, return the object reference to it. If not, attempt to make
- * a live connection to the JMX server.</p>
- *
- * <p>If the connection could not be made in the {@link #start(org.rhq.core.pluginapi.inventory.ResourceContext)}
- * method, this method will effectively try to load the connection on each attempt to use it. As such, multiple
- * threads may attempt to access the connection through this means at a time. Therefore, the method has been
- * made synchronized on instances of the class.</p>
- *
- * <p>If any errors are encountered, this method will log the error, taking into account logic to prevent spamming
- * the log file. Calling methods should take care to not redundantly log the exception thrown by this method.</p>
- *
- * @return live connection to the JMX server; this will not be <code>null</code>
- *
- * @throws Exception if there are any issues at all connecting to the server
- * @param pluginConfig
- */
- private synchronized EmsConnection loadConnection(Configuration pluginConfig) throws Exception {
- if (this.connection == null) {
- try {
- //Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
-
- ConnectionSettings connectionSettings = new ConnectionSettings();
-
- String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
- .getStringValue();
- PropertySimple serverUrl = pluginConfig
- .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);
-
- connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Class.forName(
- connectionTypeDescriptorClass).newInstance());
- // if not provided use the default serverUrl
- if (null != serverUrl) {
- connectionSettings.setServerUrl(serverUrl.getStringValue());
- }
-
-// connectionSettings.setPrincipal(pluginConfig.getSimpleValue(PRINCIPAL_CONFIG_PROP, null));
-// connectionSettings.setCredentials(pluginConfig.getSimpleValue(CREDENTIALS_CONFIG_PROP, null));
-
- if (connectionSettings.getAdvancedProperties() == null) {
- connectionSettings.setAdvancedProperties(new Properties());
- }
-
- ConnectionFactory connectionFactory = new ConnectionFactory();
-
-
- ConnectionProvider connectionProvider = connectionFactory.getConnectionProvider(connectionSettings);
- this.connection = connectionProvider.connect();
-
- this.connection.loadSynchronous(false); // this loads all the MBeans
-
- this.consecutiveConnectionErrors = 0;
-
- if (log.isDebugEnabled())
- log.debug("Successfully made connection to the OSGiServer instance");
- } catch (Exception e) {
-
- // The connection will be established even in the case that the principal cannot be authenticated,
- // but the connection will not work. That failure seems to come from the call to loadSynchronous after
- // the connection is established. If we get to this point that an exception was thrown, close any
- // connection that was made and null it out so we can try to establish it again.
- if (connection != null) {
- if (log.isDebugEnabled())
- log.debug("Connection created but an exception was thrown. Closing the connection.", e);
- connection.close();
- connection = null;
- }
-
- // Since the connection is attempted each time it's used, failure to connect could result in log
- // file spamming. Log it once for every 10 consecutive times it's encountered.
- if (consecutiveConnectionErrors % 10 == 0) {
- log.warn("Could not establish connection to the JBossOSGi instance ["
- + (consecutiveConnectionErrors + 1) + "] times for resource ["
- + resourceContext.getResourceKey() + "]", e);
- }
-
- if (log.isDebugEnabled())
- log.debug("Could not connect to the JBoss instance for resource ["
- + resourceContext.getResourceKey() + "]", e);
-
- consecutiveConnectionErrors++;
-
- throw e;
- }
- }
-
- return connection;
- }
-
-
- /**
- * If necessary attempt to close the EMS connection, then set this.connection null. Synchronized ensure we play well
- * with loadConnection.
- */
- public synchronized void closeConnection() {
- if (this.connection != null) {
- try {
- this.connection.close();
- } catch (Exception e) {
- log.error("Error closing Tomcat EMS connection: " + e);
- }
- this.connection = null;
- }
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java
deleted file mode 100644
index 41a19b6..0000000
--- a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/JBossOsgiServerDiscovery.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Jopr Management Platform
- * Copyright (C) 2005-2009 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.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
-
-/**
- * Discovery class for JBossOSGi servers
- * @author Heiko W. Rupp
- *
- * implements ResourceDiscoveryComponent<JBossOsgiServerComponent>
- */
-public class JBossOsgiServerDiscovery implements ResourceDiscoveryComponent {
-
-
- private final Log log = LogFactory.getLog(this.getClass());
- public static final String MANAGER_OBJECT = "jboss.osgi:service=ManagedFramework";
-
- /**
- * Run the discovery
- */
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext discoveryContext) {
-
- Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
-
- String remote = "service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector";
- String connector = "org.mc4j.ems.connection.support.metadata.J2SE5ConnectionTypeDescriptor";
-
-
- Configuration c = new Configuration();
- c.put(new PropertySimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY,remote));
- c.put(new PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,connector));
- c.put(new PropertySimple("objectName", MANAGER_OBJECT));
-
- boolean found = testConnection(c);
- if (found) {
- String simplifiedRemote = simplifyUrl(remote);
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails( discoveryContext.getResourceType(),
- remote, "JBossOSGi @ " + simplifiedRemote , null, "JBossOSGi Server", c, null);
-
-
- // Add to return values
- discoveredResources.add(detail);
- log.info("Discovered new JBossOSGi server :" + remote);
- }
- return discoveredResources;
-
- }
-
- /**
- * Fiddle host:port from the service string for the resource name that will be displayed. If input is null,
- * null will be returned.
- * @param remote Input jmx-remote service url.
- * @return short version of the input if anything goes wrong
- */
- private String simplifyUrl(String remote) {
- if (remote==null)
- return null;
-
- if (remote.indexOf("rmi://")==-1) // Nothing to do
- return remote;
-
- int i = remote.lastIndexOf("rmi://");
- i+=6;
- if (i>remote.length())
- return remote;
-
- String res = remote.substring(i);
- i = res.indexOf("/");
- if (i>0)
- res = res.substring(0,i);
-
- return res;
- }
-
- /**
- * Try to establish a connection to the given remote and search for the managerObject
- * @param config Configuration data to set up the remote connection
- * @return true if the connetion is successful and the MBean could be found
- */
- private boolean testConnection(Configuration config) {
-
- boolean res=false;
-
- try {
- JBossOsgiServerComponent c = new JBossOsgiServerComponent();
- EmsConnection conn = c.getEmsConnection(config);
- EmsBean managerBean = conn.getBean(MANAGER_OBJECT);
- managerBean.getAttribute("bundles").refresh();
- res = true;
- }
- catch (Exception e) {
- // Nothing to do
- }
-
- return res;
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java b/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java
deleted file mode 100644
index f9cf093..0000000
--- a/modules/plugins/JBossOSGi/src/main/java/org/jboss/on/plugins/jbossOsgi/JBossOSGi/OsgiEventPoller.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.jboss.on.plugins.jbossOsgi.JBossOSGi;
-
-import java.util.List;
-import java.util.Set;
-import java.util.HashSet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jetbrains.annotations.NotNull;
-import org.osgi.service.log.LogEntry;
-import org.osgi.service.log.LogService;
-
-import org.jboss.osgi.spi.logging.LogEntryCache;
-import org.jboss.osgi.spi.logging.LogEntryFilter;
-
-import org.rhq.core.pluginapi.event.EventPoller;
-import org.rhq.core.domain.event.Event;
-import org.rhq.core.domain.event.EventSeverity;
-
-/**
- * Remotely poll the logs from the JBossOSGi server and feed into the
- * Events subsystem.
- *
- * @author Heiko W. Rupp
- */
-public class OsgiEventPoller implements EventPoller{
-
- private final Log log = LogFactory.getLog(OsgiEventPoller.class);
- private LogEntryCache entryCache;
-
- public OsgiEventPoller() {
- entryCache = new LogEntryCache();// new LogEntryFilter(".*"), LogService.LOG_INFO, ".*");
- // TODO register with the remote
- }
-
-
- public void tearDown() {
-
- }
-
- @NotNull
- public String getEventType() {
- return JBossOsgiServerComponent.EVENT_TYPE_LOG;
- }
-
- public Set<Event> poll() {
- Set<Event> eventSet = new HashSet<Event>();
- List<LogEntry> entries = entryCache.getLog();
- for (LogEntry entry: entries ) {
- StringBuilder builder = new StringBuilder();
- builder.append(entry.getMessage());
- if (entry.getBundle()!=null)
- builder.append("\nBundle: ").append(entry.getBundle().getSymbolicName());
- if (entry.getException()!=null)
- builder.append("\nTrace: ").append(entry.getException());
-
- Event event = new Event(getEventType(),"RemoteServer",entry.getTime(),
- levelToSeverity(entry.getLevel()),builder.toString());
- eventSet.add(event);
- }
- return eventSet;
- }
-
-
- /**
- * Translate the OSGi log levels into Jopr EventSeverity
- * @param level OSGi Log level
- * @return Corresonding EventSeverity
- * @see org.osgi.service.log.LogService
- */
- private EventSeverity levelToSeverity(int level) {
- EventSeverity ret;
- switch (level) {
- case 1: ret = EventSeverity.ERROR;
- break;
- case 2: ret = EventSeverity.WARN;
- break;
- case 3: ret = EventSeverity.INFO;
- break;
- case 4: ret = EventSeverity.DEBUG;
- break;
- default:
- ret = EventSeverity.INFO;
- log.warn("Got an unknown log level: " + level);
- }
- return ret;
- }
-}
diff --git a/modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml
deleted file mode 100644
index b7155cd..0000000
--- a/modules/plugins/JBossOSGi/src/main/resources/META-INF/rhq-plugin.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<plugin name="JBossOSGi"
- displayName="JBossOSGiPlugin"
- package="org.jboss.on.plugins.jbossOsgi.JBossOSGi"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
-
- <depends plugin="JMX"/>
-
- <server
- name="JBossOSGi"
- discovery="JBossOsgiServerDiscovery"
- class="JBossOsgiServerComponent"
- createDeletePolicy="create-only"
- >
-
- <plugin-configuration>
- <c:simple-property name="connectorAddress" description="JMX Remoting address of the remote JBossOSGi Server" />
- <c:template name="default" description="The default setup for JBossOSGi">
- <c:simple-property name="connectorAddress" displayName="URL of the remote server"
- defaultValue="service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector"/>
- </c:template>
- </plugin-configuration>
-
- <operation name="getBundle" description="Retrieve the object name for the passed bundle name">
- <parameters>
- <c:simple-property name="name" description="Name of the bundle" type="string"/>
- </parameters>
- <results>
- <c:simple-property name="operationResult" description="Objectname of the bundle" type="string"/>
- </results>
- </operation>
-
- <event name="log" displayName="Log Entries" description="Log entries from the OSGi Server" />
-
- <service name="OSGiBundle"
- description="A deployed bundle"
- discovery="BundleDiscovery"
- class="BundleComponent">
- <operation name="start" description="Starts the bundle" displayName="Start"/>
- <operation name="stop" description="Stops the bundle" displayName="Stop" />
- <operation name="getProperty" description="Retrieve the value of the passed property">
- <parameters>
- <c:simple-property name="name" description="Name of the property" type="string"/>
- </parameters>
- <results>
- <c:simple-property name="operationResult" description="Value of the property" type="string"/>
- </results>
- </operation>
-
- <metric property="version" dataType="trait" description="The version of this bundle" displayType="summary"/>
- <metric property="location" dataType="trait" description="The location of this bundle (in filesystem)"/>
- <metric property="description" dataType="trait" description="Description of this bundle" displayType="summary" />
-
-
- </service>
-
- </server>
-
-
-</plugin>
\ No newline at end of file
commit 65a12992c9f737af670af4c76b41506a4285341a
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 28 09:48:54 2012 +0100
Get rid of outdated <source>1.5 and <target>1.5 settings.
diff --git a/etc/agentspawn/pom.xml b/etc/agentspawn/pom.xml
index 7896d33..d0cdc63 100644
--- a/etc/agentspawn/pom.xml
+++ b/etc/agentspawn/pom.xml
@@ -28,14 +28,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/etc/classloaders-test/plugin1/pom.xml b/etc/classloaders-test/plugin1/pom.xml
index 2c405e2..d5a9434 100644
--- a/etc/classloaders-test/plugin1/pom.xml
+++ b/etc/classloaders-test/plugin1/pom.xml
@@ -105,14 +105,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugin-validator</artifactId>
<version>${rhq.version}</version>
diff --git a/etc/classloaders-test/plugin2/pom.xml b/etc/classloaders-test/plugin2/pom.xml
index a67aff1..914bbff 100644
--- a/etc/classloaders-test/plugin2/pom.xml
+++ b/etc/classloaders-test/plugin2/pom.xml
@@ -104,13 +104,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<plugin>
<groupId>org.rhq</groupId>
diff --git a/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml b/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
index a3e6562..6739e5a 100644
--- a/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/etc/rhq-plugin-archetype/src/main/resources/archetype-resources/pom.xml
@@ -14,10 +14,10 @@
<name>${rhq-plugin-name}</name>
<description>RHQ Plugin</description>
- <properties>
+ <properties>
<rhq.version>3.0.0.B04</rhq.version>
- </properties>
-
+ </properties>
+
<dependencies>
<!-- Below are the core modules that are required dependencies of all plugins -->
@@ -68,7 +68,7 @@
<version>2.1</version>
<scope>provided</scope> <!-- provided by the agent/plugin-container -->
</dependency>
-
+
<!-- Uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog
all three are provided to your plugin by the agent/plugin-container -->
@@ -111,14 +111,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugin-validator</artifactId>
<version>${rhq.version}</version>
diff --git a/etc/samples/custom-serverplugin/pom.xml b/etc/samples/custom-serverplugin/pom.xml
index 68d76f6..d4e8ab8 100644
--- a/etc/samples/custom-serverplugin/pom.xml
+++ b/etc/samples/custom-serverplugin/pom.xml
@@ -95,13 +95,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<!--
If your plugin has third-party jar dependencies that are not already
diff --git a/etc/samples/simplereport-serverplugin/pom.xml b/etc/samples/simplereport-serverplugin/pom.xml
index fd219b4..b4855f5 100644
--- a/etc/samples/simplereport-serverplugin/pom.xml
+++ b/etc/samples/simplereport-serverplugin/pom.xml
@@ -88,14 +88,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin container, you can package these
diff --git a/etc/samples/skeleton-plugin/pom.xml b/etc/samples/skeleton-plugin/pom.xml
index 6d173ff..e49b30c 100644
--- a/etc/samples/skeleton-plugin/pom.xml
+++ b/etc/samples/skeleton-plugin/pom.xml
@@ -109,14 +109,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already available when deployed in the plugin
container, you can package these jars in your plugin. They go in your plugin jar's "lib" directory.
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index 49391a9..6494fca 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -130,13 +130,6 @@
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- </configuration>
- </plugin>
</plugins>
</build>
diff --git a/modules/helpers/pluginAnnotations/pom.xml b/modules/helpers/pluginAnnotations/pom.xml
index 74800f8..929f017 100644
--- a/modules/helpers/pluginAnnotations/pom.xml
+++ b/modules/helpers/pluginAnnotations/pom.xml
@@ -24,14 +24,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index 5c89a0f..f7f04ba 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -23,14 +23,6 @@
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
diff --git a/modules/plugins/JBossOSGi/pom.xml b/modules/plugins/JBossOSGi/pom.xml
index d2521b1..1ca9b1b 100644
--- a/modules/plugins/JBossOSGi/pom.xml
+++ b/modules/plugins/JBossOSGi/pom.xml
@@ -2,7 +2,7 @@
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/maven-v4_0_0.xsd"
- >
+ >
<modelVersion>4.0.0</modelVersion>
@@ -19,19 +19,6 @@
<name>JBossOSGi Plugin</name>
<description>Plugin to Manage JBossOSGi services</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
-
- </plugins>
- </build>
<profiles>
<profile>
diff --git a/modules/plugins/hardware/pom.xml b/modules/plugins/hardware/pom.xml
index 875a2a4..ee7beb8 100644
--- a/modules/plugins/hardware/pom.xml
+++ b/modules/plugins/hardware/pom.xml
@@ -15,7 +15,7 @@
<name>Hardware</name>
<description>RHQ Plugin</description>
-
+
<dependencies>
</dependencies>
@@ -23,14 +23,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin container, you can package these
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index 36495b8..9c7f6d2 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -31,14 +31,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
<!--
If your plugin has third-party jar dependencies that are not already
available when deployed in the plugin container, you can package these
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index f14bad8..5e41981 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -17,13 +17,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/modules/plugins/onewire/pom.xml b/modules/plugins/onewire/pom.xml
index ef3a018..8212ff2 100644
--- a/modules/plugins/onewire/pom.xml
+++ b/modules/plugins/onewire/pom.xml
@@ -7,24 +7,17 @@
<groupId>org.rhq</groupId>
<version>4.3.0-SNAPSHOT</version>
</parent>
-
+
<modelVersion>4.0.0</modelVersion>
-
+
<groupId>org.rhq</groupId>
<artifactId>rhq-onewire-plugin</artifactId>
<name>snmptrapd</name>
<description>RHQ OneWire Plugin</description>
-
+
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
+
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
@@ -66,11 +59,11 @@
-->
</executions>
</plugin>
-
-
+
+
</plugins>
</build>
-
+
<profiles>
<profile>
<id>dev</id>
@@ -109,12 +102,12 @@
<phase>package</phase>
<configuration>
<target>
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
<echo>*** Updating META-INF dir in ${deployment.file}...</echo>
<unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
<patternset><include name="META-INF/**" /></patternset>
</unjar>
- <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
</jar>
</target>
</configuration>
@@ -122,7 +115,7 @@
<goal>run</goal>
</goals>
</execution>
-
+
<execution>
<id>undeploy</id>
<phase>clean</phase>
@@ -145,7 +138,7 @@
</build>
</profile>
</profiles>
-
+
<dependencies>
<dependency>
@@ -154,6 +147,6 @@
<version>1.10</version>
</dependency>
</dependencies>
-
+
</project>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index c035714..d4d21f9 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -15,20 +15,6 @@
<name>RHQ pattern Plugin</name>
<description>Generate metrics that follow given patterns</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
-
- </plugins>
- </build>
-
<profiles>
<profile>
<id>dev</id>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index 62b4f33..6788231 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -41,14 +41,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
@@ -60,7 +52,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/modules/plugins/services/pom.xml b/modules/plugins/services/pom.xml
index dbe5b41..37a43cb 100644
--- a/modules/plugins/services/pom.xml
+++ b/modules/plugins/services/pom.xml
@@ -14,18 +14,6 @@
<name>RHQ Services Plugin</name>
<description>Do some System config services stuff</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<profiles>
<profile>
<id>dev</id>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 42594da..93d093c 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -14,13 +14,6 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index b627641..4ee1729 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -15,18 +15,6 @@
<name>RHQ Twitter Plugin</name>
<description>Do some Twitter statistics monitoring</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<profiles>
<profile>
<id>dev</id>
commit e94ba25d2769fff6d371ac5d4e048e3f90531056
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Nov 27 21:59:38 2012 +0100
BZ 880214 - better detect the location of backing files for deployed content.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
index 1c667da..3cf2cdb 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java
@@ -43,6 +43,7 @@ import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
import org.rhq.modules.plugins.jbossas7.json.ReadAttribute;
+import org.rhq.modules.plugins.jbossas7.json.ReadResource;
import org.rhq.modules.plugins.jbossas7.json.Result;
/**
@@ -51,6 +52,7 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
*/
public class DeploymentComponent extends BaseComponent<ResourceComponent<?>> implements OperationFacet, ContentFacet {
+ private static final String DOMAIN_DATA_CONTENT_SUBDIR = "/data/content";
private boolean verbose = ASConnection.verbose;
private File deploymentFile;
@@ -234,6 +236,17 @@ public class DeploymentComponent extends BaseComponent<ResourceComponent<?>> imp
}
}
+ /**
+ * Determine the location of the physical content of a deployment.
+ * We need to check several cases here:
+ * <ul>
+ * <li>Standalone server</li>
+ * <li>Domain Deployment: here the content is under /deployment=xxx and in the filesystem at $AS/domain/data/content</li>
+ * <li>Server-group deployment: there is no real physical content, it is a logical link to a domain deployment</li>
+ * <li>Manages server: here the content exists below /host=xx/server=server-name/deployment=xxx</li>
+ * </ul>
+ * @return A file object pointing to the deployed file or null if there is no content
+ */
private File determineDeploymentFile() {
Operation op = new ReadAttribute(getAddress(), "content");
Result result = getASConnection().execute(op);
@@ -241,8 +254,35 @@ public class DeploymentComponent extends BaseComponent<ResourceComponent<?>> imp
@SuppressWarnings("unchecked")
List<Map<String, Object>> content = (List<Map<String, Object>>) result.getResult();
if (content == null || content.isEmpty()) {
- log.warn("Could not determine the location of the deployment - the content descriptor wasn't found for deployment" + getAddress() + ".");
- return null;
+ // No content -> check for server group
+ if (path.startsWith(("server-group="))) {
+ // Server group has no content of its own - use the domain deployment
+ String name = (String) path.substring(path.lastIndexOf("=")+1);
+ op = new ReadResource(new Address("deployment",name));
+ result = getASConnection().execute(op);
+ if (result.isSuccess()) {
+ @SuppressWarnings("unchecked")
+ Map<String,Object> contentMap = (Map<String, Object>) result.getResult();
+ content = (List<Map<String, Object>>) contentMap.get("content");
+ if (content.get(0).containsKey("path")) {
+ String path = (String) content.get(0).get("path");
+ String relativeTo = (String) content.get(0).get("relative-to");
+ deploymentFile = getDeploymentFileFromPath(relativeTo, path);
+ } else if (content.get(0).containsKey("hash")) {
+ @SuppressWarnings("unchecked")
+ String base64Hash = ((Map<String, String>)content.get(0).get("hash")).get("BYTES_VALUE");
+ byte[] hash = Base64.decode(base64Hash);
+ ServerGroupComponent sgc = (ServerGroupComponent) context.getParentResourceComponent();
+ String baseDir = ((HostControllerComponent) sgc.context.getParentResourceComponent()).pluginConfiguration.getSimpleValue("baseDir");
+ String contentPath = new File(baseDir , "/data/content").getAbsolutePath();
+ deploymentFile = getDeploymentFileFromHash(hash, contentPath);
+ }
+ return deploymentFile;
+ }
+ }
+ else {
+ log.warn("Could not determine the location of the deployment - the content descriptor wasn't found for deployment" + getAddress() + ".");
+ return null;}
}
Boolean archive = (Boolean) content.get(0).get("archive");
@@ -260,11 +300,34 @@ public class DeploymentComponent extends BaseComponent<ResourceComponent<?>> imp
@SuppressWarnings("unchecked")
String base64Hash = ((Map<String, String>)content.get(0).get("hash")).get("BYTES_VALUE");
byte[] hash = Base64.decode(base64Hash);
- Address contentPathAddress = new Address("core-service", "server-environment");
+ Address contentPathAddress;
+ if (context.getParentResourceComponent() instanceof ManagedASComponent) {
+ // -> managed server we need to check for host=x/server=y, but the path brings host=x,server-config=y
+ String p = ((ManagedASComponent) context.getParentResourceComponent()).getPath();
+ p = p.replaceAll("server-config=","server=");
+ contentPathAddress = new Address(p);
+ contentPathAddress.add("core-service", "server-environment");
+ }
+ else {
+ // standalone
+ contentPathAddress = new Address("core-service", "server-environment");
+ }
op = new ReadAttribute(contentPathAddress, "content-dir");
result = getASConnection().execute(op);
- String contentPath = (String) result.getResult();
+ String contentPath;
+ if (result.isSuccess()) {
+ contentPath = (String) result.getResult();
+ } else {
+ // No success above -> check if this is a domain deployment
+ if (this instanceof DomainDeploymentComponent) {
+ String baseDir = ((HostControllerComponent) context.getParentResourceComponent()).pluginConfiguration.getSimpleValue("baseDir");
+ contentPath = new File(baseDir , DOMAIN_DATA_CONTENT_SUBDIR).getAbsolutePath();
+ }
+ else {
+ contentPath = "-unknown-";
+ }
+ }
deploymentFile = getDeploymentFileFromHash(hash, contentPath);
} else {
log.warn("Failed to determine the deployment file of " + getAddress() + " deployment. Neither path nor hash attributes were available.");
commit 322ff976266655f2bcc809ae4b047f77f170eb1f
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 27 15:04:58 2012 -0500
Add a description to config prop that community member had to figure out
looking at code.
diff --git a/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
index b2d11b9..b6b0cd3 100644
--- a/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/netservices/src/main/resources/META-INF/rhq-plugin.xml
@@ -18,7 +18,8 @@
<c:simple-property name="user" required="false"/>
<c:simple-property name="password" required="false"/>
<c:simple-property name="realm" required="false"/>
- <c:simple-property name="validateResponseCode" type="boolean" default="false"/>
+ <c:simple-property name="validateResponseCode" type="boolean" default="false"
+ description="Codes in the 200-299 range are considered success"/>
<c:simple-property name="sslProtocol" default="none">
<c:property-options>
<c:option value="none"/>
commit 5c501ceb548e306ac93ba66b5989cf11e2d91cdb
Merge: a14ee4d 2ec8d54
Author: Jay Shaughnessy <jshaughn(a)jshaughn.csb>
Date: Tue Nov 27 13:39:17 2012 -0500
Merge branch 'master' into rhq-on-as7
Conflicts:
.classpath
modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
modules/enterprise/server/jar/pom.xml
modules/integration-tests/jndi-access/jndi-access-test/pom.xml
pom.xml
diff --cc .classpath
index 4fe0232,e2d8841..4470eb3
--- a/.classpath
+++ b/.classpath
@@@ -173,7 -164,7 +173,6 @@@
<classpathentry kind="src" path="modules/core/arquillian-integration/container/src/test/java"/>
<classpathentry kind="src" path="modules/core/arquillian-integration/archive/src/main/java"/>
<classpathentry kind="src" path="modules/core/arquillian-integration/container/src/main/java"/>
-- <classpathentry kind="src" path="modules/enterprise/server/itests/src/test/java"/>
<classpathentry kind="src" path="modules/test-utils/src/main/java"/>
<classpathentry kind="src" path="modules/integration-tests/mod_cluster-plugin-test/src/test/java"/>
<classpathentry kind="src" path="etc/samples/skeleton-plugin/src/main/java"/>
@@@ -216,9 -215,12 +215,9 @@@
<classpathentry exported="true" kind="var" path="M2_REPO/struts-menu/struts-menu/2.3/struts-menu-2.3.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/velocity/velocity/1.5/velocity-1.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.2.3/jaxb-api-2.2.3.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/xalan/xalan/2.5.1/xalan-2.5.1.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.2.3/jaxb-api-2.2.3.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/jboss/jboss-embeddable-ejb3/jboss-ejb3-all/1.0.0.Alpha9/jboss-ejb3-all-1.0.0.Alpha9.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jboss/jbpm/3.1.1/jbpm-3.1.1.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/jboss/jboss-embeddable-ejb3/hibernate-all/1.0.0.Alpha9/hibernate-all-1.0.0.Alpha9.jar" sourcepath="/M2_REPO/hibernate/hibernate3/3.2.r14201-2/hibernate3-3.2.r14201-2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.8.0/ant-launcher-1.8.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/>
@@@ -235,20 -237,26 +234,20 @@@
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.3.3.Final/richfaces-api-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-api/3.1.3.GA/richfaces-api-3.1.3.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.3.Final/richfaces-impl-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0.GA/richfaces-impl-3.3.0.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.3.Final/richfaces-ui-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0.GA/richfaces-ui-3.3.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/postgresql/postgresql/9.1-902.jdbc4/postgresql-9.1-902.jdbc4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/postgresql/postgresql/9.1-902.jdbc4/postgresql-9.1-902.jdbc4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jboss/jboss-cache/1.4.1.SP9/jboss-cache-1.4.1.SP9.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82-sources.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3-sources.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/transaction/jboss-jta/4.2.3.SP5/jboss-jta-4.2.3.SP5.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/transaction/jboss-jts-common/4.2.3.SP5/jboss-jts-common-4.2.3.SP5.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jbossws-spi/1.1.1.GA/jbossws-spi-1.1.1.GA.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jbossws/jbossws-native-core/3.1.1.GA/jbossws-native-core-3.1.1.GA.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82-sources.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jbossts/jbossjts/4.16.2.Final/jbossjts-4.16.2.Final.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0.8/maven-plugin-api-2.0.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/swizzle/swizzle-confluence/1.6.1/swizzle-confluence-1.6.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jvnet/inflector/0.7.0/inflector-0.7.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/net/augeas/augeas/0.0.2/augeas-0.0.2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/json/json/20090211/json-20090211.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/json/json/20080701/json-20080701.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/json/json/20090211/json-20090211.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/net/java/dev/jna/jna/3.2.5/jna-3.2.5.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/freemarker/freemarker/2.3.11/freemarker-2.3.11.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/seam/jboss-seam/2.1.0.SP1/jboss-seam-2.1.0.SP1.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.1.0.SP1/jboss-seam-ui-2.1.0.SP1.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/hibernate/hibernate3/3.2.r14201-2/hibernate3-3.2.r14201-2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jline/jline/0.9.94/jline-0.9.94.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/net/sf/opencsv/opencsv/1.8/opencsv-1.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-digester/commons-digester/1.8.1/commons-digester-1.8.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>
@@@ -279,61 -287,35 +278,61 @@@
<classpathentry exported="true" kind="var" path="M2_REPO/org/mongodb/mongo-java-driver/2.6.5/mongo-java-driver-2.6.5.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/googlecode/java-diff-utils/diffutils/1.2.1/diffutils-1.2.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/google/code/morphia/morphia/0.99/morphia-0.99.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-links/2.3.4.Final/resteasy-links-2.3.4.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/2.3.4.Final/resteasy-jaxrs-2.3.4.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jackson-provider/2.3.4.Final/resteasy-jackson-provider-2.3.4.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/resteasy/jaxrs-api/2.3.4.Final/jaxrs-api-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.5.6-Final/hibernate-annotations-3.5.6-Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/hibernate/hibernate-core/4.0.1.Final/hibernate-core-4.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/4.0.1.Final/hibernate-entitymanager-4.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/hibernate/hibernate-validator/4.2.0.Final/hibernate-validator-4.2.0.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/infinispan/infinispan-core/5.1.2.FINAL/infinispan-core-5.1.2.FINAL.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/servlet/jboss-servlet-api_3.0_spec/1.0.1.Final/jboss-servlet-api_3.0_spec-1.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/msc/jboss-msc/1.0.2.GA/jboss-msc-1.0.2.GA.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jboss-dmr/1.1.1.Final/jboss-dmr-1.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-naming/7.1.1.Final/jboss-as-naming-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-server/7.1.1.Final/jboss-as-server-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/staxmapper/1.1.0.Final/staxmapper-1.1.0.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/modules/jboss-modules/1.1.1.GA/jboss-modules-1.1.1.GA.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-subsystem-test/7.1.1.Final/jboss-as-subsystem-test-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-controller/7.1.1.Final/jboss-as-controller-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-controller-client/7.1.1.Final/jboss-as-controller-client-7.1.1.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-links/2.3.4.Final/resteasy-links-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/2.3.4.Final/resteasy-jaxrs-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jackson-provider/2.3.4.Final/resteasy-jackson-provider-2.3.4.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/jaxrs-api/2.3.4.Final/jaxrs-api-2.3.4.Final.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/sasl/jboss-sasl/1.0.0.Final/jboss-sasl-1.0.0.Final.jar"/>
- <classpathentry exported="true" kind="var" path="JDK_HOME/lib/tools.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/mockito/mockito-all/1.9.0/mockito-all-1.9.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/powermock/powermock-api-mockito/1.4.12/powermock-api-mockito-1.4.12.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/powermock/powermock-core/1.4.12/powermock-core-1.4.12.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/powermock/powermock-api-support/1.4.12/powermock-api-support-1.4.12.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/powermock/powermock-module-testng-common/1.4.12/powermock-module-testng-common-1.4.12.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/powermock/powermock-module-testng/1.4.12/powermock-module-testng-1.4.12.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-api-mockito/1.4.11/powermock-api-mockito-1.4.11.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-core/1.4.11/powermock-core-1.4.11.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-api-support/1.4.11/powermock-api-support-1.4.11.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-module-testng-common/1.4.11/powermock-module-testng-common-1.4.11.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-module-testng/1.4.11/powermock-module-testng-1.4.11.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-api-mockito/1.4.12/powermock-api-mockito-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-core/1.4.12/powermock-core-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-api-support/1.4.12/powermock-api-support-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-module-testng-common/1.4.12/powermock-module-testng-common-1.4.12.jar"/>
++ <classpathentry exported="true" kind="var" path="M2_REPO/org/powermock/powermock-module-testng/1.4.12/powermock-module-testng-1.4.12.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/liquibase/liquibase-core/2.0.3/liquibase-core-2.0.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.0.1/shrinkwrap-impl-base-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-api/1.0.1/shrinkwrap-api-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-spi/1.0.1/shrinkwrap-spi-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0-alpha-3/shrinkwrap-descriptors-api-base-2.0.0-alpha-3.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api/1.0.0-beta-7/shrinkwrap-resolver-api-1.0.0-beta-7.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api-maven/1.0.0-beta-7/shrinkwrap-resolver-api-maven-1.0.0-beta-7.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/test/arquillian-test-spi/1.0.1.Final/arquillian-test-spi-1.0.1.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/test/arquillian-test-api/1.0.1.Final/arquillian-test-api-1.0.1.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/core/arquillian-core-spi/1.0.1.Final/arquillian-core-spi-1.0.1.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/core/arquillian-core-api/1.0.1.Final/arquillian-core-api-1.0.1.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/container/arquillian-container-spi/1.0.1.Final/arquillian-container-spi-1.0.1.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/container/arquillian-container-test-api/1.0.1.Final/arquillian-container-test-api-1.0.1.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/arquillian/testng/arquillian-testng-core/1.0.1.Final/arquillian-testng-core-1.0.1.Final.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1-20120531.064118-1.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.0.1/shrinkwrap-impl-base-1.0.1.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-api/1.0.1/shrinkwrap-api-1.0.1.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/shrinkwrap/shrinkwrap-spi/1.0.1/shrinkwrap-spi-1.0.1.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0-alpha-3/shrinkwrap-descriptors-api-base-2.0.0-alpha-3.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api/1.0.0-beta-7/shrinkwrap-resolver-api-1.0.0-beta-7.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-api-maven/1.0.0-beta-7/shrinkwrap-resolver-api-maven-1.0.0-beta-7.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/test/arquillian-test-spi/1.0.2.Final/arquillian-test-spi-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/test/arquillian-test-api/1.0.2.Final/arquillian-test-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/core/arquillian-core-spi/1.0.2.Final/arquillian-core-spi-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/core/arquillian-core-api/1.0.2.Final/arquillian-core-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/container/arquillian-container-spi/1.0.2.Final/arquillian-container-spi-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/container/arquillian-container-test-api/1.0.2.Final/arquillian-container-test-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/config/arquillian-config-api/1.0.2.Final/arquillian-config-api-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/container/arquillian-container-test-impl-base/1.0.2.Final/arquillian-container-test-impl-base-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/arquillian/testng/arquillian-testng-core/1.0.2.Final/arquillian-testng-core-1.0.2.Final.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/byteman/byteman/1.2.1/byteman-1.2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/2.0.0/jboss-ejb3-ext-api-2.0.0.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/ejb/jboss-ejb-api_3.1_spec/1.0.2.Final/jboss-ejb-api_3.1_spec-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/jms/jboss-jms-api_1.1_spec/1.0.0.Final/jboss-jms-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/interceptor/jboss-interceptors-api_1.1_spec/1.0.0.Final/jboss-interceptors-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.1_spec/1.0.0.Final/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/remotingjmx/remoting-jmx/1.0.2.Final/remoting-jmx-1.0.2.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/mozilla/rhino/1.7R4/rhino-1.7R4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/picketbox/picketbox/4.0.7.Final/picketbox-4.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/python/jython-standalone/2.5.2/jython-standalone-2.5.2.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var" path="JDK_HOME/lib/tools.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/joda-time/joda-time/2.1/joda-time-2.1.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
diff --cc pom.xml
index 2d9ee76,f8b3811..9703ef0
--- a/pom.xml
+++ b/pom.xml
@@@ -652,13 -543,29 +651,6 @@@
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- TODO: This is a workaround for the Javac bug requiring annotations to be
- available when compiling dependent classes. It is fixed in JDK 7. -->
- <!-- JPA annotations -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <!-- Hibernate annotations -->
- <dependency>
- <groupId>hibernate-annotations</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- JAXB annotations -->
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- end of workaround -->
-
</dependencies>
commit 2ec8d54cba53b668761c044937419a0e458d5a86
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Tue Nov 27 17:15:19 2012 +0100
[BZ-879583] Monitoring : process availability gives wrong status (SIGAR)
Remixed inital fix after review with Lukas
diff --git a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
index 9e9b95f..c85ec42 100644
--- a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
+++ b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
@@ -107,12 +107,16 @@ public class ProcessComponent implements ResourceComponent, MeasurementFacet {
}
private ProcessInfo getProcess() throws Exception {
+ if (this.process != null && this.process.isRunning()) {
+ // Refresh existing ProcessInfo when underlying process is apparently running.
+ // ProcessInfo may hold stale data.
+ // SIGAR objects do not get updated when a process goes down.
+ this.process.refresh();
+ }
if (this.process == null || !this.process.isRunning()) {
+ // Create ProcessInfo for the first time or when the underlying process is no longer running.
+ // When a process is no longer running we need to make a new PIQL or pid file discovery.
this.process = getProcessForConfiguration();
- } else {
- // Refresh previously existing ProcessInfo as it may hold stale data.
- // SIGAR objects do not get updated when, for example, a process goes down.
- process.refresh();
}
return this.process;
}
commit a14ee4d0b2fa606aff020ad32edd5af0a91f3eb5
Author: Jay Shaughnessy <jshaughn(a)jshaughn.csb>
Date: Tue Nov 27 10:32:28 2012 -0500
I have a feeling that we're not getting the translations we
expect due to the "default-value" syntax here. These properties
should be set anyway, so eliminate the defaults.
diff --git a/modules/enterprise/server/itests-2/pom.xml b/modules/enterprise/server/itests-2/pom.xml
index d22d090..f0c179f 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -481,10 +481,8 @@
</datasource>
<!-- FOR RHQ TESTING -->
<datasource jta="false" jndi-name="java:jboss/datasources/NoTxRHQDS" pool-name="NoTxRHQDS" enabled="true" use-java-context="true">
- <connection-url>${rhq.test.ds.connection-url:jdbc:postgresql://127.0.0.1:5432/rhq}</connection-url>
- <connection-property name="char.encoding">
- UTF-8
- </connection-property>
+ <connection-url>${rhq.test.ds.connection-url}</connection-url>
+ <connection-property name="char.encoding">UTF-8</connection-property>
<driver>postgres</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
@@ -507,15 +505,9 @@
</statement>
</datasource>
<xa-datasource jta="true" jndi-name="java:jboss/datasources/RHQDS" pool-name="RHQDS" enabled="true" use-java-context="true">
- <xa-datasource-property name="DatabaseName">
- ${rhq.test.ds.db-name:rhq}
- </xa-datasource-property>
- <xa-datasource-property name="PortNumber">
- ${rhq.test.ds.port:5432}
- </xa-datasource-property>
- <xa-datasource-property name="ServerName">
- ${rhq.test.ds.server-name:127.0.0.1}
- </xa-datasource-property>
+ <xa-datasource-property name="DatabaseName">${rhq.test.ds.db-name}</xa-datasource-property>
+ <xa-datasource-property name="PortNumber">${rhq.test.ds.port}</xa-datasource-property>
+ <xa-datasource-property name="ServerName">${rhq.test.ds.server-name}</xa-datasource-property>
<driver>postgres</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-pool>
@@ -566,10 +558,8 @@
</datasource>
<!-- FOR RHQ TESTING -->
<datasource jta="false" jndi-name="java:jboss/datasources/NoTxRHQDS" pool-name="NoTxRHQDS" enabled="true" use-java-context="true">
- <connection-url>${rhq.test.ds.connection-url:jdbc:oracle:thin:@127.0.0.1:1521:XE}</connection-url>
- <connection-property name="char.encoding">
- UTF-8
- </connection-property>
+ <connection-url>${rhq.test.ds.connection-url}</connection-url>
+ <connection-property name="char.encoding">UTF-8</connection-property>
<driver>oracle</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
@@ -593,7 +583,7 @@
</statement>
</datasource>
<xa-datasource jta="true" jndi-name="java:jboss/datasources/RHQDS" pool-name="RHQDS" enabled="true" use-java-context="true">
- <xa-datasource-property name="URL">${rhq.test.ds.connection-url:jdbc:oracle:thin:@127.0.0.1:1521:XE}</xa-datasource-property>
+ <xa-datasource-property name="URL">${rhq.test.ds.connection-url}</xa-datasource-property>
<xa-datasource-property name="ConnectionProperties">SetBigStringTryClob=true</xa-datasource-property>
<driver>oracle</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
commit abda861b4c4204adca7d08d3449e6d3ba50251f0
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Nov 26 11:07:46 2012 -0500
deleting test code that was just intended for prototyping
JaxbTest was used for some prototyping while I was working on the reports
export feature. It probably was committed on accident.
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java
deleted file mode 100644
index e5172f6..0000000
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/JaxbTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.rhq.enterprise.server.util;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import org.testng.annotations.Test;
-
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.shared.ResourceBuilder;
-import org.rhq.core.domain.util.PageList;
-
-public class JaxbTest {
-
- @Test
- public void writeFragments() throws Exception {
- Resource resource = new ResourceBuilder()
- .createRandomServer()
- .with(2).randomChildServers()
- .build();
-
- PageList<Resource> resources = new PageList<Resource>();
- resources.add(resource);
- resources.addAll(resource.getChildResources());
-
- JAXBContext context = JAXBContext.newInstance(Resource.class, PageList.class);
- Marshaller marshaller = context.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- System.out.println("<collection>\n");
- for (Resource r : resources) {
- marshaller.marshal(r, System.out);
- }
- System.out.println("</collection>\n");
-
- }
-
-}
commit 0a57f672d2993dd95244f5d38d0c95ddb876caf1
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Nov 26 12:18:17 2012 +0100
Randomizing ports in the JNDI access test. Maybe this will help the test
failures in the integration-tests Jenkins job.
diff --git a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
index 02be42c..d5a7e45 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
+++ b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
@@ -43,6 +43,7 @@ import org.unitils.thirdparty.org.apache.commons.io.FileUtils;
import org.rhq.core.util.file.FileUtil;
import org.rhq.core.util.stream.StreamUtil;
import org.rhq.plugins.apache.util.HttpdAddressUtility.Address;
+import org.rhq.test.PortScout;
import org.rhq.test.TokenReplacingProperties;
import org.rhq.test.TokenReplacingReader;
diff --git a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
deleted file mode 100644
index 3a33f09..0000000
--- a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-package org.rhq.plugins.apache.util;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.SocketAddress;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Tries to find a series of free ports.
- *
- * The ports remain open until the {@link #close()} method is called.
- *
- * @author Lukas Krejci
- */
-public class PortScout implements Closeable {
-
- private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
-
- public int getNextFreePort() throws IOException {
- ServerSocket s = new ServerSocket(0);
- activeSockets.add(s);
- return s.getLocalPort();
- }
-
- @Override
- public void close() throws IOException {
- String message = null;
- for(ServerSocket s : activeSockets) {
- SocketAddress addr = s.getLocalSocketAddress();
- try {
- s.close();
- } catch (IOException e) {
- if (message == null) {
- message = "The following test sockets failed to close while looking for free ports:\n";
- }
-
- message += addr.toString() + ": " + e.getMessage() + ",\n";
- }
- }
-
- if (message != null) {
- message = message.substring(0, message.length() - 2);
-
- throw new IOException(message);
- }
- }
-}
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 aed285e..36da98a 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -18,8 +18,6 @@
<rhq.server.datasource>java:/RHQDS</rhq.server.datasource>
<rhq.server.ds-mapping>PostgreSQL</rhq.server.ds-mapping>
<jboss-embeddable-ejb3.version>1.0.0.Alpha9</jboss-embeddable-ejb3.version>
- <jnp.port>54987</jnp.port>
- <jnp.rmiPort>54988</jnp.rmiPort>
</properties>
<dependencies>
@@ -323,8 +321,6 @@
<hibernate.dialect>${rhq.test.ds.hibernate-dialect}</hibernate.dialect>
<clean.db>${clean.db}</clean.db>
<test.server.jar.path>${settings.localRepository}/org/rhq/jndi-access-remote-server/${project.version}/jndi-access-remote-server-${project.version}.jar</test.server.jar.path>
- <jnp.port>${jnp.port}</jnp.port>
- <jnp.rmiPort>${jnp.rmiPort}</jnp.rmiPort>
</systemPropertyVariables>
<argLine>${jacoco.unit-test.args} -Djava.security.manager -Djava.security.policy==${basedir}/target/test-classes/security.policy</argLine>
<additionalClasspathElements>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
index e161230..abfd376 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
+++ b/modules/integration-tests/jndi-access/jndi-access-test/src/test/java/org/rhq/jndi/test/JndiAccessTest.java
@@ -48,6 +48,7 @@ import org.rhq.enterprise.client.LocalClient;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.jndi.AllowRhqServerInternalsAccessPermission;
+import org.rhq.test.PortScout;
/**
*
@@ -57,14 +58,28 @@ import org.rhq.jndi.AllowRhqServerInternalsAccessPermission;
@Test
public class JndiAccessTest extends AbstractEJB3Test {
private static final Log JNP_SERVER_LOG = LogFactory.getLog("Test JNP Server");
+ private static final Log LOG = LogFactory.getLog(JndiAccessTest.class);
private Process testServerProcess;
private Thread testServerStdErrReader;
private Thread testServerStdOutReader;
+ int jnpPort;
+
@BeforeClass
- @Parameters({"test.server.jar.path", "jnp.port", "jnp.rmiPort"})
- public void startTestJnpServer(String testServerJar, int jnpPort, int rmiPort) throws Exception {
+ @Parameters({ "test.server.jar.path" })
+ public void startTestJnpServer(String testServerJar) throws Exception {
+ int rmiPort = 0;
+ PortScout scout = new PortScout();
+
+ try {
+ jnpPort = scout.getNextFreePort();
+ rmiPort = scout.getNextFreePort();
+ } finally {
+ scout.close();
+ }
+
+ LOG.info("Starting the remote JNP server on jnpPort=" + jnpPort + ", rmiPort=" + rmiPort);
ProcessBuilder bld = new ProcessBuilder("java", "-Djnp.port=" + jnpPort, "-Djnp.rmiPort=" + rmiPort, "-jar", testServerJar);
testServerProcess = bld.start();
@@ -124,8 +139,7 @@ public class JndiAccessTest extends AbstractEJB3Test {
testServerStdOutReader.join();
}
- @Parameters("jnp.port")
- public void testRemoteConnectionWorkingFromJava(int jnpPort) throws Exception {
+ public void testRemoteConnectionWorkingFromJava() throws Exception {
Properties env = new Properties();
env.put("java.naming.factory.initial", "org.jboss.naming.NamingContextFactory");
env.put("java.naming.provider.url", "jnp://localhost:" + jnpPort);
@@ -153,8 +167,7 @@ public class JndiAccessTest extends AbstractEJB3Test {
}
}
- @Parameters("jnp.port")
- public void testRemoteJNDILookupWorksFromScripts(int jnpPort) throws Exception {
+ public void testRemoteJNDILookupWorksFromScripts() throws Exception {
Subject overlord = LookupUtil.getSubjectManager().getOverlord();
ScriptEngine engine = getEngine(overlord);
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml b/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
index ec09ed7..fd832e0 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/log4j.xml
@@ -19,7 +19,7 @@
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
- <param name="Threshold" value="WARN"/>
+ <param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Messagen -->
@@ -32,7 +32,7 @@
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="target/server-jar-test.log"/>
- <param name="Threshold" value="WARN"/>
+ <param name="Threshold" value="DEBUG"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
@@ -48,6 +48,14 @@
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.hibernate">
+ <priority value="WARN"/>
+ </category>
+
<!-- Hibernate logs WARNINGS frequent from this class, in test envs. -->
<category name="org.hibernate.hql.ast.QueryTranslatorImpl">
<priority value="ERROR"/>
diff --git a/modules/test-utils/src/main/java/org/rhq/test/PortScout.java b/modules/test-utils/src/main/java/org/rhq/test/PortScout.java
new file mode 100644
index 0000000..0c54cbd
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/PortScout.java
@@ -0,0 +1,69 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.test;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Tries to find a series of free ports.
+ *
+ * The ports remain open until the {@link #close()} method is called.
+ *
+ * @author Lukas Krejci
+ */
+public class PortScout implements Closeable {
+
+ private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
+
+ public int getNextFreePort() throws IOException {
+ ServerSocket s = new ServerSocket(0);
+ activeSockets.add(s);
+ return s.getLocalPort();
+ }
+
+ @Override
+ public void close() throws IOException {
+ String message = null;
+ for(ServerSocket s : activeSockets) {
+ SocketAddress addr = s.getLocalSocketAddress();
+ try {
+ s.close();
+ } catch (IOException e) {
+ if (message == null) {
+ message = "The following test sockets failed to close while looking for free ports:\n";
+ }
+
+ message += addr.toString() + ": " + e.getMessage() + ",\n";
+ }
+ }
+
+ if (message != null) {
+ message = message.substring(0, message.length() - 2);
+
+ throw new IOException(message);
+ }
+ }
+}
commit e6be4a4ef2a098c61e0629593a64d08a9e575a10
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Nov 26 11:46:54 2012 +0100
BZ 880136 - disable the Connections available trait by default.
(cherry-picked from c38b8eb, BZ 859417)
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
index 92370cb..2b14f5b 100644
--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
@@ -9,9 +9,9 @@
<!ENTITY datasourceAndConnectionFactoryMetrics '
<!-- Traits -->
- <metric property="custom.connectionAvailable" displayType="summary" displayName="Connection Available?"
- dataType="trait" category="availability" defaultInterval="900000"
- description="could a connection to the underlying data provider be obtained?"/>
+ <metric property="custom.connectionAvailable" displayType="detail" displayName="Connection Available?"
+ dataType="trait" category="availability" defaultInterval="900000" defaultOn="false"
+ description="could a connection to the underlying data provider be obtained? Please see the documentation before enabling this metric"/>
'>
<!ENTITY datasourceAndConnectionFactoryOperations '
commit 5c4217effa33ffd892f55005b09f7ed7201125f6
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Mon Nov 26 10:55:04 2012 +0100
[BZ-879583] Monitoring : process availability gives wrong status (SIGAR)
ProcessInfo instance needs to be refreshed on every avail check
diff --git a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
index 8281f70..9e9b95f 100644
--- a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
+++ b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/ProcessComponent.java
@@ -67,6 +67,7 @@ public class ProcessComponent implements ResourceComponent, MeasurementFacet {
private String piql;
private boolean fullProcessTree;
+ @Override
public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception {
this.resourceContext = resourceContext;
@@ -89,9 +90,11 @@ public class ProcessComponent implements ResourceComponent, MeasurementFacet {
}
}
+ @Override
public void stop() {
}
+ @Override
public AvailabilityType getAvailability() {
try {
return getProcess().isRunning() ? AvailabilityType.UP : AvailabilityType.DOWN;
@@ -106,6 +109,10 @@ public class ProcessComponent implements ResourceComponent, MeasurementFacet {
private ProcessInfo getProcess() throws Exception {
if (this.process == null || !this.process.isRunning()) {
this.process = getProcessForConfiguration();
+ } else {
+ // Refresh previously existing ProcessInfo as it may hold stale data.
+ // SIGAR objects do not get updated when, for example, a process goes down.
+ process.refresh();
}
return this.process;
}
@@ -168,6 +175,7 @@ public class ProcessComponent implements ResourceComponent, MeasurementFacet {
return processInfo;
}
+ @Override
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) {
if (this.process != null) {
this.process.refresh();
commit 844f016ee8b2608496d063c94f38461e997bcabe
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 23 17:18:35 2012 +0100
[BZ 879655] - Properly deactivate the resource instead of just calling the
component's stop() method when forcing reactivation of a started component.
This will ensure the PC can't enter an inconsistent state in the case the
stop() method fails.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index b3f7fa9..473b0d0 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -1614,7 +1614,10 @@ public class InventoryManager extends AgentService implements ContainerService,
if (forceReinitialization) {
switch (state) {
case STARTED:
- component.stop();
+ if (log.isDebugEnabled()) {
+ log.debug("Forcing re-initialization of an already started resource: " + resource);
+ }
+ deactivateResource(resource);
break;
case STARTING:
log.warn("Could not force initialization of component for resource [" + resource.getId()
@@ -2037,7 +2040,7 @@ public class InventoryManager extends AgentService implements ContainerService,
log.debug("Successfully deactivated resource with id [" + resource.getId() + "].");
}
} catch (Throwable t) {
- log.warn("Plugin Error: Failed to stop component for [" + resource + "].");
+ log.warn("Plugin Error: Failed to stop component for [" + resource + "].", t);
}
container.setResourceComponentState(ResourceComponentState.STOPPED);
commit 16f04c50bd9cffaed77c73338d5f31ffb0f9c451
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 23 17:12:43 2012 +0100
Improvements in Apache integration tests:
* improved logging
* randomization of used ports
* *WithoutSNMP tests don't use SNMP even after upgrade (makes the behavior more understandable)
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 8f8cdb6..aebea53 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
@@ -102,9 +102,6 @@ public class UpgradeTestBase extends PluginContainerTest {
boolean testFailed = false;
try {
- LOG.debug("---------------------------------------------------------- Starting the upgrade test for: "
- + testId);
-
String[] configFiles = Arrays.copyOf(testConfiguration.apacheConfigurationFiles, testConfiguration.apacheConfigurationFiles.length + 1);
configFiles[testConfiguration.apacheConfigurationFiles.length] = "/snmpd.conf";
@@ -114,7 +111,11 @@ public class UpgradeTestBase extends PluginContainerTest {
.withServerRoot(testConfiguration.serverRoot).withExePath(testConfiguration.binPath);
testConfiguration.beforeTestSetup(setup);
-
+
+ LOG.debug("---------------------------------------------------------- Starting the upgrade test for: "
+ + testId);
+ LOG.debug("Deployment configuration: " + setup.getDeploymentConfig());
+
setup.setup();
testConfiguration.beforePluginContainerStart(setup);
diff --git a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
index bc80898..02be42c 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
+++ b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/ApacheDeploymentUtil.java
@@ -19,7 +19,6 @@
package org.rhq.plugins.apache.util;
-import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
@@ -33,7 +32,6 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
@@ -198,10 +196,40 @@ public class ApacheDeploymentUtil {
tokenReplacements.put(LISTEN4, address4 == null ? "" : address4.toString(false, false));
}
}
+
+ @Override
+ public String toString() {
+ StringBuilder bld = new StringBuilder("VHost[");
+ if (address1 != null) {
+ bld.append(address1.toString()).append(", ");
+ }
+ if (address2 != null) {
+ bld.append(address2.toString()).append(", ");
+ }
+ if (address3 != null) {
+ bld.append(address3.toString()).append(", ");
+ }
+ if (address4 != null) {
+ bld.append(address4.toString()).append(", ");
+ }
+
+ String serverName = getServerName();
+ if (serverName != null) {
+ bld.append("serverName=").append(serverName).append(", ");
+ }
+
+ if (additionalDirectives != null) {
+ bld.append("with additional directives, ");
+ }
+
+ bld.replace(bld.length() - 2, bld.length(), "]");
+
+ return bld.toString();
+ }
}
public String serverRoot = null;
- public String documentRoot = "hdocs";
+ public String documentRoot = "htdocs";
public String snmpHost = "localhost";
public int snmpPort = 1610;
public final VHost mainServer = new VHost();
@@ -242,48 +270,69 @@ public class ApacheDeploymentUtil {
default: throw new IllegalArgumentException();
}
}
+
+ @Override
+ public String toString() {
+ return new StringBuilder("DeploymentConfig[").append("mainServer=").append(mainServer).append(", vhost1=")
+ .append(vhost1).append(", vhost2=").append(vhost2).append(", vhost3=").append(vhost3)
+ .append(", vhost4=").append(vhost4).append(", serverRoot=").append(serverRoot)
+ .append(", documentRoot=").append(documentRoot).append(", snmpHost=").append(snmpHost)
+ .append(", snmpPort=").append(snmpPort).append("]").toString();
+ }
}
public static void addDefaultVariables(Map<String, String> variables, String prefix) {
InetAddress localhost = determineLocalhost();
- checkOrAddDefault(variables, "localhost", localhost.getHostName());
- checkOrAddDefault(variables, "localhost.ip", localhost.getHostAddress());
- checkOrAddDefault(variables, "unresolvable.host", "unreachable.host.com");
- checkOrAddDefault(variables, "port1", "11675");
- checkOrAddDefault(variables, "port2", "11676");
- checkOrAddDefault(variables, "port3", "11677");
- checkOrAddDefault(variables, "port4", "11678");
-
- if (prefix != null && !prefix.trim().isEmpty()) {
- prefix += ".";
- } else {
- prefix = "";
+ PortScout portScout = new PortScout();
+ try {
+ checkOrAddDefault(variables, "localhost", localhost.getHostName());
+ checkOrAddDefault(variables, "localhost.ip", localhost.getHostAddress());
+ checkOrAddDefault(variables, "unresolvable.host", "unreachable.host.com");
+
+ checkOrAddDefault(variables, "port1", getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port2", getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port3", getRandomFreePort(portScout));
+ checkOrAddDefault(variables, "port4", getRandomFreePort(portScout));
+
+ if (prefix != null && !prefix.trim().isEmpty()) {
+ prefix += ".";
+ } else {
+ prefix = "";
+ }
+
+ checkOrAddDefault(variables, prefix + "snmp.port", getRandomFreePort(portScout));
+
+ checkOrAddDefault(variables, prefix + "listen1", "${port1}");
+ checkOrAddDefault(variables, prefix + "listen2", "${port2}");
+ checkOrAddDefault(variables, prefix + "listen3", "${port3}");
+ checkOrAddDefault(variables, prefix + "listen4", "${port4}");
+
+ checkOrAddDefault(variables, prefix + "vhost1.servername", "${localhost}:${port1}");
+ checkOrAddDefault(variables, prefix + "vhost1.urls", "${" + prefix + "vhost1.servername}");
+ checkOrAddDefault(variables, prefix + "vhost1.servername.directive", "ServerName ${" + prefix
+ + "vhost1.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost2.servername", "${localhost}:${port2}");
+ checkOrAddDefault(variables, prefix + "vhost2.urls", "${" + prefix + "vhost2.servername}");
+ checkOrAddDefault(variables, prefix + "vhost2.servername.directive", "ServerName ${" + prefix
+ + "vhost2.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost3.servername", "${localhost}:${port3}");
+ checkOrAddDefault(variables, prefix + "vhost3.urls", "${" + prefix + "vhost3.servername}");
+ checkOrAddDefault(variables, prefix + "vhost3.servername.directive", "ServerName ${" + prefix
+ + "vhost3.servername}");
+
+ checkOrAddDefault(variables, prefix + "vhost4.servername", "${localhost}:${port4}");
+ checkOrAddDefault(variables, prefix + "vhost4.urls", "${" + prefix + "vhost4.servername}");
+ checkOrAddDefault(variables, prefix + "vhost4.servername.directive", "ServerName ${" + prefix
+ + "vhost4.servername}");
+ } finally {
+ try {
+ portScout.close();
+ } catch (IOException e) {
+ throw new IllegalStateException(e);
+ }
}
-
- checkOrAddDefault(variables, prefix + "listen1", "${port1}");
- checkOrAddDefault(variables, prefix + "listen2", "${port2}");
- checkOrAddDefault(variables, prefix + "listen3", "${port3}");
- checkOrAddDefault(variables, prefix + "listen4", "${port4}");
-
- checkOrAddDefault(variables, prefix + "vhost1.servername", "${localhost}:${port1}");
- checkOrAddDefault(variables, prefix + "vhost1.urls", "${" + prefix + "vhost1.servername}");
- checkOrAddDefault(variables, prefix + "vhost1.servername.directive", "ServerName ${" + prefix
- + "vhost1.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost2.servername", "${localhost}:${port2}");
- checkOrAddDefault(variables, prefix + "vhost2.urls", "${" + prefix + "vhost2.servername}");
- checkOrAddDefault(variables, prefix + "vhost2.servername.directive", "ServerName ${" + prefix
- + "vhost2.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost3.servername", "${localhost}:${port3}");
- checkOrAddDefault(variables, prefix + "vhost3.urls", "${" + prefix + "vhost3.servername}");
- checkOrAddDefault(variables, prefix + "vhost3.servername.directive", "ServerName ${" + prefix
- + "vhost3.servername}");
-
- checkOrAddDefault(variables, prefix + "vhost4.servername", "${localhost}:${port4}");
- checkOrAddDefault(variables, prefix + "vhost4.urls", "${" + prefix + "vhost4.servername}");
- checkOrAddDefault(variables, prefix + "vhost4.servername.directive", "ServerName ${" + prefix
- + "vhost4.servername}");
}
private static void checkOrAddDefault(Map<String, String> map, String key, String value) {
@@ -433,4 +482,12 @@ public class ApacheDeploymentUtil {
}
}
};
+
+ private static String getRandomFreePort(PortScout scout) throws IllegalStateException {
+ try {
+ return Integer.toString(scout.getNextFreePort());
+ } catch (IOException e) {
+ throw new IllegalStateException("Failed to find a free port.", e);
+ }
+ }
}
diff --git a/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
new file mode 100644
index 0000000..3a33f09
--- /dev/null
+++ b/modules/integration-tests/apache-plugin-test/src/test/java/org/rhq/plugins/apache/util/PortScout.java
@@ -0,0 +1,69 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.plugins.apache.util;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Tries to find a series of free ports.
+ *
+ * The ports remain open until the {@link #close()} method is called.
+ *
+ * @author Lukas Krejci
+ */
+public class PortScout implements Closeable {
+
+ private Set<ServerSocket> activeSockets = new HashSet<ServerSocket>();
+
+ public int getNextFreePort() throws IOException {
+ ServerSocket s = new ServerSocket(0);
+ activeSockets.add(s);
+ return s.getLocalPort();
+ }
+
+ @Override
+ public void close() throws IOException {
+ String message = null;
+ for(ServerSocket s : activeSockets) {
+ SocketAddress addr = s.getLocalSocketAddress();
+ try {
+ s.close();
+ } catch (IOException e) {
+ if (message == null) {
+ message = "The following test sockets failed to close while looking for free ports:\n";
+ }
+
+ message += addr.toString() + ": " + e.getMessage() + ",\n";
+ }
+ }
+
+ if (message != null) {
+ message = message.substring(0, message.length() - 2);
+
+ throw new IOException(message);
+ }
+ }
+}
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 008588f..70151b7 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
@@ -19,7 +19,7 @@
<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"/>
+ <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} [%t] (%F:%M:%L) -%m%n"/>
</layout>
</appender>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
index 32f6477..10530b5 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/includes/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
index d0dd8ac..cbb9d66 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/mess/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue><!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
index d0dd8ac..1f97d99 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/nested/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
index 32f6477..10530b5 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.0/simple/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
index c3906be..987a9a0 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/includes/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
index 716773a..8557de3 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/mess/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
index 716773a..8557de3 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/nested/inventory-without-snmp.xml
@@ -284,7 +284,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
index c3906be..987a9a0 100644
--- a/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
+++ b/modules/integration-tests/apache-plugin-test/src/test/resources/mocked-inventories/rhq-3.0.1/simple/inventory-without-snmp.xml
@@ -512,7 +512,7 @@
<propertySimple>
<id>10876</id>
<name>snmpAgentPort</name>
- <stringValue>1610</stringValue>
+ <stringValue>${port1}</stringValue> <!-- intentionally wrong -->
</propertySimple>
<propertySimple>
<id>10877</id>
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index a07438d..2a2b839 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -292,7 +292,8 @@ public class ApacheServerComponent implements AugeasRHQComponent, ResourceCompon
availPingTime = System.currentTimeMillis() - t1;
} else {
if (log.isDebugEnabled()) {
- log.debug("Trying to ping the server for availability through SNMP.");
+ log.debug("Trying to ping the server for availability through SNMP "
+ + getSNMPAddressString(resourceContext.getPluginConfiguration()));
}
available = getSNMPSession().ping();
availPingTime = -1;
@@ -633,6 +634,14 @@ public class ApacheServerComponent implements AugeasRHQComponent, ResourceCompon
return snmpSession;
}
+ private static String getSNMPAddressString(Configuration pluginConfig) {
+ String host = pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_HOST).getStringValue();
+ String portString = pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_PORT).getStringValue();
+ String community = pluginConfig.getSimple(PLUGIN_CONFIG_PROP_SNMP_AGENT_COMMUNITY).getStringValue();
+
+ return host + ":" + portString + "/" + community;
+ }
+
/**
* Return the absolute path of this Apache server's server root (e.g. "C:\Program Files\Apache Group\Apache2").
*
commit 8b0919aceedac820bcbd2beb9408b1795cc32c8d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Nov 21 17:00:07 2012 +0100
stuff to help debug the apache integration test failures.
diff --git a/modules/enterprise/scripting/javascript/pom.xml b/modules/enterprise/scripting/javascript/pom.xml
index ab35acb..ee5e4ba 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -27,6 +27,10 @@
</dependency>
</dependencies>
+ <properties>
+ <failIfNoTests>true</failIfNoTests>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -61,7 +65,7 @@
-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>
+ <failIfNoTests>${failIfNoTests}</failIfNoTests>
</configuration>
</plugin>
</plugins>
diff --git a/modules/enterprise/scripting/python/pom.xml b/modules/enterprise/scripting/python/pom.xml
index e4b3cfb..fc64086 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -10,6 +10,10 @@
<name>RHQ Python support</name>
<description>Provides RHQ scripting in Python using Jython</description>
+ <properties>
+ <failIfNoTests>true</failIfNoTests>
+ </properties>
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -60,7 +64,7 @@
-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>
+ <failIfNoTests>${failIfNoTests}</failIfNoTests>
</configuration>
</plugin>
</plugins>
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index 8ccef7f..a07438d 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -283,18 +283,31 @@ public class ApacheServerComponent implements AugeasRHQComponent, ResourceCompon
boolean available;
try {
if (this.url != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to ping the server for availability: " + this.url);
+ }
long t1 = System.currentTimeMillis();
int timeout = PluginUtility.getAvailabilityFacetTimeout();
available = WWWUtils.isAvailable(this.url, timeout);
availPingTime = System.currentTimeMillis() - t1;
} else {
+ if (log.isDebugEnabled()) {
+ log.debug("Trying to ping the server for availability through SNMP.");
+ }
available = getSNMPSession().ping();
availPingTime = -1;
}
} catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.debug("Exception while checking availability.", e);
+ }
available = false;
}
+ if (log.isDebugEnabled()) {
+ log.debug("Availability determined: " + (available ? AvailabilityType.UP : AvailabilityType.DOWN));
+ }
+
return (available) ? AvailabilityType.UP : AvailabilityType.DOWN;
}
commit bed7fb96f03e50db87a8b9699846e6f51b24584a
Author: Thomas SEGISMONT <tsegismo(a)redhat.com>
Date: Fri Nov 23 11:37:42 2012 +0100
Fix Eclipse classpath file
GWT -> 2.5.0
joda-time was missing
diff --git a/.classpath b/.classpath
index e452825..e2d8841 100644
--- a/.classpath
+++ b/.classpath
@@ -269,8 +269,8 @@
<classpathentry exported="true" kind="var" path="M2_REPO/jboss/web/jbossweb/2.0.1.GA/jbossweb-2.0.1.GA.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/libvirt/libvirt/0.4.1/libvirt-0.4.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/fedorahosted/cobbler/cobbler4j/0.1/cobbler4j-0.1.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/smartgwt/smartgwt/3.0/smartgwt-3.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/googlecode/gflot/gflot/2.4.2/gflot-2.4.2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/jcraft/jsch/0.1.29/jsch-0.1.29.jar"/>
@@ -316,5 +316,6 @@
<classpathentry exported="true" kind="var" path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1-20120531.064118-1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/byteman/byteman/1.2.1/byteman-1.2.1.jar"/>
<classpathentry kind="var" path="M2_REPO/com/wordnik/swagger-annotations_2.9.1/1.1.1-SNAPSHOT/swagger-annotations_2.9.1-1.1.1-20121031.024335-6.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/joda-time/joda-time/2.1/joda-time-2.1.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
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.
11 years, 5 months
[rhq] Branch 'jkremser/ha-jsf-to-gwt-rewrite' - 36 commits - code-coverage/pom.xml etc/apt etc/greasemonkey etc/guiperftests modules/cli-tests modules/common modules/core modules/enterprise modules/helpers modules/integration-tests modules/plugins modules/pom.xml modules/test-utils pom.xml release.sh
by Jiri Kremser
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. -->
11 years, 5 months