Замена Sample на <%%RESERVED_NAME%%> для проектов на фабрике

This commit is contained in:
2026-01-19 19:25:00 +03:00
parent 4c87ee8325
commit b635941f70
17 changed files with 37 additions and 84 deletions

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -1,4 +1,4 @@
package biz.redsoft.sample;
package biz.redsoft.<%%RESERVED_NAME%%>;
import biz.redsoft.ncore.system.application.Application;

View File

@ -1,4 +1,4 @@
package biz.redsoft.sample;
package biz.redsoft.<%%RESERVED_NAME%%>;
import biz.redsoft.util.IncorrectVersionFormat;
import biz.redsoft.util.VersionUtils;

View File

@ -1,4 +1,4 @@
{
"dependencies": [],
"register": {}
}
"dependencies" : [ ],
"register" : { }
}

View File

@ -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>

View File

@ -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>

View File

@ -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%%>");
}
}

View File

@ -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;