polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject polygene-java git commit: Missing setup for non-https server. Memory ES has no configuration.
Date Tue, 23 May 2017 14:46:18 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/yeoman-work 6959f7953 -> 8721a02ec


Missing setup for non-https server. Memory ES has no configuration.

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/8721a02e
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/8721a02e
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/8721a02e

Branch: refs/heads/yeoman-work
Commit: 8721a02ec4802d7180b37ae7018064bbc652388f
Parents: 6959f79
Author: niclas <niclas@hedhman.org>
Authored: Tue May 23 22:46:01 2017 +0800
Committer: niclas <niclas@hedhman.org>
Committed: Tue May 23 22:46:01 2017 +0800

----------------------------------------------------------------------
 .../ConnectivityLayer/HttpServerModule/bootstrap.tmpl       | 9 +++++----
 .../app/templates/RestAPIApplication/bootstrap-test.tmpl    | 6 ++++--
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/8721a02e/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
b/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
index 719e567..d39b3c9 100644
--- a/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/ConnectivityLayer/HttpServerModule/bootstrap.tmpl
@@ -61,6 +61,7 @@ public class HttpServerModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
+        module.services( Servlet.class ).withMixins( ServerServlet.class );
 <% if( hasFeature('security') ) {
 %>        new HttpShiroAssembler()
             .withConfig( module, Visibility.module );
@@ -69,9 +70,6 @@ public class HttpServerModule
             .withConfig( module, Visibility.layer )
             .visibleIn( Visibility.layer )
             .assemble( module );
-
-        module.services( Servlet.class ).withMixins( ServerServlet.class );
-
         SecureJettyConfiguration defaults = module.forMixin( SecureJettyConfiguration.class
).declareDefaults();
         defaults.keystorePath().set( new File( SERVER_KEYSTORE_FILENAME ).getAbsolutePath()
);
         defaults.keystoreType().set( "JCEKS" );
@@ -81,7 +79,10 @@ public class HttpServerModule
         defaults.truststorePassword().set( KS_PASSWORD );
         defaults.wantClientAuth().set( Boolean.FALSE );
 <% } else {
-%>        new JettyServiceAssembler().assemble( module );
+%>        new JettyServiceAssembler()
+            .withConfig( module, Visibility.layer )
+            .visibleIn( Visibility.layer )
+            .assemble( module );
         JettyConfiguration defaults = module.forMixin( JettyConfiguration.class ).declareDefaults();
 <% } %>
         defaults.hostName().set( System.getProperty( "<%= polygene.name.toLowerCase()
%>.http.servername", "127.0.0.1" ));

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/8721a02e/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
index 0b4ecdc..8bbbd75 100644
--- a/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
+++ b/tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl
@@ -28,8 +28,10 @@ import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
-import org.apache.polygene.entitystore..<%= polygene.entitystore.toLowerCase() %>.<%=
polygene.entitystore %>EntityStoreConfiguration;
-import org.apache.polygene.test.docker.DockerRule;
+<% if( polygene.entitystore !== 'Memory' ) {
+%>import org.apache.polygene.entitystore.<%= polygene.entitystore.toLowerCase() %>.<%=
polygene.entitystore %>EntityStoreConfiguration;
+<% }
+%>import org.apache.polygene.test.docker.DockerRule;
 import org.junit.ClassRule;
 import org.junit.Test;
 


Mime
View raw message