Author: mstruk
Date: 2009-11-29 15:02:27 -0500 (Sun, 29 Nov 2009)
New Revision: 850
Modified:
tools/packager/branches/mc-integration/src/main/javascript/eXo/command/exobuild.js
tools/packager/branches/mc-integration/src/main/javascript/eXo/projects/Product.js
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/JbossEar.js
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/Tomcat.js
Log:
Added mc-integration deployment for jbossas, and --integration-test option to deploy
tests
Modified:
tools/packager/branches/mc-integration/src/main/javascript/eXo/command/exobuild.js
===================================================================
---
tools/packager/branches/mc-integration/src/main/javascript/eXo/command/exobuild.js 2009-11-29
16:53:22 UTC (rev 849)
+++
tools/packager/branches/mc-integration/src/main/javascript/eXo/command/exobuild.js 2009-11-29
20:02:27 UTC (rev 850)
@@ -84,6 +84,7 @@
+ " * --enable-workflow=engine + .\n"
+ " (Since DMS 2.3) Specify the workflow engine to
bundle with the product. The possible values are bonita or jbpm.\n"
+ " This option is only used for products that use
workflow. Default engine is bonita\n"
+ + " * --integration-test This option is used when preparing special server
deployment for running integration tests - extra libs and apps are deployed\n"
+ " * --help To print this help. Also you can use option:
'-help' or 'help' or '?' \n");
}
@@ -189,6 +190,7 @@
var enableWorkflow = false;
var tasks = new java.util.ArrayList();
var noInternet = false;
+var integrationTests = false;
var args = arguments;
@@ -252,6 +254,8 @@
enableWorkflow = true;
} else if (arg == "--nointernet") {
noInternet = true;
+ } else if (arg == "--integration-test") {
+ integrationTests = true;
} else if (arg == "--help" || arg == "-help" || arg ==
"help" || arg == "?") {
exobuildInstructions();
java.lang.System.exit(1);
@@ -335,6 +339,8 @@
while (serv.hasNext()) {
server = serv.next();
server.pluginVersion = product.serverPluginVersion;
+ if (integrationTests)
+ product.integrationTests = true;
tasks.add(product.DeployTask(product, server, eXo.env.m2Repos));
if (database != null) {
tasks.add(database.DeployTask(product, server, eXo.env.m2Repos));
Modified:
tools/packager/branches/mc-integration/src/main/javascript/eXo/projects/Product.js
===================================================================
---
tools/packager/branches/mc-integration/src/main/javascript/eXo/projects/Product.js 2009-11-29
16:53:22 UTC (rev 849)
+++
tools/packager/branches/mc-integration/src/main/javascript/eXo/projects/Product.js 2009-11-29
20:02:27 UTC (rev 850)
@@ -9,6 +9,7 @@
this.module = null;
this.useWorkflow = false;
+ this.integrationTests = false;
this.useContentValidation = false;
this.dependencyModule = null;
this.serverPluginVersion = "trunk";
Modified:
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/JbossEar.js
===================================================================
---
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/JbossEar.js 2009-11-29
16:53:22 UTC (rev 849)
+++
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/JbossEar.js 2009-11-29
20:02:27 UTC (rev 850)
@@ -76,6 +76,19 @@
// product.removeDependency(new Project("quartz", "quartz",
"jar",
// "1.5.0-RC2"));
+ this.EXO_KERNEL_VER = "2.2.0-Beta05-SNAPSHOT";
+ product.addDependencies(new Project("org.jboss.mc-int",
"jboss-mc-int-common", "jar", "2.2.0.Alpha2"));
+ product.addDependencies(new Project("org.jboss.mc-int",
"jboss-mc-int-servlet", "jar", "2.2.0.Alpha2"));
+ product.addDependencies(new Project("org.exoplatform.kernel",
"exo.kernel.mc-int", "jar", this.EXO_KERNEL_VER));
+ product.addDependencies(new Project("org.exoplatform.kernel",
"exo.kernel.mc-kernel-extras", "jar", this.EXO_KERNEL_VER));
+
+
+ if (product.integrationTests) {
+ this.MC_INT_DEMO_ARTIFACT = "exo.kernel.demos.mc-injection";
+ product.addDependencies(new Project("org.exoplatform.kernel.demos",
this.MC_INT_DEMO_ARTIFACT, "jar", this.EXO_KERNEL_VER));
+ product.addDependencies(new Project("org.exoplatform.kernel.tests",
"exo.kernel.integration-tests", "war", this.EXO_KERNEL_VER));
+ }
+
var version = product.version;
if (version.indexOf("2.0") != 0 && version.indexOf("2.1")
!= 0 && version.indexOf("2.2") != 0
&& version.indexOf("2.5") != 0) {
@@ -130,7 +143,14 @@
eXo.core.IOUtil.remove(file);
}
}
-
+
+ if (product.integrationTests) {
+ var fromFile = new java.io.File(libDir, this.MC_INT_DEMO_ARTIFACT + "-" +
this.EXO_KERNEL_VER + ".jar");
+ eXo.core.IOUtil.cp(fromFile.getAbsolutePath(), this.deployEarDir);
+ eXo.core.IOUtil.remove(fromFile);
+
+ }
+
eXo.core.IOUtil.chmodExecutableInDir(this.serverHome + "/bin/",
".sh");
}
Modified: tools/packager/branches/mc-integration/src/main/javascript/eXo/server/Tomcat.js
===================================================================
---
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/Tomcat.js 2009-11-29
16:53:22 UTC (rev 849)
+++
tools/packager/branches/mc-integration/src/main/javascript/eXo/server/Tomcat.js 2009-11-29
20:02:27 UTC (rev 850)
@@ -78,7 +78,11 @@
//GTNPORTAL-32 No WSRP on tomcat yet
product.removeDependency(new Project("org.exoplatform.portal",
"exo.portal.component.wsrp", "jar", product.serverPluginVersion ));
product.removeDependencyByGroupId("org.gatein.wsrp");
-
+
+ if (product.integrationTests) {
+ product.addDependencies(new Project("org.exoplatform.kernel.demos",
"exo.kernel.demos.mc-injection", "jar",
"2.2.0-Beta05-SNAPSHOT"));
+ product.addDependencies(new Project("org.exoplatform.kernel.tests",
"exo.kernel.integration-tests", "war",
"2.2.0-Beta05-SNAPSHOT"));
+ }
}
Tomcat.prototype.onDeploy = function(project) {