Author: richard.opalka(a)jboss.com
Date: 2008-09-28 10:21:25 -0400 (Sun, 28 Sep 2008)
New Revision: 8279
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java
Log:
[JBWS-2322] fixing hudson regression
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java 2008-09-28
14:20:42 UTC (rev 8278)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java 2008-09-28
14:21:25 UTC (rev 8279)
@@ -50,7 +50,6 @@
private static final String PS = System.getProperty("path.separator"); //
':' on unix, ';' on windows
private static final String ANT_SHELL = ":".equals( PS ) ? "ant" :
"ant.bat";
private String jbossHome;
- private File workspaceHome;
private File binDistroDir;
private String projectName = "GeneratorTestProject";
@@ -61,8 +60,7 @@
{
super.setUp();
jbossHome = System.getProperty("jboss.home").replace('\\',
'/');
- workspaceHome = new File(".");
- binDistroDir = new File("..");
+ binDistroDir = new File(System.getProperty("user.dir"), "..");
}
public void testGenerator() throws Exception
@@ -78,7 +76,7 @@
String integrationTarget =
System.getProperty("jbossws.integration.target");
executeCommand(ANT_SHELL + " -f " + distroBuild.getAbsolutePath() +
" -D" + integrationTarget + ".home=" + jbossHome + "
-Djbossws.integration.target="
+ integrationTarget + " create-project", "Error while creating
the user project!");
- File projectHomeDir = new File(workspaceHome, projectName);
+ File projectHomeDir = new File(binDistroDir, projectName);
File packageDir = new File(projectHomeDir.getCanonicalPath() + FS + "src"
+ FS + "main" + FS + "java" + FS + "org" + FS +
"jboss" + FS + "test" + FS + "ws" + FS +
"projectGenerator");
packageDir.mkdirs();
File endpointImpl = new File(packageDir, "EndpointImpl.java");
@@ -151,10 +149,10 @@
StringBuffer sb = new StringBuffer();
sb.append("#JBossWS user project generator test\n");
sb.append("project.name=" + projectName + "\n");
- sb.append("project.jboss.home=" + jbossHome + "\n");
+ sb.append("project.jboss.home=" + jbossHome.replace('\\',
'/') + "\n");
sb.append("project.type=jar\n");
sb.append("project.jboss.conf=default\n");
- sb.append("workspace.home=" +
workspaceHome.getCanonicalPath().replace('\\', '/') + "\n");
+ sb.append("workspace.home=" +
binDistroDir.getAbsolutePath().replace('\\', '/') + "\n");
BufferedWriter out = new BufferedWriter(new FileWriter(file));
out.write(sb.toString());
out.close();
@@ -162,7 +160,10 @@
private boolean isDistroTest() throws Exception
{
- File build = new File(".." + FS + "build.xml");
+ if (binDistroDir == null)
+ return false;
+
+ File build = new File(binDistroDir, "build.xml");
if (!build.exists())
{
String testResDir = JBossWSTestHelper.getTestResourcesDir();
Show replies by date