chkdist.sh
| 136 ++++
modules/core/dbutils/pom.xml
| 2
modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/OperationScheduleIdSetterUpgradeTask.java
| 10
modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/ResourceAncestryUpgradeTask.java
| 25
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
| 39 -
modules/enterprise/gui/coregui/pom.xml
| 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
| 51 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
| 18
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
| 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java
| 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
| 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryView.java
| 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
| 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
| 13
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
| 29
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
| 4
modules/enterprise/server/container/pom.xml
| 36 -
publish_release.sh
| 318 ++++++++++
18 files changed, 614 insertions(+), 100 deletions(-)
New commits:
commit 3f081f6dc8e72c207bc0bacb8465f8d6195418d7
Merge: ba33706 341a653
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed May 4 15:25:27 2011 +0200
Merge branch 'master' into as7plugin
commit 341a6533382ceee1bd134bbe346fc593ea75d90d
Merge: ae4f1ec f8d1ed1
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed May 4 15:25:09 2011 +0200
Merge branch 'master' of
ssh://git.fedorahosted.org/git/rhq/rhq
commit f8d1ed14a40dd8a5fb6e798f4317f00e810f640f
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue May 3 20:52:47 2011 -0400
call CoreGUI.goToView(), rather than History.newItem(), in native event handler
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index a41031d..09ca49b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -161,10 +161,10 @@ public class CoreGUI implements EntryPoint,
ValueChangeHandler<String>, Event.Na
// make sure it's not a hyperlink that GWT already handles
if (element.getPropertyString("__listener") == null) {
String url = element.getAttribute("href");
- String token = getHistoryToken(url);
- if (token != null) {
- GWT.log("Forcing History.newItem(\"" + token +
"\")...");
- History.newItem(token);
+ String viewPath = getViewPath(url);
+ if (viewPath != null) {
+ GWT.log("Forcing CoreGUI.goToView(\"" +
viewPath + "\")...");
+ CoreGUI.goToView(viewPath);
nativeEvent.preventDefault();
}
}
@@ -173,7 +173,7 @@ public class CoreGUI implements EntryPoint,
ValueChangeHandler<String>, Event.Na
}
}
- private static String getHistoryToken(String url) {
+ private static String getViewPath(String url) {
String token;
if (url.startsWith("#")) {
token = url.substring(1);
@@ -537,4 +537,5 @@ public class CoreGUI implements EntryPoint,
ValueChangeHandler<String>, Event.Na
public static boolean isDebugMode() {
return !GWT.isScript();
}
+
}
commit 4c0c992c2b1ebb560a6d4e9666591614ff1ff7c0
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue May 3 17:43:04 2011 -0400
add magic Event.NativePreviewHandler that makes anchor tags not reload the whole page
in IE; remove unused printWidgetTree method
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index 47a5c1f..a41031d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -22,10 +22,13 @@ import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.EventTarget;
+import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
@@ -54,7 +57,6 @@ import
org.rhq.enterprise.gui.coregui.client.test.TestRemoteServiceStatisticsVie
import org.rhq.enterprise.gui.coregui.client.test.TestDataSourceResponseStatisticsView;
import org.rhq.enterprise.gui.coregui.client.test.TestTopView;
import org.rhq.enterprise.gui.coregui.client.util.ErrorHandler;
-import org.rhq.enterprise.gui.coregui.client.util.WidgetUtility;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.message.MessageCenter;
import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
@@ -65,7 +67,7 @@ import
org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* @author Greg Hinkle
* @author Ian Springer
*/
-public class CoreGUI implements EntryPoint, ValueChangeHandler<String> {
+public class CoreGUI implements EntryPoint, ValueChangeHandler<String>,
Event.NativePreviewHandler {
public static final String CONTENT_CANVAS_ID = "BaseContent";
@@ -121,6 +123,8 @@ public class CoreGUI implements EntryPoint,
ValueChangeHandler<String> {
coreGUI = this;
+ Event.addNativePreviewHandler(this);
+
registerPageKeys();
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
@@ -147,6 +151,42 @@ public class CoreGUI implements EntryPoint,
ValueChangeHandler<String> {
loadingPanel.removeFromParent();
}
+ public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
+ if (SC.isIE() && event.getTypeInt() == Event.ONCLICK) {
+ NativeEvent nativeEvent = event.getNativeEvent();
+ EventTarget target = nativeEvent.getEventTarget();
+ if (Element.is(target)) {
+ Element element = Element.as(target);
+ if ("a".equalsIgnoreCase(element.getTagName())) {
+ // make sure it's not a hyperlink that GWT already handles
+ if (element.getPropertyString("__listener") == null) {
+ String url = element.getAttribute("href");
+ String token = getHistoryToken(url);
+ if (token != null) {
+ GWT.log("Forcing History.newItem(\"" + token +
"\")...");
+ History.newItem(token);
+ nativeEvent.preventDefault();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static String getHistoryToken(String url) {
+ String token;
+ if (url.startsWith("#")) {
+ token = url.substring(1);
+ } else if (url.startsWith("/#")) {
+ token = url.substring(2);
+ } else if (url.contains(Location.getHost()) && url.indexOf('#')
> 0) {
+ token = url.substring(url.indexOf('#') + 1);
+ } else {
+ token = null;
+ }
+ return token;
+ }
+
private void registerPageKeys() {
if (isDebugMode()) {
KeyIdentifier debugKey = new KeyIdentifier();
@@ -310,10 +350,6 @@ public class CoreGUI implements EntryPoint,
ValueChangeHandler<String> {
return errorHandler;
}
- public static void printWidgetTree() {
- WidgetUtility.printWidgetTree(coreGUI.rootCanvas);
- }
-
private static String getDefaultView() {
// TODO: should this be Dashboard or a User Preference?
return DEFAULT_VIEW;
commit 3a5aab6588c68bab424a0269942aa11e2a602b92
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue May 3 16:10:45 2011 -0400
BZ 701774 - ignore when a condition value cannot be converted to a Double - its
probably a trait and can't be converted anyway
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
index 6475640..b3574bc 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
@@ -374,8 +374,13 @@ public class AlertDataSource extends RPCDataSource<Alert,
AlertCriteria> {
conditionText =
AlertFormatUtility.formatAlertConditionForDisplay(condition);
conditionValue = conditionLog.getValue();
if (condition.getMeasurementDefinition() != null) {
- conditionValue =
MeasurementConverterClient.format(Double.valueOf(conditionLog.getValue()), condition
- .getMeasurementDefinition().getUnits(), true);
+ try {
+ conditionValue =
MeasurementConverterClient.format(Double.valueOf(conditionLog.getValue()),
+ condition.getMeasurementDefinition().getUnits(), true);
+ } catch (Exception e) {
+ // the condition log value was probably not a number (most likely a
trait). Ignore this exception.
+ // even if any other errors occur trying to format the value, ignore
this and just use the raw value string
+ }
}
} else {
conditionText = MSG.view_alerts_field_condition_text_none();
@@ -393,8 +398,13 @@ public class AlertDataSource extends RPCDataSource<Alert,
AlertCriteria> {
dc.setAttribute("text",
AlertFormatUtility.formatAlertConditionForDisplay(condition));
String value = log.getValue();
if (condition.getMeasurementDefinition() != null) {
- value = MeasurementConverterClient.format(Double.valueOf(log.getValue()),
condition
- .getMeasurementDefinition().getUnits(), true);
+ try {
+ value =
MeasurementConverterClient.format(Double.valueOf(log.getValue()), condition
+ .getMeasurementDefinition().getUnits(), true);
+ } catch (Exception e) {
+ // the condition log value was probably not a number (most likely a
trait). Ignore this exception.
+ // even if any other errors occur trying to format the value, ignore
this and just use the raw value string
+ }
}
dc.setAttribute("value", value);
conditions[i++] = dc;
commit 85349670fb3e4fc3b99c3a99afe3e387869b6587
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue May 3 14:45:16 2011 -0400
BZ 696753 and 701314
bump up the timeout when importing, ignoring and unignoring from the auto-discovery
queue.
in addition, if any timeout occurs anywhere in the ui, we'll log it as a Warning
now and give the user
some information about what is happening (i.e the request timed out, the server may
still be processing the request and to wait and see if it succeeded)
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index a1d1403..6dde533 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -74,7 +74,7 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
private ToolStrip footer;
private DataSource dataSource;
- private ResourceGWTServiceAsync resourceService =
GWTServiceLookup.getResourceService();
+ private ResourceGWTServiceAsync resourceService =
GWTServiceLookup.getResourceService(60000);
public ResourceAutodiscoveryView(String locatorId) {
super(locatorId);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
index e54ee38..3ce2f52 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/ErrorHandler.java
@@ -25,6 +25,7 @@ import com.allen_sauer.gwt.log.client.Log;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
/**
* @author Greg Hinkle
@@ -42,7 +43,17 @@ public class ErrorHandler {
}
public void handleError(String message, Throwable t) {
- Message errorMessage = new Message(message, t, Message.Severity.Error);
+ Severity severity;
+
+ if ((t != null) && (t instanceof
com.google.gwt.http.client.RequestTimeoutException)) {
+ // if its a timeout exception, log it as a warning since the request might
still complete on the server
+ severity = Message.Severity.Warning;
+ message = MSG.common_msg_asyncTimeout(message);
+ } else {
+ severity = Message.Severity.Error;
+ }
+
+ Message errorMessage = new Message(message, t, severity);
CoreGUI.getMessageCenter().notify(errorMessage);
if (t != null) {
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 cf9dbbc..0f75682 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
@@ -231,6 +231,9 @@ common_msg_noItemsToShow = No items to show
common_msg_notYetImplemented = Not Yet Implemented
common_msg_see_more = see more...
common_msg_step_x_of_y = Step {0} of {1}
+common_msg_asyncTimeout = {0}. This occurred because the server is taking a long time to
complete this request. \
+Please be aware that the server may still be processing your request and it may complete
shortly. \
+You can check the server logs to see if any abnormal errors occurred.
# Common Values
#--------------
commit 24a49a6d06f87cff4251da3f438efa63b77a9072
Merge: 4ea1e7e dcdd7f2
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue May 3 10:29:09 2011 -0400
Merge branch 'master' of
ssh://git.fedorahosted.org/git/rhq/rhq
commit 4ea1e7edd0b669faeb7e52cccfe392ee06ce85ab
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue May 3 10:28:27 2011 -0400
Removing hudson hack profile now that extra steps hudson plugin is available
diff --git a/modules/enterprise/server/container/pom.xml
b/modules/enterprise/server/container/pom.xml
index 4905ef7..b4116aa 100644
--- a/modules/enterprise/server/container/pom.xml
+++ b/modules/enterprise/server/container/pom.xml
@@ -431,42 +431,6 @@
</plugins>
</build>
</profile>
-
- <!--
- As the profile id indicates, this is a short-term temporary hack until
- our hudson server gets the M2 Extra Build Steps plugin involved. Once
- that plugin is available, this profile along with the shell script it
- references will be removed.
- -->
- <profile>
- <id>hudson-hack</id>
- <activation>
- <property>
- <name>hudson.hack</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-plugin-zip</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
-
<executable>${basedir}/src/main/shell/zip_all_plugins</executable>
- <workingDirectory>../../../</workingDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
</project>
commit ae4f1ec7485c7a15de42a9a5554069867e7a1a7d
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon May 2 15:49:08 2011 +0200
BZ 667218 - create operation schedule sequence on upgrade
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 50ad317..64af8e7 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,7 +22,7 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.106</db.schema.version>
+ <db.schema.version>2.107</db.schema.version>
</properties>
<dependencies>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 57f82f0..b7f801f 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3204,7 +3204,7 @@
<!-- give the 'SUPER USER' and 'ALL RESOURCES' roles
permission to delete/purge events (this permission
previously did not exist, and event deletion/purging could be
performed by any user with authz to
view the resource/group in question).
-
+
a user with MANAGE_SECURITY must explicitly grant this permission to
other roles after upgrade-->
<schema-directSQL>
<statement desc="Inserting MANAGE_EVENTS permission for
'Super User' role">
@@ -3235,7 +3235,7 @@
</statement>
</schema-directSQL>
</schemaSpec>
-
+
<schemaSpec version="2.97">
<!-- Support subject-owned groups (e.g. autogroups) -->
<schema-addColumn table="RHQ_RESOURCE_GROUP"
column="SUBJECT_ID" columnType="INTEGER" />
@@ -3328,7 +3328,7 @@
REFERENCES RHQ_RESOURCE_GROUP (ID)
</statement>
</schema-directSQL>
-
+
<!-- Add category for distinguishing what kind of dashboard this is
-->
<schema-addColumn table="RHQ_DASHBOARD"
column="CATEGORY" columnType="VARCHAR2" precision="20"/>
<schema-directSQL>
@@ -3337,12 +3337,12 @@
SET CATEGORY = 'INVENTORY'
</statement>
</schema-directSQL>
- <schema-alterColumn table="RHQ_DASHBOARD"
column="CATEGORY" nullable="FALSE" />
+ <schema-alterColumn table="RHQ_DASHBOARD"
column="CATEGORY" nullable="FALSE" />
</schemaSpec>
<schemaSpec version="2.104">
<!-- package types no longer require to be coupled with a resource
type. They can exist on their own. -->
- <schema-alterColumn table="RHQ_PACKAGE_TYPE"
column="RESOURCE_TYPE_ID" nullable="true"/>
+ <schema-alterColumn table="RHQ_PACKAGE_TYPE"
column="RESOURCE_TYPE_ID" nullable="true"/>
</schemaSpec>
<schemaSpec version="2.105">
@@ -3367,12 +3367,12 @@
REFERENCES RHQ_SUBJECT (ID)
</statement>
</schema-directSQL>
-
+
<!-- Now add modify the permissions to give all the roles with
MANAGE_INVENTORY
the new MANAGE_REPOSITORIES privilege so that people's privs remain
unchanged. -->
<schema-directSQL>
<statement>
- INSERT INTO RHQ_PERMISSION (role_id, operation)
+ INSERT INTO RHQ_PERMISSION (role_id, operation)
SELECT role_id, 15 FROM RHQ_PERMISSION WHERE operation = 1
</statement>
</schema-directSQL>
@@ -3381,9 +3381,12 @@
<schemaSpec version="2.106">
<!-- add pre-computed disambiguated name for Resource -->
<schema-addColumn table="RHQ_RESOURCE"
column="ANCESTRY" columnType="VARCHAR2" precision="4000"
/>
- <schema-javaTask className="ResourceAncestryUpgradeTask"
/>
+ <schema-javaTask className="ResourceAncestryUpgradeTask"
/>
</schemaSpec>
+ <schemaSpec version="2.107">
+ <schema-createSequence name="RHQ_OPERATION_SCHEDULE_ID_SEQ"
initial="10001"/>
+ </schemaSpec>
</dbupgrade>
</target>
</project>
commit dcdd7f2581e36451ab8a9b9fe8916be87fe8e2fb
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Apr 29 16:47:21 2011 -0400
[BZ 700868 - RHQ3 ---> RHQ4 Upgrade error with Oracle]
More upgrade fixes, oracle-specific but postgres should retested now.
diff --git
a/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/ResourceAncestryUpgradeTask.java
b/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/ResourceAncestryUpgradeTask.java
index d07e09b..60727eb 100644
---
a/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/ResourceAncestryUpgradeTask.java
+++
b/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/ResourceAncestryUpgradeTask.java
@@ -18,6 +18,7 @@
*/
package org.rhq.core.db.upgrade;
+import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
@@ -50,8 +51,16 @@ public class ResourceAncestryUpgradeTask implements DatabaseUpgradeTask
{
+ " res.RESOURCE_TYPE_ID=rt.ID and
rt.CATEGORY='PLATFORM'";
List<Object[]> rs = databaseType.executeSelectSql(connection, sql);
for (Object[] result : rs) {
- int rtId = (Integer) result[0];
- int resId = (Integer) result[1];
+ int rtId;
+ int resId;
+
+ if (result[0] instanceof BigDecimal) {
+ rtId = ((BigDecimal) result[0]).intValue();
+ resId = ((BigDecimal) result[1]).intValue();
+ } else {
+ rtId = (Integer) result[0];
+ resId = (Integer) result[1];
+ }
String resName = (String) result[2];
handleChildren(rtId, resId, resName, null);
@@ -66,8 +75,16 @@ public class ResourceAncestryUpgradeTask implements DatabaseUpgradeTask
{
+ " res.RESOURCE_TYPE_ID=rt.ID and res.PARENT_RESOURCE_ID=" +
parentResId;
List<Object[]> rs = databaseType.executeSelectSql(connection, sql);
for (Object[] result : rs) {
- int rtId = (Integer) result[0];
- int resId = (Integer) result[1];
+ int rtId;
+ int resId;
+
+ if (result[0] instanceof BigDecimal) {
+ rtId = ((BigDecimal) result[0]).intValue();
+ resId = ((BigDecimal) result[1]).intValue();
+ } else {
+ rtId = (Integer) result[0];
+ resId = (Integer) result[1];
+ }
String resName = (String) result[2];
String ancestry = getAncestry(parentRtId, parentResId, parentResName,
parentAncestry);
String updateSql = "update RHQ_RESOURCE set ANCESTRY='" +
ancestry + "' where ID=" + resId;
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 57f82f0..a82c9bf 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3288,10 +3288,14 @@
<!-- Finally, make ID the primary key, rather than (JOB_NAME,
JOB_GROUP), and make
(JOB_NAME, JOB_GROUP) a unique index instead. -->
<schema-directSQL>
- <statement desc="Changing primary key of
RHQ_OPERATION_SCHEDULE to ID...">
- ALTER TABLE RHQ_OPERATION_SCHEDULE DROP CONSTRAINT
RHQ_OPERATION_SCHEDULE_KEY;
- ALTER TABLE RHQ_OPERATION_SCHEDULE ADD PRIMARY KEY (ID);
- CREATE UNIQUE INDEX RHQ_OPERATION_SCHEDULE_KEY_IDX ON
RHQ_OPERATION_SCHEDULE (JOB_NAME, JOB_GROUP);
+ <statement desc="Changing primary key of
RHQ_OPERATION_SCHEDULE to ID. Step1/3...">
+ ALTER TABLE RHQ_OPERATION_SCHEDULE DROP CONSTRAINT
RHQ_OPERATION_SCHEDULE_KEY
+ </statement>
+ <statement desc="Changing primary key of
RHQ_OPERATION_SCHEDULE to ID. Step2/3...">
+ ALTER TABLE RHQ_OPERATION_SCHEDULE ADD PRIMARY KEY (ID)
+ </statement>
+ <statement desc="Changing primary key of
RHQ_OPERATION_SCHEDULE to ID. Step3/3...">
+ CREATE UNIQUE INDEX RHQ_OPERATION_SCHEDULE_KEY_IDX ON
RHQ_OPERATION_SCHEDULE (JOB_NAME, JOB_GROUP)
</statement>
</schema-directSQL>
</schemaSpec>
@@ -3350,15 +3354,13 @@
<schema-addColumn table="RHQ_REPO"
column="IS_PRIVATE" columnType="BOOLEAN" />
<schema-directSQL>
<statement targetDBVendor="postgresql" desc="Set
is_private flag for existing repos to false">
- UPDATE RHQ_REPO
- SET IS_PRIVATE = false
+ UPDATE RHQ_REPO SET IS_PRIVATE = false
</statement>
<statement targetDBVendor="oracle" desc="Set
is_private flag for existing repos to false">
- UPDATE RHQ_REPO
- SET IS_PRIVATE = 0
+ UPDATE RHQ_REPO SET IS_PRIVATE = 0
</statement>
</schema-directSQL>
- <schema-alterColumn table="RHQ_REPO"
column="IS_PRIVATE" nullable="FALSE" default="TRUE"/>
+ <schema-alterColumn table="RHQ_REPO"
column="IS_PRIVATE" nullable="FALSE"/>
<schema-directSQL>
<statement desc="Creating OWNER_ID foreign key relation on
RHQ_REPO">
ALTER TABLE RHQ_REPO
commit b808940a9b0104de15f561ae45c0b9b643f43f42
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Apr 29 14:50:34 2011 -0400
[BZ 700868 - RHQ3 ---> RHQ4 Upgrade error with Oracle]
remove terminating semi-colons in queries. oracle does not like this.
diff --git
a/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/OperationScheduleIdSetterUpgradeTask.java
b/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/OperationScheduleIdSetterUpgradeTask.java
index 58692c9..1d4c445 100644
---
a/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/OperationScheduleIdSetterUpgradeTask.java
+++
b/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/OperationScheduleIdSetterUpgradeTask.java
@@ -38,23 +38,23 @@ public class OperationScheduleIdSetterUpgradeTask implements
DatabaseUpgradeTask
@Override
public void execute(DatabaseType databaseType, Connection connection) throws
SQLException {
- String selectSQL = "SELECT job_name FROM rhq_operation_schedule;";
+ String selectSQL = "SELECT job_name FROM rhq_operation_schedule";
System.out.println("Executing: " + selectSQL);
List<Object[]> results = databaseType.executeSelectSql(connection,
selectSQL);
Map<Long, String> sortedJobNames = new TreeMap<Long, String>();
for (Object[] result : results) {
- String jobName = (String)result[0]; // e.g.:
rhq-resource-10001--121207376-1292542028679
+ String jobName = (String) result[0]; // e.g.:
rhq-resource-10001--121207376-1292542028679
// last portion is the job's creation time, e.g.: 1292542028679
Long ctime = Long.valueOf(jobName.substring(jobName.lastIndexOf('-')
+ 1));
sortedJobNames.put(ctime, jobName);
}
int id = 10001;
for (String jobName : sortedJobNames.values()) {
- String updateSQL = "UPDATE rhq_operation_schedule SET id = " +
(id++) + " WHERE job_name = '" + jobName +
- "';";
+ String updateSQL = "UPDATE rhq_operation_schedule SET id = " +
(id++) + " WHERE job_name = '" + jobName
+ + "'";
System.out.println("Executing: " + updateSQL);
databaseType.executeSql(connection, updateSQL);
}
}
-
+
}
commit e2c5380318047627b1d6993dc74e1c9900754ae6
Merge: 1d6a2a8 e512102
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Apr 29 12:39:30 2011 -0400
Merge branch 'master' of
ssh://git.fedorahosted.org/git/rhq/rhq
commit 1d6a2a898ee925a35d6160e61a2095dbd37476f5
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Apr 29 11:03:38 2011 -0400
Uncomment if block to allow maven to deploy artifacts
diff --git a/publish_release.sh b/publish_release.sh
index 534de03..3e5b0c4 100755
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -196,11 +196,11 @@ if [ -z "$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS" ]; then
MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS="6"
fi
-#if [ "$MODE" = "production" ] && [ "$RELEASE_TYPE"
= "community" ]; then
-# MAVEN_RELEASE_PERFORM_GOAL="deploy"
-#else
+if [ "$MODE" = "production" ] && [ "$RELEASE_TYPE"
= "community" ]; then
+ MAVEN_RELEASE_PERFORM_GOAL="deploy"
+else
MAVEN_RELEASE_PERFORM_GOAL="install"
-#fi
+fi
# Set the system character encoding to ISO-8859-1 to ensure i18log reads its
commit 1c2ebdc48061732d8da6c6c1ac842d9ac0fa7ca2
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Apr 29 10:56:39 2011 -0400
by default, GWT-compile support for both the "en" and "de"
locales
(cherry picked from commit e5121025d6c9c0588c28d31b84713e8e43955948)
diff --git a/modules/enterprise/gui/coregui/pom.xml
b/modules/enterprise/gui/coregui/pom.xml
index 7cff82b..b93f878 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -1,4 +1,5 @@
-<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">
+<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>
@@ -62,9 +63,9 @@
up gwt compilation. -->
<gwt.draftCompile>false</gwt.draftCompile>
- <!-- Set the default locale for the GUI. Currently supported locales are
"default" (for English) or "de" (for
- German). -->
- <gwt.locale>default</gwt.locale>
+ <!-- Comma-separated list of the locales that should be included during GWT
compilation. Currently supported
+ locales (i.e. locales for which we have localized message bundles) are
"en" and "de". -->
+ <gwt.locale>en,de</gwt.locale>
</properties>
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index a7b603d..f63dbd9 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -1,5 +1,5 @@
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
-
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.4//EN"
+
"http://google-web-toolkit.googlecode.com/svn/tags/2.0.4/distro-source/core/src/gwt-module.dtd">
<module>
@@ -89,17 +89,28 @@
The gwt.userAgent property is substituted by the Maven resources plugin
during the resources phase. The default value (defined in coregui/pom.xml)
is "ie6,ie8,gecko1_8,safari,opera" (i.e. all supported browsers,
except FF1).
- To override this value, specify the user.agent property on the mvn
- command line (e.g. -Duser.agent=gecko1_8) or in your ~/.m2/settings.xml.
+ To override this value, specify the gwt.userAgent property on the mvn
+ command line (e.g. -Dgwt.userAgent=gecko1_8) or in your ~/.m2/settings.xml.
-->
<set-property name="user.agent" value="${gwt.userAgent}"/>
- <!-- Support for locales ('en' need not be specified as long as
@DefaultLocale annotates
- the Constants, ConstantsWithLookup, and Messages class). Note, these other
locales
- must have a file suffixed with _<locale>.properties in the same
package/directory as
- the corresponding GWT i18n interface class resides.-->
- <!--<extend-property name="locale"
values="de,fr"/>-->
+ <!--
+ A comma-separated list of the supported locales.
+
+ Each of the locales, aside from the default locale (en) must have a message
+ bundle properties file suffixed with _<locale>.properties in the same
package
+ in which the corresponding GWT i18n interface class resides.
+
+ The gwt.locale property is substituted by the Maven resources plugin
+ during the resources phase. The default value (defined in coregui/pom.xml)
+ is "en,de", which are the languages for which we currently have
localized
+ messages. To override this value, specify the gwt.locale property on the
+ mvn command line (e.g. -Dgwt.locale=en) or in your ~/.m2/settings.xml.
+ -->
<extend-property name="locale" values="${gwt.locale}" />
+ <!-- If the user's locale is not supported, fallback to "en", rather
than the "default" locale. -->
+ <!-- TODO (ips, 04/29/11): Uncomment the below line once we upgrade to GWT 2.1 or
later. -->
+ <!--<set-property-fallback name="locale"
value="en"/>-->
<entry-point class='org.rhq.enterprise.gui.coregui.client.CoreGUI'/>
<entry-point class='org.rhq.enterprise.gui.coregui.client.SearchGUI'/>
commit aa71bbe4968a3289b5d41d4a2357330deae02182
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Apr 28 15:03:52 2011 -0400
Adding the rhq-publish-release profile to -P so it is activated
diff --git a/publish_release.sh b/publish_release.sh
index e15857f..534de03 100755
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -177,7 +177,7 @@ MAVEN_SETTINGS_FILE="$WORKSPACE/settings.xml"
PROJECT_GIT_URL="git://git.fedorahosted.org/rhq/rhq.git"
-MAVEN_ARGS="--settings $MAVEN_SETTINGS_FILE --batch-mode --errors
-Penterprise,dist,release"
+MAVEN_ARGS="--settings $MAVEN_SETTINGS_FILE --batch-mode --errors
-Prhq-publish-release,enterprise,dist"
if [ "$MODE" = "test" ]; then
MAVEN_ARGS="$MAVEN_ARGS -DskipTests=true"
commit 9995bc6ee8b1355d543ea986f222f8477e57b321
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Apr 28 14:46:43 2011 -0400
Fixing error handling checking for script args
diff --git a/publish_release.sh b/publish_release.sh
index 177a11b..e15857f 100755
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -35,7 +35,7 @@ usage()
# Process command line args.
EXE=`basename $0`
-if [ "$#" -ne 6 ]; then
+if [ "$#" -ne 3 ]; then
usage
fi
RELEASE_TYPE="$1"
commit e5121025d6c9c0588c28d31b84713e8e43955948
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Apr 29 10:56:39 2011 -0400
by default, GWT-compile support for both the "en" and "de"
locales
diff --git a/modules/enterprise/gui/coregui/pom.xml
b/modules/enterprise/gui/coregui/pom.xml
index 7cff82b..b93f878 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -1,4 +1,5 @@
-<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">
+<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>
@@ -62,9 +63,9 @@
up gwt compilation. -->
<gwt.draftCompile>false</gwt.draftCompile>
- <!-- Set the default locale for the GUI. Currently supported locales are
"default" (for English) or "de" (for
- German). -->
- <gwt.locale>default</gwt.locale>
+ <!-- Comma-separated list of the locales that should be included during GWT
compilation. Currently supported
+ locales (i.e. locales for which we have localized message bundles) are
"en" and "de". -->
+ <gwt.locale>en,de</gwt.locale>
</properties>
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index a7b603d..f63dbd9 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -1,5 +1,5 @@
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
-
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.4//EN"
+
"http://google-web-toolkit.googlecode.com/svn/tags/2.0.4/distro-source/core/src/gwt-module.dtd">
<module>
@@ -89,17 +89,28 @@
The gwt.userAgent property is substituted by the Maven resources plugin
during the resources phase. The default value (defined in coregui/pom.xml)
is "ie6,ie8,gecko1_8,safari,opera" (i.e. all supported browsers,
except FF1).
- To override this value, specify the user.agent property on the mvn
- command line (e.g. -Duser.agent=gecko1_8) or in your ~/.m2/settings.xml.
+ To override this value, specify the gwt.userAgent property on the mvn
+ command line (e.g. -Dgwt.userAgent=gecko1_8) or in your ~/.m2/settings.xml.
-->
<set-property name="user.agent" value="${gwt.userAgent}"/>
- <!-- Support for locales ('en' need not be specified as long as
@DefaultLocale annotates
- the Constants, ConstantsWithLookup, and Messages class). Note, these other
locales
- must have a file suffixed with _<locale>.properties in the same
package/directory as
- the corresponding GWT i18n interface class resides.-->
- <!--<extend-property name="locale"
values="de,fr"/>-->
+ <!--
+ A comma-separated list of the supported locales.
+
+ Each of the locales, aside from the default locale (en) must have a message
+ bundle properties file suffixed with _<locale>.properties in the same
package
+ in which the corresponding GWT i18n interface class resides.
+
+ The gwt.locale property is substituted by the Maven resources plugin
+ during the resources phase. The default value (defined in coregui/pom.xml)
+ is "en,de", which are the languages for which we currently have
localized
+ messages. To override this value, specify the gwt.locale property on the
+ mvn command line (e.g. -Dgwt.locale=en) or in your ~/.m2/settings.xml.
+ -->
<extend-property name="locale" values="${gwt.locale}" />
+ <!-- If the user's locale is not supported, fallback to "en", rather
than the "default" locale. -->
+ <!-- TODO (ips, 04/29/11): Uncomment the below line once we upgrade to GWT 2.1 or
later. -->
+ <!--<set-property-fallback name="locale"
value="en"/>-->
<entry-point class='org.rhq.enterprise.gui.coregui.client.CoreGUI'/>
<entry-point class='org.rhq.enterprise.gui.coregui.client.SearchGUI'/>
commit c76a944d159c23baf04e0967d044504b782b85cd
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Thu Apr 28 16:40:47 2011 -0400
BZ 698607: fix issue with monitor portlet not retrieving details for autogroups and
erroneous msg.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
index f4fa675..ee1fbc5 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
@@ -121,9 +121,8 @@ public class GroupConfigurationUpdatesPortlet extends LocatableVLayout
implement
super(locatorId);
//figure out which page we're loading
String currentPage = History.getToken();
- String[] elements = currentPage.split("/");
this.groupId = groupId;
- baseViewPath = elements[0];
+ baseViewPath = AbstractActivityView.groupPathLookup(currentPage);
}
public GroupConfigurationUpdatesPortlet(String locatorId) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java
index 1c5b526..e45fbab 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java
@@ -114,10 +114,9 @@ public class GroupMetricsPortlet extends LocatableVLayout implements
CustomSetti
super(locatorId);
//figure out which page we're loading
String currentPage = History.getToken();
- String[] elements = currentPage.split("/");
int groupId = AbstractActivityView.groupIdLookup(currentPage);
this.groupId = groupId;
- baseViewPath = elements[0];
+ baseViewPath = AbstractActivityView.groupPathLookup(currentPage);
}
@Override
@@ -437,7 +436,7 @@ public class GroupMetricsPortlet extends LocatableVLayout implements
CustomSetti
LocatableDynamicForm row =
AbstractActivityView
.createEmptyDisplayRow(recentMeasurementsContent
.extendLocatorId("None"),
-
AbstractActivityView.RECENT_MEASUREMENTS_NONE);
+
AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE);
column.addMember(row);
} else {
//insert see more link
@@ -454,7 +453,7 @@ public class GroupMetricsPortlet extends LocatableVLayout implements
CustomSetti
LocatableDynamicForm row =
AbstractActivityView
.createEmptyDisplayRow(recentMeasurementsContent
.extendLocatorId("None"),
-
AbstractActivityView.RECENT_MEASUREMENTS_NONE);
+
AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE);
column.addMember(row);
}
setRefreshing(false);
@@ -465,7 +464,7 @@ public class GroupMetricsPortlet extends LocatableVLayout implements
CustomSetti
}
} else {
LocatableDynamicForm row =
AbstractActivityView.createEmptyDisplayRow(recentMeasurementsContent
- .extendLocatorId("None"),
AbstractActivityView.RECENT_MEASUREMENTS_NONE);
+ .extendLocatorId("None"),
AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE);
column.addMember(row);
setRefreshing(false);
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
index c1f1042..cc51b5d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
@@ -95,6 +95,7 @@ public abstract class AbstractActivityView extends LocatableVLayout
implements R
//retrieve localized text
public static String RECENT_MEASUREMENTS = MSG.common_title_recent_measurements();
public static String RECENT_MEASUREMENTS_NONE =
MSG.view_resource_inventory_activity_no_recent_metrics();
+ public static String RECENT_MEASUREMENTS_GROUP_NONE =
MSG.view_group_inventory_activity_no_recent_metrics();
public static String RECENT_ALERTS = MSG.common_title_recent_alerts();
public static String RECENT_ALERTS_NONE =
MSG.view_resource_inventory_activity_no_recent_alerts();
public static String RECENT_OOB = MSG.common_title_recent_oob_metrics();
@@ -636,19 +637,19 @@ public abstract class AbstractActivityView extends LocatableVLayout
implements R
return groupId;
}
- /* Utility method to extract groupId from
+ /* Utility method to extract group base path from current page
*
*/
public static String groupPathLookup(String currentPage) {
String groupBasePath = "";
if ((currentPage != null) && (!currentPage.trim().isEmpty())) {
String[] elements = currentPage.split("/");
- //process for groups and auto groups Ex. ResourceGroup/10111 or
ResourceGroup/AutoCluster/10321
+ //process for groups and auto groups Ex. ResourceGroup/10111 ,
ResourceGroup/AutoCluster/10321 , Resource/AutoGroup/10141
try {
Integer.valueOf(elements[1]);
groupBasePath = elements[0];
} catch (NumberFormatException nfe) {
- groupBasePath = elements[1] + "/" + elements[1];
+ groupBasePath = elements[0] + "/" + elements[1];
}
}
return groupBasePath;
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 01045ce..cf9dbbc 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
@@ -1854,6 +1854,7 @@ view_group_detail_failLoad = Failed to load group for group with ID
[{0}]
view_group_detail_failLoadComp = Failed to load group composite for group with ID [{0}]
view_group_detail_recursiveChange = You successfully changed the recursive setting for
group [{0}]
view_group_detail_failRecursiveChange = Failed to update the recursive setting for group
[{0}]
+view_group_inventory_activity_no_recent_metrics=This group has no recent metrics
view_group_membership_failFetch = Failed to fetch Resource Group
view_group_membership_saveFailure = Failed to update membership of group [{0}]
view_group_membership_saveSuccessful = You have updated the membership of group [{0}]
commit 6afd5f4136f620345213ada1685f6f27c96972d9
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Apr 28 13:16:52 2011 -0400
Removing variables that are needed for tagging but not for publishing
diff --git a/publish_release.sh b/publish_release.sh
index cbdcf6f..177a11b 100755
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -28,7 +28,7 @@ abort()
usage()
{
- abort "$@" "Usage: $EXE community|enterprise RELEASE_VERSION
DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production" "Example: $EXE
enterprise 3.0.0.GA 3.0.0-SNAPSHOT release-3.0.0 ips test"
+ abort "$@" "Usage: $EXE community|enterprise RELEASE_BRANCH
test|production" "Example: $EXE enterprise release-3.0.0 test"
}
@@ -42,11 +42,9 @@ RELEASE_TYPE="$1"
if [ "$RELEASE_TYPE" != "community" ] && [
"$RELEASE_TYPE" != "enterprise" ]; then
usage "Invalid release type: $RELEASE_TYPE (valid release types are
'community' or 'enterprise')"
fi
-RELEASE_VERSION="$2"
-DEVELOPMENT_VERSION="$3"
-RELEASE_BRANCH="$4"
-GIT_USERNAME="$5"
-MODE="$6"
+RELEASE_BRANCH="$2"
+MODE="$3"
+
if [ "$MODE" != "test" ] && [ "$MODE" !=
"production" ]; then
usage "Invalid mode: $MODE (valid modes are 'test' or
'production')"
fi
@@ -205,10 +203,6 @@ fi
#fi
-TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
-RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
-
-
# 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,
# since that is how the German and French I18NMessage annotation values are
@@ -233,10 +227,8 @@ echo "WORKING_DIR=$WORKING_DIR"
echo "PROJECT_NAME=$PROJECT_NAME"
echo "PROJECT_GIT_URL=$PROJECT_GIT_URL"
echo "RELEASE_TYPE=$RELEASE_TYPE"
-echo "RELEASE_VERSION=$RELEASE_VERSION"
echo "DEVELOPMENT_VERSION=$DEVELOPMENT_VERSION"
echo "RELEASE_BRANCH=$RELEASE_BRANCH"
-echo "RELEASE_TAG=$RELEASE_TAG"
echo "MODE=$MODE"
echo "MAVEN_LOCAL_REPO_DIR=$MAVEN_LOCAL_REPO_DIR"
echo
"MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS=$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS"
@@ -324,12 +316,3 @@ mvn $MAVEN_RELEASE_PERFORM_GOAL $MAVEN_ARGS -Ddbreset
[ "$?" -ne 0 ] && abort "Release build failed. Please see above
Maven output for details, fix any issues, then try again."
echo
echo "Release build succeeded!"
-
-
-echo
-echo "=============================== Release Info
=================================="
-echo "Version: $RELEASE_VERSION"
-echo "Branch URL:
$PROJECT_GIT_WEB_URL;a=shortlog;h=refs/heads/$RELEASE_BRANCH"
-echo "Tag URL: $PROJECT_GIT_WEB_URL;a=shortlog;h=refs/tags/$RELEASE_TAG"
-echo
"==============================================================================="
-
commit 65c380ab752343a24a1efd2119825cf070f3d698
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Apr 28 12:57:16 2011 -0400
Look for settings.xml in the workspace.
diff --git a/publish_release.sh b/publish_release.sh
index eb1ce04..cbdcf6f 100755
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -175,6 +175,8 @@ elif [ -z "$WORKING_DIR" ]; then
MAVEN_SETTINGS_FILE="$HOME/release/m2-settings.xml"
fi
+MAVEN_SETTINGS_FILE="$WORKSPACE/settings.xml"
+
PROJECT_GIT_URL="git://git.fedorahosted.org/rhq/rhq.git"
MAVEN_ARGS="--settings $MAVEN_SETTINGS_FILE --batch-mode --errors
-Penterprise,dist,release"
commit ec90b2f03d82ddf217cdc35b99b0cb52c15530c4
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Apr 28 12:48:09 2011 -0400
Removing the generated settings.xml from script
The generated settings.xml contained info like internal host names that
should not be put out in the public repo.
diff --git a/publish_release.sh b/publish_release.sh
old mode 100644
new mode 100755
index 71635b3..eb1ce04
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -167,7 +167,7 @@ if [ -n "$HUDSON_URL" ] && [ -n
"$WORKSPACE" ]; then
echo "We appear to be running in a Hudson job."
WORKING_DIR="$WORKSPACE"
MAVEN_LOCAL_REPO_DIR="$HOME/.m2/hudson-release-$RELEASE_TYPE-repository"
- MAVEN_SETTINGS_FILE="$HOME/.m2/hudson-$JOB_NAME-settings.xml"
+ #MAVEN_SETTINGS_FILE="$HOME/.m2/hudson-$JOB_NAME-settings.xml"
elif [ -z "$WORKING_DIR" ]; then
WORKING_DIR="$HOME/release/rhq"
MAVEN_LOCAL_REPO_DIR="$HOME/release/m2-repository"
@@ -270,55 +270,6 @@ if [ -f "$MAVEN_LOCAL_REPO_DIR" ]; then
fi
mkdir -p "$MAVEN_LOCAL_REPO_DIR"
-
-# Create the Maven settings file.
-cat <<EOF >"${MAVEN_SETTINGS_FILE}"
-<settings>
- <localRepository>$MAVEN_LOCAL_REPO_DIR</localRepository>
-
- <profiles>
-
- <profile>
- <id>release</id>
- <properties>
-<rhq.test.ds.server-name>vmg01.mw.lab.eng.bos.redhat.com</rhq.test.ds.server-name>
- <rhq.db.admin.username>jon2</rhq.db.admin.username>
- <rhq.db.admin.password>jboss42</rhq.db.admin.password>
- <rhq.test.ds.user-name>jon2</rhq.test.ds.user-name>
- <rhq.test.ds.password>jboss42</rhq.test.ds.password>
- <rhq.test.ds.db-name>rhq_release</rhq.test.ds.db-name>
-
<rhq.test.ds.connection-url>jdbc:postgresql://${rhq.test.ds.server-name}:5432/${rhq.test.ds.db-name}</rhq.test.ds.connection-url>
- <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.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>
-
- <DatabaseTest.nofail>true</DatabaseTest.nofail>
-
-
<rhq.testng.excludedGroups>agent-comm,comm-client,postgres-plugin,native-system</rhq.testng.excludedGroups>
-
- <gwt-plugin.extraJvmArgs>-Xms512M -Xmx1024M -XX:PermSize=256M
-XX:MaxPermSize=512M</gwt-plugin.extraJvmArgs>
- </properties>
- </profile>
-
- </profiles>
-
- <!-- This is used by the deploy plugin to publish release artifacts to the
jboss.org Nexus repo. -->
- <servers>
- <server>
- <id>jboss-releases-repository</id>
- <username>$JBOSS_ORG_USERNAME</username>
- <password>$JBOSS_ORG_PASSWORD</password>
- </server>
- </servers>
-
-</settings>
-EOF
-
# We only need to worry about cloning the repo if we are not running on hudson
if [ ! "$HUDSON_URL" ]; then
# Clone and/or checkout the source from git.
commit 8ae637d3f3deacbab62e093b8fd1e279250faf2d
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Apr 28 11:42:27 2011 -0400
Initial commit for publish_release script
This script is essentially the portion of the release.sh script that
runs maven to deploy/publish build artifacts. The release script cannot
currently be run from hudson since hudson does not have write access to
the remote git repo.
diff --git a/publish_release.sh b/publish_release.sh
new file mode 100644
index 0000000..71635b3
--- /dev/null
+++ b/publish_release.sh
@@ -0,0 +1,382 @@
+#!/bin/sh
+
+if [ -n "$RELEASE_DEBUG" ]; then
+ echo "Debug output is enabled."
+ set -x
+fi
+
+
+# Constants
+
+PROJECT_NAME="rhq"
+PROJECT_DISPLAY_NAME="RHQ"
+PROJECT_GIT_WEB_URL="http://git.fedorahosted.org/git/?p=rhq/rhq.git"
+TAG_PREFIX="RHQ"
+MINIMUM_MAVEN_VERSION="2.1.0"
+
+
+# Functions
+
+abort()
+{
+ echo >&2
+ for ARG in "$@"; do
+ echo "$ARG" >&2
+ done
+ exit 1
+}
+
+usage()
+{
+ abort "$@" "Usage: $EXE community|enterprise RELEASE_VERSION
DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production" "Example: $EXE
enterprise 3.0.0.GA 3.0.0-SNAPSHOT release-3.0.0 ips test"
+}
+
+
+# Process command line args.
+
+EXE=`basename $0`
+if [ "$#" -ne 6 ]; then
+ usage
+fi
+RELEASE_TYPE="$1"
+if [ "$RELEASE_TYPE" != "community" ] && [
"$RELEASE_TYPE" != "enterprise" ]; then
+ usage "Invalid release type: $RELEASE_TYPE (valid release types are
'community' or 'enterprise')"
+fi
+RELEASE_VERSION="$2"
+DEVELOPMENT_VERSION="$3"
+RELEASE_BRANCH="$4"
+GIT_USERNAME="$5"
+MODE="$6"
+if [ "$MODE" != "test" ] && [ "$MODE" !=
"production" ]; then
+ usage "Invalid mode: $MODE (valid modes are 'test' or
'production')"
+fi
+
+if [ "$MODE" = "production" ]; then
+ if [ -z "$JBOSS_ORG_USERNAME" ] || [ -z "$JBOSS_ORG_PASSWORD" ];
then
+ usage "In production mode,
jboss.org credentials must be specified via the
JBOSS_ORG_USERNAME and JBOSS_ORG_PASSWORD environment variables."
+ fi
+fi
+
+
+# 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
+
+# TODO: Check that JDK version is < 1.7.
+
+
+# If this is an enterprise release, 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 [ "$RELEASE_TYPE" = "enterprise" ]; then
+ 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
+fi
+
+
+# Make sure M2_HOME points to a valid Maven 2.1.x or 2.2.x 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
+
+mvn -version >/dev/null
+[ $? -ne 0 ] && abort "mvn --version failed with exit code $?."
+MAVEN_VERSION=`mvn -version | head -1 | sed 's|[^0-9]*\([^ ]*\).*|\1|'`
+if echo $MAVEN_VERSION | grep -Ev "^(2\.[12]|3\.0)"; then
+ abort "Unsupported Maven version - $MAVEN_VERSION. Only Maven 2.1.x, 2.2.x, or
3.0.x is supported. Please update the value of M2_HOME, then try again."
+fi
+
+
+# Make sure git 1.6.x or 1.7.x is in the PATH.
+
+if ! which git >/dev/null 2>&1; then
+ abort "git not found in PATH ($PATH)."
+fi
+
+git --version >/dev/null
+[ $? -ne 0 ] && abort "git --version failed with exit code $?."
+GIT_VERSION=`git --version | sed 's|[^0-9]*\([^ ]*\).*|\1|'`
+if echo $GIT_VERSION | grep -v "^1.[67]"; then
+ abort "Unsupported git version - $GIT_VERSION. Only git 1.6.x or 1.7.x are
supported. Please add a directory containing a supported version of git to your PATH, then
try again."
+fi
+
+
+# Set various environment variables.
+
+MAVEN_OPTS="-Xms512M -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M"
+export MAVEN_OPTS
+
+
+# Set various local variables.
+
+if [ -n "$HUDSON_URL" ] && [ -n "$WORKSPACE" ]; then
+ echo "We appear to be running in a Hudson job."
+ WORKING_DIR="$WORKSPACE"
+ MAVEN_LOCAL_REPO_DIR="$HOME/.m2/hudson-release-$RELEASE_TYPE-repository"
+ MAVEN_SETTINGS_FILE="$HOME/.m2/hudson-$JOB_NAME-settings.xml"
+elif [ -z "$WORKING_DIR" ]; then
+ WORKING_DIR="$HOME/release/rhq"
+ MAVEN_LOCAL_REPO_DIR="$HOME/release/m2-repository"
+ #MAVEN_LOCAL_REPO_DIR="$HOME/.m2/repository"
+ MAVEN_SETTINGS_FILE="$HOME/release/m2-settings.xml"
+fi
+
+PROJECT_GIT_URL="git://git.fedorahosted.org/rhq/rhq.git"
+
+MAVEN_ARGS="--settings $MAVEN_SETTINGS_FILE --batch-mode --errors
-Penterprise,dist,release"
+
+if [ "$MODE" = "test" ]; then
+ MAVEN_ARGS="$MAVEN_ARGS -DskipTests=true"
+fi
+
+if [ "$RELEASE_TYPE" = "enterprise" ]; then
+ MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav -Djava5.home=$JAVA5_HOME/jre"
+fi
+if [ -n "$RELEASE_DEBUG" ]; then
+ MAVEN_ARGS="$MAVEN_ARGS --debug"
+fi
+if [ -n "$RELEASE_ADDITIONAL_MAVEN_ARGS" ]; then
+ MAVEN_ARGS="$MAVEN_ARGS $RELEASE_ADDITIONAL_MAVEN_ARGS"
+fi
+if [ -z "$MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS" ]; then
+ MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS="6"
+fi
+
+#if [ "$MODE" = "production" ] && [ "$RELEASE_TYPE"
= "community" ]; then
+# MAVEN_RELEASE_PERFORM_GOAL="deploy"
+#else
+ MAVEN_RELEASE_PERFORM_GOAL="install"
+#fi
+
+
+TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
+RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
+
+
+# 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,
+# since that is how the German and French I18NMessage annotation values are
+# encoded and the encoding used by i18nlog to read in resource bundle
+# property files.
+LANG=en_US.iso8859
+export LANG
+
+
+# Print out a summary of the environment.
+
+echo
+echo "========================== Environment Variables
=============================="
+echo "JAVA_HOME=$JAVA_HOME"
+[ "$RELEASE_TYPE" = "enterprise" ] && echo
"JAVA5_HOME=$JAVA5_HOME"
+echo "M2_HOME=$M2_HOME"
+echo "MAVEN_OPTS=$MAVEN_OPTS"
+echo "PATH=$PATH"
+echo "LANG=$LANG"
+echo "============================= Local Variables
================================="
+echo "WORKING_DIR=$WORKING_DIR"
+echo "PROJECT_NAME=$PROJECT_NAME"
+echo "PROJECT_GIT_URL=$PROJECT_GIT_URL"
+echo "RELEASE_TYPE=$RELEASE_TYPE"
+echo "RELEASE_VERSION=$RELEASE_VERSION"
+echo "DEVELOPMENT_VERSION=$DEVELOPMENT_VERSION"
+echo "RELEASE_BRANCH=$RELEASE_BRANCH"
+echo "RELEASE_TAG=$RELEASE_TAG"
+echo "MODE=$MODE"
+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_ARGS=$MAVEN_ARGS"
+echo "MAVEN_RELEASE_PERFORM_GOAL=$MAVEN_RELEASE_PERFORM_GOAL"
+echo "JBOSS_ORG_USERNAME=$JBOSS_ORG_USERNAME"
+echo "============================= Program Versions
================================"
+git --version
+echo
+java -version
+echo
+mvn --version | head -1
+echo
"==============================================================================="
+echo
+
+
+# Clean the Maven local repo if it hasn't been purged recently.
+
+if [ -f "$MAVEN_LOCAL_REPO_DIR" ]; then
+ if [ "$MODE" = "production" ]; then
+ echo "Purging MAVEN_LOCAL_REPO_DIR ($MAVEN_LOCAL_REPO_DIR) since this is a
production build..."
+ #rm -rf "$MAVEN_LOCAL_REPO_DIR"
+ else
+ echo boo
+ #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 $MAVEN_LOCAL_REPO_PURGE_INTERVAL_HOURS hours - purging it for a clean-clean
build..."
+ # rm -rf "$MAVEN_LOCAL_REPO_DIR"
+ #fi
+ fi
+
+fi
+mkdir -p "$MAVEN_LOCAL_REPO_DIR"
+
+
+# Create the Maven settings file.
+cat <<EOF >"${MAVEN_SETTINGS_FILE}"
+<settings>
+ <localRepository>$MAVEN_LOCAL_REPO_DIR</localRepository>
+
+ <profiles>
+
+ <profile>
+ <id>release</id>
+ <properties>
+<rhq.test.ds.server-name>vmg01.mw.lab.eng.bos.redhat.com</rhq.test.ds.server-name>
+ <rhq.db.admin.username>jon2</rhq.db.admin.username>
+ <rhq.db.admin.password>jboss42</rhq.db.admin.password>
+ <rhq.test.ds.user-name>jon2</rhq.test.ds.user-name>
+ <rhq.test.ds.password>jboss42</rhq.test.ds.password>
+ <rhq.test.ds.db-name>rhq_release</rhq.test.ds.db-name>
+
<rhq.test.ds.connection-url>jdbc:postgresql://${rhq.test.ds.server-name}:5432/${rhq.test.ds.db-name}</rhq.test.ds.connection-url>
+ <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.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>
+
+ <DatabaseTest.nofail>true</DatabaseTest.nofail>
+
+
<rhq.testng.excludedGroups>agent-comm,comm-client,postgres-plugin,native-system</rhq.testng.excludedGroups>
+
+ <gwt-plugin.extraJvmArgs>-Xms512M -Xmx1024M -XX:PermSize=256M
-XX:MaxPermSize=512M</gwt-plugin.extraJvmArgs>
+ </properties>
+ </profile>
+
+ </profiles>
+
+ <!-- This is used by the deploy plugin to publish release artifacts to the
jboss.org Nexus repo. -->
+ <servers>
+ <server>
+ <id>jboss-releases-repository</id>
+ <username>$JBOSS_ORG_USERNAME</username>
+ <password>$JBOSS_ORG_PASSWORD</password>
+ </server>
+ </servers>
+
+</settings>
+EOF
+
+# We only need to worry about cloning the repo if we are not running on hudson
+if [ ! "$HUDSON_URL" ]; then
+ # Clone and/or checkout the source from git.
+
+ if [ -d "$WORKING_DIR" ]; then
+ cd "$WORKING_DIR"
+ git status >/dev/null 2>&1
+ GIT_STATUS_EXIT_CODE=$?
+ # Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there
are any uncommitted changes,
+ # and git 1.7 returns 0, so we check if the exit code is less than or equal to 1
to determine if $WORKING_DIR
+ # is truly a git working copy.
+ if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
+ echo "Checking out a clean copy of the release branch
($RELEASE_BRANCH)..."
+ git fetch origin "$RELEASE_BRANCH"
+ [ "$?" -ne 0 ] && abort "Failed to fetch release
branch ($RELEASE_BRANCH)."
+ git checkout "$RELEASE_BRANCH" 2>/dev/null
+ if [ "$?" -ne 0 ]; then
+ git checkout --track -b "$RELEASE_BRANCH"
"origin/$RELEASE_BRANCH"
+ fi
+ [ "$?" -ne 0 ] && abort "Failed to checkout release
branch ($RELEASE_BRANCH)."
+ git reset --hard "origin/$RELEASE_BRANCH"
+ [ "$?" -ne 0 ] && abort "Failed to reset release
branch ($RELEASE_BRANCH)."
+ git clean -dxf
+ [ "$?" -ne 0 ] && abort "Failed to clean release
branch ($RELEASE_BRANCH)."
+ git pull
+ [ "$?" -ne 0 ] && abort "Failed to update release
branch ($RELEASE_BRANCH)."
+ else
+ echo "$WORKING_DIR does not appear to be a git working directory
('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly
clone the repo..."
+ cd ..
+ rm -rf "$WORKING_DIR"
+ [ "$?" -ne 0 ] && abort "Failed to remove bogus
working directory ($WORKING_DIR)."
+ fi
+ fi
+
+ if [ ! -d "$WORKING_DIR" ]; then
+ echo "Cloning the $PROJECT_NAME git repo (this will take about 10-15
minutes)..."
+ git clone "$PROJECT_GIT_URL" "$WORKING_DIR"
+ [ "$?" -ne 0 ] && abort "Failed to clone $PROJECT_NAME git
repo ($PROJECT_GIT_URL)."
+ cd "$WORKING_DIR"
+ if [ "$RELEASE_BRANCH" != "master" ]; then
+ git checkout --track -b $RELEASE_BRANCH "origin/$RELEASE_BRANCH"
+ fi
+ [ "$?" -ne 0 ] && abort "Failed to checkout release branch
($RELEASE_BRANCH)."
+ fi
+fi
+
+
+echo "Building release from tag and publishing Maven artifacts (this will take about
10-15 minutes)..."
+mvn $MAVEN_RELEASE_PERFORM_GOAL $MAVEN_ARGS -Ddbreset
+[ "$?" -ne 0 ] && abort "Release build failed. Please see above
Maven output for details, fix any issues, then try again."
+echo
+echo "Release build succeeded!"
+
+
+echo
+echo "=============================== Release Info
=================================="
+echo "Version: $RELEASE_VERSION"
+echo "Branch URL:
$PROJECT_GIT_WEB_URL;a=shortlog;h=refs/heads/$RELEASE_BRANCH"
+echo "Tag URL: $PROJECT_GIT_WEB_URL;a=shortlog;h=refs/tags/$RELEASE_TAG"
+echo
"==============================================================================="
+
commit cc0bd46fdbd593384c25152fcc0cbd108ceb326c
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Apr 28 11:00:17 2011 -0400
some minor fixes
diff --git a/chkdist.sh b/chkdist.sh
index 16e3a5c..ff2edd2 100755
--- a/chkdist.sh
+++ b/chkdist.sh
@@ -24,7 +24,7 @@ pass()
fail()
{
_MSG="$1"
- echo "[FAILED] $_MSG" >&2
+ echo "[FAILED] $_MSG"
EXIT_CODE=2
return 1
}
@@ -87,10 +87,10 @@ else
fi
# Unzip the dist zip to a temp dir.
-TMP_DIR="/tmp/chkjondist$$"
+TMP_DIR="/tmp/chkdist$$"
unzip -q "$RHQ_DIST_ZIPFILE" -d $TMP_DIR
-# e.g.: /tmp/chkjondist12345/rhq-server-4.0.0)
+# e.g.: /tmp/chkdist12345/rhq-server-4.0.0)
RHQ_DIR=`ls -d $TMP_DIR/*`
AS_CONFIG_DIR="$RHQ_DIR/jbossas/server/default"
@@ -117,7 +117,8 @@ SNAPSHOT_JARS=`find "$RHQ_EAR_DIR" -name
"*-SNAPSHOT.jar"`
if [ -z "$SNAPSHOT_JARS" ]; then
pass "No snapshot jars are included."
else
- fail "The following snapshot jars are included: $SNAPSHOT_JARS"
+ fail "The following snapshot jars are included:"
+ echo "$SNAPSHOT_JARS"
fi
# Check encoding of message bundles.
commit 3c14cc9f692aada117c2f6f45149691696688809
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Apr 28 10:55:02 2011 -0400
script for checking/validating a release zipfile
diff --git a/chkdist.sh b/chkdist.sh
new file mode 100755
index 0000000..16e3a5c
--- /dev/null
+++ b/chkdist.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+#
+# A script to validate an RHQ distribution zipfile.
+#
+
+abort()
+{
+ _MSG="$1"
+ if [ -n "$_MSG" ]; then
+ echo "$_MSG" >&2
+ fi
+ echo "Usage: $SCRIPT_NAME rhq-dist-zipfile" >&2
+ exit 1
+}
+
+pass()
+{
+ _MSG="$1"
+ echo "[PASSED] $_MSG"
+ return 0
+}
+
+fail()
+{
+ _MSG="$1"
+ echo "[FAILED] $_MSG" >&2
+ EXIT_CODE=2
+ return 1
+}
+
+chkfile()
+{
+ _PATH=`eval echo $1`
+ _DESC="$2"
+ _COUNT=`ls -d1 "$_PATH" 2>/dev/null | wc -l`
+ if [ $_COUNT -eq 1 ]; then
+ pass "$_DESC is included."
+ else
+ fail "$_DESC ($_PATH) is missing."
+ fi
+ return $?
+}
+
+chknofile()
+{
+ _PATH=`eval echo $1`
+ _DESC="$2"
+ _COUNT=`ls -d1 "$_PATH" 2>/dev/null | wc -l`
+ if [ $_COUNT -eq 0 ]; then
+ pass "$_DESC is not included."
+ else
+ fail "$_DESC ($_PATH) is present."
+ fi
+ return $?
+}
+
+chkdir()
+{
+ _PATH="$1"
+ _DESC="$2"
+ if [ -d "$_PATH" ]; then
+ pass "$_DESC is included."
+ else
+ fail "$_DESC ($_PATH) is missing."
+ fi
+ return $?
+}
+
+SCRIPT_NAME=`basename $0`
+
+RHQ_DIST_ZIPFILE="$1"
+
+# Validate arguments.
+[ -z "$RHQ_DIST_ZIPFILE" ] && abort "Argument missing."
+[ -d "$RHQ_DIST_ZIPFILE" ] && abort "$RHQ_DIST_ZIPFILE is a
directory, not a regular file."
+[ ! -e "$RHQ_DIST_ZIPFILE" ] && abort "$RHQ_DIST_ZIPFILE does not
exist."
+
+# Check zip file dize is in expected range.
+ZIPFILESIZE=`ls -l "$RHQ_DIST_ZIPFILE" | awk '{print $5}'`
+if [ "$ZIPFILESIZE" -lt 185000000 ]; then
+ fail "Dist zipfile size is less than 185 MB."
+elif [ "$ZIPFILESIZE" -gt 200000000 ]; then
+ fail "Dist zipfile size is greater than 200 MB."
+else
+ pass "Dist zipfile size is between 185 and 200 MB."
+fi
+
+# Unzip the dist zip to a temp dir.
+TMP_DIR="/tmp/chkjondist$$"
+unzip -q "$RHQ_DIST_ZIPFILE" -d $TMP_DIR
+
+# e.g.: /tmp/chkjondist12345/rhq-server-4.0.0)
+RHQ_DIR=`ls -d $TMP_DIR/*`
+
+AS_CONFIG_DIR="$RHQ_DIR/jbossas/server/default"
+RHQ_EAR_DIR="$AS_CONFIG_DIR/deploy/rhq.ear.rej"
+
+EXIT_CODE=0
+
+# Check for existence of various dirs and files.
+chkdir "$RHQ_EAR_DIR" "RHQ EAR"
+chknofile "$RHQ_EAR_DIR/rhq-downloads/connectors/connector-apache.zip"
"Apache Connectors zipfile"
+chkfile "$RHQ_EAR_DIR/rhq-downloads/connectors/connector-rtfilter.zip"
"Servlet RT Connectors zipfile"
+chkfile "$AS_CONFIG_DIR/lib/postgresql-*.jar" "PostgreSQL JDBC
driver"
+chknofile "$AS_CONFIG_DIR/lib/ojdbc5-*.jar" "Oracle JDBC driver"
+
+# Check that JSPs are precompiled.
+if [ -f
"$RHQ_EAR_DIR/rhq-portal.war/WEB-INF/classes/jsp/portal/MainLayout_jsp.class" ];
then
+ pass "JSPs are precompiled."
+else
+ fail "JSPs are not precompiled."
+fi
+
+# Check that no SNAPSHOT jars are included.
+SNAPSHOT_JARS=`find "$RHQ_EAR_DIR" -name "*-SNAPSHOT.jar"`
+if [ -z "$SNAPSHOT_JARS" ]; then
+ pass "No snapshot jars are included."
+else
+ fail "The following snapshot jars are included: $SNAPSHOT_JARS"
+fi
+
+# Check encoding of message bundles.
+ENCODING=`file
$RHQ_DIR/jbossas/server/default/deploy/rhq-installer.war/WEB-INF/classes/InstallerMessages_de.properties
| cut -d: -f2 | cut -d' ' -f2`
+if [ "$ENCODING" = "ISO-8859" ]; then
+ pass "Message bundle encoding is correct."
+else
+ fail "Message bundle encoding is incorrect (expected: ISO-8859, actual:
$ENCODING). LANG environment variable was probably not set to en_US.iso88591 in shell that
was used to build the release."
+fi
+
+# Cleanup.
+rm -rf "$TMP_DIR"
+
+exit $EXIT_CODE
+
commit 0bbe5a50f2ee6760a90822f76df8033b1a8c24fa
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Apr 28 09:51:43 2011 -0400
BZ 700226 - be able to delete multiple config history items
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryView.java
index 72966cf..07c4080 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryView.java
@@ -97,7 +97,8 @@ public abstract class AbstractConfigurationHistoryView<T extends
AbstractConfigu
int[] doomedIds = new int[selection.length];
int i = 0;
for (ListGridRecord selected : selection) {
- doomedIds[i] =
selected.getAttributeAsInt(AbstractConfigurationHistoryDataSource.Field.ID);
+ doomedIds[i++] = selected
+
.getAttributeAsInt(AbstractConfigurationHistoryDataSource.Field.ID);
if (selected
.getAttribute(AbstractConfigurationHistoryDataSource.Field.GROUP_CONFIG_UPDATE_ID) !=
null) {
CoreGUI.getMessageCenter().notify(