ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [01/30] ignite git commit: IGNITE-5888 Web Console: Fixed maven project generation.
Date Thu, 10 Aug 2017 13:52:58 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5872 cfbd3275d -> 855ece3b1


IGNITE-5888 Web Console: Fixed maven project generation.


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

Branch: refs/heads/ignite-5872
Commit: 20969c0755595ba686d00220287d986327ff2b9d
Parents: 4d323f3
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Thu Aug 3 10:42:08 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Aug 3 10:42:08 2017 +0700

----------------------------------------------------------------------
 .../modules/configuration/generator/Maven.service.js   | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/20969c07/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
b/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
index abbada9..9bf0a34 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
@@ -42,13 +42,18 @@ export default class IgniteMavenGenerator {
         deps.push({groupId, artifactId, version, jar});
     }
 
-    pickDependency(deps, key, dfltVer, igniteVer) {
+    pickDependency(acc, key, dfltVer, igniteVer) {
+        const deps = POM_DEPENDENCIES[key];
+
+        if (_.isNil(deps))
+            return;
+
         const extractVersion = (version) => {
             return _.isArray(version) ? _.find(version, (v) => versionService.since(igniteVer,
v.range)).version : version;
         };
 
-        _.forEach(POM_DEPENDENCIES[key], ({groupId, artifactId, version, jar}) => {
-            this.addDependency(deps, groupId || 'org.apache.ignite', artifactId, extractVersion(version)
|| dfltVer, jar);
+        _.forEach(_.castArray(deps), ({groupId, artifactId, version, jar}) => {
+            this.addDependency(acc, groupId || 'org.apache.ignite', artifactId, extractVersion(version)
|| dfltVer, jar);
         });
     }
 
@@ -140,8 +145,10 @@ export default class IgniteMavenGenerator {
 
     /**
      * Add dependency for specified store factory if not exist.
+     *
      * @param deps Already added dependencies.
      * @param storeFactory Store factory to add dependency.
+     * @param igniteVer Ignite version.
      */
     storeFactoryDependency(deps, storeFactory, igniteVer) {
         if (storeFactory.dialect && (!storeFactory.connectVia || storeFactory.connectVia
=== 'DataSource'))


Mime
View raw message