From a5e5bcf9b1feda8e2fe0812db0aeb6bdadc1329a Mon Sep 17 00:00:00 2001 From: Gregory Amerson Date: Fri, 19 Dec 2014 07:56:06 +0800 Subject: [PATCH 1/2] remove trailing whitespace Signed-off-by: Gregory Amerson --- product.rb | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/product.rb b/product.rb index 39226a8..4c2ba4c 100755 --- a/product.rb +++ b/product.rb @@ -1,10 +1,10 @@ #!/usr/bin/env ruby # Copyright (c) 2013 to Jason van Zyl -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html require 'mustache' require 'rexml/document' @@ -58,36 +58,36 @@ # Plugin template = File.open('templates/plugin.mustache').read -plugin = Mustache.render(template, vars) -File.open(pluginId + "/plugin.xml", 'w') { |f| - f.write(plugin) +plugin = Mustache.render(template, vars) +File.open(pluginId + "/plugin.xml", 'w') { |f| + f.write(plugin) } # Feature template = File.open('templates/feature.mustache').read -feature = Mustache.render(template, vars) -File.open(featureDirectory + "/feature.xml", 'w') { |f| - f.write(feature) +feature = Mustache.render(template, vars) +File.open(featureDirectory + "/feature.xml", 'w') { |f| + f.write(feature) } # Product template = File.open('templates/product.mustache').read -product = Mustache.render(template, vars) -File.open("io.tesla.ide.rcp/io.tesla.ide.rcp.product", 'w') { |f| - f.write(product) +product = Mustache.render(template, vars) +File.open("io.tesla.ide.rcp/io.tesla.ide.rcp.product", 'w') { |f| + f.write(product) } # Poms pomTemplate = File.open('templates/pom.parent.mustache').read -parentPom = Mustache.render(pomTemplate, vars) -File.open("pom.xml", 'w') { |f| - f.write(parentPom) +parentPom = Mustache.render(pomTemplate, vars) +File.open("pom.xml", 'w') { |f| + f.write(parentPom) } pomTemplate = File.open('templates/pom.product.mustache').read -productPom = Mustache.render(pomTemplate, vars) -File.open(productDirectory + "/pom.xml", 'w') { |f| - f.write(productPom) +productPom = Mustache.render(pomTemplate, vars) +File.open(productDirectory + "/pom.xml", 'w') { |f| + f.write(productPom) } From fb3a280b72d8e4e6a1f4669dcba5fa4393a56370 Mon Sep 17 00:00:00 2001 From: Gregory Amerson Date: Tue, 23 Dec 2014 05:47:23 +0800 Subject: [PATCH 2/2] added missing template processing Signed-off-by: Gregory Amerson --- product.rb | 11 ++++++++++- templates/pom.feature.mustache | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 templates/pom.feature.mustache diff --git a/product.rb b/product.rb index 4c2ba4c..bf87fa5 100755 --- a/product.rb +++ b/product.rb @@ -90,5 +90,14 @@ f.write(productPom) } +pomTemplate = File.open('templates/pom.feature.mustache').read +featurePom = Mustache.render(pomTemplate, vars) +File.open(featureDirectory + "/pom.xml", 'w') { |f| + f.write(featurePom) +} - +pomTemplate = File.open('templates/pom.plugin.mustache').read +pluginPom = Mustache.render(pomTemplate, vars) +File.open(pluginId + "/pom.xml", 'w') { |f| + f.write(pluginPom) +} diff --git a/templates/pom.feature.mustache b/templates/pom.feature.mustache new file mode 100644 index 0000000..5ba7760 --- /dev/null +++ b/templates/pom.feature.mustache @@ -0,0 +1,15 @@ + + + 4.0.0 + + + 1.0.0-SNAPSHOT + org.sonatype.maven.ide + maven-ide-parent + + + io.tesla.ide.feature + eclipse-feature + TeslaIDE :: Feature +