ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [15/50] ignite git commit: IGNITE-2696 Reworked pom artifact name generation.
Date Fri, 04 Mar 2016 09:31:10 GMT
IGNITE-2696 Reworked pom artifact name generation.


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

Branch: refs/heads/ignite-843
Commit: e52058de8ac486e991746dfbfe4783fc7e664a81
Parents: 75ad7be
Author: vsisko <vsisko@gridgain.com>
Authored: Sat Feb 20 14:49:05 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Sat Feb 20 14:49:05 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/helpers/generator/generator-pom.js          | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e52058de/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
index 4d9724f..804b607 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
@@ -18,6 +18,13 @@
 // pom.xml generation entry point.
 $generatorPom = {};
 
+$generatorPom.escapeId = function (s) {
+    if (typeof(s) !== 'string')
+        return s;
+
+    return s.replace(/[^A-Za-z0-9_\-.]+/g, '_');
+};
+
 $generatorPom.addProperty = function (res, tag, val) {
     res.line('<' + tag + '>' + val + '</' + tag + '>');
 };
@@ -124,7 +131,7 @@ $generatorPom.pom = function (cluster, igniteVersion, mvnRepositories,
res) {
     res.needEmptyLine = true;
 
     $generatorPom.addProperty(res, 'groupId', 'org.apache.ignite');
-    $generatorPom.addProperty(res, 'artifactId', 'ignite-generated-model');
+    $generatorPom.addProperty(res, 'artifactId', 'ignite-generated-' + $generatorPom.escapeId(cluster.name));
     $generatorPom.addProperty(res, 'version', igniteVersion);
 
     res.needEmptyLine = true;


Mime
View raw message