Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 85a37fd

Browse files
committed
POLYGENE-255 - Fixed JMX problems in Command Line AppType in Yeoman generator.
Signed-off-by: niclas <niclas@hedhman.org>
1 parent 818df1a commit 85a37fd

2 files changed

Lines changed: 29 additions & 14 deletions

File tree

tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ if( polygene.caching !== "None" ) {
5353
}
5454
if( polygene.metrics !== "None" ) {
5555
%> implementation "org.apache.polygene.extensions:org.apache.polygene.extension.metrics-<%= polygene.metrics.toLowerCase() %>:$polygeneVersion"
56+
<%
57+
}
58+
if( polygene.hasFeature('jmx' ) ) {
59+
%> implementation "org.apache.polygene.libraries:org.apache.polygene.library.jmx:$polygeneVersion"
5660
<%
5761
}
5862
if( polygene.hasFeature('envisage' ) ) {

tools/generator-polygene/test/generator_test.js

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ var assert = require('yeoman-assert');
2222
var shell = require('shelljs');
2323

2424
//See http://yeoman.io/authoring/testing.html
25+
var restApiAppType = "Rest API";
26+
var commandLineAppType = "Command Line";
27+
var defaultAppType = restApiAppType;
2528

2629
var appTypes = [
27-
"Rest API",
28-
'Command Line'
30+
restApiAppType,
31+
commandLineAppType
2932
];
3033

3134
var entityStores = [
@@ -70,17 +73,25 @@ var featuresset = [
7073
[],
7174
['jmx'],
7275
['mixin scripting'],
73-
['security'],
7476
['jmx', 'mixin scripting'],
75-
['jmx', 'scripting'],
76-
['mixin scripting', 'scripting'],
77-
['jmx', 'mixin scripting', 'scripting']
77+
['security'],
78+
['jmx', 'security'],
79+
['mixin scripting', 'security'],
80+
['jmx', 'mixin scripting', 'security'],
81+
['envisage'],
82+
['jmx', 'envisage'],
83+
['mixin scripting', 'envisage'],
84+
['jmx', 'mixin scripting', 'envisage'],
85+
['security', 'envisage'],
86+
['jmx', 'security', 'envisage'],
87+
['mixin scripting', 'security', 'envisage'],
88+
['jmx', 'mixin scripting', 'security', 'envisage']
7889
];
7990

8091
// test with all defaults first.
8192
test();
8293

83-
if(process.env.TEST_ALL === 'yes') {
94+
if (process.env.TEST_ALL === 'yes') {
8495
// All Tests !!!!
8596
appTypes.forEach(function (appType) {
8697
entityStores.forEach(function (entitystore) {
@@ -102,23 +113,23 @@ if(process.env.TEST_ALL === 'yes') {
102113
});
103114

104115
entityStores.forEach(function (entityStore) {
105-
test("Rest API", entityStore, "Rdf", "Memcache", "Codahale", "[]");
116+
test(defaultAppType, entityStore, "Rdf", "Memcache", "Codahale", "[]");
106117
});
107118

108119
indexings.forEach(function (indexing) {
109-
test("Rest API", "Memory", indexing, "Memcache", "Codahale", "[]");
120+
test(defaultAppType, "Memory", indexing, "Memcache", "Codahale", "[]");
110121
});
111122

112123
cachings.forEach(function (caching) {
113-
test("Rest API", "Memory", "Rdf", caching, "Codahale", "[]");
124+
test(defaultAppType, "Memory", "Rdf", caching, "Codahale", "[]");
114125
});
115126

116127
metricses.forEach(function (metrics) {
117-
test("Rest API", "Memory", "Rdf", "Memcache", metrics, "[]");
128+
test(defaultAppType, "Memory", "Rdf", "Memcache", metrics, "[]");
118129
});
119130

120131
featuresset.forEach(function (feature) {
121-
test("Rest API", "Memory", "Rdf", "Memcache", "Codahale", feature);
132+
test(defaultAppType, "Memory", "Rdf", "Memcache", "Codahale", feature);
122133
});
123134
}
124135

@@ -129,13 +140,13 @@ function test(appType, entityStore, indexing, caching, metrics, features) {
129140
+ indexing + ' Indexing - '
130141
+ caching + ' Caching - '
131142
+ metrics + ' Metrics';
132-
if(features && features.length > 0) {
143+
if (features && features.length > 0) {
133144
testName += ' - ' + features.toString().replace(new RegExp(',', 'g'), ' - ');
134145
}
135146
var testDirName = testName.replace(new RegExp(' - ', 'g'), '_').replace(new RegExp(' ', 'g'), '_');
136147
it(testName,
137148
function () {
138-
console.log( "\n\nTest: " + testName );
149+
console.log("\n\nTest: " + testName);
139150
this.timeout(60000);
140151
return helpers.run(path.join(__dirname, '../app'))
141152
.inDir(path.join(__dirname, '../build/npm-test/' + testDirName))

0 commit comments

Comments
 (0)