You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2017/03/05 15:45:32 UTC

[02/12] polygene-java git commit: Fixes on the Yeoman generator

Fixes on the Yeoman generator


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

Branch: refs/heads/develop
Commit: 33641902faf01f32b3a03763af18acaed8b43255
Parents: 849f4f5
Author: niclas <ni...@spicter.com>
Authored: Fri Mar 3 08:19:32 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Fri Mar 3 08:19:32 2017 +0800

----------------------------------------------------------------------
 tools/generator-polygene/app/index.js           |  5 +-
 .../templates/RDFIndexingModule/bootstrap.tmpl  | 50 --------------------
 .../templates/RdfIndexingModule/bootstrap.tmpl  | 50 ++++++++++++++++++++
 .../templates/buildtool/gradle-bootstrap.tmpl   |  6 +--
 4 files changed, 56 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/33641902/tools/generator-polygene/app/index.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/index.js b/tools/generator-polygene/app/index.js
index cddb34a..be71f4f 100644
--- a/tools/generator-polygene/app/index.js
+++ b/tools/generator-polygene/app/index.js
@@ -55,7 +55,7 @@ module.exports = generators.Base.extend(
                         type: 'input',
                         name: 'packagename',
                         message: 'Java package name',
-                        default: this.appname // Default to current folder name
+                        default: "com.acme." + this.appname // Default to current folder name
                     },
                     {
                         type: 'list',
@@ -158,7 +158,7 @@ module.exports = generators.Base.extend(
 
             copyEntityStore( this, polygene.entitystore );
 
-            copyPolygeneBootstrap( this, "infrastructure", "RDFIndexingModule", hasIndexing( 'Rdf' ) );
+            copyPolygeneBootstrap( this, "infrastructure", "RdfIndexingModule", hasIndexing( 'Rdf' ) );
             copyPolygeneBootstrap( this, "infrastructure", "ElasticSearchIndexingModule", hasIndexing( 'Elasticsearch' ) );
             copyPolygeneBootstrap( this, "infrastructure", "SolrIndexingModule", hasIndexing( 'Solr' ) );
             copyPolygeneBootstrap( this, "infrastructure", "SqlIndexingModule", hasIndexing( 'Sql' ) );
@@ -178,6 +178,7 @@ module.exports = generators.Base.extend(
             copyPolygeneBootstrap( this, "infrastructure", "MigrationModule", hasFeature( 'version migration' ) );
 
             copyPolygeneBootstrap( this, "domain", "CrudModule", true );
+            copyPolygeneBootstrap( this, "domain", "SecurityModule", true );
             copyHeroesSampleApp( this );
             copyPolygeneDomain( this, "security", "RestApiModule", "SecurityRepository", hasFeature( 'rest api' ) );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/33641902/tools/generator-polygene/app/templates/RDFIndexingModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/RDFIndexingModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/RDFIndexingModule/bootstrap.tmpl
deleted file mode 100644
index 8376a2b..0000000
--- a/tools/generator-polygene/app/templates/RDFIndexingModule/bootstrap.tmpl
+++ /dev/null
@@ -1,50 +0,0 @@
-<%#
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
--%>
-package <%= packageName %>.bootstrap.infrastructure;
-
-import org.apache.polygene.api.common.Visibility;
-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.index.rdf.assembly.RdfNativeSesameStoreAssembler;
-import org.apache.polygene.library.rdf.repository.NativeConfiguration;
-
-public class RdfIndexingModule
-    implements ModuleAssembler
-{
-    public static final String NAME = "Rdf Indexing Module";
-    private final ModuleAssembly configModule;
-
-    public RdfIndexingModule( ModuleAssembly configModule )
-    {
-        this.configModule = configModule;
-    }
-
-    @Override
-    public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
-        throws AssemblyException
-    {
-        configModule.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
-        new RdfNativeSesameStoreAssembler(Visibility.application, Visibility.module).assemble( module );
-        return module;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/33641902/tools/generator-polygene/app/templates/RdfIndexingModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/RdfIndexingModule/bootstrap.tmpl b/tools/generator-polygene/app/templates/RdfIndexingModule/bootstrap.tmpl
new file mode 100644
index 0000000..8376a2b
--- /dev/null
+++ b/tools/generator-polygene/app/templates/RdfIndexingModule/bootstrap.tmpl
@@ -0,0 +1,50 @@
+<%#
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+-%>
+package <%= packageName %>.bootstrap.infrastructure;
+
+import org.apache.polygene.api.common.Visibility;
+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.index.rdf.assembly.RdfNativeSesameStoreAssembler;
+import org.apache.polygene.library.rdf.repository.NativeConfiguration;
+
+public class RdfIndexingModule
+    implements ModuleAssembler
+{
+    public static final String NAME = "Rdf Indexing Module";
+    private final ModuleAssembly configModule;
+
+    public RdfIndexingModule( ModuleAssembly configModule )
+    {
+        this.configModule = configModule;
+    }
+
+    @Override
+    public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
+        throws AssemblyException
+    {
+        configModule.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
+        new RdfNativeSesameStoreAssembler(Visibility.application, Visibility.module).assemble( module );
+        return module;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/33641902/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 d13cb96..ceb0541 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
@@ -29,8 +29,8 @@ dependencies {
 <% if( hasFeature( 'rest api' ) ) { %>
   compile "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
 <% } %>
-  compile "org.apache.polygene.extension:org.apache.polygene.extension.entitystore-<%= polygene.entitystore.toLowerCase() %>:$polygeneVersion"
-  compile "org.apache.polygene.extension:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase() %>:$polygeneVersion"
-  compile "org.apache.polygene.extension:org.apache.polygene.extension.valueserialization-<%= polygene.serialization.toLowerCase() %>:$polygeneVersion"
+  compile "org.apache.polygene.extensions:org.apache.polygene.extension.entitystore-<%= polygene.entitystore.toLowerCase() %>:$polygeneVersion"
+  compile "org.apache.polygene.extensions:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase() %>:$polygeneVersion"
+  compile "org.apache.polygene.extensions:org.apache.polygene.extension.valueserialization-<%= polygene.serialization.toLowerCase() %>:$polygeneVersion"
 
 }
\ No newline at end of file