Visitar URL original
Various fixes in tools/generator-polygene, fixing some things. · apache/polygene-java@29ecdba · GitHub
Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 29ecdba

Browse files
committed
Various fixes in tools/generator-polygene, fixing some things.
1 parent 04a0f56 commit 29ecdba

10 files changed

Lines changed: 12 additions & 290 deletions

File tree

‎buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ class DistributionsPlugin implements Plugin<Project>
165165
spec.exclude '**/.nb-gradle/**' // Netbeans files
166166
spec.exclude '**/.nb-gradle*' // Netbeans files
167167

168-
// Polygene Generator files
169-
spec.exclude 'tools/generator-polygene/app/templates/**/*.txt'
170-
171168
spec.into '.'
172169
}
173170
def srcDistSupplementaryFilesCopySpec = project.copySpec { CopySpec spec ->
@@ -291,8 +288,6 @@ class DistributionsPlugin implements Plugin<Project>
291288
'manual/**/jquery*.js',
292289
// W3C XML Schemas - W3C Software License
293290
'samples/rental/src/main/resources/*.xsd',
294-
// Polygene Generator Heroes Templates - MIT
295-
'tools/generator-polygene/app/templates/Heroes/**',
296291
]
297292
} as Action<RatTask> )
298293
project.tasks.create( TaskNames.INSPECT_SOURCE_DIST ) { Task task ->

‎extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
4444
{
4545
@ClassRule
4646
public static final DockerRule DOCKER = new DockerRule( "postgres",
47-
3000L,
47+
10000L,
4848
"PostgreSQL init process complete; ready for start up." );
4949

5050
@Override

‎tools/generator-polygene/app/templates/RestAPIApplication/DevelopmentKeyManagement.java.tmpl‎

Lines changed: 0 additions & 259 deletions
This file was deleted.

‎tools/generator-polygene/app/templates/RestAPIApplication/Launcher.java.tmpl‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@ public class <%= polygene.name %>Launcher extends PolygeneRestApplicationLaunche
4545
protected LayeredApplicationAssembler createApplicationAssembler()
4646
throws AssemblyException
4747
{
48-
<% if( polygene.hasFeature( 'security' ) ) {
49-
%> if( mode == Application.Mode.development )
50-
{
51-
DevelopmentKeyManagement.initializeKeyStore();
52-
}
53-
<% }
54-
%> return new <%= polygene.name %>ApplicationAssembler( name, version, mode, none -> {} );
48+
return new <%= polygene.name %>ApplicationAssembler( name, version, mode, none -> {} );
5549
}
5650

5751
@Override

‎tools/generator-polygene/app/templates/RestAPIApplication/app.js‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ module.exports = {
3333
'app/src/main/java/' + p.javaPackageDir + '/app/' + p.name + 'Launcher.java');
3434

3535
if (p.hasFeature('security')) {
36-
p.copyTemplate(p.ctx,
37-
'RestAPIApplication/DevelopmentKeyManagement.java.tmpl',
38-
'app/src/main/java/' + p.javaPackageDir + '/app/DevelopmentKeyManagement.java');
3936
p.copyToConfig(p.ctx, 'RestAPIApplication/web-shiro.ini.tmpl', 'web-shiro.ini');
37+
p.copyToConfig(p.ctx, 'RestAPIApplication/dev-keystore.p12', 'security/keystore-' + p.name + '.p12');
4038
}
4139

4240
p.copyTemplate(p.ctx,
@@ -51,15 +49,13 @@ module.exports = {
5149
'RestAPIApplication/SETUP.tmpl',
5250
'SETUP.txt');
5351

54-
p.ctx.fs.copy(
55-
p.ctx.templatePath('RestAPIApplication/customUnixStartScript.txt'),
56-
p.ctx.destinationPath('app/src/scripts/customUnixStartScript.txt')
57-
);
52+
p.copyTemplate(p.ctx,
53+
'RestAPIApplication/customUnixStartScript.txt.tmpl',
54+
'app/src/scripts/customUnixStartScript.txt.tmpl');
5855

59-
p.ctx.fs.copy(
60-
p.ctx.templatePath('RestAPIApplication/customWindowsStartScript.txt'),
61-
p.ctx.destinationPath('app/src/scripts/customWindowsStartScript.txt')
62-
);
56+
p.copyTemplate(p.ctx,
57+
'RestAPIApplication/customWindowsStartScript.txt.tmpl',
58+
'app/src/scripts/customWindowsStartScript.txt.tmpl');
6359
}
6460
};
6561

‎tools/generator-polygene/app/templates/RestAPIApplication/bootstrap-test.tmpl‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ public class BootstrapTest
9191
protected LayeredApplicationAssembler createApplicationAssembler()
9292
throws AssemblyException
9393
{
94-
<% if( polygene.hasFeature( 'security' ) ) {
95-
%> DevelopmentKeyManagement.initializeKeyStore();
96-
<% }
97-
%> return new <%= polygene.name %>ApplicationAssembler( "LaunchTest", "0", Application.Mode.development, BootstrapTest.this::setupTest )
94+
return new <%= polygene.name %>ApplicationAssembler( "LaunchTest", "0", Application.Mode.development, BootstrapTest.this::setupTest )
9895
{
9996
@Override
10097
protected void onModelCreated( ApplicationDescriptor model )

tools/generator-polygene/app/templates/RestAPIApplication/customUnixStartScript.txt renamed to tools/generator-polygene/app/templates/RestAPIApplication/customUnixStartScript.txt.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ save () {
165165
APP_ARGS=\$(save "\$@")
166166

167167
# Collect all arguments for the java command, following the shell quoting and substitution rules
168-
eval set -- \$DEFAULT_JVM_OPTS \$JAVA_OPTS \$${optsEnvironmentVar} <% if ( appNameSystemProperty ) { %>"\"-D${appNameSystemProperty}=\$APP_BASE_NAME\"" <% } %>-classpath "\"\$CLASSPATH\"" ${mainClassName} "\$APP_ARGS"
168+
eval set -- \$DEFAULT_JVM_OPTS \$JAVA_OPTS \$${optsEnvironmentVar} <%% if ( appNameSystemProperty ) { %>"\"-D${appNameSystemProperty}=\$APP_BASE_NAME\"" <%% } %>-classpath "\"\$CLASSPATH\"" ${mainClassName} "\$APP_ARGS"
169169

170170
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
171171
if [ "\$(uname)" = "Darwin" ] && [ "\$HOME" = "\$PWD" ]; then

tools/generator-polygene/app/templates/RestAPIApplication/customWindowsStartScript.txt renamed to tools/generator-polygene/app/templates/RestAPIApplication/customWindowsStartScript.txt.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ set APP_MODE=development
7171
set CLASSPATH=%APP_HOME%\\config\\%APP_MODE%;$classpath
7272
7373
@rem Execute ${applicationName}
74-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %> -classpath "%CLASSPATH%" ${mainClassName} %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <%% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<%% } %> -classpath "%CLASSPATH%" ${mainClassName} %CMD_LINE_ARGS%
7575
7676
:end
7777
@rem End local scope for the variables with windows NT shell
Binary file not shown.

‎tools/generator-polygene/src/docs/yeoman_polygene.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ we will create a complete project, like this
359359
create bootstrap/src/main/java/com/sensetif/sink/bootstrap/connectivity/ConnectivityLayer.java
360360
create rest/src/main/java/com/sensetif/sink/rest/FloodRestApplication.java
361361
create app/src/main/java/com/sensetif/sink/app/FloodLauncher.java
362-
create app/src/main/java/com/sensetif/sink/app/DevelopmentKeyManagement.java
363362
create app/src/main/config/development/web-shiro.ini
364363
create app/src/main/config/qa/web-shiro.ini
365364
create app/src/main/config/staging/web-shiro.ini

0 commit comments

Comments
 (0)