Merge branch 'master' into 'ncore-sample-1.9'
Merge with master See merge request ncore/ncore-sample!1
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -1 +1,2 @@
|
|||||||
*.bat text eol=crlf
|
*.bat text eol=crlf
|
||||||
|
gradlew text eol=lf
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
<artifact type="war" name="Gradle : biz.redsoft.sample : sample-1.1.1.1-SNAPSHOT.war">
|
<artifact type="war" name="Gradle : biz.redsoft.sample : sample-1.1.1.1-SNAPSHOT.war">
|
||||||
<output-path>$PROJECT_DIR$/build/libs</output-path>
|
<output-path>$PROJECT_DIR$/build/libs</output-path>
|
||||||
<properties id="gradle-properties">
|
<properties id="gradle-properties">
|
||||||
<options external-project-path="$PROJECT_DIR$" />
|
<options external-project-path="$PROJECT_DIR$">
|
||||||
|
<buildTaskPath>:war</buildTaskPath>
|
||||||
|
<cleanTaskPath>:cleanWar</cleanTaskPath>
|
||||||
|
</options>
|
||||||
</properties>
|
</properties>
|
||||||
<root id="archive" name="sample-1.1.1.1-SNAPSHOT.war">
|
<root id="archive" name="sample-1.1.1.1-SNAPSHOT.war">
|
||||||
<element id="artifact" artifact-name="Gradle : biz.redsoft.sample : sample-1.1.1.1-SNAPSHOT.war (exploded)" />
|
<element id="artifact" artifact-name="Gradle : biz.redsoft.sample : sample-1.1.1.1-SNAPSHOT.war (exploded)" />
|
||||||
|
17
build.gradle
17
build.gradle
@ -17,6 +17,8 @@ apply plugin: 'application'
|
|||||||
apply plugin: 'war'
|
apply plugin: 'war'
|
||||||
apply plugin: 'ncore'
|
apply plugin: 'ncore'
|
||||||
|
|
||||||
|
apply from: "dependencies.gradle"
|
||||||
|
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
ncore {
|
ncore {
|
||||||
@ -42,6 +44,8 @@ dependencies {
|
|||||||
provided 'javax.servlet:javax.servlet-api:3.1.0'
|
provided 'javax.servlet:javax.servlet-api:3.1.0'
|
||||||
|
|
||||||
testCompile 'org.junit.jupiter:junit-jupiter:5.8.2'
|
testCompile 'org.junit.jupiter:junit-jupiter:5.8.2'
|
||||||
|
runtimeClasspath files(ncoreGenerateControlDataJar)
|
||||||
|
runtimeClasspath files(genJar)
|
||||||
}
|
}
|
||||||
|
|
||||||
// writing build process to a log file
|
// writing build process to a log file
|
||||||
@ -91,3 +95,16 @@ task buildRelease(type: GradleBuild) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
idea { module.scopes.PROVIDED.plus += [configurations.provided] }
|
idea { module.scopes.PROVIDED.plus += [configurations.provided] }
|
||||||
|
|
||||||
|
jar{
|
||||||
|
manifest{
|
||||||
|
attributes(
|
||||||
|
'Main-Class': 'biz.redsoft.ncore.client.MainForm',
|
||||||
|
'Class-Path': configurations.runtimeClasspath.collect { it.name }.join(' ')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
startScripts{
|
||||||
|
project.startScripts.defaultJvmOpts = ['-Dlogback.configurationFile=./config/logback.xml']
|
||||||
|
}
|
13
creds.gradle
Normal file
13
creds.gradle
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url 'https://nexus.red-soft.ru/repository/ncore-public'
|
||||||
|
}
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'nu.studer:gradle-credentials-plugin:1.0.4'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'nu.studer.credentials'
|
BIN
db/ncore.7z
BIN
db/ncore.7z
Binary file not shown.
BIN
db/ncore.zip
Normal file
BIN
db/ncore.zip
Normal file
Binary file not shown.
13
dependencies.gradle
Normal file
13
dependencies.gradle
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
maven {
|
||||||
|
url 'https://nexus.red-soft.ru/repository/public'
|
||||||
|
if (project.credentials.user != null && project.credentials.password != null) {
|
||||||
|
credentials {
|
||||||
|
username project.credentials.user
|
||||||
|
password project.credentials.password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,4 +3,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<entry key="ncore.developer.mode">true</entry>
|
<entry key="ncore.developer.mode">true</entry>
|
||||||
<!-- <entry key="ncore.db.url">jdbc:firebirdsql:localhost:ncore-sample-dev?lc_ctype=WIN1251</entry> -->
|
<!-- <entry key="ncore.db.url">jdbc:firebirdsql:localhost:ncore-sample-dev?lc_ctype=WIN1251</entry> -->
|
||||||
|
<!-- Для автоматизированного рестора базы данных запустить gradlew nRDB-->
|
||||||
|
<entry key="ncore.db.backup.path">db/ncore.zip</entry>
|
||||||
|
<entry key="ncore.db.restore.path">~/sample-db/ncore-sample.fdb</entry>
|
||||||
</properties>
|
</properties>
|
||||||
|
2
src/dist/bin/starter
vendored
2
src/dist/bin/starter
vendored
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
cd $(dirname $0)/..
|
||||||
bin/ncore $1 -config config/ncore-properties.xml $2 $3 $4 $5
|
bin/sample $1 -config config/ncore-properties.xml $2 $3 $4 $5
|
||||||
cd $OLDPWD
|
cd $OLDPWD
|
2
src/dist/bin/starter.bat
vendored
2
src/dist/bin/starter.bat
vendored
@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
pushd "%~dp0\.."
|
pushd "%~dp0\.."
|
||||||
call bin\ncore.bat %1 -config config\ncore-properties.xml %2 %3 %4 %5
|
call bin\sample.bat %1 -config config\ncore-properties.xml %2 %3 %4 %5
|
||||||
popd
|
popd
|
15
src/dist/bin/sync-full
vendored
Normal file
15
src/dist/bin/sync-full
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
$(dirname $0)/starter patch updates
|
||||||
|
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo Error patch loading
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(dirname $0)/starter update -fullSync
|
||||||
|
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo Error updating database
|
||||||
|
exit 11
|
||||||
|
fi
|
7
src/dist/bin/sync-full.bat
vendored
Normal file
7
src/dist/bin/sync-full.bat
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
call "%~dp0\starter.bat" patch updates
|
||||||
|
if ERRORLEVEL == 1 goto :EOF
|
||||||
|
|
||||||
|
call "%~dp0\starter.bat" update -fullSync
|
||||||
|
@pause
|
@ -37,18 +37,18 @@
|
|||||||
</servlet>
|
</servlet>
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>ncore</servlet-name>
|
<servlet-name>ncore</servlet-name>
|
||||||
<url-pattern>/client/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</servlet-mapping>
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>ncore</servlet-name>
|
|
||||||
<url-pattern>/VAADIN/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
<!-- TLS/SSL logback JNDI selector section -->
|
||||||
|
<!-- <env-entry>
|
||||||
|
<env-entry-name>logback/context-name</env-entry-name>
|
||||||
|
<env-entry-type>java.lang.String</env-entry-type>
|
||||||
|
<env-entry-value>ncore</env-entry-value>
|
||||||
|
</env-entry>-->
|
||||||
|
<!-- end of TLS/SSL logback JNDI selector section -->
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>biz.redsoft.ncore.dx.init.DxInitializationListener</listener-class>
|
<listener-class>biz.redsoft.ncore.dx.init.DxInitializationListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file>client</welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>biz.redsoft.ncore.client.vaadin.VaadinSessionListener</listener-class>
|
<listener-class>biz.redsoft.ncore.client.vaadin.VaadinSessionListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
@ -6,8 +6,8 @@ import java.io.IOException;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Victor Bellavin
|
* @author Victor Bellavin
|
||||||
@ -17,6 +17,6 @@ public class SampleTests {
|
|||||||
public void testProductName() throws IOException {
|
public void testProductName() throws IOException {
|
||||||
final Properties props = new Properties(System.getProperties());
|
final Properties props = new Properties(System.getProperties());
|
||||||
Misc.loadProperties(props, Arrays.asList("ncore-properties.xml", "ncore-properties-local.xml"));
|
Misc.loadProperties(props, Arrays.asList("ncore-properties.xml", "ncore-properties-local.xml"));
|
||||||
Assert.assertEquals(props.getProperty("product.name"), "sample");
|
Assertions.assertEquals(props.getProperty("product.name"), "sample");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
0
updates/.gitkeep
Normal file
0
updates/.gitkeep
Normal file
Reference in New Issue
Block a user