diff --git a/hyracks-maven-plugin/.classpath b/hyracks-maven-plugin/.classpath
new file mode 100644
index 0000000..1f3c1ff
--- /dev/null
+++ b/hyracks-maven-plugin/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/hyracks-maven-plugin/.project b/hyracks-maven-plugin/.project
new file mode 100644
index 0000000..0e5add5
--- /dev/null
+++ b/hyracks-maven-plugin/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>hyracks-maven-plugin</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>
diff --git a/hyracks-maven-plugin/.settings/org.eclipse.jdt.core.prefs b/hyracks-maven-plugin/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..52cdab7
--- /dev/null
+++ b/hyracks-maven-plugin/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+#Thu May 19 11:57:56 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/hyracks-maven-plugin/.settings/org.maven.ide.eclipse.prefs b/hyracks-maven-plugin/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 0000000..bcc93a5
--- /dev/null
+++ b/hyracks-maven-plugin/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Thu May 19 11:57:56 PDT 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/hyracks-maven-plugin/pom.xml b/hyracks-maven-plugin/pom.xml
new file mode 100644
index 0000000..0972bca
--- /dev/null
+++ b/hyracks-maven-plugin/pom.xml
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>edu.uci.ics.hyracks</groupId>
+  <artifactId>hyracks-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <version>0.1.6-SNAPSHOT</version>
+
+  <parent>
+    <groupId>edu.uci.ics.hyracks</groupId>
+    <artifactId>hyracks</artifactId>
+    <version>0.1.6-SNAPSHOT</version>
+  </parent>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+  	<dependency>
+  		<groupId>org.apache.maven</groupId>
+  		<artifactId>maven-plugin-api</artifactId>
+  		<version>2.2.1</version>
+  		<type>jar</type>
+  		<scope>compile</scope>
+  	</dependency>
+  </dependencies>
+</project>
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksCLIMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksCLIMojo.java
new file mode 100644
index 0000000..7f3faef
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksCLIMojo.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.io.File;
+import java.io.PrintWriter;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+public abstract class AbstractHyracksCLIMojo extends AbstractHyracksMojo {
+    private static final String HYRACKS_CLI_SCRIPT = "bin" + File.separator + "hyrackscli";
+
+    /**
+     * @parameter
+     * @required
+     */
+    protected File hyracksCLIHome;
+
+    /**
+     * @parameter
+     * @required
+     */
+    private String ccHost;
+
+    /**
+     * @parameter
+     */
+    private int ccPort;
+
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        StringBuilder buffer = new StringBuilder();
+        buffer.append(createConnectCommand());
+        buffer.append('\n');
+        buffer.append(getCommands());
+        final Process proc = launch(new File(hyracksCLIHome, makeScriptName(HYRACKS_CLI_SCRIPT)), null, null);
+        try {
+            PrintWriter out = new PrintWriter(proc.getOutputStream());
+            out.println(buffer.toString());
+            out.close();
+            proc.waitFor();
+        } catch (Exception e) {
+            throw new MojoExecutionException(e.getMessage());
+        }
+    }
+
+    private String createConnectCommand() {
+        return "connect to \"" + ccHost + (ccPort == 0 ? "" : (":" + ccPort)) + "\";";
+    }
+
+    protected abstract String getCommands();
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksMojo.java
new file mode 100644
index 0000000..972f584
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksMojo.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+public abstract class AbstractHyracksMojo extends AbstractMojo {
+    protected Process launch(File command, String options, File workingDir) throws MojoExecutionException {
+        if (!command.isFile()) {
+            throw new MojoExecutionException(command.getAbsolutePath() + " is not an executable program");
+        }
+
+        getLog().info("Executing Hyracks command: " + command + " with args [" + options + "]");
+        String osName = System.getProperty("os.name");
+        try {
+            if (osName.startsWith("Windows")) {
+                return launchWindowsBatch(command, options);
+            } else {
+                return launchUnixScript(command, options, workingDir);
+            }
+        } catch (IOException e) {
+            throw new MojoExecutionException("Error executing command: " + command.getAbsolutePath(), e);
+        }
+    }
+
+    protected Process launchWindowsBatch(File command, String options) throws IOException {
+        String[] commandWithOptions = new String[] { "cmd.exe", "/C", command.getAbsolutePath() + " " + options };
+
+        Process proc = Runtime.getRuntime().exec(commandWithOptions);
+        dump(proc.getInputStream());
+        dump(proc.getErrorStream());
+        return proc;
+    }
+
+    protected Process launchUnixScript(File command, String options, File workingDir) throws IOException {
+        String[] optionsArray = new String[0];
+        if (options != null && !options.trim().isEmpty()) {
+            optionsArray = options.trim().split("\\s+");
+        }
+        String[] commandWithOptions = new String[optionsArray.length + 1];
+        commandWithOptions[0] = command.getAbsolutePath();
+        for (int i = 0; i < optionsArray.length; ++i) {
+            commandWithOptions[i + 1] = optionsArray[i];
+        }
+        Process proc = Runtime.getRuntime().exec(commandWithOptions, null,
+                workingDir == null ? new File(".") : workingDir);
+        dump(proc.getInputStream());
+        dump(proc.getErrorStream());
+        return proc;
+    }
+
+    protected void dump(final InputStream input) {
+        final int streamBufferSize = 1000;
+        final Reader in = new InputStreamReader(input);
+        new Thread(new Runnable() {
+            public void run() {
+                try {
+                    char[] chars = new char[streamBufferSize];
+                    int c;
+                    while ((c = in.read(chars)) != -1) {
+                        if (c > 0) {
+                            System.out.print(String.valueOf(chars, 0, c));
+                        }
+                    }
+                } catch (IOException e) {
+                }
+            }
+        }).start();
+    }
+
+    protected String makeScriptName(String scriptName) {
+        String osName = System.getProperty("os.name");
+        String commandExt = osName.startsWith("Windows") ? ".bat" : "";
+        return scriptName + commandExt;
+    }
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksServerMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksServerMojo.java
new file mode 100644
index 0000000..448ca22
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/AbstractHyracksServerMojo.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.io.File;
+
+public abstract class AbstractHyracksServerMojo extends AbstractHyracksMojo {
+    /**
+     * @parameter
+     * @required
+     */
+    protected File hyracksServerHome;
+
+    /**
+     * @parameter
+     */
+    protected File workingDir;
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksAppDeploymentMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksAppDeploymentMojo.java
new file mode 100644
index 0000000..76bbb5a
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksAppDeploymentMojo.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.io.File;
+
+/**
+ * @goal deploy-app
+ */
+public class HyracksAppDeploymentMojo extends AbstractHyracksCLIMojo {
+    /**
+     * @parameter
+     * @required
+     */
+    private String appName;
+
+    /**
+     * @parameter
+     * @required
+     */
+    private File harFile;
+
+    @Override
+    protected String getCommands() {
+        return "create application " + appName + " \"" + harFile.getAbsolutePath() + "\";";
+    }
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksCCStartMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksCCStartMojo.java
new file mode 100644
index 0000000..942b055
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksCCStartMojo.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.io.File;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * @goal start-cc
+ */
+public class HyracksCCStartMojo extends AbstractHyracksServerMojo {
+    private static final String HYRACKS_CC_SCRIPT = "bin" + File.separator + "hyrackscc";
+
+    /**
+     * @parameter property = "port"
+     */
+    private int port;
+
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        StringBuilder cmdLineBuffer = new StringBuilder();
+        if (port != 0) {
+            cmdLineBuffer.append("-port ").append(port);
+        }
+        String args = cmdLineBuffer.toString();
+        final Process proc = launch(new File(hyracksServerHome, makeScriptName(HYRACKS_CC_SCRIPT)), args, workingDir);
+        HyracksServiceRegistry.INSTANCE.addServiceProcess(proc);
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+    }
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksNCStartMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksNCStartMojo.java
new file mode 100644
index 0000000..1206e08
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksNCStartMojo.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.io.File;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * @goal start-nc
+ */
+public class HyracksNCStartMojo extends AbstractHyracksServerMojo {
+    private static final String HYRACKS_NC_SCRIPT = "bin" + File.separator + "hyracksnc";
+
+    /**
+     * @parameter
+     * @required
+     */
+    private String nodeId;
+
+    /**
+     * @parameter
+     * @required
+     */
+    private String ccHost;
+
+    /**
+     * @parameter
+     */
+    private int ccPort;
+
+    /**
+     * @parameter
+     * @required
+     */
+    private String dataIpAddress;
+
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        StringBuilder cmdLineBuffer = new StringBuilder();
+        cmdLineBuffer.append(" -cc-host ").append(ccHost);
+        cmdLineBuffer.append(" -data-ip-address ").append(dataIpAddress);
+        cmdLineBuffer.append(" -node-id ").append(nodeId);
+        if (ccPort != 0) {
+            cmdLineBuffer.append(" -cc-port ").append(ccPort);
+        }
+        String args = cmdLineBuffer.toString();
+        final Process proc = launch(new File(hyracksServerHome, makeScriptName(HYRACKS_NC_SCRIPT)), args, workingDir);
+        HyracksServiceRegistry.INSTANCE.addServiceProcess(proc);
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+    }
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksServiceRegistry.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksServiceRegistry.java
new file mode 100644
index 0000000..6ea5a64
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksServiceRegistry.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class HyracksServiceRegistry {
+    public static HyracksServiceRegistry INSTANCE = new HyracksServiceRegistry();
+
+    private final List<Process> serviceProcesses;
+
+    private HyracksServiceRegistry() {
+        serviceProcesses = new ArrayList<Process>();
+        Runtime.getRuntime().addShutdownHook(new Thread() {
+            @Override
+            public void run() {
+                destroyAll();
+            }
+        });
+    }
+
+    public synchronized void addServiceProcess(Process process) {
+        serviceProcesses.add(process);
+    }
+
+    public synchronized void destroyAll() {
+        for (Process p : serviceProcesses) {
+            try {
+                p.destroy();
+            } catch (Exception e) {
+            }
+        }
+        serviceProcesses.clear();
+    }
+}
\ No newline at end of file
diff --git a/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksStopServicesMojo.java b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksStopServicesMojo.java
new file mode 100644
index 0000000..eaf40fc
--- /dev/null
+++ b/hyracks-maven-plugin/src/main/java/edu/uci/ics/hyracks/maven/plugin/HyracksStopServicesMojo.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.maven.plugin;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * @goal stop-services
+ */
+public class HyracksStopServicesMojo extends AbstractHyracksMojo {
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        getLog().info("Stopping Hyracks Services");
+        HyracksServiceRegistry.INSTANCE.destroyAll();
+    }
+}
\ No newline at end of file
