diff --git a/Wix-cloudstack-maven-plugin/pom.xml b/Wix-cloudstack-maven-plugin/pom.xml
new file mode 100644
index 00000000000..e5b9bd1c7d3
--- /dev/null
+++ b/Wix-cloudstack-maven-plugin/pom.xml
@@ -0,0 +1,68 @@
+
+ 4.0.0
+ Wix-cloudstack-maven-plugin
+ Wix-cloudstack-maven-plugin
+ maven-plugin
+
+ org.apache.cloudstack
+ cloudstack
+ 4.5.0-SNAPSHOT
+
+
+
+
+ org.apache.maven
+ maven-plugin-api
+ ${maven-plugin-api.version}
+
+
+ org.apache.commons
+ commons-exec
+ ${commons-exec.version}
+
+
+ org.bitbucket.joxley
+ wix-maven-plugin
+ ${wix-maven-plugin.version}
+
+
+
+
+ 2.0
+ 1.1
+ 1.1.1
+
+
+
+
+
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ [1.0.0,)
+
+ enforce
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java b/Wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
new file mode 100644
index 00000000000..4724d76f700
--- /dev/null
+++ b/Wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
@@ -0,0 +1,121 @@
+package org.apache.cloudstack.wix;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.exec.CommandLine;
+import org.apache.commons.exec.DefaultExecutor;
+import org.apache.commons.exec.ExecuteException;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.bitbucket.joxley.wix.AbstractWixMojo;
+
+/**
+ *
+ * @goal heat
+ *
+ * @phase package
+ *
+ */
+public class HeatMojo extends AbstractWixMojo {
+
+ /**
+ * Directory name to be harvested
+ *
+ * @parameter expression="${dir}"
+ * @required
+ *
+ */
+ private String dir;
+
+ /**
+ * use template, one of: fragment,module,product
+ * @parameter expression="${template}" defaults to fragment
+ *
+ */
+ private String template;
+
+ /**
+ * Output file
+ *
+ * @parameter expression="${outputFile}"
+ */
+ private File outputFile;
+
+ /**
+ *
+ * variable names to be passed to heat command
+ * @parameter expression="${vars}"
+ */
+ private String vars;
+
+ /**
+ *
+ * variable names to be passed to heat command
+ * @parameter expression="${workingDirectory}"
+ */
+ private File workingDirectory;
+
+ /**
+ *
+ * directory reference to root directories
+ * @parameter expression="${directoryName}"
+ */
+ private String directoryName;
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ try {
+ CommandLine commandLine = new CommandLine("heat");
+
+ if(dir != null && !dir.trim().isEmpty()) {
+ commandLine.addArgument("dir");
+ commandLine.addArgument(dir);
+ }
+
+ commandLine.addArgument("-gg");
+ commandLine.addArgument("-cg");
+ commandLine.addArgument("ClientPath");
+ commandLine.addArgument("-ke");
+ commandLine.addArgument("-sfrag");
+
+ if(template == null || template.trim().isEmpty()) {
+ commandLine.addArgument("-template");
+ commandLine.addArgument("fragment");
+ } else {
+ commandLine.addArgument("-template");
+ commandLine.addArgument(template);
+ }
+
+ if (outputFile != null) {
+ commandLine.addArgument("-out");
+ commandLine.addArgument(outputFile.getAbsolutePath());
+ }
+
+ if (directoryName != null) {
+ commandLine.addArgument("-dr");
+ commandLine.addArgument(directoryName);
+ }
+
+ if (vars != null) {
+ commandLine.addArguments(vars, false);
+ }
+
+ DefaultExecutor executor = new DefaultExecutor();
+ getLog().debug("working directory " + commandLine.toString());
+ executor.setWorkingDirectory(getWorkingDirectory(workingDirectory));
+ int exitValue = executor.execute(commandLine);
+
+ if (exitValue != 0) {
+ throw new MojoExecutionException(
+ "Problem executing heat, return code " + exitValue);
+ }
+
+ } catch (ExecuteException e) {
+ throw new MojoExecutionException("Problem executing heat", e);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Problem executing heat", e);
+ }
+ }
+
+}
diff --git a/client/pom.xml b/client/pom.xml
index d8dbde72a8d..aee2672bb19 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -515,6 +515,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -648,6 +658,90 @@
+
+ buildw
+
+
+ buildw
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 2.3
+
+ target/client
+ ./target/generated-webapp/WEB-INF/web.xml
+ ./target/generated-webapp
+
+
+ true
+
+
+ ${git.revision}
+ ${git.branch}
+
+
+
+
+
+ org.apache.cloudstack
+ Wix-cloudstack-maven-plugin
+ 4.5.0-SNAPSHOT
+
+ -var wix.SourceClient
+ ${basedir}/target
+ client
+ fragment
+ WEBAPPS
+ target/client.wxs
+
+
+
+ wix-cs
+
+ heat
+
+
+
+
+
+ org.bitbucket.joxley
+ wix-maven-plugin
+ 1.1.1
+
+ ${basedir}/target
+
+ WixFirewallExtension
+ WixUIExtension
+
+ -dSourceClient=SourceDir\client
+
+ ../scripts/installer/windows/acs.wxs
+ target/client.wxs
+
+ target
+
+ target/acs.wixobj
+ target/client.wixobj
+
+ target/acs.msi
+
+
+
+ wix
+
+ candle
+ light
+
+
+
+
+
+
+
simulator