diff --git a/.gitignore b/.gitignore
index 2eda6cf..76ca9c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@ gen
.idea/workspace.xml
.idea/misc.xml
ncore-properties-local.xml
-*.iml
\ No newline at end of file
+*.iml
+/out
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..6ee9cd6
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..ea2f49f
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 51e227a..174d8c2 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -11,8 +11,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index e423192..4b64f3b 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -21,5 +21,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 002f828..a019a5c 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,7 +3,12 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/MainForm.xml b/.idea/runConfigurations/MainForm.xml
index 0d12656..3e13758 100644
--- a/.idea/runConfigurations/MainForm.xml
+++ b/.idea/runConfigurations/MainForm.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/README.md b/README.md
index a1836e7..188106b 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
Для данного проекта можно использовать базу ядра.
-Таски запускаются с помощью gradle wrapper. Версия Gradle - 4.10.3.
+Таски запускаются с помощью gradle wrapper. Версия Gradle - 7.5.1.
Nix
```bash
diff --git a/build.gradle b/build.gradle
index 06b6166..2f002c8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,11 +5,9 @@ plugins {
id 'application'
id 'java-library'
id 'war'
- id 'gradle-ncore' version("$pluginVersion")
+ id 'gradle-ncore' version('3.0.59')
}
-apply from: "dependencies.gradle"
-
targetCompatibility = 1.8
ncore {
@@ -17,6 +15,7 @@ ncore {
sourceEncoding = 'UTF-8'
}
+
repositories {
maven {
url 'https://ncore-repo.red-soft.ru/repository/ncore'
@@ -39,6 +38,8 @@ dependencies {
}
+group = 'biz.redsoft.sample'
+
// writing build process to a log file
// --------------------- BUILD LOG SETTINGS ----------------------
def tstamp = new Date().format('yyyy-MM-dd_HH-mm-ss')
@@ -129,8 +130,10 @@ startScripts {
}
distTar {
- duplicatesStrategy = DuplicatesStrategy.WARN
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
distZip {
- duplicatesStrategy = DuplicatesStrategy.WARN
-}
\ No newline at end of file
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+}
+ncoreRestoreDB.writeToWebProps = false
+ncoreRestoreDB.generateUniqueDBPath = false
\ No newline at end of file
diff --git a/db/ncore.zip b/db/ncore.zip
index 7da4821..412174a 100644
Binary files a/db/ncore.zip and b/db/ncore.zip differ
diff --git a/dependencies.gradle b/dependencies.gradle
index 6d15e95..e64c2fc 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,12 +1,9 @@
-repositories {
- mavenLocal()
- maven {
- url 'https://ncore-repo.red-soft.ru/repository/public'
- if (project.credentials.user != null && project.credentials.password != null) {
- credentials {
- username project.credentials.user
- password project.credentials.password
- }
- }
- }
-}
+dependencies {
+ implementation("biz.redsoft.ncore:ncore:1.10.275.0")
+ updates("biz.redsoft.ncore:ncore:1.10.275.0:updates")
+ codemaker("biz.redsoft.ncore:ncore:1.10.275.0")
+ implementation("biz.redsoft.ncore:ncore-util:1.10.275.0")
+ implementation("biz.redsoft.ncore:ncore-cryptoapisec:1.10.275.0")
+ implementation("biz.redsoft.ncore:ncore-jna:1.10.275.0")
+ codemaker("biz.redsoft.ncore:ncore-gen:1.10.275.0")
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 7911e14..3636882 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,2 +1,4 @@
-biz.redsoft.ncore.version=1.9.19.251
-pluginVersion=3.0.82
+biz.redsoft.ncore.version=1.10.275.0
+org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError
+org.gradle.daemon=false
+org.gradle.configureondemand=true
\ No newline at end of file
diff --git a/ncore-properties-template.xml b/ncore-properties-template.xml
index 7f1d38c..2d8aae4 100644
--- a/ncore-properties-template.xml
+++ b/ncore-properties-template.xml
@@ -2,8 +2,10 @@
true
-
+
+
db/ncore.zip
- ~/sample-db/ncore-sample.fdb
+
+ /db/ncore-sample.fdb
diff --git a/settings.gradle b/settings.gradle
index 5571488..7adbdef 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,5 +1,6 @@
pluginManagement{
repositories {
+ mavenLocal()
maven { url 'https://ncore-repo.red-soft.ru/repository/public' }
}
}
diff --git a/src/main/resources/META-INF/resources/VAADIN/themes/img/page_white_delete.png b/src/main/resources/META-INF/resources/VAADIN/themes/img/page_white_delete.png
new file mode 100644
index 0000000..644935f
Binary files /dev/null and b/src/main/resources/META-INF/resources/VAADIN/themes/img/page_white_delete.png differ
diff --git a/src/main/resources/META-INF/resources/VAADIN/themes/img/upload_file.gif b/src/main/resources/META-INF/resources/VAADIN/themes/img/upload_file.gif
new file mode 100644
index 0000000..9bffce7
Binary files /dev/null and b/src/main/resources/META-INF/resources/VAADIN/themes/img/upload_file.gif differ
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index e46a2be..cbadd8a 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -22,11 +22,12 @@
ncore
- biz.redsoft.ncore.server.NcoreApplicationServlet
+
+
Vaadin application class to startUI
- biz.redsoft.ncore.client.vaadin.WebApplication
+ biz.redsoft.ncore_vaadin.client.vaadin.WebApplicationApplication widgetset
@@ -50,6 +51,7 @@
biz.redsoft.ncore.dx.init.DxInitializationListener
- biz.redsoft.ncore.client.vaadin.VaadinSessionListener
+
+
diff --git a/src/test/java/biz/redsoft/sample/TomcatStarter.java b/src/test/java/biz/redsoft/sample/TomcatStarter.java
new file mode 100644
index 0000000..f290142
--- /dev/null
+++ b/src/test/java/biz/redsoft/sample/TomcatStarter.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2017 Red Soft Corporation.
+ *
+ * This file is part of Red nCore.
+ *
+ * Red nCore is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Red nCore is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Red nCore; see the file COPYING. If not, write to the
+ * Red Soft Corporation, 117105, Russia, Moscow, Nagornyy proyezd, 5.
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obligated to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
+
+package biz.redsoft.sample;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.Socket;
+
+import javax.servlet.ServletException;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Server;
+import org.apache.catalina.WebResourceRoot;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.webresources.DirResourceSet;
+import org.apache.catalina.webresources.FileResourceSet;
+import org.apache.catalina.webresources.StandardRoot;
+import org.apache.tomcat.util.scan.StandardJarScanner;
+
+
+public class TomcatStarter {
+ private String contextPath = "/ncore";
+ private int port = 8080;
+
+ private int shutdownPort = 8020;
+ private String shutdownCommand = "SHUTDOWN";
+
+ public void start() throws ServletException, LifecycleException {
+ System.setProperty("catalina.home", new File(".").getAbsolutePath());
+ final Tomcat tomcat = new Tomcat();
+ tomcat.setPort(port);
+ tomcat.setBaseDir(".");
+ tomcat.getHost().setAppBase(".");
+ tomcat.getConnector(); // initialize standard HTTP 1.1 connector
+ tomcat.enableNaming();
+ final Server server = tomcat.getServer();
+ server.setPort(shutdownPort);
+ server.setShutdown(shutdownCommand);
+ final StandardContext webContext = (StandardContext) tomcat.addWebapp(contextPath, "src/main/webapp");
+ webContext.setUseNaming(true);
+ final WebResourceRoot resources = new StandardRoot(webContext);
+ //aliases to resources
+ final String base = ap("");
+ resources.addPreResources(new DirResourceSet(resources, "/META-INF/resources", ap("src/main/resources"), "/META-INF/resources"));
+ //resources.addPreResources(new DirResourceSet(resources, "/WEB-INF/classes/export_templates", base, "/export_templates"));
+ if (new File(base, "ncore-properties-local.xml").exists())
+ resources.addPreResources(new FileResourceSet(resources, "/WEB-INF/ncore-properties-local.xml", base, "/ncore-properties-local.xml"));
+ //resources.addPreResources(new FileResourceSet(resources, "/WEB-INF/ncore-properties-local-openid.xml", base, "/ncore-properties-local-openid.xml"));
+ resources.addPreResources(new FileResourceSet(resources, "/WEB-INF/logback.xml", base, "/logback.xml"));
+ webContext.setResources(resources);
+ // IDEA не всегда корректно формирует пути. Отключим проверку ресурсов.
+ ((StandardJarScanner)webContext.getJarScanner()).setScanClassPath(false);
+ webContext.setWorkDir("build/tomcat/work");
+ tomcat.start();
+ server.await();
+ tomcat.stop();
+ }
+
+ private String ap(String s) {
+ return new File(s).getAbsolutePath();
+ }
+
+ public void stop() throws IOException {
+ final InetAddress serverAddress = InetAddress.getByName("localhost");
+ final Socket socket = new Socket(serverAddress, shutdownPort);
+ try (OutputStream os = socket.getOutputStream()) {
+ final byte[] buffer = shutdownCommand.getBytes();
+ os.write(buffer, 0, buffer.length);
+ os.flush();
+ }
+ }
+
+ public static void main(String[] args) throws ServletException, LifecycleException, IOException {
+ if (args.length > 0) {
+ String command = args[0];
+ if ("start".equals(command))
+ new TomcatStarter().start();
+ else if ("stop".equals(command))
+ new TomcatStarter().stop();
+ }
+ }
+}