cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 9855a84
Date Wed, 11 Jun 2014 12:06:29 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 522208dec -> 9855a84a1


Move the maven wiz stuff to the tools directory and make sure it gets build with the correct
version when needed


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9855a84a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9855a84a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9855a84a

Branch: refs/heads/master
Commit: 9855a84a18ef3828a4e6f0a95bfa8287eec2bb76
Parents: 8e704f5
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Jun 11 14:05:13 2014 +0200
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Jun 11 14:06:16 2014 +0200

----------------------------------------------------------------------
 Wix-cloudstack-maven-plugin/pom.xml             |  77 ----------
 .../src/org/apache/cloudstack/wix/HeatMojo.java | 144 -------------------
 client/pom.xml                                  |   2 +-
 pom.xml                                         |  11 ++
 tools/wix-cloudstack-maven-plugin/pom.xml       |  78 ++++++++++
 .../src/org/apache/cloudstack/wix/HeatMojo.java | 144 +++++++++++++++++++
 6 files changed, 234 insertions(+), 222 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9855a84a/Wix-cloudstack-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/Wix-cloudstack-maven-plugin/pom.xml b/Wix-cloudstack-maven-plugin/pom.xml
deleted file mode 100644
index 0ce356c..0000000
--- a/Wix-cloudstack-maven-plugin/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
-  license agreements. See the NOTICE file distributed with this work for additional
-  information regarding copyright ownership. The ASF licenses this file to you 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 at 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. -->
-<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/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>Wix-cloudstack-maven-plugin</artifactId>
-  <name>Wix-cloudstack-maven-plugin</name>
-  <packaging>maven-plugin</packaging>
-  <parent>
-    <groupId>org.apache.cloudstack</groupId>
-    <artifactId>cloudstack</artifactId>
-    <version>4.5.0-SNAPSHOT</version>
-  </parent>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>${maven-plugin-api.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-exec</artifactId>
-      <version>${commons-exec.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.bitbucket.joxley</groupId>
-      <artifactId>wix-maven-plugin</artifactId>
-      <version>${wix-maven-plugin.version}</version>
-    </dependency>
-  </dependencies>
-
-  <properties>
-    <maven-plugin-api.version>2.0</maven-plugin-api.version>
-    <commons-exec.version>1.1</commons-exec.version>
-    <wix-maven-plugin.version>1.1.1</wix-maven-plugin.version>
-  </properties>
-
-  <build>
-    <pluginManagement>
-      <plugins>
-        <!-- Ignore/Execute plugin execution -->
-        <plugin>
-          <groupId>org.eclipse.m2e</groupId>
-          <artifactId>lifecycle-mapping</artifactId>
-          <version>1.0.0</version>
-          <configuration>
-            <lifecycleMappingMetadata>
-              <pluginExecutions>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-enforcer-plugin</artifactId>
-                    <versionRange>[1.0.0,)</versionRange>
-                    <goals>
-                      <goal>enforce</goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <ignore />
-                  </action>
-                </pluginExecution>
-              </pluginExecutions>
-            </lifecycleMappingMetadata>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9855a84a/Wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
----------------------------------------------------------------------
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
deleted file mode 100644
index 075908e..0000000
--- a/Wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
+++ /dev/null
@@ -1,144 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you 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 at
-//
-//   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 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;
-
-  /**
-  *
-  * variable names to be passed to heat command
-  * @parameter expression="${componentGroup}"
-  */
-  private String componentGroup;
-
-  /**
-   *
-   * <DirectoryName>  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(componentGroup);
-      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);
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9855a84a/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 4d1c118..29fef4f 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -749,7 +749,7 @@
           <plugin>
             <groupId>org.apache.cloudstack</groupId>
             <artifactId>Wix-cloudstack-maven-plugin</artifactId>
-            <version>4.5.0-SNAPSHOT</version>
+            <version>${project.version}</version>
             <executions>
               <execution>
                 <id>wix-cs</id>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9855a84a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e7f56f9..0b3b56e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1059,5 +1059,16 @@
         </plugins>
       </build>
     </profile>  
+    <profile>
+      <id>buildw</id>
+      <activation>
+        <property>
+          <name>buildw</name>
+        </property>
+      </activation>
+      <modules>
+        <module>tools/wix-cloudstack-maven-plugin</module>
+      </modules>
+    </profile>
   </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9855a84a/tools/wix-cloudstack-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/tools/wix-cloudstack-maven-plugin/pom.xml b/tools/wix-cloudstack-maven-plugin/pom.xml
new file mode 100644
index 0000000..7b89b07
--- /dev/null
+++ b/tools/wix-cloudstack-maven-plugin/pom.xml
@@ -0,0 +1,78 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+  license agreements. See the NOTICE file distributed with this work for additional
+  information regarding copyright ownership. The ASF licenses this file to you 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 at 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. -->
+<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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>Wix-cloudstack-maven-plugin</artifactId>
+  <name>Apache CloudStack - Wix Maven Plugin</name>
+  <packaging>maven-plugin</packaging>
+  <parent>
+    <groupId>org.apache.cloudstack</groupId>
+    <artifactId>cloudstack</artifactId>
+    <version>4.5.0-SNAPSHOT</version>
+    <relativePath>../../pom.xml</relativePath>
+  </parent>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-plugin-api.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-exec</artifactId>
+      <version>${commons-exec.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.bitbucket.joxley</groupId>
+      <artifactId>wix-maven-plugin</artifactId>
+      <version>${wix-maven-plugin.version}</version>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <maven-plugin-api.version>2.0</maven-plugin-api.version>
+    <commons-exec.version>1.1</commons-exec.version>
+    <wix-maven-plugin.version>1.1.1</wix-maven-plugin.version>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <!-- Ignore/Execute plugin execution -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-enforcer-plugin</artifactId>
+                    <versionRange>[1.0.0,)</versionRange>
+                    <goals>
+                      <goal>enforce</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore />
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9855a84a/tools/wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
----------------------------------------------------------------------
diff --git a/tools/wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
b/tools/wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
new file mode 100644
index 0000000..075908e
--- /dev/null
+++ b/tools/wix-cloudstack-maven-plugin/src/org/apache/cloudstack/wix/HeatMojo.java
@@ -0,0 +1,144 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you 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 at
+//
+//   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 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;
+
+  /**
+  *
+  * variable names to be passed to heat command
+  * @parameter expression="${componentGroup}"
+  */
+  private String componentGroup;
+
+  /**
+   *
+   * <DirectoryName>  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(componentGroup);
+      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);
+    }
+  }
+
+}


Mime
View raw message