polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [10/50] [abbrv] polygene-java git commit: Fixed Serialization missing in RdfIndexingAssembler, causing failed tests. Fixed additional issues in Yeoman generator.
Date Mon, 13 Mar 2017 10:35:02 GMT
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxCollectionSerializationTest.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxCollectionSerializationTest.java
b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxCollectionSerializationTest.java
index ae1267b..04ed30a 100644
--- a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxCollectionSerializationTest.java
+++ b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxCollectionSerializationTest.java
@@ -19,6 +19,7 @@
  */
 package org.apache.polygene.valueserialization.stax;
 
+import org.apache.polygene.valueserialization.stax.assembly.StaxValueSerializationAssembler;
 import org.junit.BeforeClass;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxConfigurationDeserializationTest.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxConfigurationDeserializationTest.java
b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxConfigurationDeserializationTest.java
index 3c52f82..052072f 100644
--- a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxConfigurationDeserializationTest.java
+++ b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxConfigurationDeserializationTest.java
@@ -21,6 +21,7 @@
 package org.apache.polygene.valueserialization.stax;
 
 import org.apache.polygene.api.identity.StringIdentity;
+import org.apache.polygene.valueserialization.stax.assembly.StaxValueSerializationAssembler;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Service;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxPlainValueSerializationTest.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxPlainValueSerializationTest.java
b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxPlainValueSerializationTest.java
index 1d1c456..11f1e7d 100644
--- a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxPlainValueSerializationTest.java
+++ b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxPlainValueSerializationTest.java
@@ -21,6 +21,7 @@ package org.apache.polygene.valueserialization.stax;
 
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.value.AbstractPlainValueSerializationTest;
+import org.apache.polygene.valueserialization.stax.assembly.StaxValueSerializationAssembler;
 import org.junit.BeforeClass;
 
 import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxValueCompositeSerializationTest.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxValueCompositeSerializationTest.java
b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxValueCompositeSerializationTest.java
index 57a7e9a..65d66f6 100644
--- a/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxValueCompositeSerializationTest.java
+++ b/extensions/valueserialization-stax/src/test/java/org/apache/polygene/valueserialization/stax/StaxValueCompositeSerializationTest.java
@@ -19,6 +19,7 @@
  */
 package org.apache.polygene.valueserialization.stax;
 
+import org.apache.polygene.valueserialization.stax.assembly.StaxValueSerializationAssembler;
 import org.junit.BeforeClass;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
index 3979194..21a2e0c 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
@@ -38,7 +38,7 @@ import org.apache.polygene.library.restlet.resource.EntryPointResource;
 import org.apache.polygene.library.restlet.resource.ResourceBuilder;
 import org.apache.polygene.library.restlet.serialization.FormRepresentation;
 import org.apache.polygene.library.restlet.serialization.JsonRepresentation;
-import org.apache.polygene.valueserialization.jackson.JacksonValueSerializationAssembler;
+import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class RestletCrudConnectivityAssembler
     implements Assembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
index 87f5241..e564c0d 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
@@ -26,7 +26,7 @@ import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.valueserialization.jackson.JacksonValueSerializationAssembler;
+import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class ConfigurationModule
     implements ModuleAssembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
index 736edaa..77d1166 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
@@ -25,7 +25,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.valueserialization.jackson.JacksonValueSerializationAssembler;
+import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class SerializationModule
     implements ModuleAssembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index a982fbb..5b9c045 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -81,6 +81,7 @@ include 'core:api',
         'extensions:valueserialization-stax',
         'tools:model-detail',
         'tools:envisage',
+        'tools:generator-polygene',
 //        'tools:qidea',
         'tests:regression',
         'tests:performance',

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
b/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
index b152d3a..0c925da 100644
--- a/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/ConfigurationLayer/ConfigModule/bootstrap.tmpl
@@ -25,7 +25,7 @@ import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.valueserialization.jackson.JacksonValueSerializationAssembler;
+import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class ConfigModule
     implements ModuleAssembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
b/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
index 2bbc875..a4d3919 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/MetricsModule/bootstrap.tmpl
@@ -41,7 +41,7 @@ public class <%- polygene.metrics %>MetricsModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        new <%- polygene.metrics %>Assembler(Visibility.application, Visibility.module).assemble(
module );
+        new <%- polygene.metrics %>MetricsAssembler().assemble( module );
         return module;
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
b/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
index ea455cd..62b3586 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/SerializationModule/bootstrap.tmpl
@@ -24,7 +24,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.valueserialization.<%- polygene.serialization.toLowerCase()
%>.<%- polygene.serialization %>ValueSerializationAssembler;
+import org.apache.polygene.valueserialization.<%- polygene.serialization.toLowerCase()
%>.assembly.<%- polygene.serialization %>ValueSerializationAssembler;
 
 public class <%- polygene.serialization %>ValueSerializationModule
     implements ModuleAssembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/tools/generator-polygene/build.gradle
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/build.gradle b/tools/generator-polygene/build.gradle
new file mode 100644
index 0000000..64bd9f0
--- /dev/null
+++ b/tools/generator-polygene/build.gradle
@@ -0,0 +1,68 @@
+def allEntityStores = [
+        'Cassandra',
+        'File',
+        'DerbySQL',
+        'Geode',
+        'H2SQL',
+        'Hazelcast',
+        'JClouds',
+        'Jdbm',
+        'LevelDB',
+        'Memory',
+        'MongoDB',
+        'MySQL',
+        'Preferences',
+        'Redis',
+        'Riak',
+        'PostgresSQL',
+        'SQLite'
+]
+
+def allIndexing = [
+        "Rdf",
+        "ElasticSearch",
+        "Solr",
+        "SQL"
+]
+
+def allCaching = [
+        "None",
+        "EhCache",
+        "Memcache"
+]
+
+def allMetrics = [
+        "None",
+        "Codahale"
+]
+
+def allValueSerialization = [
+        "Jackson",
+        "Stax"
+]
+
+def featureCombinations(array, result) {
+    if (array?.empty) {
+        return []
+    }
+    return [array, featureCombinations(array.tail())]
+}
+
+def allFeatures = [
+        'rest api',
+        'jmx',
+        'security'
+].forEach( {
+
+});
+
+def allFeatureCombos = [
+
+]
+
+def allCombos = [
+
+]
+
+println allFeatures
+

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/b8aea70a/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 0e8ef8b..e215d4c 100644
--- a/tools/generator-polygene/test/generator_test.js
+++ b/tools/generator-polygene/test/generator_test.js
@@ -3,17 +3,127 @@ var helpers = require('yeoman-test');
 var assert = require('yeoman-assert');
 var shell = require('shelljs');
 
-// See http://yeoman.io/authoring/testing.html
-describe('polygene-generator', function () {
-  it('generates a buildable gradle project', function () {
-      return helpers.run(path.join(__dirname, '../app'))
-        .withPrompts({
-            name: 'test-project',
-            packageName: 'org.apache.polygene.generator.test'
-        })
-        .then(function(dir) {
-            assert.file(['gradlew', 'settings.gradle', 'build.gradle']);
-            assert(shell.exec(path.join(dir, 'gradlew') + ' build').code == 0);
+//See http://yeoman.io/authoring/testing.html
+
+describe('polygene-generator-defaults', function () {
+    this.timeout(10000);
+    it('generates a Gradle buildable Apache Polygene project', function () {
+        return helpers.run(path.join(__dirname, '../app'))
+            .withPrompts({
+                name: 'test-project',
+                packageName: 'org.apache.polygene.generator.test'
+            })
+            .then(buildAndVerify);
+    });
+});
+
+[
+    'Cassandra',
+    'File',
+    'Geode',
+    'Hazelcast',
+    'JClouds',
+    'Jdbm',
+    'LevelDB',
+    'MongoDB',
+    'Preferences',
+    'Redis',
+    'Riak',
+    'SQL',
+    'Memory'   // Somehow the last EntityStore is used in subsequent test arrays. Pick the
fastest.
+].forEach(function (entityStore) {
+    describe('polygene-generator-default-and-' + entityStore.toLowerCase() + "-entitystore",
function () {
+        this.timeout(10000);
+        it('generates a Gradle buildable Apache Polygene project with ' + entityStore + '
as the Entity Store', function () {
+            return helpers.run(path.join(__dirname, '../app'))
+                .withPrompts({
+                    name: 'test-project',
+                    packageName: 'org.apache.polygene.generator.test',
+                    entitystore: entityStore
+                })
+                .then(buildAndVerify);
+        });
+    });
+});
+
+[
+    'Rdf',
+    'ElasticSearch',
+    'Solr',
+    'SQL'
+].forEach(function (indexing) {
+    describe('polygene-generator-default-and-' + indexing.toLowerCase() + '-indexing', function
() {
+        this.timeout(10000);
+        it('generates a Gradle buildable Apache Polygene project with '+ indexing + ' as
the Indexing system', function () {
+            return helpers.run(path.join(__dirname, '../app'))
+                .withPrompts({
+                    name: 'test-project',
+                    packageName: 'org.apache.polygene.generator.test',
+                    indexing: indexing
+                })
+                .then(buildAndVerify);
+        });
+    });
+});
+
+[
+    'None',
+    'Memcache',
+    'EhCache'
+].forEach(function (caching) {
+    describe('polygene-generator-default-and-' + caching.toLowerCase() + '-caching', function
() {
+        this.timeout(10000);
+        it('generates a Gradle buildable Apache Polygene project with '+caching+' as the
Caching system', function () {
+            return helpers.run(path.join(__dirname, '../app'))
+                .withPrompts({
+                    name: 'test-project',
+                    packageName: 'org.apache.polygene.generator.test',
+                    caching: caching
+                })
+                .then(buildAndVerify);
         });
-  });
+    });
 });
+
+[
+    'Jackson',
+    // 'Johnzon',
+    'Stax'
+].forEach(function (serialization) {
+    describe('polygene-generator-default-and-' + serialization.toLowerCase() + '-caching',
function () {
+        this.timeout(10000);
+        it('generates a Gradle buildable Apache Polygene project with '+serialization+' as
the Serialization system', function () {
+            return helpers.run(path.join(__dirname, '../app'))
+                .withPrompts({
+                    name: 'test-project',
+                    packageName: 'org.apache.polygene.generator.test',
+                    serialization: serialization
+                })
+                .then(buildAndVerify);
+        });
+    });
+});
+
+[
+    'None',
+    'Codahale'
+].forEach(function (metrics) {
+    describe('polygene-generator-default-and-' + metrics.toLowerCase() + '-caching', function
() {
+        this.timeout(10000);
+        it('generates a Gradle buildable Apache Polygene project with '+metrics+' as the
Metrics system', function () {
+            return helpers.run(path.join(__dirname, '../app'))
+                .withPrompts({
+                    name: 'test-project',
+                    packageName: 'org.apache.polygene.generator.test',
+                    metrics: metrics
+                })
+                .then(buildAndVerify);
+        });
+    });
+});
+
+
+function buildAndVerify(dir) {
+    assert.file(['gradlew', 'settings.gradle', 'build.gradle']);
+    assert(shell.exec(path.join(dir, 'gradlew') + ' build').code == 0);
+}
\ No newline at end of file


Mime
View raw message