[rhq] Branch 'raw-config' - 4 commits - modules/core modules/enterprise
by John Sanda
modules/core/dbutils/pom.xml | 4 -
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 8 ++
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java | 20 ++++-
modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java | 37 ++++++++++
modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java | 9 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBean.java | 1
7 files changed, 76 insertions(+), 5 deletions(-)
New commits:
commit 904487ce4305c46e70710399a7b719cbcf8e4f8f
Merge: 0cb5c04... 0d0de27...
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Oct 27 10:46:00 2009 -0400
Merge branch 'raw-config' of ssh://jsanda@git.fedorahosted.org/git/rhq/rhq into raw-config
commit 0cb5c04df3cd30ab4340c36ff463b1632349e399
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Oct 23 16:38:33 2009 -0400
[US 403] Adding support for ampsVersion in data model and in schema.
This commit includes:
* dbupgrade task to add AMPS_VERSION column to RHQ_PLUGIN table
* Add ampsVersion property and JPA mapping to Plugin class
* Update Plugin JPAQL queries to include ampsVersion property
* Modify ResourceMetadataManagerBean to persist ampsVersion found in plugin descriptor
* Bumping up schema version in dbutils/pom.xml
[US 403] Bumping up schema version to 2.59.1
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index cb40351..565b753 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.59</db.schema.version>
+ <db.schema.version>2.59.1</db.schema.version>
</properties>
<dependencies>
@@ -272,4 +272,4 @@
</profiles>
-</project>
\ No newline at end of file
+</project>
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 948df51..d3336fa 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -1580,6 +1580,14 @@ DB Upgrade:
</schemaSpec>
+ <schemaSpec version="2.59.1">
+ <schema-addColumn table="RHQ_PLUGIN" column="AMPS_VERSION" columnType="VARCHAR2"/>
+ <schema-alterColumn table="RHQ_PLUGIN"
+ column="AMPS_VERSION"
+ columnType="VARCHAR2"
+ precision="16"/>
+ </schemaSpec>
+
</dbupgrade>
</target>
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java b/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java
index 1ee09e0..0c8336b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java
@@ -61,6 +61,7 @@ import org.rhq.core.util.MessageDigestGenerator;
+ " p.help, " //
+ " p.md5, " //
+ " p.version, " //
+ + " p.ampsVersion, "
+ " p.ctime, " //
+ " p.mtime) " //
+ " FROM Plugin AS p " //
@@ -78,6 +79,7 @@ import org.rhq.core.util.MessageDigestGenerator;
+ " p.help, " //
+ " p.md5, " //
+ " p.version, " //
+ + " p.ampsVersion, "
+ " p.ctime, " //
+ " p.mtime) " //
+ " FROM Plugin AS p "), //
@@ -91,6 +93,7 @@ import org.rhq.core.util.MessageDigestGenerator;
+ " p.enabled = :enabled, " //
+ " p.help = :help, " //
+ " p.version = :version, " //
+ + " p.ampsVersion = :ampsVersion,"
+ " p.path = :path, " //
+ " p.md5 = :md5, " //
+ " p.mtime = :mtime " //
@@ -108,6 +111,7 @@ import org.rhq.core.util.MessageDigestGenerator;
+ " p.help, " //
+ " p.md5, " //
+ " p.version, " //
+ + " p.ampsVersion, "
+ " p.ctime, " //
+ " p.mtime) " //
+ " FROM Plugin p " //
@@ -152,6 +156,9 @@ public class Plugin implements Serializable {
@Column(name = "VERSION", nullable = true)
private String version;
+ @Column(name = "AMPS_VERSION", nullable = true)
+ private String ampsVersion;
+
@Column(name = "PATH", nullable = false)
private String path;
@@ -167,7 +174,7 @@ public class Plugin implements Serializable {
@Column(name = "CONTENT", nullable = true)
private byte[] content;
- protected Plugin() {
+ public Plugin() {
}
/**
@@ -236,7 +243,7 @@ public class Plugin implements Serializable {
* @param mtime
*/
public Plugin(int id, String name, String path, String displayName, boolean enabled, String description,
- String help, String md5, String version, long ctime, long mtime) {
+ String help, String md5, String version, String ampsVersion, long ctime, long mtime) {
this.id = id;
this.name = name;
this.path = path;
@@ -246,6 +253,7 @@ public class Plugin implements Serializable {
this.help = help;
this.md5 = md5;
this.version = version;
+ this.ampsVersion = ampsVersion;
this.ctime = ctime;
this.mtime = mtime;
}
@@ -356,6 +364,14 @@ public class Plugin implements Serializable {
this.version = version;
}
+ public String getAmpsVersion() {
+ return ampsVersion;
+ }
+
+ public void setAmpsVersion(String ampsVersion) {
+ this.ampsVersion = ampsVersion;
+ }
+
public String getMd5() {
return md5;
}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
index 93dc5c4..c502f99 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
@@ -116,7 +116,7 @@ public class ConfigurationTest {
@Test
public void deepCopyWithoutProxiesShouldSetParentReferenceOfCopiedRawConfigurations() {
Configuration original = createConfiguration();
- original.addRawConfiguration(createRawConfiguration("/tmp/foo");
+ original.addRawConfiguration(createRawConfiguration("/tmp/foo"));
Configuration copy = original.deepCopyWithoutProxies();
RawConfiguration copiedRawConfig = getCopiedRawConfiguration(copy);
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java
index 07ab588..9fc810a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java
@@ -28,6 +28,7 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;
+import java.lang.reflect.Constructor;
import javax.naming.InitialContext;
import javax.persistence.EntityManager;
@@ -40,6 +41,11 @@ import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.domain.test.AbstractEJB3Test;
import org.rhq.core.util.MessageDigestGenerator;
import org.rhq.core.util.stream.StreamUtil;
+import org.hibernate.Session;
+import org.hibernate.transform.ResultTransformer;
+import org.hibernate.type.Type;
+import org.hibernate.criterion.Example;
+import org.hibernate.criterion.Projections;
@Test
public class PluginTest extends AbstractEJB3Test {
@@ -90,6 +96,7 @@ public class PluginTest extends AbstractEJB3Test {
enabled = !enabled;
md5 = md5 + "00000";
String version = "version-UPDATED";
+ String ampsVersion = "ampsVersion-UPDATED";
String description = "description-UPDATED";
String help = "help-UPDATED";
@@ -106,6 +113,7 @@ public class PluginTest extends AbstractEJB3Test {
q.setParameter("enabled", enabled);
q.setParameter("md5", md5);
q.setParameter("version", version);
+ q.setParameter("ampsVersion", ampsVersion);
q.setParameter("description", description);
q.setParameter("help", help);
q.setParameter("mtime", System.currentTimeMillis());
@@ -496,4 +504,5 @@ public class PluginTest extends AbstractEJB3Test {
}
}
}
+
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBean.java
index 4bde2aa..7d2265a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBean.java
@@ -204,6 +204,7 @@ public class ResourceMetadataManagerBean implements ResourceMetadataManagerLocal
q.setParameter("enabled", plugin.isEnabled());
q.setParameter("md5", plugin.getMD5());
q.setParameter("version", plugin.getVersion());
+ q.setParameter("ampsVersion", plugin.getAmpsVersion());
q.setParameter("description", plugin.getDescription());
q.setParameter("help", plugin.getHelp());
q.setParameter("mtime", plugin.getMtime());
commit ea57695afbcda010f30e9d34513dc5330b2ddb8e
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Oct 21 11:48:54 2009 -0400
Fixing typo/comiler error in unit test
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
index 2838b26..93dc5c4 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
@@ -116,7 +116,7 @@ public class ConfigurationTest {
@Test
public void deepCopyWithoutProxiesShouldSetParentReferenceOfCopiedRawConfigurations() {
Configuration original = createConfiguration();
- original.addRawConfiguration(createRawConfiguration("/tmp/foo"););
+ original.addRawConfiguration(createRawConfiguration("/tmp/foo");
Configuration copy = original.deepCopyWithoutProxies();
RawConfiguration copiedRawConfig = getCopiedRawConfiguration(copy);
commit ea87ff2ad0e8faba3ee81db903960427095bf586
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Oct 19 16:50:58 2009 -0400
Updating deepCopyWithoutProxies() to copy rawConfigurations collection.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
index 237b27b..3fab412 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
@@ -499,7 +499,7 @@ public class Configuration implements Externalizable, Cloneable, AbstractPropert
}
for (RawConfiguration rawConfig : rawConfigurations) {
-
+ copy.addRawConfiguration(rawConfig.deepCopy());
}
return copy;
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
index ddbdc83..2838b26 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/ConfigurationTest.java
@@ -99,6 +99,43 @@ public class ConfigurationTest {
}
@Test
+ public void deepCopyWithoutProxiesShouldCopyRawConfigurations() {
+ Configuration original = createConfiguration();
+ original.addRawConfiguration(createRawConfiguration("/tmp/foo"));
+
+ Configuration copy = original.deepCopyWithoutProxies();
+
+ assertNotSame(
+ copy.getRawConfigurations(),
+ original.getRawConfigurations(),
+ "The rawConfigurations property should not refer to the original rawConfigurations of the copied object."
+ );
+ assertEquals(copy.getRawConfigurations(), original.getRawConfigurations(), "Failed to copy rawConfigurations property.");
+ }
+
+ @Test
+ public void deepCopyWithoutProxiesShouldSetParentReferenceOfCopiedRawConfigurations() {
+ Configuration original = createConfiguration();
+ original.addRawConfiguration(createRawConfiguration("/tmp/foo"););
+
+ Configuration copy = original.deepCopyWithoutProxies();
+ RawConfiguration copiedRawConfig = getCopiedRawConfiguration(copy);
+
+ assertSame(
+ copiedRawConfig.getConfiguration(),
+ copy,
+ "The reference to the parent configuration should point to the newly copied configuration, not the original configuration."
+ );
+ }
+
+ private RawConfiguration getCopiedRawConfiguration(Configuration config) {
+ for (RawConfiguration rawConfig : config.getRawConfigurations()) {
+ return rawConfig;
+ }
+ return null;
+ }
+
+ @Test
public void equalsShouldBeFalseWhenArgumentIsNull() {
Configuration config = new Configuration();
14 years, 6 months
[rhq] Branch 'linux-config' - modules/plugins
by Shannon Hughes
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 263b1271a574912df59548c3daf841560cfd9898
Author: Shannon Hughes <shughes(a)fred.hughes.lan>
Date: Tue Oct 27 08:31:01 2009 -0400
modifying support for resource creating using augeas set vs insert nodes
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 6b7b822..0bfcef0 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
@@ -175,7 +175,7 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
}
String rootLabel = getChildResourceConfigurationRootLabel(report.getResourceType(), report
.getResourceConfiguration());
- this.augeas.insert(rootNode.getPath(), rootLabel, false);
+ this.augeas.set(rootNode.getPath(), rootLabel);
// Then set all its child nodes.
Collection<PropertyDefinition> propDefs = resourceConfigDef.getPropertyDefinitions().values();
14 years, 6 months
[rhq] modules/helpers
by Heiko W. Rupp
modules/helpers/pluginAnnotations/pom.xml | 2 +-
modules/helpers/pluginGen/pom.xml | 2 +-
modules/helpers/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit dcc37be2ccb608d9a84d00245d16c55931f4d862
Author: Heiko W. Rupp <pilhuhn(a)fedorapeople.org>
Date: Tue Oct 27 11:53:25 2009 +0100
More pom work to make users happy that obtain the pugin* stuff from a remote repo.
diff --git a/modules/helpers/pluginAnnotations/pom.xml b/modules/helpers/pluginAnnotations/pom.xml
index a3dc269..dbf2bad 100644
--- a/modules/helpers/pluginAnnotations/pom.xml
+++ b/modules/helpers/pluginAnnotations/pom.xml
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.rhq</groupId>
+ <groupId>org.rhq.helpers</groupId>
<artifactId>rhq-helpers</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index 0fd3ff7..3197e9e 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.rhq</groupId>
+ <groupId>org.rhq.helpers</groupId>
<artifactId>rhq-helpers</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index 6814e97..6731258 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -8,7 +8,7 @@
<version>1.4.0-SNAPSHOT</version>
</parent>
- <groupId>org.rhq</groupId>
+ <groupId>org.rhq.helpers</groupId>
<artifactId>rhq-helpers</artifactId>
<packaging>pom</packaging>
14 years, 6 months
[rhq] Branch 'linux-config' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/server/ear/pom.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit 988ddae459d868610e4e408ac4126523c6db70df
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Oct 26 23:20:30 2009 -0400
Add samba and sudoers plugins to rhq.ear for dist builds
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 0aaf838..bff9bb3 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -326,6 +326,12 @@
<artifactItem>
<groupId>org.rhq</groupId>
+ <artifactId>rhq-samba-plugin</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+
+ <artifactItem>
+ <groupId>org.rhq</groupId>
<artifactId>rhq-script-plugin</artifactId>
<version>${project.version}</version>
</artifactItem>
@@ -341,6 +347,13 @@
<artifactId>rhq-sshd-plugin</artifactId>
<version>${project.version}</version>
</artifactItem>
+
+ <artifactItem>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-sudoers-plugin</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+
<!-- TODO: Uncomment once errors in virt plugin have been fixed.
<artifactItem>
<groupId>org.rhq</groupId>
14 years, 6 months
[rhq] Branch 'linux-config' - modules/plugins
by Shannon Hughes
modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareComponent.java | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit b6b99e75c6353b684d3dceb70a69c504473c88be
Author: Shannon Hughes <shughes(a)scooby.rdu.redhat.com>
Date: Mon Oct 26 18:58:23 2009 -0400
adding support for samba share creation
diff --git a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareComponent.java b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareComponent.java
index fe69430..747241f 100644
--- a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareComponent.java
+++ b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareComponent.java
@@ -22,8 +22,10 @@ import net.augeas.Augeas;
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.domain.resource.CreateResourceHistory;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.plugins.augeas.AugeasConfigurationComponent;
import org.rhq.plugins.augeas.helper.AugeasNode;
@@ -78,4 +80,9 @@ public class SambaShareComponent extends AugeasConfigurationComponent<SambaServe
public void deleteResource() throws Exception {
super.deleteResource();
}
+
+ public CreateResourceReport createResource(CreateResourceReport report) {
+ return super.createResource(report);
+ }
+
}
14 years, 6 months
[rhq] Branch 'content' - modules/core
by Jeff Ortel
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 164 ++++++++--
1 file changed, 142 insertions(+), 22 deletions(-)
New commits:
commit 9692ffba3b81f773a7d75a4418b73cbb414c991b
Author: Jeff Ortel <jortel(a)redhat.com>
Date: Mon Oct 26 17:22:28 2009 -0500
356 - Test/Adjust on Oracle. Add inserts to seed DB for repo group & relation types.
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 858d05d..99ac1b3 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -1516,11 +1516,11 @@
ALTER INDEX RHQ_CHANNEL_IDX
RENAME TO RHQ_REPO_IDX
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO
DROP CONSTRAINT RHQ_CHANNEL_PKEY CASCADE
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO
ADD CONSTRAINT RHQ_REPO_PKEY PRIMARY KEY ( ID )
</statement>
@@ -1542,17 +1542,17 @@
ADD CONSTRAINT RHQ_REPO_CONTENT_SRC_MAP_KEY
PRIMARY KEY ( REPO_ID, CONTENT_SRC_ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_CONTENT_SRC_MAP
ADD CONSTRAINT RHQ_REPO_CONTENT_SRC_MAP_REPO_ID_FKEY
FOREIGN KEY ( REPO_ID )
REFERENCES RHQ_REPO ( ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_CONTENT_SRC_MAP
DROP CONSTRAINT RHQ_CHANNEL_CONTENT_SRC_MAP_CONTENT_SRC_ID_FKEY
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_CONTENT_SRC_MAP
ADD CONSTRAINT RHQ_REPO_CONTENT_SRC_MAP_CONTENT_SRC_ID_FKEY
FOREIGN KEY ( CONTENT_SRC_ID )
@@ -1576,17 +1576,17 @@
ADD CONSTRAINT RHQ_REPO_PKG_VER_MAP_KEY
PRIMARY KEY ( REPO_ID, PACKAGE_VERSION_ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_PKG_VERSION_MAP
DROP CONSTRAINT RHQ_CHANNEL_PKG_VERSION_MAP_PACKAGE_VERSION_ID_FKEY
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_PKG_VERSION_MAP
ADD CONSTRAINT RHQ_REPO_PKG_VERSION_MAP_PACKAGE_VERSION_ID_FKEY
FOREIGN KEY ( PACKAGE_VERSION_ID )
REFERENCES RHQ_PACKAGE_VERSION ( ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_PKG_VERSION_MAP
ADD CONSTRAINT RHQ_REPO_PKG_VERSION_MAP_REPO_ID_FKEY
FOREIGN KEY ( REPO_ID )
@@ -1608,19 +1608,19 @@
<statement>
ALTER TABLE RHQ_REPO_RESOURCE_MAP
ADD CONSTRAINT RHQ_REPO_RESOURCE_MAP_KEY
- PRIMARY KEY ( REPO_ID, RESOURCE_ID )
+ PRIMARY KEY ( REPO_ID, RESOURCE_ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_RESOURCE_MAP
DROP CONSTRAINT RHQ_CHANNEL_RESOURCE_MAP_RESOURCE_ID_FKEY
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_RESOURCE_MAP
ADD CONSTRAINT RHQ_REPO_RESOURCE_MAP_RESOURCE_ID_FKEY
FOREIGN KEY ( RESOURCE_ID )
REFERENCES RHQ_RESOURCE ( ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_RESOURCE_MAP
ADD CONSTRAINT RHQ_REPO_RESOURCE_MAP_REPO_ID_FKEY
FOREIGN KEY ( REPO_ID )
@@ -1634,10 +1634,16 @@
CREATE TABLE RHQ_REPO_GROUP_TYPE ( ID INTEGER PRIMARY KEY )
</statement>
</schema-directSQL>
+ <schema-alterColumn table="RHQ_REPO_GROUP_TYPE" column="ID" nullable="false" />
<schema-addColumn table="RHQ_REPO_GROUP_TYPE" column="NAME" precision="200" columnType="VARCHAR2" />
<schema-alterColumn table="RHQ_REPO_GROUP_TYPE" column="NAME" nullable="false" />
<schema-addColumn table="RHQ_REPO_GROUP_TYPE" column="DESCRIPTION" precision="500" columnType="VARCHAR2" />
- <schema-alterColumn table="RHQ_REPO_GROUP_TYPE" column="DESCRIPTION" nullable="true" />
+ <schema-directSQL>
+ <statement>
+ INSERT INTO RHQ_REPO_GROUP_TYPE ( ID, NAME )
+ VALUES ( 1, 'family' )
+ </statement>
+ </schema-directSQL>
<!-- RHQ_REPO_GROUP -->
<schema-createSequence name="RHQ_REPO_GROUP_ID_SEQ" initial="10001" />
<schema-directSQL>
@@ -1645,20 +1651,29 @@
CREATE TABLE RHQ_REPO_GROUP ( ID INTEGER PRIMARY KEY )
</statement>
</schema-directSQL>
+ <schema-alterColumn table="RHQ_REPO_GROUP" column="ID" nullable="false" />
<schema-addColumn table="RHQ_REPO_GROUP" column="NAME" precision="200" columnType="VARCHAR2" />
<schema-alterColumn table="RHQ_REPO_GROUP" column="NAME" nullable="false" />
<schema-addColumn table="RHQ_REPO_GROUP" column="DESCRIPTION" precision="500" columnType="VARCHAR2" />
- <schema-alterColumn table="RHQ_REPO_GROUP" column="DESCRIPTION" nullable="true" />
<schema-addColumn table="RHQ_REPO_GROUP" column="REPO_GROUP_TYPE_ID" columnType="INTEGER" />
<schema-alterColumn table="RHQ_REPO_GROUP" column="REPO_GROUP_TYPE_ID" nullable="false" />
<schema-directSQL>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_GROUP
ADD CONSTRAINT RHQ_REPO_GROUP_REPO_GROUP_TYPE_ID_FKEY
FOREIGN KEY ( REPO_GROUP_TYPE_ID )
REFERENCES RHQ_REPO_GROUP_TYPE ( ID )
</statement>
- <statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_GROUP
+ ADD FOREIGN KEY ( REPO_GROUP_TYPE_ID )
+ REFERENCES RHQ_REPO_GROUP_TYPE ( ID )
+ </statement>
+ <statement targetDBVendor="postgresql">
+ CREATE UNIQUE INDEX RHQ_REPO_GROUP_IDX
+ ON RHQ_REPO_GROUP ( NAME, REPO_GROUP_TYPE_ID )
+ </statement>
+ <statement targetDBVendor="oracle">
CREATE UNIQUE INDEX RHQ_REPO_GROUP_IDX
ON RHQ_REPO_GROUP ( NAME, REPO_GROUP_TYPE_ID )
</statement>
@@ -1680,24 +1695,129 @@
ADD CONSTRAINT RHQ_REPO_REPO_GRP_MAP_KEY
PRIMARY KEY ( REPO_ID, REPO_GRP_ID )
</statement>
- <statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_REPO_GRP_MAP
ADD CONSTRAINT RHQ_REPO_REPO_GRP_MAP_REPO_ID_FKEY
FOREIGN KEY ( REPO_ID )
REFERENCES RHQ_REPO ( ID )
</statement>
- <statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_REPO_GRP_MAP
+ ADD FOREIGN KEY ( REPO_ID )
+ REFERENCES RHQ_REPO ( ID )
+ </statement>
+ <statement targetDBVendor="postgresql">
ALTER TABLE RHQ_REPO_REPO_GRP_MAP
ADD CONSTRAINT RHQ_REPO_REPO_GRP_MAP_REPO_GRP_ID_FKEY
FOREIGN KEY ( REPO_GRP_ID )
REFERENCES RHQ_REPO_GROUP ( ID )
</statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_REPO_GRP_MAP
+ ADD FOREIGN KEY ( REPO_GRP_ID )
+ REFERENCES RHQ_REPO_GROUP ( ID )
+ </statement>
+ </schema-directSQL>
+ <!-- RHQ_REPO_RELATION_TYPE -->
+ <schema-createSequence name="RHQ_REPO_RELATION_TYPE_ID_SEQ" initial="10001" />
+ <schema-directSQL>
+ <statement>
+ CREATE TABLE RHQ_REPO_RELATION_TYPE ( ID INTEGER PRIMARY KEY )
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_REPO_RELATION_TYPE" column="ID" nullable="false" />
+ <schema-addColumn table="RHQ_REPO_RELATION_TYPE" column="NAME" precision="200" columnType="VARCHAR2" />
+ <schema-alterColumn table="RHQ_REPO_RELATION_TYPE" column="NAME" nullable="false" />
+ <schema-addColumn table="RHQ_REPO_RELATION_TYPE" column="DESCRIPTION" precision="500" columnType="VARCHAR2" />
+ <schema-directSQL>
+ <statement>
+ INSERT INTO
+ RHQ_REPO_RELATION_TYPE ( ID, NAME )
+ VALUES ( 1, 'parent' )
+ </statement>
+ <statement>
+ INSERT INTO
+ RHQ_REPO_RELATION_TYPE ( ID, NAME )
+ VALUES ( 2, 'clone' )
+ </statement>
+ </schema-directSQL>
+ <!-- RHQ_REPO_RELATION -->
+ <schema-createSequence name="RHQ_REPO_RELATION_ID_SEQ" initial="10001" />
+ <schema-directSQL>
+ <statement>
+ CREATE TABLE RHQ_REPO_RELATION ( ID INTEGER PRIMARY KEY )
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_REPO_RELATION" column="ID" nullable="false" />
+ <schema-addColumn table="RHQ_REPO_RELATION" column="RELATED_REPO_ID" columnType="INTEGER" />
+ <schema-alterColumn table="RHQ_REPO_RELATION" column="RELATED_REPO_ID" nullable="false" />
+ <schema-addColumn table="RHQ_REPO_RELATION" column="REPO_RELATION_TYPE_ID" columnType="INTEGER" />
+ <schema-alterColumn table="RHQ_REPO_RELATION" column="REPO_RELATION_TYPE_ID" nullable="false" />
+ <schema-directSQL>
+ <statement targetDBVendor="postgresql">
+ ALTER TABLE RHQ_REPO_RELATION
+ ADD CONSTRAINT RHQ_REPO_RELATION_RELATED_REPO_ID_FKEY
+ FOREIGN KEY ( RELATED_REPO_ID )
+ REFERENCES RHQ_REPO ( ID )
+ </statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_RELATION
+ ADD FOREIGN KEY ( RELATED_REPO_ID )
+ REFERENCES RHQ_REPO ( ID )
+ </statement>
+ <statement targetDBVendor="postgresql">
+ ALTER TABLE RHQ_REPO_RELATION
+ ADD CONSTRAINT RHQ_REPO_RELATION_REPO_RELATION_TYPE_ID_FKEY
+ FOREIGN KEY ( REPO_RELATION_TYPE_ID )
+ REFERENCES RHQ_REPO_RELATION_TYPE ( ID )
+ </statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_RELATION
+ ADD FOREIGN KEY ( REPO_RELATION_TYPE_ID )
+ REFERENCES RHQ_REPO_RELATION_TYPE ( ID )
+ </statement>
+ </schema-directSQL>
+ <!-- RHQ_REPO_REPO_RELATION_MAP -->
+ <schema-directSQL>
+ <statement>
+ CREATE TABLE RHQ_REPO_REPO_RELATION_MAP ( REPO_ID INTEGER )
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_REPO_REPO_RELATION_MAP" column="REPO_ID" nullable="false" />
+ <schema-addColumn table="RHQ_REPO_REPO_RELATION_MAP" column="REPO_RELATION_ID" columnType="INTEGER" />
+ <schema-alterColumn table="RHQ_REPO_REPO_RELATION_MAP" column="REPO_RELATION_ID" nullable="false" />
+ <schema-addColumn table="RHQ_REPO_REPO_RELATION_MAP" column="CTIME" columnType="LONG" />
+ <schema-alterColumn table="RHQ_REPO_REPO_RELATION_MAP" column="CTIME" nullable="false" />
+ <schema-directSQL>
+ <statement>
+ ALTER TABLE RHQ_REPO_REPO_RELATION_MAP
+ ADD CONSTRAINT RHQ_REPO_REPO_RELATION_MAP_KEY
+ PRIMARY KEY ( REPO_ID, REPO_RELATION_ID )
+ </statement>
+ <statement targetDBVendor="postgresql">
+ ALTER TABLE RHQ_REPO_REPO_RELATION_MAP
+ ADD CONSTRAINT RHQ_REPO_REPO_RELATION_MAP_REPO_ID_FKEY
+ FOREIGN KEY ( REPO_ID )
+ REFERENCES RHQ_REPO ( ID )
+ </statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_REPO_RELATION_MAP
+ ADD FOREIGN KEY ( REPO_ID )
+ REFERENCES RHQ_REPO ( ID )
+ </statement>
+ <statement targetDBVendor="postgresql">
+ ALTER TABLE RHQ_REPO_REPO_RELATION_MAP
+ ADD CONSTRAINT RHQ_REPO_REPO_RELATION_MAP_REPO_RELATION_ID_FKEY
+ FOREIGN KEY ( REPO_RELATION_ID )
+ REFERENCES RHQ_REPO_RELATION ( ID )
+ </statement>
+ <statement targetDBVendor="oracle">
+ ALTER TABLE RHQ_REPO_REPO_RELATION_MAP
+ ADD FOREIGN KEY ( REPO_RELATION_ID )
+ REFERENCES RHQ_REPO_RELATION ( ID )
+ </statement>
</schema-directSQL>
</schemaSpec>
-
-
</dbupgrade>
-
</target>
-
</project>
14 years, 6 months
[rhq] Branch 'content' - modules/enterprise
by John Matthews
modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/RHNConnector.java | 25 +-
modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransport.java | 2
modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransportFactory.java | 12 -
modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java | 99 ++++++++++
modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransportFactory.java | 64 ++++++
5 files changed, 179 insertions(+), 23 deletions(-)
New commits:
commit 8ef6623e1a4c4a2014118dcdae422d59902cd794
Author: John Matthews <jmatthew(a)redhat.com>
Date: Mon Oct 26 17:03:54 2009 -0400
423 - first cut at adding SSL support
TODO: Add support for cert validation
diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/RHNConnector.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/RHNConnector.java
index 0baaa7a..f8ce152 100644
--- a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/RHNConnector.java
+++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/RHNConnector.java
@@ -33,6 +33,7 @@ import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.enterprise.server.plugins.rhnhosted.certificate.PublicKeyRing;
+import org.rhq.enterprise.server.plugins.rhnhosted.xmlrpc.RhnSSLTransportFactory;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
@@ -60,15 +61,11 @@ public class RHNConnector {
*/
public RHNConnector(String systemidIn, String certificateIn, String serverUrlIn)
throws Exception {
+
this.certificateFileName = certificateIn;
this.certificateText = FileUtils.readFileToString(new File(this.certificateFileName));
-
URL serverUrl = new URL(serverUrlIn);
- XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
- config.setServerURL(serverUrl);
- client = new XmlRpcClient();
- client.setConfig(config);
-
+ client = newClient(serverUrl);
File systemid_file = new File(systemidIn);
this.systemid = FileUtils.readFileToString(systemid_file);
}
@@ -85,15 +82,21 @@ public class RHNConnector {
// store the file to local server
this.writeStringToFile();
URL serverUrl = new URL(serverUrlIn);
- XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
- config.setServerURL(serverUrl);
- client = new XmlRpcClient();
- client.setConfig(config);
-
+ client = newClient(serverUrl);
File systemid_file = new File(RHNConstants.DEFAULT_SYSTEM_ID);
this.systemid = FileUtils.readFileToString(systemid_file);
}
+ protected XmlRpcClient newClient(URL serverUrl) {
+ XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
+ config.setServerURL(serverUrl);
+ client = new XmlRpcClient();
+ client.setConfig(config);
+ // Add support for SSL connections to RHN Hosted
+ RhnSSLTransportFactory transportFactory = new RhnSSLTransportFactory(client);
+ client.setTransportFactory(transportFactory);
+ return client;
+ }
/**
* Call that invokes the server object and passing in the xmlrpc
* exposed call to activate the rhq server.
diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransport.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransport.java
index f00a1f7..3ff375e 100644
--- a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransport.java
+++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransport.java
@@ -31,7 +31,7 @@ import org.apache.xmlrpc.util.SAXParsers;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
-public class CustomReqPropTransport extends XmlRpcSun15HttpTransport {
+public class CustomReqPropTransport extends RhnSSLTransport {
private final Log log = LogFactory.getLog(CustomReqPropTransport.class);
protected Map<String,String> reqProps;
diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransportFactory.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransportFactory.java
index 3746486..202c5b0 100644
--- a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransportFactory.java
+++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/CustomReqPropTransportFactory.java
@@ -10,7 +10,7 @@ import org.apache.xmlrpc.client.XmlRpcSun15HttpTransport;
import org.apache.xmlrpc.client.XmlRpcSun15HttpTransportFactory;
import org.apache.xmlrpc.client.XmlRpcTransport;
-public class CustomReqPropTransportFactory extends XmlRpcSun15HttpTransportFactory {
+public class CustomReqPropTransportFactory extends RhnSSLTransportFactory {
protected Map reqProps;
@@ -48,16 +48,6 @@ public class CustomReqPropTransportFactory extends XmlRpcSun15HttpTransportFacto
return new CustomReqPropTransport(getClient());
}
- /**
- * We can't access the proxy member directly from our super class
- * so we are grabbing it from the transport instance.
- * Would prefer if XmlRpcSun15HttpTransportFactory had a getProxy method
- * */
- protected Proxy getProxy() {
- XmlRpcSun15HttpTransport hackGetProxy = (XmlRpcSun15HttpTransport)super.getTransport();
- return hackGetProxy.getProxy();
- }
-
public XmlRpcTransport getTransport() {
CustomReqPropTransport transport = newTransportInstance();
if (reqProps != null) {
diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java
new file mode 100644
index 0000000..b59b821
--- /dev/null
+++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java
@@ -0,0 +1,99 @@
+/*
+ * 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.plugins.rhnhosted.xmlrpc;
+
+import java.security.cert.X509Certificate;
+import java.security.NoSuchAlgorithmException;
+import java.security.KeyManagementException;
+import java.net.URLConnection;
+import java.net.URL;
+import java.io.IOException;
+
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSocketFactory;
+
+
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.Log;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcSun15HttpTransport;
+
+public class RhnSSLTransport extends XmlRpcSun15HttpTransport
+{
+ private final Log log = LogFactory.getLog(RhnSSLTransport.class);
+
+ /**
+ * Creates a new instance.
+ * @param pClient The client controlling this instance.
+ */
+ public RhnSSLTransport(XmlRpcClient pClient) {
+ super(pClient);
+ }
+
+ protected SSLSocketFactory initSSLSocketFactory() {
+ // Create a trust manager that does not validate certificate chains
+ TrustManager[] trustAllCerts = new TrustManager[] {
+ new X509TrustManager() {
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ public void checkClientTrusted(X509Certificate[] certs, String authType) {
+ // Trust always
+ }
+
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {
+ // Trust always
+ }
+ }
+ };
+
+ // Install the all-trusting trust manager
+ SSLContext sc = null;
+ try
+ {
+ sc = SSLContext.getInstance("SSL");
+ sc.init(null, trustAllCerts, new java.security.SecureRandom());
+ }
+ catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ log.error(e);
+ }
+ catch (KeyManagementException e)
+ {
+ e.printStackTrace();
+ log.error(e);
+ }
+ return sc.getSocketFactory();
+ }
+
+ @Override
+ protected URLConnection newURLConnection(URL url) throws IOException
+ {
+ URLConnection c = super.newURLConnection(url);
+ if (c instanceof HttpsURLConnection) {
+ ((HttpsURLConnection)c).setSSLSocketFactory(initSSLSocketFactory());
+ log.debug("SSLSocketFactory has been set with a custom TrustManager");;
+ }
+ return c;
+ }
+}
diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransportFactory.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransportFactory.java
new file mode 100644
index 0000000..9348e08
--- /dev/null
+++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransportFactory.java
@@ -0,0 +1,64 @@
+/*
+ * 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.plugins.rhnhosted.xmlrpc;
+
+import java.net.Proxy;
+
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcSun15HttpTransportFactory;
+import org.apache.xmlrpc.client.XmlRpcTransport;
+import org.apache.xmlrpc.client.XmlRpcSun15HttpTransport;
+
+
+public class RhnSSLTransportFactory extends XmlRpcSun15HttpTransportFactory
+{
+ /**
+ * Creates a new factory, which creates transports for the given client.
+ * @param pClient The client, which is operating the factory.
+ */
+ public RhnSSLTransportFactory(XmlRpcClient pClient) {
+ super(pClient);
+ }
+
+ /**
+ * Override to specify a different Transport
+ * */
+ protected RhnSSLTransport newTransportInstance() {
+ return new RhnSSLTransport(getClient());
+ }
+
+ /**
+ * We can't access the proxy member directly from our super class
+ * so we are grabbing it from the transport instance.
+ * Would prefer if XmlRpcSun15HttpTransportFactory had a getProxy method
+ * */
+ protected Proxy getProxy() {
+ XmlRpcSun15HttpTransport hackGetProxy = (XmlRpcSun15HttpTransport)super.getTransport();
+ return hackGetProxy.getProxy();
+ }
+
+ @Override
+ public XmlRpcTransport getTransport()
+ {
+ RhnSSLTransport transport = new RhnSSLTransport(getClient());
+ transport.setSSLSocketFactory(getSSLSocketFactory());
+ transport.setProxy(getProxy());
+ return transport;
+ }
+}
14 years, 6 months
[rhq] Branch 'linux-config' - modules/plugins
by Partha Aji
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java | 91 +++++-----
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/helper/AugeasNode.java | 6
modules/plugins/sudoers/src/main/java/org/rhq/plugins/sudoers/SudoersComponent.java | 44 ++++
modules/plugins/sudoers/src/main/resources/META-INF/rhq-plugin.xml | 8
4 files changed, 101 insertions(+), 48 deletions(-)
New commits:
commit 610e1ef8c3c4351a919313bda0dd92439d61335a
Author: Partha Aji <paji(a)redhat.com>
Date: Mon Oct 26 16:45:25 2009 -0400
Commiting a bare bones limited edition sudoers plugin
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 24cb1e0..6b7b822 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
@@ -53,7 +53,12 @@ import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.inventory.*;
+import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.plugins.augeas.helper.AugeasNode;
import org.rhq.plugins.augeas.helper.Glob;
@@ -62,7 +67,7 @@ import org.rhq.plugins.augeas.helper.Glob;
* @author Lukas Krejci
*/
public class AugeasConfigurationComponent<T extends ResourceComponent> implements ResourceComponent<T>,
- ConfigurationFacet, CreateChildResourceFacet, DeleteResourceFacet {
+ ConfigurationFacet, CreateChildResourceFacet, DeleteResourceFacet {
public static final String INCLUDE_GLOBS_PROP = "configurationFilesInclusionPatterns";
public static final String EXCLUDE_GLOBS_PROP = "configurationFilesExclusionPatterns";
public static final String RESOURCE_CONFIGURATION_ROOT_NODE_PROP = "resourceConfigurationRootNode";
@@ -80,8 +85,7 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
private Augeas augeas;
private AugeasNode resourceConfigRootNode;
- public void start(ResourceContext<T> resourceContext) throws InvalidPluginConfigurationException,
- Exception {
+ public void start(ResourceContext<T> resourceContext) throws InvalidPluginConfigurationException, Exception {
this.resourceContext = resourceContext;
Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
@@ -104,7 +108,7 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
}
public AvailabilityType getAvailability() {
- for(File f : getConfigurationFiles()) {
+ for (File f : getConfigurationFiles()) {
singleFileAvailabilityCheck(f);
}
return AvailabilityType.UP;
@@ -130,10 +134,9 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
public void updateResourceConfiguration(ConfigurationUpdateReport report) {
if (!validateResourceConfiguration(report)) {
- log.debug("Validation of updated Resource configuration for "
- + this.getResourceContext().getResourceType() + " Resource with key '"
- + this.getResourceContext().getResourceKey() + "' failed with the following errors: "
- + report.getErrorMessage());
+ log.debug("Validation of updated Resource configuration for " + this.getResourceContext().getResourceType()
+ + " Resource with key '" + this.getResourceContext().getResourceKey()
+ + "' failed with the following errors: " + report.getErrorMessage());
report.setStatus(ConfigurationUpdateStatus.FAILURE);
return;
}
@@ -159,20 +162,19 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
public CreateResourceReport createResource(CreateResourceReport report) {
Configuration resourceConfig = report.getResourceConfiguration();
- ConfigurationDefinition resourceConfigDef = report.getResourceType()
- .getResourceConfigurationDefinition();
+ ConfigurationDefinition resourceConfigDef = report.getResourceType().getResourceConfigurationDefinition();
// First insert the root node corresponding to the new child Resource.
- String rootPath = getChildResourceConfigurationRootPath(report.getResourceType(),
- report.getResourceConfiguration());
+ String rootPath = getChildResourceConfigurationRootPath(report.getResourceType(), report
+ .getResourceConfiguration());
AugeasNode rootNode = new AugeasNode(rootPath);
if (this.augeas.exists(rootNode.getPath())) {
report.setStatus(CreateResourceStatus.FAILURE);
report.setErrorMessage("An Augeas node already exists with path " + rootPath);
return report;
}
- String rootLabel = getChildResourceConfigurationRootLabel(report.getResourceType(),
- report.getResourceConfiguration());
+ String rootLabel = getChildResourceConfigurationRootLabel(report.getResourceType(), report
+ .getResourceConfiguration());
this.augeas.insert(rootNode.getPath(), rootLabel, false);
// Then set all its child nodes.
@@ -233,10 +235,9 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
*
* @return the path of the Augeas node that should be created for the child Resource being created
*/
- protected String getChildResourceConfigurationRootPath(ResourceType resourceType,
- Configuration resourceConfig) {
+ protected String getChildResourceConfigurationRootPath(ResourceType resourceType, Configuration resourceConfig) {
throw new IllegalStateException("Class " + getClass().getName()
- + " does not override getChildResourceConfigurationRootPath() for " + resourceType + ".");
+ + " does not override getChildResourceConfigurationRootPath() for " + resourceType + ".");
}
/**
@@ -247,10 +248,9 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
*
* @return the value of the Augeas node that should be created for the child Resource being created
*/
- protected String getChildResourceConfigurationRootLabel(ResourceType resourceType,
- Configuration resourceConfig) {
+ protected String getChildResourceConfigurationRootLabel(ResourceType resourceType, Configuration resourceConfig) {
throw new IllegalStateException("Class " + getClass().getName()
- + " does not override getChildResourceConfigurationRootLabel() for " + resourceType + ".");
+ + " does not override getChildResourceConfigurationRootLabel() for " + resourceType + ".");
}
public ResourceContext<T> getResourceContext() {
@@ -282,13 +282,13 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
try {
augeas = new Augeas(AUGEAS_ROOT_PATH, AUGEAS_LOAD_PATH, Augeas.NO_MODL_AUTOLOAD);
augeas.set("/augeas/load/" + augeasModuleName + "/lens", augeasModuleName + ".lns");
-
+
int idx = 1;
- for(String incl : includeGlobs) {
+ for (String incl : includeGlobs) {
augeas.set("/augeas/load/" + augeasModuleName + "/incl[" + (idx++) + "]", incl);
}
idx = 1;
- for(String excl : excludeGlobs) {
+ for (String excl : excludeGlobs) {
augeas.set("/augeas/load/" + augeasModuleName + "/excl[" + (idx++) + "]", excl);
}
} catch (RuntimeException e) {
@@ -331,8 +331,12 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
parentPropMap.put(prop);
}
+ protected Object toPropertyValue(PropertyDefinitionSimple propDefSimple, Augeas augeas, AugeasNode node) {
+ return augeas.get(node.getPath());
+ }
+
protected Property createPropertySimple(PropertyDefinitionSimple propDefSimple, Augeas augeas, AugeasNode node) {
- String value;
+ Object value;
if (propDefSimple.getType() == PropertySimpleType.LONG_STRING) {
List<String> childPaths = augeas.match(node.getPath());
if (childPaths.isEmpty()) {
@@ -347,7 +351,7 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
propValue.deleteCharAt(propValue.length() - 1);
value = propValue.toString();
} else {
- value = augeas.get(node.getPath());
+ value = toPropertyValue(propDefSimple, augeas, node);
}
return new PropertySimple(propDefSimple.getName(), value);
}
@@ -426,9 +430,14 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
}
}
+ protected String toNodeValue(Augeas augeas, AugeasNode node, PropertyDefinitionSimple propDefSimple,
+ PropertySimple propSimple) {
+ return propSimple.getStringValue();
+ }
+
protected void setNodeFromPropertySimple(Augeas augeas, AugeasNode node, PropertyDefinitionSimple propDefSimple,
PropertySimple propSimple) {
- String value = propSimple.getStringValue();
+ String value = toNodeValue(augeas, node, propDefSimple, propSimple);
if (propDefSimple.getType() == PropertySimpleType.LONG_STRING) {
// First remove the existing items.
List<String> childPaths = augeas.match(node.getPath());
@@ -467,7 +476,7 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
int listIndex = 0;
List<String> existingListMemberPaths = augeas.match(listNode.getPath() + AugeasNode.SEPARATOR_CHAR
- + listMemberPropDefMap.getName());
+ + listMemberPropDefMap.getName());
List<AugeasNode> existingListMemberNodes = new ArrayList<AugeasNode>();
for (String existingListMemberPath : existingListMemberPaths) {
existingListMemberNodes.add(new AugeasNode(existingListMemberPath));
@@ -534,49 +543,47 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
throw new RuntimeException(summarizeAugeasError(), e);
}
}
-
+
private void initGlobs(Configuration pluginConfiguration) {
PropertySimple includes = pluginConfiguration.getSimple(INCLUDE_GLOBS_PROP);
PropertySimple excludes = pluginConfiguration.getSimple(EXCLUDE_GLOBS_PROP);
-
+
includeGlobs = new ArrayList<String>();
excludeGlobs = new ArrayList<String>();
-
+
includeGlobs.addAll(Arrays.asList(includes.getStringValue().split("\\s*\\|\\s*")));
if (excludes != null) {
excludeGlobs.addAll(Arrays.asList(excludes.getStringValue().split("\\s*\\|\\s*")));
}
}
-
+
private void singleFileAvailabilityCheck(File f) {
if (!f.isAbsolute()) {
- throw new InvalidPluginConfigurationException("Path '" + f.getPath()
- + "' is not an absolute path.");
+ throw new InvalidPluginConfigurationException("Path '" + f.getPath() + "' is not an absolute path.");
}
if (!f.exists()) {
- throw new InvalidPluginConfigurationException("File '" + f.getPath()
- + "' does not exist.");
+ throw new InvalidPluginConfigurationException("File '" + f.getPath() + "' does not exist.");
}
if (f.isDirectory()) {
throw new InvalidPluginConfigurationException("Path '" + f.getPath()
+ "' is a directory, not a regular file.");
}
}
-
+
private String summarizeAugeasError() {
StringBuilder summary = new StringBuilder();
String metadataNodePrefix = "/augeas/files";
- for(String glob : includeGlobs) {
+ for (String glob : includeGlobs) {
AugeasNode metadataNode = new AugeasNode(metadataNodePrefix, glob);
AugeasNode errorNode = new AugeasNode(metadataNode, "error");
- List<String> nodePaths = this.augeas.match(errorNode.getPath());
+ List<String> nodePaths = this.augeas.match(errorNode.getPath() + "/*");
for (String path : nodePaths) {
String error = this.augeas.get(path);
- summary.append("File '").append(path.substring(metadataNodePrefix.length(), path.length() - 5))
- .append("':\n").append(error).append("\n");
+ summary.append("File '").append(path.substring(metadataNodePrefix.length(), path.length() - 5)).append(
+ "':\n").append(error).append("\n");
}
}
-
+
return summary.toString();
}
}
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/helper/AugeasNode.java b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/helper/AugeasNode.java
index 5cae312..7c01a14 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/helper/AugeasNode.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/helper/AugeasNode.java
@@ -18,7 +18,6 @@
*/
package org.rhq.plugins.augeas.helper;
-
/**
* An abstract representation of a node in an Augeas configuration tree (e.g. /files/etc/hosts/3/canonical).
*
@@ -50,9 +49,10 @@ public class AugeasNode {
if (name == null) {
throw new IllegalArgumentException("'name' parameter must not be null.");
}
+ /*
if (name.charAt(0) == SEPARATOR_CHAR) {
throw new IllegalArgumentException("Specified path (" + path + ") is not relative.");
- }
+ }*/
// TODO: This is temporary until augeas-java fixes a bug.
this.path = parent.getPath() + SEPARATOR_CHAR + name.replaceAll(" ", "\\\\ ");
@@ -104,7 +104,7 @@ public class AugeasNode {
public String toString() {
return this.path;
}
-
+
protected String getParentPath() {
String path = getPath();
if (path.equals(SEPARATOR)) {
diff --git a/modules/plugins/sudoers/src/main/java/org/rhq/plugins/sudoers/SudoersComponent.java b/modules/plugins/sudoers/src/main/java/org/rhq/plugins/sudoers/SudoersComponent.java
index 94bd969..938dca4 100644
--- a/modules/plugins/sudoers/src/main/java/org/rhq/plugins/sudoers/SudoersComponent.java
+++ b/modules/plugins/sudoers/src/main/java/org/rhq/plugins/sudoers/SudoersComponent.java
@@ -18,10 +18,54 @@
*/
package org.rhq.plugins.sudoers;
+import java.util.List;
+
+import net.augeas.Augeas;
+
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.plugins.augeas.AugeasConfigurationComponent;
+import org.rhq.plugins.augeas.helper.AugeasNode;
/**
* @author Partha Aji
*/
public class SudoersComponent extends AugeasConfigurationComponent {
+ @Override
+ protected Object toPropertyValue(PropertyDefinitionSimple propDefSimple, Augeas augeas, AugeasNode node) {
+ if ("tag".equals(node.getName())) {
+ return !"NOPASSWD".equals(augeas.get(node.getPath()));
+ }
+ return super.toPropertyValue(propDefSimple, augeas, node);
+ }
+
+ @Override
+ protected String toNodeValue(Augeas augeas, AugeasNode node, PropertyDefinitionSimple propDefSimple,
+ PropertySimple propSimple) {
+ if ("tag".equals(node.getName())) {
+ if (propSimple.getBooleanValue()) {
+ return "PASSWD";
+ }
+ return "NOPASSWD";
+ }
+
+ return super.toNodeValue(augeas, node, propDefSimple, propSimple);
+ }
+
+ protected AugeasNode getExistingChildNodeForListMemberPropertyMap(AugeasNode parentNode,
+ PropertyDefinitionList propDefList, PropertyMap propMap) {
+ // First find all child nodes with the same 'spec' value as the PropertyMap.
+ Augeas augeas = getAugeas();
+
+ String userName = propMap.getSimple("user").getStringValue();
+ String specFilter = parentNode.getPath() + "/spec[*]";
+ List<String> userPaths = augeas.match(String.format(specFilter + "/user[.='%s']", userName));
+ if (userPaths == null || userPaths.isEmpty()) {
+ return null;
+ }
+ AugeasNode node = new AugeasNode(userPaths.get(0));
+ return node.getParent();
+ }
}
diff --git a/modules/plugins/sudoers/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/sudoers/src/main/resources/META-INF/rhq-plugin.xml
index c72d01d..fda6e03 100644
--- a/modules/plugins/sudoers/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/sudoers/src/main/resources/META-INF/rhq-plugin.xml
@@ -29,8 +29,10 @@
<plugin-configuration>
<c:simple-property name="augeasModuleName" displayName="Augeas Module Name" default="Sudoers" required="true" readOnly="true"
description="the name of the Augeas module/lens to use for loading and updating this resource's configuration"/>
- <c:simple-property name="configurationFile" displayName="Sudoers File Path" required="true" readOnly="true"
- default="/etc/sudoers" description="Location of the sudoers file."/>
+ <c:simple-property name="configurationFilesInclusionPatterns" displayName="Sudoers File Path" required="true" readOnly="true"
+ default="/etc/sudoers" description="Location of the sudoers file."/>
+ <c:simple-property name="resourceConfigurationRootNode" required="true" readOnly="true"
+ default="/files/etc/sudoers"/>
</plugin-configuration>
<resource-configuration>
@@ -44,7 +46,7 @@
description="The Command/Command Alias that the specified user is allowed to execute from the specified hosts. Set it to ALL if the user is allowed to execute any command. Alternatively if you have a Cmnd_Alias defined you can use that here. Eg:if you defined Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables - in /etc/sudoers you can specify NETWORKING here."/>
<c:simple-property name="host_group/command/runas_user" displayName="Run as User" type="string" required="false" activationPolicy="immediate"
description="The User name/Run Alias of the user the specified command will be run as. For example if you wanted the command to be run as user 'foo' you would specify foo here. Set it to ALL if the user is allowed to execute the command as any user. Alternatively if you have a Run_Alias defined you can use that here. Eg:if you defined Runas_Alias OP = root, operator - in /etc/sudoers you can specify OP here."/>
- <c:simple-property name="host_group/command/tag" displayName="Require Password" type="string" required="false" activationPolicy="immediate"
+ <c:simple-property name="host_group/command/tag" displayName="Tag Specification" type="boolean" required="false" activationPolicy="immediate"
description="True if password is required to execute the command. False otherwise."/>
</c:map-property>
</c:list-property>
14 years, 6 months
[rhq] Branch 'linux-config' - 6 commits - modules/enterprise modules/helpers
by Partha Aji
modules/enterprise/gui/installer-war/pom.xml | 11 +++++++----
modules/enterprise/gui/portal-war/pom.xml | 15 +++++++++------
modules/helpers/pluginAnnotations/pom.xml | 4 ++--
modules/helpers/pluginGen/pom.xml | 6 +++---
4 files changed, 21 insertions(+), 15 deletions(-)
New commits:
commit a0f57b81ae975121c9db6e94550bcaca4c145692
Merge: 45d5a03... 7185ca2...
Author: Partha Aji <paji(a)redhat.com>
Date: Mon Oct 26 16:43:32 2009 -0400
Merge branch 'master' into linux-config
commit 7185ca2f37cc7b35d8a48df8d2bac74f4592d144
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Oct 26 14:48:30 2009 -0400
temporarily disabling jsp precomp in the dist build since it's generating errors
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml
index 0d35569..40c8268 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -299,6 +299,7 @@
</build>
</profile>
+ <!--
<profile>
<id>dist</id>
@@ -306,13 +307,13 @@
<plugins>
<plugin>
- <!-- See http://jetty.mortbay.org/jspc-maven-plugin/ -->
+ // See http://jetty.mortbay.org/jspc-maven-plugin/
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>${jetty-jspc.version}</version>
<configuration>
<keepSources>false</keepSources>
- <validateXml>false</validateXml> <!-- TODO: set to true -->
+ <validateXml>false</validateXml> // TODO: set to true
<generatedClasses>${project.build.outputDirectory}</generatedClasses>
</configuration>
<executions>
@@ -323,6 +324,7 @@
</plugins>
</build>
</profile>
+ -->
</profiles>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index dd751d3..d60407e 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -548,6 +548,7 @@
</build>
</profile>
+ <!--
<profile>
<id>dist</id>
@@ -555,13 +556,13 @@
<plugins>
<plugin>
- <!-- See http://jetty.mortbay.org/jspc-maven-plugin/ -->
+ // See http://jetty.mortbay.org/jspc-maven-plugin/
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>${jetty-jspc.version}</version>
<configuration>
<keepSources>false</keepSources>
- <validateXml>false</validateXml> <!-- TODO: set to true -->
+ <validateXml>false</validateXml> // TODO: set to true
<generatedClasses>${project.build.outputDirectory}</generatedClasses>
</configuration>
<executions>
@@ -572,6 +573,7 @@
</plugins>
</build>
</profile>
+ -->
</profiles>
commit 59cad4fcb211675be4167f684664deab5f1db696
Merge: cb30db0... bacd1ba...
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Oct 26 12:15:21 2009 -0400
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit cb30db0ea4dea73a4de3d9003c07d5033df000ec
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Oct 26 12:11:39 2009 -0400
upping jsp precompiler since the previous version seems gone from the central repo. may want to up again when a non RC is available.
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml
index 896dd3c..0d35569 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -27,6 +27,7 @@
<!-- dependency versions -->
<el.version>1.0</el.version>
<jsf-facelets.version>1.1.14</jsf-facelets.version>
+ <jetty-jspc.version>7.0.0.RC6</jetty-jspc.version>
<product.shortName>RHQ</product.shortName>
<product.name>RHQ</product.name>
@@ -307,8 +308,8 @@
<plugin>
<!-- See http://jetty.mortbay.org/jspc-maven-plugin/ -->
<groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-jspc-plugin</artifactId>
- <version>6.1.7</version>
+ <artifactId>jetty-jspc-maven-plugin</artifactId>
+ <version>${jetty-jspc.version}</version>
<configuration>
<keepSources>false</keepSources>
<validateXml>false</validateXml> <!-- TODO: set to true -->
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index 4f38976..dd751d3 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -26,6 +26,7 @@
<el.version>1.0</el.version>
<jsf-facelets.version>1.1.14</jsf-facelets.version>
<seam.version>2.1.0.SP1</seam.version>
+ <jetty-jspc.version>7.0.0.RC6</jetty-jspc.version>
<product.shortName>RHQ</product.shortName>
<product.name>RHQ</product.name>
@@ -367,8 +368,8 @@
<!-- new jetty based jsp compiler -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-jspc-plugin</artifactId>
- <version>6.1.5</version>
+ <artifactId>jetty-jspc-maven-plugin</artifactId>
+ <version>${jetty-jspc.version}</version>
<scope>provided</scope>
</dependency>
@@ -556,8 +557,8 @@
<plugin>
<!-- See http://jetty.mortbay.org/jspc-maven-plugin/ -->
<groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-jspc-plugin</artifactId>
- <version>6.1.7</version>
+ <artifactId>jetty-jspc-maven-plugin</artifactId>
+ <version>${jetty-jspc.version}</version>
<configuration>
<keepSources>false</keepSources>
<validateXml>false</validateXml> <!-- TODO: set to true -->
commit bacd1ba678d44af463226cc1a7102212b35faa09
Merge: 9dba749... 4422052...
Author: Heiko W. Rupp <hrupp(a)snert.(none)>
Date: Mon Oct 26 11:38:17 2009 +0100
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 9dba7497582b27dd7b2a547a3d43f3183dc224bf
Author: Heiko W. Rupp <hrupp(a)snert.(none)>
Date: Mon Oct 26 11:35:05 2009 +0100
Change the group of the helper artifacts to 'org.rhq.helpers' so that they end up in a subgroup
on their own. This gives less clutter to the repo.
diff --git a/modules/helpers/pluginAnnotations/pom.xml b/modules/helpers/pluginAnnotations/pom.xml
index 3e73c16..a3dc269 100644
--- a/modules/helpers/pluginAnnotations/pom.xml
+++ b/modules/helpers/pluginAnnotations/pom.xml
@@ -10,7 +10,7 @@
</parent>
- <groupId>org.rhq</groupId>
+ <groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginAnnotations</artifactId>
<packaging>jar</packaging>
@@ -50,4 +50,4 @@
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index e58e36d..0fd3ff7 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -10,7 +10,7 @@
</parent>
- <groupId>org.rhq</groupId>
+ <groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginGen</artifactId>
<packaging>jar</packaging>
@@ -86,9 +86,9 @@
<version>2.3.11</version>
</dependency>
<dependency>
- <groupId>org.rhq</groupId>
+ <groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginAnnotations</artifactId>
<version>1.4.0-SNAPSHOT</version>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
14 years, 6 months
[rhq] modules/enterprise
by Jay Shaughnessy
modules/enterprise/gui/installer-war/pom.xml | 6 ++++--
modules/enterprise/gui/portal-war/pom.xml | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 7185ca2f37cc7b35d8a48df8d2bac74f4592d144
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Oct 26 14:48:30 2009 -0400
temporarily disabling jsp precomp in the dist build since it's generating errors
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml
index 0d35569..40c8268 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -299,6 +299,7 @@
</build>
</profile>
+ <!--
<profile>
<id>dist</id>
@@ -306,13 +307,13 @@
<plugins>
<plugin>
- <!-- See http://jetty.mortbay.org/jspc-maven-plugin/ -->
+ // See http://jetty.mortbay.org/jspc-maven-plugin/
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>${jetty-jspc.version}</version>
<configuration>
<keepSources>false</keepSources>
- <validateXml>false</validateXml> <!-- TODO: set to true -->
+ <validateXml>false</validateXml> // TODO: set to true
<generatedClasses>${project.build.outputDirectory}</generatedClasses>
</configuration>
<executions>
@@ -323,6 +324,7 @@
</plugins>
</build>
</profile>
+ -->
</profiles>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index dd751d3..d60407e 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -548,6 +548,7 @@
</build>
</profile>
+ <!--
<profile>
<id>dist</id>
@@ -555,13 +556,13 @@
<plugins>
<plugin>
- <!-- See http://jetty.mortbay.org/jspc-maven-plugin/ -->
+ // See http://jetty.mortbay.org/jspc-maven-plugin/
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>${jetty-jspc.version}</version>
<configuration>
<keepSources>false</keepSources>
- <validateXml>false</validateXml> <!-- TODO: set to true -->
+ <validateXml>false</validateXml> // TODO: set to true
<generatedClasses>${project.build.outputDirectory}</generatedClasses>
</configuration>
<executions>
@@ -572,6 +573,7 @@
</plugins>
</build>
</profile>
+ -->
</profiles>
14 years, 6 months