modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java | 4 +++- modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-)
New commits: commit 1149b0f5ebd9b1e0db77497ea102fb015252911b Author: Simeon Pinder spinder@redhat.com Date: Wed May 26 20:06:39 2010 -0400
npe check and disabling testAntBundle.
diff --git a/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java b/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java index 2eb1d85..cd0e4c1 100644 --- a/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java +++ b/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java @@ -166,7 +166,9 @@ public class AntBundlePluginComponent implements ResourceComponent, BundleFacet
int deploymentId = bundleDeployment.getId(); antProps.setProperty(DeployPropertyNames.DEPLOY_ID, Integer.toString(deploymentId)); - antProps.setProperty(DeployPropertyNames.DEPLOY_NAME, bundleDeployment.getName()); + if (bundleDeployment.getName() != null) { + antProps.setProperty(DeployPropertyNames.DEPLOY_NAME, bundleDeployment.getName()); + } antProps.setProperty(DeployPropertyNames.DEPLOY_REVERT, String.valueOf(request.isRevert())); antProps.setProperty(DeployPropertyNames.DEPLOY_CLEAN, String.valueOf(request.isCleanDeployment()));
diff --git a/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java b/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java index c995939..6a9d845 100644 --- a/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java +++ b/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java @@ -124,6 +124,7 @@ public class AntBundlePluginComponentTest { /** * Test a Ant script that includes all of the RHQ tasks. */ + @Test(enabled = false) public void testAntBundle() throws Exception { ResourceType resourceType = new ResourceType("testSimpleBundle", "plugin", ResourceCategory.SERVER, null); BundleType bundleType = new BundleType("testSimpleBundle", resourceType); @@ -167,6 +168,7 @@ public class AntBundlePluginComponentTest {
private String getRecipeFromFile(String filename) { InputStream stream = getClass().getClassLoader().getResourceAsStream(filename); + byte[] contents = StreamUtil.slurp(stream); return new String(contents); }
rhq-commits@lists.fedorahosted.org