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/05/28 16:10:38 UTC
[18/35] polygene-java git commit: Missing setup for non-https server.
Memory ES has no configuration.
Missing setup for non-https server. Memory ES has no configuration.
Signed-off-by: niclas <ni...@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/develop
Commit: 8721a02ec4802d7180b37ae7018064bbc652388f
Parents: 6959f79
Author: niclas <ni...@hedhman.org>
Authored: Tue May 23 22:46:01 2017 +0800
Committer: niclas <ni...@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;