polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [13/50] polygene-java git commit: POLYGENE-255 - Fixed JMX problems in Command Line AppType in Yeoman generator.
Date Mon, 10 Jul 2017 06:53:15 GMT
POLYGENE-255 - Fixed JMX problems in Command Line AppType in Yeoman generator.

Signed-off-by: niclas <niclas@hedhman.org>


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/85a37fdc
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/85a37fdc
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/85a37fdc

Branch: refs/heads/es-jooq
Commit: 85a37fdc1c0724dffddf47a06205a1272815ddf6
Parents: 818df1a
Author: niclas <niclas@hedhman.org>
Authored: Sat Jun 17 09:26:41 2017 +0800
Committer: niclas <niclas@hedhman.org>
Committed: Sat Jun 17 09:26:41 2017 +0800

----------------------------------------------------------------------
 .../templates/buildtool/gradle-bootstrap.tmpl   |  4 ++
 tools/generator-polygene/test/generator_test.js | 39 +++++++++++++-------
 2 files changed, 29 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/85a37fdc/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
index 55b1c93..13085c0 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
@@ -55,6 +55,10 @@ if( polygene.caching !== "None" ) {
 %>  implementation "org.apache.polygene.extensions:org.apache.polygene.extension.metrics-<%=
polygene.metrics.toLowerCase() %>:$polygeneVersion"
 <%
     }
+if( polygene.hasFeature('jmx' ) ) {
+%>  implementation "org.apache.polygene.libraries:org.apache.polygene.library.jmx:$polygeneVersion"
+<%
+    }
 if( polygene.hasFeature('envisage' ) ) {
 %>  implementation "org.apache.polygene.tools:org.apache.polygene.tool.envisage:$polygeneVersion"
 <% }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/85a37fdc/tools/generator-polygene/test/generator_test.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/test/generator_test.js b/tools/generator-polygene/test/generator_test.js
index 99f9bdb..1afd9a1 100644
--- a/tools/generator-polygene/test/generator_test.js
+++ b/tools/generator-polygene/test/generator_test.js
@@ -22,10 +22,13 @@ var assert = require('yeoman-assert');
 var shell = require('shelljs');
 
 //See http://yeoman.io/authoring/testing.html
+var restApiAppType = "Rest API";
+var commandLineAppType = "Command Line";
+var defaultAppType = restApiAppType;
 
 var appTypes = [
-    "Rest API",
-    'Command Line'
+    restApiAppType,
+    commandLineAppType
 ];
 
 var entityStores = [
@@ -70,17 +73,25 @@ var featuresset = [
     [],
     ['jmx'],
     ['mixin scripting'],
-    ['security'],
     ['jmx', 'mixin scripting'],
-    ['jmx', 'scripting'],
-    ['mixin scripting', 'scripting'],
-    ['jmx', 'mixin scripting', 'scripting']
+    ['security'],
+    ['jmx', 'security'],
+    ['mixin scripting', 'security'],
+    ['jmx', 'mixin scripting', 'security'],
+    ['envisage'],
+    ['jmx', 'envisage'],
+    ['mixin scripting', 'envisage'],
+    ['jmx', 'mixin scripting', 'envisage'],
+    ['security', 'envisage'],
+    ['jmx', 'security', 'envisage'],
+    ['mixin scripting', 'security', 'envisage'],
+    ['jmx', 'mixin scripting', 'security', 'envisage']
 ];
 
 // test with all defaults first.
 test();
 
-if(process.env.TEST_ALL === 'yes') {
+if (process.env.TEST_ALL === 'yes') {
     // All Tests !!!!
     appTypes.forEach(function (appType) {
         entityStores.forEach(function (entitystore) {
@@ -102,23 +113,23 @@ if(process.env.TEST_ALL === 'yes') {
     });
 
     entityStores.forEach(function (entityStore) {
-        test("Rest API", entityStore, "Rdf", "Memcache", "Codahale", "[]");
+        test(defaultAppType, entityStore, "Rdf", "Memcache", "Codahale", "[]");
     });
 
     indexings.forEach(function (indexing) {
-        test("Rest API", "Memory", indexing, "Memcache", "Codahale", "[]");
+        test(defaultAppType, "Memory", indexing, "Memcache", "Codahale", "[]");
     });
 
     cachings.forEach(function (caching) {
-        test("Rest API", "Memory", "Rdf", caching, "Codahale", "[]");
+        test(defaultAppType, "Memory", "Rdf", caching, "Codahale", "[]");
     });
 
     metricses.forEach(function (metrics) {
-        test("Rest API", "Memory", "Rdf", "Memcache", metrics, "[]");
+        test(defaultAppType, "Memory", "Rdf", "Memcache", metrics, "[]");
     });
 
     featuresset.forEach(function (feature) {
-        test("Rest API", "Memory", "Rdf", "Memcache", "Codahale", feature);
+        test(defaultAppType, "Memory", "Rdf", "Memcache", "Codahale", feature);
     });
 }
 
@@ -129,13 +140,13 @@ function test(appType, entityStore, indexing, caching, metrics, features)
{
             + indexing + ' Indexing - '
             + caching + ' Caching - '
             + metrics + ' Metrics';
-        if(features && features.length > 0) {
+        if (features && features.length > 0) {
             testName += ' - ' + features.toString().replace(new RegExp(',', 'g'), ' - ');
         }
         var testDirName = testName.replace(new RegExp(' - ', 'g'), '_').replace(new RegExp('
', 'g'), '_');
         it(testName,
             function () {
-                console.log( "\n\nTest: " + testName );
+                console.log("\n\nTest: " + testName);
                 this.timeout(60000);
                 return helpers.run(path.join(__dirname, '../app'))
                     .inDir(path.join(__dirname, '../build/npm-test/' + testDirName))


Mime
View raw message