Замена Sample на <%%RESERVED_NAME%%> для проектов на фабрике
This commit is contained in:
2
src/dist/bin/starter
vendored
2
src/dist/bin/starter
vendored
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $(dirname $0)/..
|
||||
bin/sample $1 -config config/ncore-properties.xml $2 $3 $4 $5
|
||||
bin/<%%RESERVED_NAME%%> $1 -config config/ncore-properties.xml $2 $3 $4 $5
|
||||
cd $OLDPWD
|
||||
2
src/dist/bin/starter.bat
vendored
2
src/dist/bin/starter.bat
vendored
@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
|
||||
pushd "%~dp0\.."
|
||||
call bin\sample.bat %1 -config config\ncore-properties.xml %2 %3 %4 %5
|
||||
call bin\<%%RESERVED_NAME%%>.bat %1 -config config\ncore-properties.xml %2 %3 %4 %5
|
||||
popd
|
||||
6
src/dist/config/ncore-properties.xml
vendored
6
src/dist/config/ncore-properties.xml
vendored
@ -4,12 +4,12 @@
|
||||
<comment>Configuration settings for ncore platform</comment>
|
||||
|
||||
<!-- Product settings -->
|
||||
<entry key="product.name">sample</entry>
|
||||
<entry key="product.title">Sample ncore project</entry>
|
||||
<entry key="product.name"><%%RESERVED_NAME%%></entry>
|
||||
<entry key="product.title"><%%RESERVED_NAME%%> ncore project</entry>
|
||||
|
||||
<!-- Database settings -->
|
||||
<entry key="jdbc.drivers">org.firebirdsql.jdbc.FBDriver</entry>
|
||||
<entry key="ncore.db.url">jdbc:firebirdsql:localhost:ncore-sample?lc_ctype=WIN1251</entry>
|
||||
<entry key="ncore.db.url">jdbc:firebirdsql:localhost:ncore-<%%RESERVED_NAME%%>?lc_ctype=WIN1251</entry>
|
||||
<entry key="ncore.db.user">SYSDBA</entry>
|
||||
<entry key="ncore.db.password">masterkey</entry>
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package biz.redsoft.sample;
|
||||
package biz.redsoft.<%%RESERVED_NAME%%>;
|
||||
|
||||
import biz.redsoft.ncore.system.application.Application;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package biz.redsoft.sample;
|
||||
package biz.redsoft.<%%RESERVED_NAME%%>;
|
||||
|
||||
import biz.redsoft.util.IncorrectVersionFormat;
|
||||
import biz.redsoft.util.VersionUtils;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"dependencies": [],
|
||||
"register": {}
|
||||
}
|
||||
"dependencies" : [ ],
|
||||
"register" : { }
|
||||
}
|
||||
@ -4,12 +4,12 @@
|
||||
<comment>Configuration settings for ncore platform</comment>
|
||||
|
||||
<!-- Product settings -->
|
||||
<entry key="product.name">sample</entry>
|
||||
<entry key="product.title">Sample ncore project</entry>
|
||||
<entry key="product.name"><%%RESERVED_NAME%%></entry>
|
||||
<entry key="product.title"><%%RESERVED_NAME%%> ncore project</entry>
|
||||
|
||||
<!-- Database settings -->
|
||||
<entry key="jdbc.drivers">org.firebirdsql.jdbc.FBDriver</entry>
|
||||
<entry key="ncore.db.url">jdbc:firebirdsql:localhost:ncore-sample?lc_ctype=WIN1251</entry>
|
||||
<entry key="ncore.db.url">jdbc:firebirdsql:localhost:ncore-<%%RESERVED_NAME%%>?lc_ctype=WIN1251</entry>
|
||||
<entry key="ncore.db.user">SYSDBA</entry>
|
||||
<entry key="ncore.db.password">masterkey</entry>
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<session-config>
|
||||
<session-timeout>30</session-timeout>
|
||||
</session-config>
|
||||
<display-name>Sample server</display-name>
|
||||
<display-name><%%RESERVED_NAME%%> server</display-name>
|
||||
<context-param>
|
||||
<param-name>productionMode</param-name>
|
||||
<param-value>true</param-value>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package biz.redsoft.sample;
|
||||
package biz.redsoft.<%%RESERVED_NAME%%>;
|
||||
|
||||
import biz.redsoft.ncore.util.Misc;
|
||||
|
||||
@ -10,11 +10,11 @@ import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
public class SampleTests {
|
||||
public class <%%RESERVED_NAME%%>Tests {
|
||||
@Test
|
||||
public void testProductName() throws IOException {
|
||||
final Properties props = new Properties(System.getProperties());
|
||||
Misc.loadProperties(props, Arrays.asList("ncore-properties.xml", "ncore-properties-local.xml"));
|
||||
Assertions.assertEquals(props.getProperty("product.name"), "sample");
|
||||
Assertions.assertEquals(props.getProperty("product.name"), "<%%RESERVED_NAME%%>");
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
package biz.redsoft.sample;
|
||||
package biz.redsoft.<%%RESERVED_NAME%%>;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
Reference in New Issue
Block a user