From f90f1071aa80a5070a391b946126d67d9c9b420f Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Wed, 19 Jul 2023 18:28:53 +0300 Subject: [PATCH 1/6] Update for next development version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d64e715..110b8c4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,10 +5,10 @@ 4.0.0 org.dominokit domino-cli - 1.0.0 + HEAD-SNAPSHOT HEAD-SNAPSHOT - 1.0.0 + 1.0.1 ${next.release.version}-${snapshot.version} 3.11.0 17 From 71ec741628edc5cbacb7d97bf465e08da2704c1c Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sat, 2 Sep 2023 01:17:14 +0300 Subject: [PATCH 2/6] update versions --- src/main/java/org/dominokit/cli/generator/Versions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/dominokit/cli/generator/Versions.java b/src/main/java/org/dominokit/cli/generator/Versions.java index 31a7a83..9259656 100644 --- a/src/main/java/org/dominokit/cli/generator/Versions.java +++ b/src/main/java/org/dominokit/cli/generator/Versions.java @@ -1,7 +1,7 @@ package org.dominokit.cli.generator; public enum Versions { - domino_ui_version("DOMINO_CLI_DOMINO_UI_VERSION","1.0.0"), + domino_ui_version("DOMINO_CLI_DOMINO_UI_VERSION","1.0.1"), domino_history_version("DOMINO_CLI_DOMINO_HISTORY_VERSION","1.0.0"), domino_mvp_version("DOMINO_CLI_DOMINO_MVP_VERSION","1.0.0"), domino_rest_version("DOMINO_CLI_DOMINO_REST_VERSION","1.0.0"), From a5cb54fba95264ee088f8e439c6aa8ee0bceacae Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sat, 2 Sep 2023 12:01:36 +0300 Subject: [PATCH 3/6] prepare for version profiles: --- pom.xml | 2 +- .../org/dominokit/cli/generator/Versions.java | 4 +- .../app/gwt/basic/client/source/App.java | 34 ----------------- .../projects-templates/{ => v2}/api/README.md | 0 .../{ => v2}/api/docker/Dockerfile.jvm | 0 .../{ => v2}/api/docker/Dockerfile.legacy-jar | 0 .../{ => v2}/api/docker/Dockerfile.native | 0 .../api/docker/Dockerfile.native-distroless | 0 .../{ => v2}/api/dockerignore | 0 .../projects-templates/{ => v2}/api/pom.xml | 0 .../api/resource/application.properties | 0 .../{ => v2}/api/resource/index.html | 0 .../{ => v2}/api/source/GreetingResource.java | 0 .../{ => v2}/app/gwt/basic/README.md | 0 .../{ => v2}/app/gwt/basic/client/pom.xml | 0 .../v2/app/gwt/basic/client/source/App.java | 35 ++++++++++++++++++ .../gwt/basic/client/source/module.gwt.xml | 0 .../{ => v2}/app/gwt/basic/pom.ftl | 0 .../app/gwt/basic/server/jetty/context.xml | 0 .../{ => v2}/app/gwt/basic/server/pom.xml | 0 .../app/gwt/basic/server/tomcat/context.xml | 0 .../app/gwt/basic/server/webapp/favicon.ico | Bin .../app/gwt/basic/server/webapp/favicon.png | Bin .../app/gwt/basic/server/webapp/index.html | 3 +- .../gwt/basic/server/webapp/ui-starter.css | 0 .../app/gwt/basic/server/webapp/web.xml | 0 .../{ => v2}/app/gwt/basic/shared/pom.xml | 0 .../app/gwt/basic/shared/source/Person.java | 0 .../{ => v2}/app/gwt/mvp/README.md | 0 .../{ => v2}/app/gwt/mvp/backend/pom.xml | 4 -- .../app/gwt/mvp/backend/resource/app.css | 0 .../app/gwt/mvp/backend/resource/config.json | 0 .../app/gwt/mvp/backend/resource/favicon.ico | Bin .../app/gwt/mvp/backend/resource/favicon.png | Bin .../app/gwt/mvp/backend/resource/index.html | 5 +-- .../{ => v2}/app/gwt/mvp/frontend/pom.xml | 0 .../mvp/frontend/source/AppClientModule.java | 5 +-- .../gwt/mvp/frontend/source/module.gwt.xml | 0 .../{ => v2}/app/gwt/mvp/pom.ftl | 0 .../gwt/mvp/runConfigurations/ALL_TESTS.xml | 0 .../mvp/runConfigurations/Development.xml | 0 .../gwt}/mvp/runConfigurations/app-api.xml | 0 .../app/gwt/mvp/runConfigurations/app-dev.xml | 0 .../app/gwt/mvp/runConfigurations/app.xml | 0 .../gwt/mvp/runConfigurations/backend-api.xml | 0 .../mvp/runConfigurations/process_sources.xml | 0 .../mvp/runConfigurations/super_dev_mode.xml | 0 .../{ => v2}/app/j2cl/basic/README.md | 0 .../{ => v2}/app/j2cl/basic/client/pom.xml | 0 .../app/j2cl/basic/client/source/App.java | 0 .../j2cl/basic/client/source/App.native.js | 0 .../j2cl/basic/client/source/EntryPoint.java | 0 .../app/j2cl/basic/client/webapp/web.xml | 0 .../{ => v2}/app/j2cl/basic/pom.ftl | 0 .../app/j2cl/basic/server/jetty/context.xml | 0 .../{ => v2}/app/j2cl/basic/server/pom.xml | 0 .../app/j2cl/basic/server/tomcat/context.xml | 0 .../app/j2cl/basic/server/webapp/favicon.ico | 0 .../app/j2cl/basic/server/webapp/favicon.png | 0 .../app/j2cl/basic/server/webapp/index.html | 0 .../j2cl/basic/server/webapp/ui-starter.css | 0 .../app/j2cl/basic/server/webapp/web.xml | 0 .../{ => v2}/app/j2cl/basic/shared/pom.xml | 0 .../app/j2cl/basic/shared/source/Person.java | 0 .../{ => v2}/app/j2cl/mvp/README.md | 0 .../{ => v2}/app/j2cl/mvp/backend/pom.xml | 0 .../app/j2cl/mvp/backend/resource/app.css | 0 .../app/j2cl/mvp/backend/resource/config.json | 0 .../app/j2cl/mvp/backend/resource/favicon.ico | Bin .../app/j2cl/mvp/backend/resource/favicon.png | Bin .../app/j2cl/mvp/backend/resource/index.html | 0 .../{ => v2}/app/j2cl/mvp/frontend/pom.xml | 0 .../mvp/frontend/source/AppClientModule.java | 0 .../frontend/source/AppClientModule.native.js | 0 .../j2cl/mvp/frontend/source/EntryPoint.java | 0 .../app/j2cl/mvp/frontend/webapp/web.xml | 0 .../{ => v2}/app/j2cl/mvp/pom.ftl | 0 .../j2cl/mvp/runConfigurations/ALL_TESTS.xml | 0 .../mvp/runConfigurations/Development.xml | 2 +- .../j2cl/mvp/runConfigurations/app-api.xml | 31 ++++++++++++++++ .../j2cl/mvp/runConfigurations/app-dev.xml | 0 .../app/j2cl/mvp/runConfigurations/app.xml | 0 .../mvp/runConfigurations/process_sources.xml | 0 .../mvp/runConfigurations/super_dev_mode.xml | 0 .../module/gwt/multi/backend-dependency.ftl | 0 .../{ => v2}/module/gwt/multi/backend/pom.xml | 0 .../multi/backend/source/package-info.java | 0 .../module/gwt/multi/frontend-dependency.ftl | 0 .../gwt/multi/frontend-ui-dependency.ftl | 0 .../module/gwt/multi/frontend/pom.xml | 0 .../multi/frontend/source/ClientModule.java | 0 .../gwt/multi/frontend/source/Proxy.java | 6 +-- .../gwt/multi/frontend/source/View.java | 0 .../gwt/multi/frontend/source/module.gwt.xml | 0 .../frontend/test/ClientModuleTestSuite.java | 0 .../gwt/multi/frontend/test/FakeView.java | 0 .../gwt/multi/frontend/test/PresenterSpy.java | 0 .../gwt/multi/frontend/test/ProxyTest.java | 0 .../{ => v2}/module/gwt/multi/pom.ftl | 0 .../{ => v2}/module/gwt/multi/shared/pom.xml | 0 .../gwt/multi/shared/source/Service.java | 0 .../{ => v2}/module/gwt/multi/ui/pom.xml | 0 .../gwt/multi/ui/source/UIClientModule.java | 0 .../module/gwt/multi/ui}/source/ViewImpl.java | 5 +-- .../module/gwt/multi/ui/source/module.gwt.xml | 0 .../module/gwt/single/frontend-dependency.ftl | 0 .../{ => v2}/module/gwt/single/pom.xml | 0 .../gwt/single/source/ClientModule.java | 0 .../module/gwt/single/source/Proxy.java | 0 .../module/gwt/single/source/Service.java | 0 .../module/gwt/single/source/View.java | 0 .../module/gwt/single}/source/ViewImpl.java | 0 .../module/gwt/single/source/module.gwt.xml | 0 113 files changed, 80 insertions(+), 56 deletions(-) delete mode 100644 src/main/resources/projects-templates/app/gwt/basic/client/source/App.java rename src/main/resources/projects-templates/{ => v2}/api/README.md (100%) rename src/main/resources/projects-templates/{ => v2}/api/docker/Dockerfile.jvm (100%) rename src/main/resources/projects-templates/{ => v2}/api/docker/Dockerfile.legacy-jar (100%) rename src/main/resources/projects-templates/{ => v2}/api/docker/Dockerfile.native (100%) rename src/main/resources/projects-templates/{ => v2}/api/docker/Dockerfile.native-distroless (100%) rename src/main/resources/projects-templates/{ => v2}/api/dockerignore (100%) rename src/main/resources/projects-templates/{ => v2}/api/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/api/resource/application.properties (100%) rename src/main/resources/projects-templates/{ => v2}/api/resource/index.html (100%) rename src/main/resources/projects-templates/{ => v2}/api/source/GreetingResource.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/README.md (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/client/pom.xml (100%) create mode 100644 src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/client/source/module.gwt.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/pom.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/jetty/context.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/tomcat/context.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/webapp/favicon.ico (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/webapp/favicon.png (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/webapp/index.html (92%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/webapp/ui-starter.css (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/server/webapp/web.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/shared/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/basic/shared/source/Person.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/README.md (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/backend/pom.xml (97%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/backend/resource/app.css (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/backend/resource/config.json (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/backend/resource/favicon.ico (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/backend/resource/favicon.png (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/backend/resource/index.html (83%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/frontend/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/frontend/source/AppClientModule.java (85%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/frontend/source/module.gwt.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/pom.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/runConfigurations/ALL_TESTS.xml (100%) rename src/main/resources/projects-templates/{app/j2cl => v2/app/gwt}/mvp/runConfigurations/Development.xml (100%) rename src/main/resources/projects-templates/{app/j2cl => v2/app/gwt}/mvp/runConfigurations/app-api.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/runConfigurations/app-dev.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/runConfigurations/app.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/runConfigurations/backend-api.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/runConfigurations/process_sources.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/gwt/mvp/runConfigurations/super_dev_mode.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/README.md (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/client/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/client/source/App.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/client/source/App.native.js (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/client/source/EntryPoint.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/client/webapp/web.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/pom.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/jetty/context.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/tomcat/context.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/webapp/favicon.ico (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/webapp/favicon.png (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/webapp/index.html (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/webapp/ui-starter.css (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/server/webapp/web.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/shared/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/basic/shared/source/Person.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/README.md (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/backend/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/backend/resource/app.css (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/backend/resource/config.json (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/backend/resource/favicon.ico (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/backend/resource/favicon.png (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/backend/resource/index.html (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/frontend/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/frontend/source/AppClientModule.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/frontend/source/AppClientModule.native.js (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/frontend/source/EntryPoint.java (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/frontend/webapp/web.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/pom.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml (100%) rename src/main/resources/projects-templates/{app/gwt => v2/app/j2cl}/mvp/runConfigurations/Development.xml (83%) create mode 100644 src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app-api.xml rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/runConfigurations/app-dev.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/runConfigurations/app.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/runConfigurations/process_sources.xml (100%) rename src/main/resources/projects-templates/{ => v2}/app/j2cl/mvp/runConfigurations/super_dev_mode.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/backend-dependency.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/backend/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/backend/source/package-info.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend-dependency.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend-ui-dependency.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/source/ClientModule.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/source/Proxy.java (83%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/source/View.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/source/module.gwt.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/test/ClientModuleTestSuite.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/test/FakeView.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/test/PresenterSpy.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/frontend/test/ProxyTest.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/pom.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/shared/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/shared/source/Service.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/ui/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/ui/source/UIClientModule.java (100%) rename src/main/resources/projects-templates/{module/gwt/single => v2/module/gwt/multi/ui}/source/ViewImpl.java (83%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/multi/ui/source/module.gwt.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/frontend-dependency.ftl (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/pom.xml (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/source/ClientModule.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/source/Proxy.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/source/Service.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/source/View.java (100%) rename src/main/resources/projects-templates/{module/gwt/multi/ui => v2/module/gwt/single}/source/ViewImpl.java (100%) rename src/main/resources/projects-templates/{ => v2}/module/gwt/single/source/module.gwt.xml (100%) diff --git a/pom.xml b/pom.xml index 110b8c4..52ef57c 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ HEAD-SNAPSHOT HEAD-SNAPSHOT - 1.0.1 + 2.0.0 ${next.release.version}-${snapshot.version} 3.11.0 17 diff --git a/src/main/java/org/dominokit/cli/generator/Versions.java b/src/main/java/org/dominokit/cli/generator/Versions.java index 9259656..acb649a 100644 --- a/src/main/java/org/dominokit/cli/generator/Versions.java +++ b/src/main/java/org/dominokit/cli/generator/Versions.java @@ -1,9 +1,9 @@ package org.dominokit.cli.generator; public enum Versions { - domino_ui_version("DOMINO_CLI_DOMINO_UI_VERSION","1.0.1"), + domino_ui_version("DOMINO_CLI_DOMINO_UI_VERSION","HEAD-SNAPSHOT"), domino_history_version("DOMINO_CLI_DOMINO_HISTORY_VERSION","1.0.0"), - domino_mvp_version("DOMINO_CLI_DOMINO_MVP_VERSION","1.0.0"), + domino_mvp_version("DOMINO_CLI_DOMINO_MVP_VERSION","HEAD-SNAPSHOT"), domino_rest_version("DOMINO_CLI_DOMINO_REST_VERSION","1.0.0"), domino_jackson_version("DOMINO_CLI_DOMINO_JACKSON_VERSION","1.0.0"), quarkus_version("DOMINO_CLI_QUARKUS_VERSION","2.16.7.Final"), diff --git a/src/main/resources/projects-templates/app/gwt/basic/client/source/App.java b/src/main/resources/projects-templates/app/gwt/basic/client/source/App.java deleted file mode 100644 index bdfbc06..0000000 --- a/src/main/resources/projects-templates/app/gwt/basic/client/source/App.java +++ /dev/null @@ -1,34 +0,0 @@ -package ${rootPackage}; - -import com.google.gwt.core.client.EntryPoint; -import org.dominokit.domino.ui.typography.Paragraph; -import org.dominokit.domino.ui.cards.Card; -import org.dominokit.domino.ui.icons.Icons; -import org.dominokit.domino.ui.layout.Layout; -import org.dominokit.domino.ui.style.ColorScheme; -import org.dominokit.domino.ui.tree.Tree; -import org.dominokit.domino.ui.tree.TreeItem; - -/** - * Entry point classes define onModuleLoad(). - */ -public class App implements EntryPoint { - - /** - * This is the entry point method. - */ - public void onModuleLoad() { - var layout = Layout.create("Domino-ui starter") - .show(ColorScheme.BLUE); - - layout.getLeftPanel() - .appendChild(Tree.create("Menu") - .appendChild(TreeItem.create("Menu 1", Icons.ALL.widgets())) - .appendChild(TreeItem.create("Menu 2", Icons.ALL.widgets())) - .addItemClickListener(treeItem -> { - layout.setContent(Card.create(treeItem.getValue()) - .appendChild(Paragraph.create("Welcome to domino-ui , you are viewing "+treeItem.getValue()+" content"))); - }) - ); - } -} diff --git a/src/main/resources/projects-templates/api/README.md b/src/main/resources/projects-templates/v2/api/README.md similarity index 100% rename from src/main/resources/projects-templates/api/README.md rename to src/main/resources/projects-templates/v2/api/README.md diff --git a/src/main/resources/projects-templates/api/docker/Dockerfile.jvm b/src/main/resources/projects-templates/v2/api/docker/Dockerfile.jvm similarity index 100% rename from src/main/resources/projects-templates/api/docker/Dockerfile.jvm rename to src/main/resources/projects-templates/v2/api/docker/Dockerfile.jvm diff --git a/src/main/resources/projects-templates/api/docker/Dockerfile.legacy-jar b/src/main/resources/projects-templates/v2/api/docker/Dockerfile.legacy-jar similarity index 100% rename from src/main/resources/projects-templates/api/docker/Dockerfile.legacy-jar rename to src/main/resources/projects-templates/v2/api/docker/Dockerfile.legacy-jar diff --git a/src/main/resources/projects-templates/api/docker/Dockerfile.native b/src/main/resources/projects-templates/v2/api/docker/Dockerfile.native similarity index 100% rename from src/main/resources/projects-templates/api/docker/Dockerfile.native rename to src/main/resources/projects-templates/v2/api/docker/Dockerfile.native diff --git a/src/main/resources/projects-templates/api/docker/Dockerfile.native-distroless b/src/main/resources/projects-templates/v2/api/docker/Dockerfile.native-distroless similarity index 100% rename from src/main/resources/projects-templates/api/docker/Dockerfile.native-distroless rename to src/main/resources/projects-templates/v2/api/docker/Dockerfile.native-distroless diff --git a/src/main/resources/projects-templates/api/dockerignore b/src/main/resources/projects-templates/v2/api/dockerignore similarity index 100% rename from src/main/resources/projects-templates/api/dockerignore rename to src/main/resources/projects-templates/v2/api/dockerignore diff --git a/src/main/resources/projects-templates/api/pom.xml b/src/main/resources/projects-templates/v2/api/pom.xml similarity index 100% rename from src/main/resources/projects-templates/api/pom.xml rename to src/main/resources/projects-templates/v2/api/pom.xml diff --git a/src/main/resources/projects-templates/api/resource/application.properties b/src/main/resources/projects-templates/v2/api/resource/application.properties similarity index 100% rename from src/main/resources/projects-templates/api/resource/application.properties rename to src/main/resources/projects-templates/v2/api/resource/application.properties diff --git a/src/main/resources/projects-templates/api/resource/index.html b/src/main/resources/projects-templates/v2/api/resource/index.html similarity index 100% rename from src/main/resources/projects-templates/api/resource/index.html rename to src/main/resources/projects-templates/v2/api/resource/index.html diff --git a/src/main/resources/projects-templates/api/source/GreetingResource.java b/src/main/resources/projects-templates/v2/api/source/GreetingResource.java similarity index 100% rename from src/main/resources/projects-templates/api/source/GreetingResource.java rename to src/main/resources/projects-templates/v2/api/source/GreetingResource.java diff --git a/src/main/resources/projects-templates/app/gwt/basic/README.md b/src/main/resources/projects-templates/v2/app/gwt/basic/README.md similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/README.md rename to src/main/resources/projects-templates/v2/app/gwt/basic/README.md diff --git a/src/main/resources/projects-templates/app/gwt/basic/client/pom.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/client/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/client/pom.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/client/pom.xml diff --git a/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java b/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java new file mode 100644 index 0000000..44b21ca --- /dev/null +++ b/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java @@ -0,0 +1,35 @@ +package ${rootPackage}; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.ui.cards.Card; +import org.dominokit.domino.ui.icons.lib.Icons; +import org.dominokit.domino.ui.layout.AppLayout; +import org.dominokit.domino.ui.style.DominoCss; +import org.dominokit.domino.ui.tree.Tree; +import org.dominokit.domino.ui.tree.TreeItem; +import org.dominokit.domino.ui.utils.ElementsFactory; + +/** + * Entry point classes define onModuleLoad(). + */ +public class App implements EntryPoint, ElementsFactory, DominoCss { + + /** + * This is the entry point method. + */ + public void onModuleLoad() { + var layout = AppLayout.create("Domino-ui starter"); + + layout.withLeftDrawer((parent, drawer) -> { + Tree.create("Menu") + .appendChild(TreeItem.create(Icons.widgets(), "Menu 1")) + .appendChild(TreeItem.create(Icons.widgets(), "Menu 2")) + .addSelectionListener((source, selection) -> { + layout.setContent(Card.create(source.get().getValue()) + .appendChild(p("Welcome to domino-ui , you are viewing "+source.get().getValue()+" content"))); + + }); + }); + body().appendChild(layout); + } +} diff --git a/src/main/resources/projects-templates/app/gwt/basic/client/source/module.gwt.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/module.gwt.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/client/source/module.gwt.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/client/source/module.gwt.xml diff --git a/src/main/resources/projects-templates/app/gwt/basic/pom.ftl b/src/main/resources/projects-templates/v2/app/gwt/basic/pom.ftl similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/pom.ftl rename to src/main/resources/projects-templates/v2/app/gwt/basic/pom.ftl diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/jetty/context.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/server/jetty/context.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/jetty/context.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/jetty/context.xml diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/pom.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/server/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/pom.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/pom.xml diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/tomcat/context.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/server/tomcat/context.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/tomcat/context.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/tomcat/context.xml diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/webapp/favicon.ico b/src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/favicon.ico similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/webapp/favicon.ico rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/favicon.ico diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/webapp/favicon.png b/src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/favicon.png similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/webapp/favicon.png rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/favicon.png diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/webapp/index.html b/src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/index.html similarity index 92% rename from src/main/resources/projects-templates/app/gwt/basic/server/webapp/index.html rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/index.html index c4bc8c1..4ab8425 100644 --- a/src/main/resources/projects-templates/app/gwt/basic/server/webapp/index.html +++ b/src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/index.html @@ -9,8 +9,7 @@ - - + diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/webapp/ui-starter.css b/src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/ui-starter.css similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/webapp/ui-starter.css rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/ui-starter.css diff --git a/src/main/resources/projects-templates/app/gwt/basic/server/webapp/web.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/web.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/server/webapp/web.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/server/webapp/web.xml diff --git a/src/main/resources/projects-templates/app/gwt/basic/shared/pom.xml b/src/main/resources/projects-templates/v2/app/gwt/basic/shared/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/shared/pom.xml rename to src/main/resources/projects-templates/v2/app/gwt/basic/shared/pom.xml diff --git a/src/main/resources/projects-templates/app/gwt/basic/shared/source/Person.java b/src/main/resources/projects-templates/v2/app/gwt/basic/shared/source/Person.java similarity index 100% rename from src/main/resources/projects-templates/app/gwt/basic/shared/source/Person.java rename to src/main/resources/projects-templates/v2/app/gwt/basic/shared/source/Person.java diff --git a/src/main/resources/projects-templates/app/gwt/mvp/README.md b/src/main/resources/projects-templates/v2/app/gwt/mvp/README.md similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/README.md rename to src/main/resources/projects-templates/v2/app/gwt/mvp/README.md diff --git a/src/main/resources/projects-templates/app/gwt/mvp/backend/pom.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/pom.xml similarity index 97% rename from src/main/resources/projects-templates/app/gwt/mvp/backend/pom.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/backend/pom.xml index b15ccf8..d0068bb 100644 --- a/src/main/resources/projects-templates/app/gwt/mvp/backend/pom.xml +++ b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/pom.xml @@ -38,10 +38,6 @@ org.dominokit domino-mvp-remote-logging - - org.dominokit - domino-mvp-log4j-server-logging - org.dominokit domino-mvp-resteasy-plugin diff --git a/src/main/resources/projects-templates/app/gwt/mvp/backend/resource/app.css b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/app.css similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/backend/resource/app.css rename to src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/app.css diff --git a/src/main/resources/projects-templates/app/gwt/mvp/backend/resource/config.json b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/config.json similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/backend/resource/config.json rename to src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/config.json diff --git a/src/main/resources/projects-templates/app/gwt/mvp/backend/resource/favicon.ico b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/favicon.ico similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/backend/resource/favicon.ico rename to src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/favicon.ico diff --git a/src/main/resources/projects-templates/app/gwt/mvp/backend/resource/favicon.png b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/favicon.png similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/backend/resource/favicon.png rename to src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/favicon.png diff --git a/src/main/resources/projects-templates/app/gwt/mvp/backend/resource/index.html b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/index.html similarity index 83% rename from src/main/resources/projects-templates/app/gwt/mvp/backend/resource/index.html rename to src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/index.html index 5888009..f54615e 100644 --- a/src/main/resources/projects-templates/app/gwt/mvp/backend/resource/index.html +++ b/src/main/resources/projects-templates/v2/app/gwt/mvp/backend/resource/index.html @@ -6,15 +6,14 @@ - - + ${name} - + diff --git a/src/main/resources/projects-templates/app/gwt/mvp/frontend/pom.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/frontend/pom.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/pom.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/frontend/source/AppClientModule.java b/src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/source/AppClientModule.java similarity index 85% rename from src/main/resources/projects-templates/app/gwt/mvp/frontend/source/AppClientModule.java rename to src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/source/AppClientModule.java index afeca95..b4dec3d 100644 --- a/src/main/resources/projects-templates/app/gwt/mvp/frontend/source/AppClientModule.java +++ b/src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/source/AppClientModule.java @@ -3,7 +3,7 @@ import com.google.gwt.core.client.EntryPoint; import org.dominokit.domino.api.client.ClientApp; import org.dominokit.domino.gwt.client.app.DominoGWT; -import org.dominokit.domino.view.GwtView; +import org.dominokit.domino.view.DominoViewOptions; import org.dominokit.rest.DominoRestConfig; import java.util.logging.Logger; @@ -15,8 +15,7 @@ public class AppClientModule implements EntryPoint { public void onModuleLoad() { DominoRestConfig.initDefaults() .setDefaultServiceRoot("http://localhost:${port}"); - DominoGWT.init(); - GwtView.init(); + DominoGWT.init(DominoViewOptions.getInstance()); ClientApp.make().run(); LOGGER.info("${name} Application frontend have been initialized."); } diff --git a/src/main/resources/projects-templates/app/gwt/mvp/frontend/source/module.gwt.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/source/module.gwt.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/frontend/source/module.gwt.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/frontend/source/module.gwt.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/pom.ftl b/src/main/resources/projects-templates/v2/app/gwt/mvp/pom.ftl similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/pom.ftl rename to src/main/resources/projects-templates/v2/app/gwt/mvp/pom.ftl diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/ALL_TESTS.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/ALL_TESTS.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/ALL_TESTS.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/ALL_TESTS.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/Development.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/Development.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/Development.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/Development.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/app-api.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/app-api.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/app-api.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/app-api.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/app-dev.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/app-dev.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/app-dev.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/app-dev.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/app.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/app.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/app.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/app.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/backend-api.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/backend-api.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/backend-api.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/backend-api.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/process_sources.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/process_sources.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/process_sources.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/process_sources.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/super_dev_mode.xml b/src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/super_dev_mode.xml similarity index 100% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/super_dev_mode.xml rename to src/main/resources/projects-templates/v2/app/gwt/mvp/runConfigurations/super_dev_mode.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/README.md b/src/main/resources/projects-templates/v2/app/j2cl/basic/README.md similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/README.md rename to src/main/resources/projects-templates/v2/app/j2cl/basic/README.md diff --git a/src/main/resources/projects-templates/app/j2cl/basic/client/pom.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/client/pom.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/client/pom.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/client/source/App.java b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.java similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/client/source/App.java rename to src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.java diff --git a/src/main/resources/projects-templates/app/j2cl/basic/client/source/App.native.js b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.native.js similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/client/source/App.native.js rename to src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.native.js diff --git a/src/main/resources/projects-templates/app/j2cl/basic/client/source/EntryPoint.java b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/EntryPoint.java similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/client/source/EntryPoint.java rename to src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/EntryPoint.java diff --git a/src/main/resources/projects-templates/app/j2cl/basic/client/webapp/web.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/webapp/web.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/client/webapp/web.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/client/webapp/web.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/pom.ftl b/src/main/resources/projects-templates/v2/app/j2cl/basic/pom.ftl similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/pom.ftl rename to src/main/resources/projects-templates/v2/app/j2cl/basic/pom.ftl diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/jetty/context.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/jetty/context.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/jetty/context.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/jetty/context.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/pom.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/pom.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/pom.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/tomcat/context.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/tomcat/context.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/tomcat/context.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/tomcat/context.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/webapp/favicon.ico b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/favicon.ico similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/webapp/favicon.ico rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/favicon.ico diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/webapp/favicon.png b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/favicon.png similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/webapp/favicon.png rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/favicon.png diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/webapp/index.html b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/index.html similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/webapp/index.html rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/index.html diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/webapp/ui-starter.css b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/ui-starter.css similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/webapp/ui-starter.css rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/ui-starter.css diff --git a/src/main/resources/projects-templates/app/j2cl/basic/server/webapp/web.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/web.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/server/webapp/web.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/server/webapp/web.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/shared/pom.xml b/src/main/resources/projects-templates/v2/app/j2cl/basic/shared/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/shared/pom.xml rename to src/main/resources/projects-templates/v2/app/j2cl/basic/shared/pom.xml diff --git a/src/main/resources/projects-templates/app/j2cl/basic/shared/source/Person.java b/src/main/resources/projects-templates/v2/app/j2cl/basic/shared/source/Person.java similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/basic/shared/source/Person.java rename to src/main/resources/projects-templates/v2/app/j2cl/basic/shared/source/Person.java diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/README.md b/src/main/resources/projects-templates/v2/app/j2cl/mvp/README.md similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/README.md rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/README.md diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/backend/pom.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/backend/pom.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/pom.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/app.css b/src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/app.css similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/app.css rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/app.css diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/config.json b/src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/config.json similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/config.json rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/config.json diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/favicon.ico b/src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/favicon.ico similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/favicon.ico rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/favicon.ico diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/favicon.png b/src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/favicon.png similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/favicon.png rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/favicon.png diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/index.html b/src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/index.html similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/backend/resource/index.html rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/backend/resource/index.html diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/frontend/pom.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/pom.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/frontend/pom.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/pom.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/frontend/source/AppClientModule.java b/src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/source/AppClientModule.java similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/frontend/source/AppClientModule.java rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/source/AppClientModule.java diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/frontend/source/AppClientModule.native.js b/src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/source/AppClientModule.native.js similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/frontend/source/AppClientModule.native.js rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/source/AppClientModule.native.js diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/frontend/source/EntryPoint.java b/src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/source/EntryPoint.java similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/frontend/source/EntryPoint.java rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/source/EntryPoint.java diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/frontend/webapp/web.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/webapp/web.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/frontend/webapp/web.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/frontend/webapp/web.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/pom.ftl b/src/main/resources/projects-templates/v2/app/j2cl/mvp/pom.ftl similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/pom.ftl rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/pom.ftl diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml diff --git a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/Development.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/Development.xml similarity index 83% rename from src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/Development.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/Development.xml index 5d04c02..845698f 100644 --- a/src/main/resources/projects-templates/app/gwt/mvp/runConfigurations/Development.xml +++ b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/Development.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app-api.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app-api.xml new file mode 100644 index 0000000..11177ec --- /dev/null +++ b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app-api.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/app-dev.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app-dev.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/app-dev.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app-dev.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/app.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/app.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/app.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/process_sources.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/process_sources.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/process_sources.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/process_sources.xml diff --git a/src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/super_dev_mode.xml b/src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/super_dev_mode.xml similarity index 100% rename from src/main/resources/projects-templates/app/j2cl/mvp/runConfigurations/super_dev_mode.xml rename to src/main/resources/projects-templates/v2/app/j2cl/mvp/runConfigurations/super_dev_mode.xml diff --git a/src/main/resources/projects-templates/module/gwt/multi/backend-dependency.ftl b/src/main/resources/projects-templates/v2/module/gwt/multi/backend-dependency.ftl similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/backend-dependency.ftl rename to src/main/resources/projects-templates/v2/module/gwt/multi/backend-dependency.ftl diff --git a/src/main/resources/projects-templates/module/gwt/multi/backend/pom.xml b/src/main/resources/projects-templates/v2/module/gwt/multi/backend/pom.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/backend/pom.xml rename to src/main/resources/projects-templates/v2/module/gwt/multi/backend/pom.xml diff --git a/src/main/resources/projects-templates/module/gwt/multi/backend/source/package-info.java b/src/main/resources/projects-templates/v2/module/gwt/multi/backend/source/package-info.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/backend/source/package-info.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/backend/source/package-info.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend-dependency.ftl b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend-dependency.ftl similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend-dependency.ftl rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend-dependency.ftl diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend-ui-dependency.ftl b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend-ui-dependency.ftl similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend-ui-dependency.ftl rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend-ui-dependency.ftl diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/pom.xml b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/pom.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/pom.xml rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/pom.xml diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/source/ClientModule.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/ClientModule.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/source/ClientModule.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/ClientModule.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/source/Proxy.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/Proxy.java similarity index 83% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/source/Proxy.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/Proxy.java index a693dfd..8b12b28 100644 --- a/src/main/resources/projects-templates/module/gwt/multi/frontend/source/Proxy.java +++ b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/Proxy.java @@ -1,7 +1,7 @@ package ${rootPackage}.${subpackage}.client.presenters; import org.dominokit.domino.api.client.annotations.presenter.*; -import org.dominokit.domino.api.client.mvp.presenter.ViewBaseClientPresenter; +import org.dominokit.domino.api.client.mvp.presenter.ViewablePresenter; import org.dominokit.domino.api.shared.extension.PredefinedSlots; import ${rootPackage}.${subpackage}.client.views.${prefix}View; import ${rootPackage}.${subpackage}.shared.services.${prefix}ServiceFactory; @@ -12,11 +12,11 @@ @AutoRoute(token = "${token}") @Slot(PredefinedSlots.BODY_SLOT) @AutoReveal -public class ${prefix}Proxy extends ViewBaseClientPresenter<${prefix}View> implements ${prefix}View.${prefix}UiHandlers { +public class ${prefix}Proxy extends ViewablePresenter<${prefix}View> implements ${prefix}View.${prefix}UiHandlers { private static final Logger LOGGER = LoggerFactory.getLogger(${prefix}Proxy.class); - @OnInit + @OnActivated public void on${prefix}Init(){ LOGGER.info("${prefix} initialized"); } diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/source/View.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/View.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/source/View.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/View.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/source/module.gwt.xml b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/module.gwt.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/source/module.gwt.xml rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/source/module.gwt.xml diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/test/ClientModuleTestSuite.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/ClientModuleTestSuite.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/test/ClientModuleTestSuite.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/ClientModuleTestSuite.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/test/FakeView.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/FakeView.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/test/FakeView.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/FakeView.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/test/PresenterSpy.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/PresenterSpy.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/test/PresenterSpy.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/PresenterSpy.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/frontend/test/ProxyTest.java b/src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/ProxyTest.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/frontend/test/ProxyTest.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/frontend/test/ProxyTest.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/pom.ftl b/src/main/resources/projects-templates/v2/module/gwt/multi/pom.ftl similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/pom.ftl rename to src/main/resources/projects-templates/v2/module/gwt/multi/pom.ftl diff --git a/src/main/resources/projects-templates/module/gwt/multi/shared/pom.xml b/src/main/resources/projects-templates/v2/module/gwt/multi/shared/pom.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/shared/pom.xml rename to src/main/resources/projects-templates/v2/module/gwt/multi/shared/pom.xml diff --git a/src/main/resources/projects-templates/module/gwt/multi/shared/source/Service.java b/src/main/resources/projects-templates/v2/module/gwt/multi/shared/source/Service.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/shared/source/Service.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/shared/source/Service.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/ui/pom.xml b/src/main/resources/projects-templates/v2/module/gwt/multi/ui/pom.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/ui/pom.xml rename to src/main/resources/projects-templates/v2/module/gwt/multi/ui/pom.xml diff --git a/src/main/resources/projects-templates/module/gwt/multi/ui/source/UIClientModule.java b/src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/UIClientModule.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/ui/source/UIClientModule.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/UIClientModule.java diff --git a/src/main/resources/projects-templates/module/gwt/single/source/ViewImpl.java b/src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/ViewImpl.java similarity index 83% rename from src/main/resources/projects-templates/module/gwt/single/source/ViewImpl.java rename to src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/ViewImpl.java index a34d6c5..c2fd2d2 100644 --- a/src/main/resources/projects-templates/module/gwt/single/source/ViewImpl.java +++ b/src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/ViewImpl.java @@ -4,18 +4,17 @@ import org.dominokit.domino.view.BaseElementView; import org.dominokit.domino.api.client.annotations.UiView; -import org.dominokit.domino.ui.utils.DominoElement; +import org.dominokit.domino.ui.elements.DivElement; import ${rootPackage}.${subpackage}.client.presenters.${prefix}Proxy; import ${rootPackage}.${subpackage}.client.views.${prefix}View; -import static org.jboss.elemento.Elements.h; @UiView(presentable = ${prefix}Proxy.class) public class ${prefix}ViewImpl extends BaseElementView implements ${prefix}View{ private ${prefix}UiHandlers uiHandlers; - private DominoElement root = DominoElement.div(); + private DivElement root = div(); @Override public HTMLDivElement init() { diff --git a/src/main/resources/projects-templates/module/gwt/multi/ui/source/module.gwt.xml b/src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/module.gwt.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/ui/source/module.gwt.xml rename to src/main/resources/projects-templates/v2/module/gwt/multi/ui/source/module.gwt.xml diff --git a/src/main/resources/projects-templates/module/gwt/single/frontend-dependency.ftl b/src/main/resources/projects-templates/v2/module/gwt/single/frontend-dependency.ftl similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/frontend-dependency.ftl rename to src/main/resources/projects-templates/v2/module/gwt/single/frontend-dependency.ftl diff --git a/src/main/resources/projects-templates/module/gwt/single/pom.xml b/src/main/resources/projects-templates/v2/module/gwt/single/pom.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/pom.xml rename to src/main/resources/projects-templates/v2/module/gwt/single/pom.xml diff --git a/src/main/resources/projects-templates/module/gwt/single/source/ClientModule.java b/src/main/resources/projects-templates/v2/module/gwt/single/source/ClientModule.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/source/ClientModule.java rename to src/main/resources/projects-templates/v2/module/gwt/single/source/ClientModule.java diff --git a/src/main/resources/projects-templates/module/gwt/single/source/Proxy.java b/src/main/resources/projects-templates/v2/module/gwt/single/source/Proxy.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/source/Proxy.java rename to src/main/resources/projects-templates/v2/module/gwt/single/source/Proxy.java diff --git a/src/main/resources/projects-templates/module/gwt/single/source/Service.java b/src/main/resources/projects-templates/v2/module/gwt/single/source/Service.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/source/Service.java rename to src/main/resources/projects-templates/v2/module/gwt/single/source/Service.java diff --git a/src/main/resources/projects-templates/module/gwt/single/source/View.java b/src/main/resources/projects-templates/v2/module/gwt/single/source/View.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/source/View.java rename to src/main/resources/projects-templates/v2/module/gwt/single/source/View.java diff --git a/src/main/resources/projects-templates/module/gwt/multi/ui/source/ViewImpl.java b/src/main/resources/projects-templates/v2/module/gwt/single/source/ViewImpl.java similarity index 100% rename from src/main/resources/projects-templates/module/gwt/multi/ui/source/ViewImpl.java rename to src/main/resources/projects-templates/v2/module/gwt/single/source/ViewImpl.java diff --git a/src/main/resources/projects-templates/module/gwt/single/source/module.gwt.xml b/src/main/resources/projects-templates/v2/module/gwt/single/source/module.gwt.xml similarity index 100% rename from src/main/resources/projects-templates/module/gwt/single/source/module.gwt.xml rename to src/main/resources/projects-templates/v2/module/gwt/single/source/module.gwt.xml From f4be6c366977644997343b29364b624678148260 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sat, 2 Sep 2023 16:14:51 +0300 Subject: [PATCH 4/6] prepare for version profiles --- pom.xml | 3 +- .../java/org/dominokit/cli/ToolVersion.java | 24 +++ .../org/dominokit/cli/VersionProfile.java | 83 ++++++++ .../dominokit/cli/commands/DominoCommand.java | 11 - .../cli/commands/GenerateAppCommand.java | 13 ++ .../cli/commands/GenerateModuleCommand.java | 12 ++ .../dominokit/cli/generator/ResourceFile.java | 3 +- .../cli/generator/TemplateProvider.java | 35 ++-- .../org/dominokit/cli/generator/Versions.java | 29 --- .../projects-templates/v1/api/README.md | 54 +++++ .../v1/api/docker/Dockerfile.jvm | 54 +++++ .../v1/api/docker/Dockerfile.legacy-jar | 51 +++++ .../v1/api/docker/Dockerfile.native | 27 +++ .../api/docker/Dockerfile.native-distroless | 23 +++ .../projects-templates/v1/api/dockerignore | 5 + .../projects-templates/v1/api/pom.xml | 134 ++++++++++++ .../v1/api/resource/application.properties | 2 + .../v1/api/resource/index.html | 170 ++++++++++++++++ .../v1/api/source/GreetingResource.java | 18 ++ .../v1/app/gwt/basic/README.md | 13 ++ .../v1/app/gwt/basic/client/pom.xml | 59 ++++++ .../v1/app/gwt/basic/client/source/App.java | 34 ++++ .../gwt/basic/client/source/module.gwt.xml | 11 + .../v1/app/gwt/basic/pom.ftl | 110 ++++++++++ .../v1/app/gwt/basic/server/jetty/context.xml | 6 + .../v1/app/gwt/basic/server/pom.xml | 110 ++++++++++ .../app/gwt/basic/server/tomcat/context.xml | 6 + .../app/gwt/basic/server/webapp/favicon.ico | Bin 0 -> 1150 bytes .../app/gwt/basic/server/webapp/favicon.png | Bin 0 -> 548 bytes .../v1/app/gwt/basic/server/webapp/index.html | 49 +++++ .../gwt/basic/server/webapp/ui-starter.css | 1 + .../v1/app/gwt/basic/server/webapp/web.xml | 11 + .../v1/app/gwt/basic/shared/pom.xml | 26 +++ .../app/gwt/basic/shared/source/Person.java | 23 +++ .../v1/app/gwt/mvp/README.md | 29 +++ .../v1/app/gwt/mvp/backend/pom.xml | 165 +++++++++++++++ .../v1/app/gwt/mvp/backend/resource/app.css | 1 + .../app/gwt/mvp/backend/resource/config.json | 4 + .../app/gwt/mvp/backend/resource/favicon.ico | Bin 0 -> 1150 bytes .../app/gwt/mvp/backend/resource/favicon.png | Bin 0 -> 548 bytes .../app/gwt/mvp/backend/resource/index.html | 30 +++ .../v1/app/gwt/mvp/frontend/pom.xml | 69 +++++++ .../mvp/frontend/source/AppClientModule.java | 23 +++ .../gwt/mvp/frontend/source/module.gwt.xml | 18 ++ .../projects-templates/v1/app/gwt/mvp/pom.ftl | 190 ++++++++++++++++++ .../gwt/mvp/runConfigurations/ALL_TESTS.xml | 23 +++ .../gwt/mvp/runConfigurations/Development.xml | 8 + .../app/gwt/mvp/runConfigurations/app-dev.xml | 17 ++ .../v1/app/gwt/mvp/runConfigurations/app.xml | 17 ++ .../gwt/mvp/runConfigurations/backend-api.xml | 26 +++ .../mvp/runConfigurations/process_sources.xml | 27 +++ .../mvp/runConfigurations/super_dev_mode.xml | 30 +++ .../v1/app/j2cl/basic/README.md | 13 ++ .../v1/app/j2cl/basic/client/pom.xml | 114 +++++++++++ .../v1/app/j2cl/basic/client/source/App.java | 24 +++ .../j2cl/basic/client/source/App.native.js | 32 +++ .../j2cl/basic/client/source/EntryPoint.java | 28 +++ .../v1/app/j2cl/basic/client/webapp/web.xml | 32 +++ .../v1/app/j2cl/basic/pom.ftl | 121 +++++++++++ .../app/j2cl/basic/server/jetty/context.xml | 6 + .../v1/app/j2cl/basic/server/pom.xml | 107 ++++++++++ .../app/j2cl/basic/server/tomcat/context.xml | 6 + .../app/j2cl/basic/server/webapp/favicon.ico | 0 .../app/j2cl/basic/server/webapp/favicon.png | 0 .../app/j2cl/basic/server/webapp/index.html | 46 +++++ .../j2cl/basic/server/webapp/ui-starter.css | 1 + .../v1/app/j2cl/basic/server/webapp/web.xml | 11 + .../v1/app/j2cl/basic/shared/pom.xml | 21 ++ .../app/j2cl/basic/shared/source/Person.java | 23 +++ .../v1/app/j2cl/mvp/README.md | 25 +++ .../v1/app/j2cl/mvp/backend/pom.xml | 167 +++++++++++++++ .../v1/app/j2cl/mvp/backend/resource/app.css | 1 + .../app/j2cl/mvp/backend/resource/config.json | 4 + .../app/j2cl/mvp/backend/resource/favicon.ico | Bin 0 -> 1150 bytes .../app/j2cl/mvp/backend/resource/favicon.png | Bin 0 -> 548 bytes .../app/j2cl/mvp/backend/resource/index.html | 30 +++ .../v1/app/j2cl/mvp/frontend/pom.xml | 87 ++++++++ .../mvp/frontend/source/AppClientModule.java | 26 +++ .../frontend/source/AppClientModule.native.js | 32 +++ .../j2cl/mvp/frontend/source/EntryPoint.java | 28 +++ .../v1/app/j2cl/mvp/frontend/webapp/web.xml | 31 +++ .../v1/app/j2cl/mvp/pom.ftl | 107 ++++++++++ .../j2cl/mvp/runConfigurations/ALL_TESTS.xml | 23 +++ .../mvp/runConfigurations/Development.xml | 8 + .../j2cl/mvp/runConfigurations/app-api.xml | 31 +++ .../j2cl/mvp/runConfigurations/app-dev.xml | 17 ++ .../v1/app/j2cl/mvp/runConfigurations/app.xml | 17 ++ .../mvp/runConfigurations/process_sources.xml | 27 +++ .../mvp/runConfigurations/super_dev_mode.xml | 24 +++ .../module/gwt/multi/backend-dependency.ftl | 6 + .../v1/module/gwt/multi/backend/pom.xml | 48 +++++ .../multi/backend/source/package-info.java | 4 + .../module/gwt/multi/frontend-dependency.ftl | 6 + .../gwt/multi/frontend-ui-dependency.ftl | 6 + .../v1/module/gwt/multi/frontend/pom.xml | 117 +++++++++++ .../multi/frontend/source/ClientModule.java | 19 ++ .../gwt/multi/frontend/source/Proxy.java | 32 +++ .../gwt/multi/frontend/source/View.java | 13 ++ .../gwt/multi/frontend/source/module.gwt.xml | 11 + .../frontend/test/ClientModuleTestSuite.java | 9 + .../gwt/multi/frontend/test/FakeView.java | 31 +++ .../gwt/multi/frontend/test/PresenterSpy.java | 4 + .../gwt/multi/frontend/test/ProxyTest.java | 56 ++++++ .../v1/module/gwt/multi/pom.ftl | 49 +++++ .../v1/module/gwt/multi/shared/pom.xml | 63 ++++++ .../gwt/multi/shared/source/Service.java | 17 ++ .../v1/module/gwt/multi/ui/pom.xml | 96 +++++++++ .../gwt/multi/ui/source/UIClientModule.java | 19 ++ .../module/gwt/multi/ui/source/ViewImpl.java | 34 ++++ .../module/gwt/multi/ui/source/module.gwt.xml | 9 + .../module/gwt/single/frontend-dependency.ftl | 6 + .../v1/module/gwt/single/pom.xml | 127 ++++++++++++ .../gwt/single/source/ClientModule.java | 19 ++ .../v1/module/gwt/single/source/Proxy.java | 28 +++ .../v1/module/gwt/single/source/Service.java | 17 ++ .../v1/module/gwt/single/source/View.java | 13 ++ .../v1/module/gwt/single/source/ViewImpl.java | 34 ++++ .../module/gwt/single/source/module.gwt.xml | 10 + .../v2/api/resource/application.properties | 3 +- .../v2/app/gwt/basic/client/source/App.java | 11 +- .../v2/app/j2cl/basic/client/source/App.java | 2 +- 121 files changed, 4011 insertions(+), 65 deletions(-) create mode 100644 src/main/java/org/dominokit/cli/ToolVersion.java create mode 100644 src/main/java/org/dominokit/cli/VersionProfile.java delete mode 100644 src/main/java/org/dominokit/cli/generator/Versions.java create mode 100644 src/main/resources/projects-templates/v1/api/README.md create mode 100644 src/main/resources/projects-templates/v1/api/docker/Dockerfile.jvm create mode 100644 src/main/resources/projects-templates/v1/api/docker/Dockerfile.legacy-jar create mode 100644 src/main/resources/projects-templates/v1/api/docker/Dockerfile.native create mode 100644 src/main/resources/projects-templates/v1/api/docker/Dockerfile.native-distroless create mode 100644 src/main/resources/projects-templates/v1/api/dockerignore create mode 100644 src/main/resources/projects-templates/v1/api/pom.xml create mode 100644 src/main/resources/projects-templates/v1/api/resource/application.properties create mode 100644 src/main/resources/projects-templates/v1/api/resource/index.html create mode 100644 src/main/resources/projects-templates/v1/api/source/GreetingResource.java create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/README.md create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/client/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/client/source/App.java create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/client/source/module.gwt.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/pom.ftl create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/jetty/context.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/tomcat/context.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/favicon.ico create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/favicon.png create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/index.html create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/ui-starter.css create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/web.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/shared/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/basic/shared/source/Person.java create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/README.md create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/backend/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/app.css create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/config.json create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/favicon.ico create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/favicon.png create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/index.html create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/AppClientModule.java create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/module.gwt.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/pom.ftl create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/ALL_TESTS.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/Development.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app-dev.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/backend-api.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/process_sources.xml create mode 100644 src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/super_dev_mode.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/README.md create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/client/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.java create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.native.js create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/EntryPoint.java create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/client/webapp/web.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/pom.ftl create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/jetty/context.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/tomcat/context.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/favicon.ico create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/favicon.png create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/index.html create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/ui-starter.css create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/web.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/shared/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/basic/shared/source/Person.java create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/README.md create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/app.css create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/config.json create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/favicon.ico create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/favicon.png create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/index.html create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/pom.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.java create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.native.js create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/EntryPoint.java create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/webapp/web.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/pom.ftl create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/Development.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-api.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-dev.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/process_sources.xml create mode 100644 src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/super_dev_mode.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/backend-dependency.ftl create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/backend/pom.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/backend/source/package-info.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend-dependency.ftl create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend-ui-dependency.ftl create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/pom.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/ClientModule.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/Proxy.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/View.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/module.gwt.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ClientModuleTestSuite.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/FakeView.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/PresenterSpy.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ProxyTest.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/pom.ftl create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/shared/pom.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/shared/source/Service.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/ui/pom.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/UIClientModule.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/ViewImpl.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/module.gwt.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/frontend-dependency.ftl create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/pom.xml create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/source/ClientModule.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/source/Proxy.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/source/Service.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/source/View.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/source/ViewImpl.java create mode 100644 src/main/resources/projects-templates/v1/module/gwt/single/source/module.gwt.xml diff --git a/pom.xml b/pom.xml index 52ef57c..0602e47 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ HEAD-SNAPSHOT 2.0.0 - ${next.release.version}-${snapshot.version} + 0.0.0-HEAD-SNAPSHOT 3.11.0 17 UTF-8 @@ -169,6 +169,7 @@ ${project.version} + ${project.version} diff --git a/src/main/java/org/dominokit/cli/ToolVersion.java b/src/main/java/org/dominokit/cli/ToolVersion.java new file mode 100644 index 0000000..1dfdbf2 --- /dev/null +++ b/src/main/java/org/dominokit/cli/ToolVersion.java @@ -0,0 +1,24 @@ +package org.dominokit.cli; + +public class ToolVersion { + + private final String key; + private final String version; + + public static ToolVersion of(String key, String version){ + return new ToolVersion(key, version); + } + + private ToolVersion(String key, String version) { + this.key = key; + this.version = version; + } + + public String getKey() { + return key; + } + + public String getVersion() { + return version; + } +} diff --git a/src/main/java/org/dominokit/cli/VersionProfile.java b/src/main/java/org/dominokit/cli/VersionProfile.java new file mode 100644 index 0000000..09c0df6 --- /dev/null +++ b/src/main/java/org/dominokit/cli/VersionProfile.java @@ -0,0 +1,83 @@ +package org.dominokit.cli; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class VersionProfile { + + private static VersionProfile INSTANCE; + + private final String version; + private final String templatesPath; + private final List toolsVersions = new ArrayList<>(); + + public VersionProfile(String version,String templatesPath, ToolVersion... toolVersions) { + this.version = version; + this.templatesPath = templatesPath; + this.toolsVersions.addAll(Arrays.asList(toolVersions)); + } + + public String getVersion() { + return version; + } + + public String getTemplatesPath() { + return templatesPath; + } + + public List getToolsVersions() { + return toolsVersions; + } + + public static void setVersion(String version){ + INSTANCE = get(version); + } + + public static VersionProfile get(){ + return INSTANCE; + } + + private static VersionProfile get(String version){ + switch (version){ + case "v1" : + return new VersionProfile(version, version, + ToolVersion.of("domino_ui_version", "1.0.1"), + ToolVersion.of("domino_history_version", "1.0.0"), + ToolVersion.of("domino_mvp_version", "1.0.0"), + ToolVersion.of("domino_rest_version", "1.0.0"), + ToolVersion.of("domino_jackson_version", "1.0.0"), + ToolVersion.of("quarkus_version", "2.16.7.Final"), + ToolVersion.of("vertx_version", "3.9.0"), + ToolVersion.of("gwt_version", "2.10.0"), + ToolVersion.of("j2cl_maven_plugin_version", "0.21") + ); + case "v2" : + return new VersionProfile(version, version, + ToolVersion.of("domino_ui_version", "2.0.0-RC1"), + ToolVersion.of("domino_history_version", "1.0.0"), + ToolVersion.of("domino_mvp_version", "HEAD-SNAPSHOT"), + ToolVersion.of("domino_rest_version", "1.0.0"), + ToolVersion.of("domino_jackson_version", "1.0.0"), + ToolVersion.of("quarkus_version", "2.16.7.Final"), + ToolVersion.of("vertx_version", "3.9.0"), + ToolVersion.of("gwt_version", "2.10.0"), + ToolVersion.of("j2cl_maven_plugin_version", "0.21") + ); + case "dev" : + return new VersionProfile(version, "v2", + ToolVersion.of("domino_ui_version", "HEAD-SNAPSHOT"), + ToolVersion.of("domino_history_version", "HEAD-SNAPSHOT"), + ToolVersion.of("domino_mvp_version", "HEAD-SNAPSHOT"), + ToolVersion.of("domino_rest_version", "HEAD-SNAPSHOT"), + ToolVersion.of("domino_jackson_version", "HEAD-SNAPSHOT"), + ToolVersion.of("quarkus_version", "2.16.7.Final"), + ToolVersion.of("vertx_version", "3.9.0"), + ToolVersion.of("gwt_version", "2.10.0"), + ToolVersion.of("j2cl_maven_plugin_version", "0.21") + ); + + } + throw new IllegalArgumentException("Invalid versions profile ["+version+"] use one of [v1, v2, dev]."); + } +} diff --git a/src/main/java/org/dominokit/cli/commands/DominoCommand.java b/src/main/java/org/dominokit/cli/commands/DominoCommand.java index 5af7ae8..0d289b5 100644 --- a/src/main/java/org/dominokit/cli/commands/DominoCommand.java +++ b/src/main/java/org/dominokit/cli/commands/DominoCommand.java @@ -11,17 +11,6 @@ description = """ Executes domino commands Use this command to generate basic template project or an MVP project. - The versions used in the project dependencies can be set dynamically using env variable as the following : - - - DOMINO_CLI_DOMINO_UI_VERSION - - DOMINO_CLI_DOMINO_HISTORY_VERSION - - DOMINO_CLI_DOMINO_MVP_VERSION - - DOMINO_CLI_DOMINO_REST_VERSION - - DOMINO_CLI_DOMINO_JACKSON_VERSION - - DOMINO_CLI_QUARKUS_VERSION - - DOMINO_CLI_VERTX_VERSION - - DOMINO_CLI_GWT_VERSION - - DOMINO_CLI_J2CL_PLUGIN_VERSION """, subcommands = { CommandLine.HelpCommand.class, diff --git a/src/main/java/org/dominokit/cli/commands/GenerateAppCommand.java b/src/main/java/org/dominokit/cli/commands/GenerateAppCommand.java index 153f7bc..b50cbd2 100644 --- a/src/main/java/org/dominokit/cli/commands/GenerateAppCommand.java +++ b/src/main/java/org/dominokit/cli/commands/GenerateAppCommand.java @@ -3,6 +3,7 @@ import org.apache.commons.io.FileUtils; import org.apache.maven.model.Model; import org.dominokit.cli.PomUtil; +import org.dominokit.cli.VersionProfile; import org.dominokit.cli.generator.project.Project; import org.dominokit.cli.generator.project.ProjectCreator; import org.dominokit.cli.generator.project.ProjectCreatorFactory; @@ -55,6 +56,16 @@ public class GenerateAppCommand implements Runnable { ) private String type; + @Option( + names = {"-v", "--version"}, + description = "DominoKit tools version " + + "\n\t\t -[v1] : Will generate a project using DominoKi tools version 1.x.x" + + "\n\t\t -[v2] : Will generate a project using DominoKi tools version 2.x.x" + + "\n\t\t -[dev] : Will generate a project using DominoKi tools HEAD-SNAPSHOT versions", + defaultValue = "v2" + ) + private String version; + @Option( names = {"-api", "--generate-api"}, fallbackValue = "true", @@ -74,6 +85,8 @@ public class GenerateAppCommand implements Runnable { @Override public void run() { + VersionProfile.setVersion(version); + Model parentPom = null; PathUtils.setWorkingDir(workingDire); try { diff --git a/src/main/java/org/dominokit/cli/commands/GenerateModuleCommand.java b/src/main/java/org/dominokit/cli/commands/GenerateModuleCommand.java index 2538596..24107e7 100644 --- a/src/main/java/org/dominokit/cli/commands/GenerateModuleCommand.java +++ b/src/main/java/org/dominokit/cli/commands/GenerateModuleCommand.java @@ -1,5 +1,6 @@ package org.dominokit.cli.commands; +import org.dominokit.cli.VersionProfile; import org.dominokit.cli.generator.module.Module; import org.dominokit.cli.generator.module.ModuleCreatorFactory; @@ -31,6 +32,16 @@ public class GenerateModuleCommand implements Runnable { ) private boolean single = false; + @Option( + names = {"-v", "--version"}, + description = "DominoKit tools version " + + "\n\t\t -[v1] : Will generate a project using DominoKi tools version 1.x.x" + + "\n\t\t -[v2] : Will generate a project using DominoKi tools version 2.x.x" + + "\n\t\t -[dev] : Will generate a project using DominoKi tools HEAD-SNAPSHOT versions", + defaultValue = "v2" + ) + private String version; + @Option( names = {"-t", "--tests"}, fallbackValue = "true", @@ -78,6 +89,7 @@ public class GenerateModuleCommand implements Runnable { @Override public void run() { + VersionProfile.setVersion(version); PathUtils.setWorkingDir(workingDire); try { diff --git a/src/main/java/org/dominokit/cli/generator/ResourceFile.java b/src/main/java/org/dominokit/cli/generator/ResourceFile.java index e273cba..bbba4c7 100644 --- a/src/main/java/org/dominokit/cli/generator/ResourceFile.java +++ b/src/main/java/org/dominokit/cli/generator/ResourceFile.java @@ -1,6 +1,7 @@ package org.dominokit.cli.generator; import org.apache.commons.io.IOUtils; +import org.dominokit.cli.VersionProfile; import org.dominokit.cli.generator.exception.FailedToCreateResourceException; import java.io.File; @@ -44,7 +45,7 @@ public void write(String path, Map context) { Path filePath = Paths.get(path, name).toAbsolutePath(); File file = filePath.toFile(); if (!file.exists()) { - byte[] content = IOUtils.resourceToByteArray("projects-templates"+template, getClass().getClassLoader()); + byte[] content = IOUtils.resourceToByteArray("projects-templates/"+ VersionProfile.get().getTemplatesPath()+template, getClass().getClassLoader()); Files.write(filePath, content); } } catch (IOException e) { diff --git a/src/main/java/org/dominokit/cli/generator/TemplateProvider.java b/src/main/java/org/dominokit/cli/generator/TemplateProvider.java index 912fd8f..2a34dc5 100644 --- a/src/main/java/org/dominokit/cli/generator/TemplateProvider.java +++ b/src/main/java/org/dominokit/cli/generator/TemplateProvider.java @@ -4,6 +4,7 @@ import freemarker.template.Template; import freemarker.template.TemplateException; import freemarker.template.TemplateExceptionHandler; +import org.dominokit.cli.VersionProfile; import java.io.IOException; import java.io.StringWriter; @@ -26,12 +27,12 @@ public static void render(String templatePath, Map context, Writ } private static void fillVersions(Map context) { - Arrays.stream(Versions.values()) - .forEach(version -> { - context.put(version.name(), Optional.ofNullable(System.getProperty(version.getEnvVariable())) - .or(() -> Optional.ofNullable(System.getenv(version.getEnvVariable()))) - .orElse(version.get())); - }); + VersionProfile.get() + .getToolsVersions() + .forEach(version -> context.put(version.getKey(), Optional.ofNullable(System.getProperty(version.getKey())) + .orElse(version.getVersion()) + ) + ); } public static String render(String templatePath, Map context) throws IOException, TemplateException { @@ -43,16 +44,16 @@ public static String render(String templatePath, Map context) th } private static Configuration getEngine() { - if (isNull(cfg)) { - cfg = new Configuration(Configuration.VERSION_2_3_29); - cfg.setClassLoaderForTemplateLoading(TemplateProvider.class.getClassLoader(), "/projects-templates"); - cfg.setDefaultEncoding("UTF-8"); - cfg.setTemplateExceptionHandler(TemplateExceptionHandler.IGNORE_HANDLER); - cfg.setLogTemplateExceptions(false); - cfg.setWrapUncheckedExceptions(true); - cfg.setFallbackOnNullLoopVariable(false); - - } - return cfg; + if (isNull(cfg)) { + cfg = new Configuration(Configuration.VERSION_2_3_29); + cfg.setClassLoaderForTemplateLoading(TemplateProvider.class.getClassLoader(), "/projects-templates/"+VersionProfile.get().getTemplatesPath()); + cfg.setDefaultEncoding("UTF-8"); + cfg.setTemplateExceptionHandler(TemplateExceptionHandler.IGNORE_HANDLER); + cfg.setLogTemplateExceptions(false); + cfg.setWrapUncheckedExceptions(true); + cfg.setFallbackOnNullLoopVariable(false); + + } + return cfg; } } diff --git a/src/main/java/org/dominokit/cli/generator/Versions.java b/src/main/java/org/dominokit/cli/generator/Versions.java deleted file mode 100644 index acb649a..0000000 --- a/src/main/java/org/dominokit/cli/generator/Versions.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.dominokit.cli.generator; - -public enum Versions { - domino_ui_version("DOMINO_CLI_DOMINO_UI_VERSION","HEAD-SNAPSHOT"), - domino_history_version("DOMINO_CLI_DOMINO_HISTORY_VERSION","1.0.0"), - domino_mvp_version("DOMINO_CLI_DOMINO_MVP_VERSION","HEAD-SNAPSHOT"), - domino_rest_version("DOMINO_CLI_DOMINO_REST_VERSION","1.0.0"), - domino_jackson_version("DOMINO_CLI_DOMINO_JACKSON_VERSION","1.0.0"), - quarkus_version("DOMINO_CLI_QUARKUS_VERSION","2.16.7.Final"), - vertx_version("DOMINO_CLI_VERTX_VERSION","3.9.0"), - gwt_version("DOMINO_CLI_GWT_VERSION","2.10.0"), - j2cl_maven_plugin_version("DOMINO_CLI_J2CL_PLUGIN_VERSION","0.21-SNAPSHOT"); - - private String envVariable; - private String version; - - Versions(String envVariable, String version) { - this.envVariable = envVariable; - this.version = version; - } - - public String get() { - return version; - } - - public String getEnvVariable() { - return envVariable; - } -} diff --git a/src/main/resources/projects-templates/v1/api/README.md b/src/main/resources/projects-templates/v1/api/README.md new file mode 100644 index 0000000..6c1ebe9 --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/README.md @@ -0,0 +1,54 @@ +# ${name}-api project + +This project uses Quarkus, the Supersonic Subatomic Java Framework. + +If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ . + +## Running the application in dev mode + +You can run your application in dev mode that enables live coding using: +```shell script +mvn compile quarkus:dev +``` + +> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:9090/q/dev/. + +## Packaging and running the application + +The application can be packaged using: +```shell script +mvn package +``` +It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. +Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. + +If you want to build an _über-jar_, execute the following command: +```shell script +mvn package -Dquarkus.package.type=uber-jar +``` + +The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. + +## Creating a native executable + +You can create a native executable using: +```shell script +mvn package -Pnative +``` + +Or, if you don't have GraalVM installed, you can run the native executable build in a container using: +```shell script +mvn package -Pnative -Dquarkus.native.container-build=true +``` + +You can then execute your native executable with: `./target/${name}-api-1.0.0-SNAPSHOT-runner` + +If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html. + +## Provided examples + +### RESTEasy JAX-RS example + +REST is easy peasy with this Hello World RESTEasy resource. + +[Related guide section...](https://quarkus.io/guides/${name}-api#the-jax-rs-resources) diff --git a/src/main/resources/projects-templates/v1/api/docker/Dockerfile.jvm b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.jvm new file mode 100644 index 0000000..57fb2ed --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.jvm @@ -0,0 +1,54 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# mvn package +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/${name}-api-jvm . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/${name}-api-jvm +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5005 +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/${name}-api-jvm +# +### +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ARG JAVA_PACKAGE=java-11-openjdk-headless +ARG RUN_JAVA_VERSION=1.3.8 +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' +# Install java and the run-java script +# Also set up permissions for user `1001` +RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ + && microdnf update \ + && microdnf clean all \ + && mkdir /deployments \ + && chown 1001 /deployments \ + && chmod "g+rwX" /deployments \ + && chown 1001:root /deployments \ + && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ + && chown 1001 /deployments/run-java.sh \ + && chmod 540 /deployments/run-java.sh \ + && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/conf/security/java.security + +# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. +ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/ +COPY --chown=1001 target/quarkus-app/*.jar /deployments/ +COPY --chown=1001 target/quarkus-app/app/ /deployments/app/ +COPY --chown=1001 target/quarkus-app/quarkus/ /deployments/quarkus/ + +EXPOSE 8080 +USER 1001 + +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/src/main/resources/projects-templates/v1/api/docker/Dockerfile.legacy-jar b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.legacy-jar new file mode 100644 index 0000000..e224250 --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.legacy-jar @@ -0,0 +1,51 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# mvn package -Dquarkus.package.type=legacy-jar +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/${name}-api-legacy-jar . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/${name}-api-legacy-jar +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5005 +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/${name}-api-legacy-jar +# +### +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ARG JAVA_PACKAGE=java-11-openjdk-headless +ARG RUN_JAVA_VERSION=1.3.8 +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' +# Install java and the run-java script +# Also set up permissions for user `1001` +RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ + && microdnf update \ + && microdnf clean all \ + && mkdir /deployments \ + && chown 1001 /deployments \ + && chmod "g+rwX" /deployments \ + && chown 1001:root /deployments \ + && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ + && chown 1001 /deployments/run-java.sh \ + && chmod 540 /deployments/run-java.sh \ + && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/conf/security/java.security + +# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. +ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +COPY target/lib/* /deployments/lib/ +COPY target/*-runner.jar /deployments/app.jar + +EXPOSE 8080 +USER 1001 + +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/src/main/resources/projects-templates/v1/api/docker/Dockerfile.native b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.native new file mode 100644 index 0000000..63c0d7f --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.native @@ -0,0 +1,27 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode +# +# Before building the container image run: +# +# mvn package -Pnative +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native -t quarkus/${name}-api . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/${name}-api +# +### +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root target/*-runner /work/application + +EXPOSE 8080 +USER 1001 + +CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/src/main/resources/projects-templates/v1/api/docker/Dockerfile.native-distroless b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.native-distroless new file mode 100644 index 0000000..c5ad91a --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/docker/Dockerfile.native-distroless @@ -0,0 +1,23 @@ +#### +# This Dockerfile is used in order to build a distroless container that runs the Quarkus application in native (no JVM) mode +# +# Before building the container image run: +# +# mvn package -Pnative +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native-distroless -t quarkus/${name}-api . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/${name}-api +# +### +FROM quay.io/quarkus/quarkus-distroless-image:1.0 +COPY target/*-runner /application + +EXPOSE 8080 +USER nonroot + +CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/src/main/resources/projects-templates/v1/api/dockerignore b/src/main/resources/projects-templates/v1/api/dockerignore new file mode 100644 index 0000000..94810d0 --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/dockerignore @@ -0,0 +1,5 @@ +* +!target/*-runner +!target/*-runner.jar +!target/lib/* +!target/quarkus-app/* \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/api/pom.xml b/src/main/resources/projects-templates/v1/api/pom.xml new file mode 100644 index 0000000..6b9715d --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/pom.xml @@ -0,0 +1,134 @@ + + + 4.0.0 + + ${groupId} + ${name} + ${version} + + ${artifactId}-api + + 3.8.1 + true + 11 + 11 + UTF-8 + UTF-8 + ${quarkus_version} + quarkus-universe-bom + io.quarkus + ${quarkus_version} + 3.0.0-M5 + + + + + ${r"${quarkus.platform.group-id}"} + ${r"${quarkus.platform.artifact-id}"} + ${r"${quarkus.platform.version}"} + pom + import + + + + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + io.quarkus + quarkus-resteasy-jackson + + + + + + io.quarkus + quarkus-maven-plugin + ${r"${quarkus-plugin.version}"} + true + + + + build + generate-code + generate-code-tests + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${r"${compiler-plugin.version}"} + + ${r"${maven.compiler.parameters}"} + + + + org.apache.maven.plugins + maven-surefire-plugin + ${r"${surefire-plugin.version}"} + + + org.jboss.logmanager.LogManager + ${r"${maven.home}"} + + + + + + + + native + + + native + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${r"${surefire-plugin.version}"} + + + + integration-test + verify + + + + ${r"${project.build.directory}"}/${r"${project.build.finalName}"}-runner + org.jboss.logmanager.LogManager + ${r"${maven.home}"} + + + + + + + + + native + + + + diff --git a/src/main/resources/projects-templates/v1/api/resource/application.properties b/src/main/resources/projects-templates/v1/api/resource/application.properties new file mode 100644 index 0000000..2d80a39 --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/resource/application.properties @@ -0,0 +1,2 @@ +quarkus.http.port=9090 +quarkus.http.cors=true \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/api/resource/index.html b/src/main/resources/projects-templates/v1/api/resource/index.html new file mode 100644 index 0000000..8063ba6 --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/resource/index.html @@ -0,0 +1,170 @@ + + + + + ${name}-api - ${version} + + + + + + +
+
+

Congratulations, you have created a new Quarkus cloud application.

+ +

What is this page?

+ +

This page is served by Quarkus. The source is in + src/main/resources/META-INF/resources/index.html.

+ +

What are your next steps?

+ +

If not already done, run the application in dev mode using: mvn compile quarkus:dev. +

+
    +
  • Your static assets are located in src/main/resources/META-INF/resources.
  • +
  • Configure your application in src/main/resources/application.properties.
  • +
  • Quarkus now ships with a Dev UI (available in dev mode only)
  • +
  • Play with the getting started example code located in src/main/java:
  • +
+
+

RESTEasy JAX-RS example

+

REST is easy peasy with this Hello World RESTEasy resource.

+

@Path: /hello

+

Related guide section...

+
+ +
+
+
+

Application

+
    +
  • GroupId: ${groupId}
  • +
  • ArtifactId: ${artifactId}
  • +
  • Version: ${version}
  • +
  • Quarkus Version: ${quarkus_version}
  • +
+
+
+

Do you like Quarkus?

+
    +
  • Go give it a star on GitHub.
  • +
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/api/source/GreetingResource.java b/src/main/resources/projects-templates/v1/api/source/GreetingResource.java new file mode 100644 index 0000000..4ec49b7 --- /dev/null +++ b/src/main/resources/projects-templates/v1/api/source/GreetingResource.java @@ -0,0 +1,18 @@ +package ${rootPackage}; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +@Path("/hello") +public class GreetingResource { + + @Path("/hello/{name}") + @GET + @Produces(MediaType.TEXT_PLAIN) + public String greeting(@PathParam("name") String name) { + return "hello : "+name; + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/README.md b/src/main/resources/projects-templates/v1/app/gwt/basic/README.md new file mode 100644 index 0000000..654c02e --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/README.md @@ -0,0 +1,13 @@ +# ${name} + +### How to run + +- Build the project `mvn clean verify` + +- Super Development mode : + +In one terminal run `mvn tomcat7:run -pl *-server -am -Denv=dev` + +In another terminal run `mvn gwt:codeserver -pl *-client -am` + +- For production get the war from the target folder and deploy it to your preferred application server diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/client/pom.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/client/pom.xml new file mode 100644 index 0000000..f047eb2 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/client/pom.xml @@ -0,0 +1,59 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${name}-client + gwt-app + + + + ${groupId} + ${name}-shared + ${r"${project.version}"} + + + ${groupId} + ${name}-shared + ${r"${project.version}"} + sources + + + com.google.gwt + gwt-user + + + com.google.gwt + gwt-dev + + + org.dominokit + domino-ui + ${r"${domino.ui.version}"} + + + org.dominokit + domino-ui + ${r"${domino.ui.version}"} + sources + + + + + + + net.ltgt.gwt.maven + gwt-maven-plugin + + ${rootPackage}.App + app + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/client/source/App.java b/src/main/resources/projects-templates/v1/app/gwt/basic/client/source/App.java new file mode 100644 index 0000000..bdfbc06 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/client/source/App.java @@ -0,0 +1,34 @@ +package ${rootPackage}; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.ui.typography.Paragraph; +import org.dominokit.domino.ui.cards.Card; +import org.dominokit.domino.ui.icons.Icons; +import org.dominokit.domino.ui.layout.Layout; +import org.dominokit.domino.ui.style.ColorScheme; +import org.dominokit.domino.ui.tree.Tree; +import org.dominokit.domino.ui.tree.TreeItem; + +/** + * Entry point classes define onModuleLoad(). + */ +public class App implements EntryPoint { + + /** + * This is the entry point method. + */ + public void onModuleLoad() { + var layout = Layout.create("Domino-ui starter") + .show(ColorScheme.BLUE); + + layout.getLeftPanel() + .appendChild(Tree.create("Menu") + .appendChild(TreeItem.create("Menu 1", Icons.ALL.widgets())) + .appendChild(TreeItem.create("Menu 2", Icons.ALL.widgets())) + .addItemClickListener(treeItem -> { + layout.setContent(Card.create(treeItem.getValue()) + .appendChild(Paragraph.create("Welcome to domino-ui , you are viewing "+treeItem.getValue()+" content"))); + }) + ); + } +} diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/client/source/module.gwt.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/client/source/module.gwt.xml new file mode 100644 index 0000000..1dc4f25 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/client/source/module.gwt.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/pom.ftl b/src/main/resources/projects-templates/v1/app/gwt/basic/pom.ftl new file mode 100644 index 0000000..e10bdff --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/pom.ftl @@ -0,0 +1,110 @@ + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + pom + + + 11 + 11 + UTF-8 + UTF-8 + ${domino_ui_version} + ${gwt_version} + + + + + + com.google.gwt + gwt + ${r"${gwt.version}"} + pom + import + + + javax.servlet + javax.servlet-api + 3.1.0 + + + + + + + + net.ltgt.gwt.maven + gwt-maven-plugin + false + + ${r"${project.build.directory}"}/gwt/launcherDir + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${r"${maven.compiler.source}"} + ${r"${maven.compiler.target}"} + + + + org.apache.maven.plugins + maven-war-plugin + 3.4.0 + + + org.eclipse.jetty + jetty-maven-plugin + 9.4.8.v20171121 + + + net.ltgt.gwt.maven + gwt-maven-plugin + 1.0.1 + true + + ${r"${maven.compiler.source}"} + true + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + package + + jar-no-fork + + + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + + + + + + ${name}-client + ${name}-shared + ${name}-server + <#if generateApi> + ${name}-api + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/server/jetty/context.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/server/jetty/context.xml new file mode 100644 index 0000000..eaea86d --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/server/jetty/context.xml @@ -0,0 +1,6 @@ + + + org.eclipse.jetty.servlet.Default.useFileMappedBuffer + false + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/server/pom.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/server/pom.xml new file mode 100644 index 0000000..6cbdccb --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/server/pom.xml @@ -0,0 +1,110 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${name}-server + war + + + + ${groupId} + ${name}-shared + ${r"${project.version}"} + + + com.google.gwt + gwt-servlet + + + javax.servlet + javax.servlet-api + provided + + + + + + + + org.eclipse.jetty + jetty-maven-plugin + + 1 + + ${r"${basedir}"}/../${name}-shared/target/classes/ + + ${r"${basedir}"}/src/main/jettyconf/context.xml + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + false + / + UTF-8 + + + + + + + + + + env-prod + + true + + + + ${r"${project.groupId}"} + ${name}-client + ${r"${project.version}"} + war + runtime + + + + + env-dev + + + env + dev + + + + + + + org.eclipse.jetty + jetty-maven-plugin + + + + ${r"${basedir}"}/src/main/webapp + ${r"${basedir}"}/../target/gwt/launcherDir/ + + + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + ${r"${basedir}"}/src/main/tomcatconf/context.xml + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/server/tomcat/context.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/server/tomcat/context.xml new file mode 100644 index 0000000..f449cbc --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/server/tomcat/context.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/favicon.ico b/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a89fcb7d078f5702b148080589b8a33133e91bb3 GIT binary patch literal 1150 zcmb`F%TE(g6vj^csuT%eSsF)=EMkA)kFY%PYZ>G8XDB(}I@Cck^`x#xUm?wosxba*Wm!sw%U zBauQx9RN#M`Lhl~gxKbop-kD|qrt6u3Fv_xsK5)FzyUzAVk5J)p$6!{uCIz5&;Xu; z4e%Xgfenb5t*ygmlCHh zJ2*9+=FYCj2dgBE7$9hn7O#%Tq;G8t%pMAbiqY;K4g^Eu4lG0O)-?a>#rb~%;{J#l zmpopdo(x94)9slXPb7=z|8l*>>V&?chsYIv9k>cI;6AtkTtLKXY!2rbbRO6WZFvJ# tgQn5J3aX-e>xwg9c?WJ1y)qHKHW1}O0rM?0(RJMKDeJ%HMBf4J(Jqo z`?7u3WDC8JL4a!)#R3shk|c@sdL4uaTNbmskc%Uj4kr&gor4=M9*jMC_a=TTCa$lq z;l{)SG)?2%TZN_axjPR)QIt7K>85KtSa`Wi1R+I^8sgQb?-9QpLq4D9%(fpS>lJUzw!2I27~yF-oa^ zX$p}@WV}=={YG{rAdUJnAUpxi;ZJY!#gP!nWwX>`&TKEl<3LqHJ3h-^)N3{KALL3V z@b*(YQmhex!!%7yN|Tft)h?tjM$TdQEOy6*MCYRce!w!Cb~EAH)^#1StTc*Wzs;2l z<8$8*R8>ACK#+5M??R%{0JEBzWb$4jm&-P6hutlgjopDMgjM+`fGM}w2Wg$9Az-Cf md}#{j^v-zve+M`8HU0&1OY{+Qnm!Ex0000 + + + + + + + + + + + + + + + + + + + + + Domino-ui starter + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/ui-starter.css b/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/ui-starter.css new file mode 100644 index 0000000..3755c6a --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/ui-starter.css @@ -0,0 +1 @@ +/* ========== APP specific css ============*/ \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/web.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/web.xml new file mode 100644 index 0000000..8d77258 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/server/webapp/web.xml @@ -0,0 +1,11 @@ + + + + + + index.html + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/shared/pom.xml b/src/main/resources/projects-templates/v1/app/gwt/basic/shared/pom.xml new file mode 100644 index 0000000..6aceac2 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/shared/pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${name}-shared + + + + + src/main/java + + + + + org.apache.maven.plugins + maven-source-plugin + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/basic/shared/source/Person.java b/src/main/resources/projects-templates/v1/app/gwt/basic/shared/source/Person.java new file mode 100644 index 0000000..ab94860 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/basic/shared/source/Person.java @@ -0,0 +1,23 @@ +package ${rootPackage}; + +public class Person { + + private int id; + private String name; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/README.md b/src/main/resources/projects-templates/v1/app/gwt/mvp/README.md new file mode 100644 index 0000000..86e632d --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/README.md @@ -0,0 +1,29 @@ +# How to run + +- #### run `mvn clean install` to build + +- #### Run for development : + + - ##### For super dev mode + + - In one terminal run `mvn gwt:codeserver -pl *-frontend -am` + + - In another terminal `cd ${name}-backend` + - execute `mvn exec:java` + - the server port will be printed in the logs access the application on `http://localhost:[port]` + + - ##### For gwt compiled mode + + - `cd ${name}-backend` + - execute `mvn exec:java -Dmode=compiled` + - the server port will be printed in the logs access the application on `http://localhost:[port]` + + - ##### For production mode + + - `cd ${name}-backend` + - execute `java -jar target/${name}-backend-${version}-fat.jar` + - the server port will be printed in the logs access the application on `http://localhost:[port]` + + - ##### Running the API server + - In a separate terminal `cd ${name}-api` and from there follow the readme file inside `${name}-api` module + diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/pom.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/pom.xml new file mode 100644 index 0000000..b15ccf8 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/pom.xml @@ -0,0 +1,165 @@ + + + 4.0.0 + + + ${groupId} + ${name} + ${version} + + + ${name}-backend + ${version} + jar + + + + ${groupId} + ${name}-frontend + ${r"${project.version}"} + war + runtime + + + io.vertx + vertx-web + ${r"${vertx.version}"} + + + org.dominokit + domino-mvp-api-client + + + org.dominokit + domino-mvp-api-server + + + org.dominokit + domino-mvp-remote-logging + + + org.dominokit + domino-mvp-log4j-server-logging + + + org.dominokit + domino-mvp-resteasy-plugin + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.0.0 + + + package + + shade + + + + + + org.dominokit.domino.api.server.DominoLauncher + org.dominokit.domino.api.server.StartupVerticle + + + + ${moduleShortName} + ${moduleShortName} + + + + + true + fat + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + org.dominokit.domino.api.server.DominoLauncher + + run + org.dominokit.domino.api.server.StartupVerticle + -conf + target/classes/config.json + + + + vertx.options.fileResolverCachingEnabled + false + + + + + + + + + + mode-compiled + + + mode + compiled + + + + + + org.codehaus.mojo + exec-maven-plugin + + + + domino.webroot.location + + ${r"${basedir}"}/../${name}-frontend/target/${name}-frontend-${version}/${moduleShortName} + + + + + + + + + + mode-develop + + true + + + + + org.codehaus.mojo + exec-maven-plugin + + + + domino.webroot.location + ${r"${basedir}"}/../target/gwt/launcherDir/${moduleShortName} + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/app.css b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/app.css new file mode 100644 index 0000000..ad117ce --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/app.css @@ -0,0 +1 @@ +/** Add css rules here for your application. */ \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/config.json b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/config.json new file mode 100644 index 0000000..df583a2 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/config.json @@ -0,0 +1,4 @@ +{ + "http.port": 8080, + "webroot": "${moduleShortName}" +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/favicon.ico b/src/main/resources/projects-templates/v1/app/gwt/mvp/backend/resource/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a89fcb7d078f5702b148080589b8a33133e91bb3 GIT binary patch literal 1150 zcmb`F%TE(g6vj^csuT%eSsF)=EMkA)kFY%PYZ>G8XDB(}I@Cck^`x#xUm?wosxba*Wm!sw%U zBauQx9RN#M`Lhl~gxKbop-kD|qrt6u3Fv_xsK5)FzyUzAVk5J)p$6!{uCIz5&;Xu; z4e%Xgfenb5t*ygmlCHh zJ2*9+=FYCj2dgBE7$9hn7O#%Tq;G8t%pMAbiqY;K4g^Eu4lG0O)-?a>#rb~%;{J#l zmpopdo(x94)9slXPb7=z|8l*>>V&?chsYIv9k>cI;6AtkTtLKXY!2rbbRO6WZFvJ# tgQn5J3aX-e>xwg9c?WJ1y)qHKHW1}O0rM?0(RJMKDeJ%HMBf4J(Jqo z`?7u3WDC8JL4a!)#R3shk|c@sdL4uaTNbmskc%Uj4kr&gor4=M9*jMC_a=TTCa$lq z;l{)SG)?2%TZN_axjPR)QIt7K>85KtSa`Wi1R+I^8sgQb?-9QpLq4D9%(fpS>lJUzw!2I27~yF-oa^ zX$p}@WV}=={YG{rAdUJnAUpxi;ZJY!#gP!nWwX>`&TKEl<3LqHJ3h-^)N3{KALL3V z@b*(YQmhex!!%7yN|Tft)h?tjM$TdQEOy6*MCYRce!w!Cb~EAH)^#1StTc*Wzs;2l z<8$8*R8>ACK#+5M??R%{0JEBzWb$4jm&-P6hutlgjopDMgjM+`fGM}w2Wg$9Az-Cf md}#{j^v-zve+M`8HU0&1OY{+Qnm!Ex0000 + + + + + + + + + + + ${name} + + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/pom.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/pom.xml new file mode 100644 index 0000000..1c2629e --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/pom.xml @@ -0,0 +1,69 @@ + + + + 4.0.0 + + + ${groupId} + ${name} + ${version} + + + ${name}-frontend + ${version} + gwt-app + + + ${r"${project.build.directory}/${project.build.finalName}"}/${moduleShortName} + + + + + com.google.gwt + gwt-user + + + com.google.gwt + gwt-dev + + + org.dominokit + domino-mvp-api-client + + + org.dominokit + domino-mvp-api-shared + + + org.dominokit + domino-mvp-gwt + + + org.dominokit + domino-mvp-gwt-view + + + org.dominokit + domino-ui + + + + + + net.ltgt.gwt.maven + gwt-maven-plugin + + ${r"${extra.directory}"}/gwt/extra + ${rootPackage}.AppClientModule + ${moduleShortName} + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/AppClientModule.java b/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/AppClientModule.java new file mode 100644 index 0000000..afeca95 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/AppClientModule.java @@ -0,0 +1,23 @@ +package ${rootPackage}; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.api.client.ClientApp; +import org.dominokit.domino.gwt.client.app.DominoGWT; +import org.dominokit.domino.view.GwtView; +import org.dominokit.rest.DominoRestConfig; + +import java.util.logging.Logger; + +public class AppClientModule implements EntryPoint { + + private static final Logger LOGGER = Logger.getLogger(AppClientModule.class.getName()); + + public void onModuleLoad() { + DominoRestConfig.initDefaults() + .setDefaultServiceRoot("http://localhost:${port}"); + DominoGWT.init(); + GwtView.init(); + ClientApp.make().run(); + LOGGER.info("${name} Application frontend have been initialized."); + } +} diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/module.gwt.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/module.gwt.xml new file mode 100644 index 0000000..93f1b6a --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/frontend/source/module.gwt.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/pom.ftl b/src/main/resources/projects-templates/v1/app/gwt/mvp/pom.ftl new file mode 100644 index 0000000..36dedcc --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/pom.ftl @@ -0,0 +1,190 @@ + + + 4.0.0 + <#if hasParent> + + + ${groupId} + ${parentArtifactId} + ${version} + + ${artifactId} + + <#else> + + ${groupId} + ${artifactId} + ${version} + + + pom + + + 11 + 11 + UTF-8 + UTF-8 + ${vertx_version} + ${domino_history_version} + ${domino_rest_version} + ${domino_ui_version} + ${domino_jackson_version} + ${domino_mvp_version} + ${gwt_version} + + + + + + org.dominokit + domino-mvp + ${r"${domino.mvp.version}"} + pom + import + + + com.google.gwt + gwt + ${r"${gwt.version}"} + pom + import + + + org.dominokit + domino-ui + ${r"${domino.ui.version}"} + + + org.slf4j + slf4j-simple + 1.7.30 + test + + + org.assertj + assertj-core + 3.20.2 + test + + + + org.dominokit + domino-jackson + ${r"${domino.jackson.version}"} + + + org.dominokit + domino-jackson + ${r"${domino.jackson.version}"} + sources + + + org.dominokit + domino-jackson-processor + ${r"${domino.jackson.version}"} + provided + + + org.dominokit + domino-rest-client + ${r"${domino.rest.version}"} + + + org.dominokit + domino-rest-processor + ${r"${domino.rest.version}"} + provided + + + org.dominokit + domino-history-shared + ${r"${domino.history.version}"} + + + + + + javax.validation + validation-api + 1.0.0.GA + + + junit + junit + 4.13.2 + test + + + org.assertj + assertj-core + test + + + com.google.auto.service + auto-service + 1.0 + provided + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + + net.ltgt.gwt.maven + gwt-maven-plugin + 1.0.1 + true + + ${r"${maven.compiler.source}"} + true + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + net.ltgt.gwt.maven + gwt-maven-plugin + false + + ${r"${project.build.directory}"}/gwt/launcherDir + + + + + + + + ${artifactId}-frontend + ${artifactId}-backend + <#if generateApi> + ${artifactId}-api + + + diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/ALL_TESTS.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/ALL_TESTS.xml new file mode 100644 index 0000000..ea0fab6 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/ALL_TESTS.xml @@ -0,0 +1,23 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/Development.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/Development.xml new file mode 100644 index 0000000..5d04c02 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/Development.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app-dev.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app-dev.xml new file mode 100644 index 0000000..c574838 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app-dev.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app.xml new file mode 100644 index 0000000..1b79235 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/app.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/backend-api.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/backend-api.xml new file mode 100644 index 0000000..443c0e1 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/backend-api.xml @@ -0,0 +1,26 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/process_sources.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/process_sources.xml new file mode 100644 index 0000000..8dd1f3f --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/process_sources.xml @@ -0,0 +1,27 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/super_dev_mode.xml b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/super_dev_mode.xml new file mode 100644 index 0000000..b25832f --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/gwt/mvp/runConfigurations/super_dev_mode.xml @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/README.md b/src/main/resources/projects-templates/v1/app/j2cl/basic/README.md new file mode 100644 index 0000000..645190c --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/README.md @@ -0,0 +1,13 @@ +# ${name} + +### How to run + +- Build the project `mvn clean verify` + +- Super Development mode : + +In one terminal run `mvn tomcat7:run -pl *-server -am -Denv=dev` + +In another terminal run `mvn j2cl:watch` + +- For production get the war from the target folder and deploy it to your preferred application server diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/client/pom.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/pom.xml new file mode 100644 index 0000000..cc4ceb0 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/pom.xml @@ -0,0 +1,114 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${name}-client + war + + + ${r"${project.build.directory}"}/webapp + ${r"${webappdir}"}/WEB-INF/lib + + + + + ${groupId} + ${name}-shared + ${r"${project.version}"} + + + com.google.jsinterop + jsinterop-annotations + 2.0.0 + + + com.google.elemental2 + elemental2-core + 1.1.0 + + + com.google.elemental2 + elemental2-dom + 1.1.0 + + + + + + + maven-compiler-plugin + 3.11.0 + + ${r"${maven.compiler.source}"} + ${r"${maven.compiler.target}"} + + + + org.apache.maven.plugins + maven-war-plugin + 3.4.0 + + + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + com.vertispan.j2cl + j2cl-maven-plugin + + + build-js + process-classes + + build + + + + + + en_US + + + ${r"${project.artifactId}"}.js + + + + + + + + vertispan-releases + Vertispan hosted artifacts-releases + https://repo.vertispan.com/j2cl/ + + true + + + true + + + + sonatype-snapshots-repo + https://oss.sonatype.org/content/repositories/snapshots + + true + + fail + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.java b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.java new file mode 100644 index 0000000..de6db61 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.java @@ -0,0 +1,24 @@ +package ${rootPackage}; + +import com.google.gwt.core.client.EntryPoint; +import elemental2.dom.DomGlobal; +import elemental2.dom.HTMLDivElement; +import elemental2.dom.HTMLHeadingElement; +import jsinterop.base.Js; + +/** + * Entry point classes define onModuleLoad(). + */ +public class App implements EntryPoint { + + /** + * This is the entry point method. + */ + public void onModuleLoad() { + HTMLDivElement div= Js.cast(DomGlobal.document.createElement("div")); + HTMLHeadingElement h1= Js.cast(DomGlobal.document.createElement("h1")); + h1.textContent ="Hello from j2cl"; + div.appendChild(h1); + DomGlobal.document.body.appendChild(div); + } +} diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.native.js b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.native.js new file mode 100644 index 0000000..fcdf730 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/App.native.js @@ -0,0 +1,32 @@ +/* + * #%L + * Connected + * %% + * Copyright (C) 2017 Vertispan + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +// Defer this command, since this will be folded into the FlowChartEntryPoint js impl, +// and if it runs right away, will not have its dependencies resolved yet (at least while +// running in BUNDLE). +setTimeout(function(){ + // Call the java "constructor" method, `new` will only work if it is a @JsType, or maybe + // once optimized. Without this, in BUNDLE mode, `new` doesn't include the clinit, so + // static imports haven't been resolved yet. + var ep = App.$create__(); + // Invoke onModuleLoad to start the app. + ep.m_onModuleLoad__() +}, 0); + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/EntryPoint.java b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/EntryPoint.java new file mode 100644 index 0000000..07c5dd7 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/source/EntryPoint.java @@ -0,0 +1,28 @@ +package com.google.gwt.core.client; + +/* + * #%L + * Connected + * %% + * Copyright (C) 2017 Vertispan + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +/** + * Created by colin on 9/16/17. + */ +public interface EntryPoint { + void onModuleLoad(); +} diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/client/webapp/web.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/webapp/web.xml new file mode 100644 index 0000000..35d50ab --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/client/webapp/web.xml @@ -0,0 +1,32 @@ + + + + + + + + index.html + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/pom.ftl b/src/main/resources/projects-templates/v1/app/j2cl/basic/pom.ftl new file mode 100644 index 0000000..9660b4e --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/pom.ftl @@ -0,0 +1,121 @@ + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + pom + + + 1.8 + 1.8 + UTF-8 + UTF-8 + ${domino_ui_version} + ${j2cl_maven_plugin_version} + + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + + + + + com.vertispan.j2cl + j2cl-maven-plugin + ${r"${j2cl.maven.plugin.version}"} + false + + ${r"${project.build.directory}"}/gwt/launcherDir + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${r"${maven.compiler.source}"} + ${r"${maven.compiler.target}"} + + + + org.apache.maven.plugins + maven-war-plugin + 3.4.0 + + + org.eclipse.jetty + jetty-maven-plugin + 9.4.8.v20171121 + + + com.vertispan.j2cl + j2cl-maven-plugin + ${r"${j2cl.maven.plugin.version}"} + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + package + + jar-no-fork + + + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + + + + + + vertispan-releases + Vertispan hosted artifacts-releases + https://repo.vertispan.com/j2cl/ + + true + + + true + + + + sonatype-snapshots-repo + https://oss.sonatype.org/content/repositories/snapshots + + always + fail + + + + + + ${name}-client + ${name}-shared + ${name}-server + <#if generateApi> + ${name}-api + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/jetty/context.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/jetty/context.xml new file mode 100644 index 0000000..eaea86d --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/jetty/context.xml @@ -0,0 +1,6 @@ + + + org.eclipse.jetty.servlet.Default.useFileMappedBuffer + false + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/pom.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/pom.xml new file mode 100644 index 0000000..0bb5f1b --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${name}-server + war + + + + ${groupId} + ${name}-shared + ${r"${project.version}"} + + + javax.servlet + javax.servlet-api + provided + + + + + + + + + org.eclipse.jetty + jetty-maven-plugin + + 1 + + ${r"${basedir}"}/../${name}-shared/target/classes/ + + ${r"${basedir}"}/src/main/jettyconf/context.xml + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + false + / + UTF-8 + + + + + + + + + + env-prod + + true + + + + ${r"${project.groupId}"} + ${name}-client + ${r"${project.version}"} + war + runtime + + + + + env-dev + + + env + dev + + + + + + + org.eclipse.jetty + jetty-maven-plugin + + + + ${r"${basedir}"}/src/main/webapp + ${r"${basedir}"}/../target/gwt/launcherDir/ + + + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + ${r"${basedir}"}/src/main/tomcatconf/context.xml + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/tomcat/context.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/tomcat/context.xml new file mode 100644 index 0000000..f449cbc --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/tomcat/context.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/favicon.ico b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/favicon.png b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/favicon.png new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/index.html b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/index.html new file mode 100644 index 0000000..eff7099 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/index.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + J2CL starter + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/ui-starter.css b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/ui-starter.css new file mode 100644 index 0000000..3755c6a --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/ui-starter.css @@ -0,0 +1 @@ +/* ========== APP specific css ============*/ \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/web.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/web.xml new file mode 100644 index 0000000..8d77258 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/server/webapp/web.xml @@ -0,0 +1,11 @@ + + + + + + index.html + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/shared/pom.xml b/src/main/resources/projects-templates/v1/app/j2cl/basic/shared/pom.xml new file mode 100644 index 0000000..530214b --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/shared/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${name}-shared + + + + + org.apache.maven.plugins + maven-source-plugin + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/basic/shared/source/Person.java b/src/main/resources/projects-templates/v1/app/j2cl/basic/shared/source/Person.java new file mode 100644 index 0000000..ab94860 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/basic/shared/source/Person.java @@ -0,0 +1,23 @@ +package ${rootPackage}; + +public class Person { + + private int id; + private String name; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/README.md b/src/main/resources/projects-templates/v1/app/j2cl/mvp/README.md new file mode 100644 index 0000000..73ea16c --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/README.md @@ -0,0 +1,25 @@ +# How to run + +- #### run `mvn clean verify` to build + +- #### Run for development : + + - ##### For development + + - In one terminal run `mvn j2cl:watch` + + - In another terminal `cd ${name}-backend` + - execute `mvn exec:java` + - the server port will be printed in the logs access the application on `http://localhost:[port]` + + - ##### For gwt compiled mode + + - `cd ${name}-backend` + - execute `mvn exec:java -Dmode=compiled` + - the server port will be printed in the logs access the application on `http://localhost:[port]` + + - ##### For production mode + + - `cd ${name}-backend` + - execute `java -jar target/${name}-backend-${version}-fat.jar` + - the server port will be printed in the logs access the application on `http://localhost:[port]` diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/pom.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/pom.xml new file mode 100644 index 0000000..da53517 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/pom.xml @@ -0,0 +1,167 @@ + + + 4.0.0 + + + ${groupId} + ${name} + ${version} + + + ${name}-backend + ${version} + jar + + + + ${groupId} + ${name}-frontend + ${version} + war + runtime + + + io.vertx + vertx-web + ${r"${vertx.version}"} + + + org.dominokit + domino-mvp-api-client + + + org.dominokit + domino-mvp-api-server + + + org.dominokit + domino-mvp-remote-logging + + + org.dominokit + domino-mvp-log4j-server-logging + + + org.dominokit + domino-mvp-resteasy-plugin + + + org.dominokit + domino-ui-webjar + ${r"${domino.ui.version}"} + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.0.0 + + + package + + shade + + + + + + org.dominokit.domino.api.server.DominoLauncher + org.dominokit.domino.api.server.StartupVerticle + + + + ${moduleShortName} + ${moduleShortName} + + + + + true + fat + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + org.dominokit.domino.api.server.DominoLauncher + + run + org.dominokit.domino.api.server.StartupVerticle + -conf + target/classes/config.json + + + + vertx.options.fileResolverCachingEnabled + false + + + + + + + + + + mode-compiled + + + mode + compiled + + + + + + org.codehaus.mojo + exec-maven-plugin + + + + domino.webroot.location + ${r"${basedir}"}/../${name}-frontend/target/${name}-frontend-${version}/app + + + + + + + + + mode-develop + + true + + + + + org.codehaus.mojo + exec-maven-plugin + + + + domino.webroot.location + ${r"${basedir}"}/../${name}-frontend/target/${name}-frontend-${version}/app + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/app.css b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/app.css new file mode 100644 index 0000000..ad117ce --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/app.css @@ -0,0 +1 @@ +/** Add css rules here for your application. */ \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/config.json b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/config.json new file mode 100644 index 0000000..df583a2 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/config.json @@ -0,0 +1,4 @@ +{ + "http.port": 8080, + "webroot": "${moduleShortName}" +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/favicon.ico b/src/main/resources/projects-templates/v1/app/j2cl/mvp/backend/resource/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a89fcb7d078f5702b148080589b8a33133e91bb3 GIT binary patch literal 1150 zcmb`F%TE(g6vj^csuT%eSsF)=EMkA)kFY%PYZ>G8XDB(}I@Cck^`x#xUm?wosxba*Wm!sw%U zBauQx9RN#M`Lhl~gxKbop-kD|qrt6u3Fv_xsK5)FzyUzAVk5J)p$6!{uCIz5&;Xu; z4e%Xgfenb5t*ygmlCHh zJ2*9+=FYCj2dgBE7$9hn7O#%Tq;G8t%pMAbiqY;K4g^Eu4lG0O)-?a>#rb~%;{J#l zmpopdo(x94)9slXPb7=z|8l*>>V&?chsYIv9k>cI;6AtkTtLKXY!2rbbRO6WZFvJ# tgQn5J3aX-e>xwg9c?WJ1y)qHKHW1}O0rM?0(RJMKDeJ%HMBf4J(Jqo z`?7u3WDC8JL4a!)#R3shk|c@sdL4uaTNbmskc%Uj4kr&gor4=M9*jMC_a=TTCa$lq z;l{)SG)?2%TZN_axjPR)QIt7K>85KtSa`Wi1R+I^8sgQb?-9QpLq4D9%(fpS>lJUzw!2I27~yF-oa^ zX$p}@WV}=={YG{rAdUJnAUpxi;ZJY!#gP!nWwX>`&TKEl<3LqHJ3h-^)N3{KALL3V z@b*(YQmhex!!%7yN|Tft)h?tjM$TdQEOy6*MCYRce!w!Cb~EAH)^#1StTc*Wzs;2l z<8$8*R8>ACK#+5M??R%{0JEBzWb$4jm&-P6hutlgjopDMgjM+`fGM}w2Wg$9Az-Cf md}#{j^v-zve+M`8HU0&1OY{+Qnm!Ex0000 + + + + + + + + + + + ${name} + + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/pom.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/pom.xml new file mode 100644 index 0000000..9df9903 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/pom.xml @@ -0,0 +1,87 @@ + + + + 4.0.0 + + + ${groupId} + ${name} + ${version} + + + ${name}-frontend + ${version} + war + + + + com.google.jsinterop + jsinterop-annotations + 2.0.0 + + + org.dominokit.domino.api + domino-api-shared + + + org.dominokit.domino.impl + domino-gwt + + + org.dominokit.domino.api + domino-api-client + + + org.dominokit.domino + domino-gwt-view + + + org.dominokit + domino-ui + ${r"${domino.ui.version}"} + + + org.dominokit + domino-rest-gwt + ${r"${domino.rest.version}"} + + + org.dominokit + domino-rest-shared + ${r"${domino.rest.version}"} + + + + + + com.vertispan.j2cl + j2cl-maven-plugin + ${r"${j2cl.maven.plugin.version}"} + + + build-js + process-classes + + build + + + + + ${groupId}.AppClientModule + + en_US + + ${r"${project.build.directory}"}/${r"${project.artifactId}"}-${r"${project.version}"}/app + + ${r"${project.artifactId}"}.js + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.java b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.java new file mode 100644 index 0000000..7737c4c --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.java @@ -0,0 +1,26 @@ +#set($symbol_pound='#') +#set($symbol_dollar='$') +#set($symbol_escape='\' ) +package ${rootPackage}; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.api.client.ClientApp; + +import org.dominokit.domino.gwt.client.app.DominoGWT; +import org.dominokit.domino.view.GwtView; +import org.dominokit.rest.DominoRestConfig; + +import java.util.logging.Logger; + +public class AppClientModule implements EntryPoint { + + private static final Logger LOGGER = Logger.getLogger(AppClientModule.class.getName()); + + public void onModuleLoad() { + DominoRestConfig.initDefaults(); + DominoGWT.init(); + GwtView.init(); + ClientApp.make().run(); + LOGGER.info("${name} Application frontend have been initialized."); + } +} diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.native.js b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.native.js new file mode 100644 index 0000000..9149e0b --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/AppClientModule.native.js @@ -0,0 +1,32 @@ +/* + * #%L + * Connected + * %% + * Copyright (C) 2017 Vertispan + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +// Defer this command, since this will be folded into the FlowChartEntryPoint js impl, +// and if it runs right away, will not have its dependencies resolved yet (at least while +// running in BUNDLE). +setTimeout(function(){ + // Call the java "constructor" method, `new` will only work if it is a @JsType, or maybe + // once optimized. Without this, in BUNDLE mode, `new` doesn't include the clinit, so + // static imports haven't been resolved yet. + var ep = AppClientModule.$create__(); + // Invoke onModuleLoad to start the app. + ep.m_onModuleLoad__() +}, 0); + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/EntryPoint.java b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/EntryPoint.java new file mode 100644 index 0000000..07c5dd7 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/source/EntryPoint.java @@ -0,0 +1,28 @@ +package com.google.gwt.core.client; + +/* + * #%L + * Connected + * %% + * Copyright (C) 2017 Vertispan + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +/** + * Created by colin on 9/16/17. + */ +public interface EntryPoint { + void onModuleLoad(); +} diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/webapp/web.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/webapp/web.xml new file mode 100644 index 0000000..31395de --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/frontend/webapp/web.xml @@ -0,0 +1,31 @@ + + + + + + + + index.html + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/pom.ftl b/src/main/resources/projects-templates/v1/app/j2cl/mvp/pom.ftl new file mode 100644 index 0000000..eef99d3 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/pom.ftl @@ -0,0 +1,107 @@ + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + pom + + + 11 + 11 + UTF-8 + UTF-8 + ${vertx_version} + ${domino_history_version} + ${domino_rest_version} + ${domino_ui_version} + ${domino_jackson_version} + ${domino_mvp_version} + ${j2cl_maven_plugin_version} + + + + + sonatype-snapshots-repo + https://oss.sonatype.org/content/repositories/snapshots + + true + always + fail + + + + + + + + org.dominokit + domino-mvp + ${r"${domino.mvp.version}"} + pom + import + + + org.dominokit + domino-ui + ${r"${domino.ui.version}"} + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + com.vertispan.j2cl + j2cl-maven-plugin + false + ${r"${j2cl.maven.plugin.version}"} + + ${r"${project.build.directory}"}/gwt/launcherDir/app + + + + + + + + ${artifactId}-frontend + ${artifactId}-backend + <#if generateApi> + ${artifactId}-api + + + diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml new file mode 100644 index 0000000..2a4a553 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/ALL_TESTS.xml @@ -0,0 +1,23 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/Development.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/Development.xml new file mode 100644 index 0000000..845698f --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/Development.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-api.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-api.xml new file mode 100644 index 0000000..11177ec --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-api.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-dev.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-dev.xml new file mode 100644 index 0000000..c1be121 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app-dev.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app.xml new file mode 100644 index 0000000..bfe17fc --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/app.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/process_sources.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/process_sources.xml new file mode 100644 index 0000000..8dd1f3f --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/process_sources.xml @@ -0,0 +1,27 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/super_dev_mode.xml b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/super_dev_mode.xml new file mode 100644 index 0000000..103ffd0 --- /dev/null +++ b/src/main/resources/projects-templates/v1/app/j2cl/mvp/runConfigurations/super_dev_mode.xml @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/backend-dependency.ftl b/src/main/resources/projects-templates/v1/module/gwt/multi/backend-dependency.ftl new file mode 100644 index 0000000..e276ac5 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/backend-dependency.ftl @@ -0,0 +1,6 @@ + + ${groupId} + ${artifactId}-backend + ${r"${project.version}"} + gwt-lib + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/backend/pom.xml b/src/main/resources/projects-templates/v1/module/gwt/multi/backend/pom.xml new file mode 100644 index 0000000..f1f5979 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/backend/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${artifactId}-backend + jar + + ${artifactId}-backend + http://maven.apache.org + + + + org.dominokit + domino-mvp-api-server + + + org.dominokit + domino-mvp-apt-server + provided + + + org.dominokit + domino-mvp-server-test + test + + + ${groupId} + ${artifactId}-shared + ${r"${project.version}"} + + + + + + + maven-source-plugin + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/backend/source/package-info.java b/src/main/resources/projects-templates/v1/module/gwt/multi/backend/source/package-info.java new file mode 100644 index 0000000..587d962 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/backend/source/package-info.java @@ -0,0 +1,4 @@ +@ServerModule(name="${moduleName}") +package ${rootPackage}.${subpackage}.server; + +import org.dominokit.domino.api.server.config.ServerModule; \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend-dependency.ftl b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend-dependency.ftl new file mode 100644 index 0000000..07bcf5f --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend-dependency.ftl @@ -0,0 +1,6 @@ + + ${groupId} + ${artifactId}-frontend + ${r"${project.version}"} + gwt-lib + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend-ui-dependency.ftl b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend-ui-dependency.ftl new file mode 100644 index 0000000..a6403ae --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend-ui-dependency.ftl @@ -0,0 +1,6 @@ + + ${groupId} + ${artifactId}-frontend-ui + ${r"${project.version}"} + gwt-lib + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/pom.xml b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/pom.xml new file mode 100644 index 0000000..57cc0d7 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${artifactId}-frontend + ${artifactId}-frontend + gwt-lib + + + + com.google.gwt + gwt-user + provided + + + org.dominokit + domino-mvp-api-client + + + org.dominokit + domino-mvp-api-client + sources + + + org.dominokit + domino-slf4j-logger + + + org.dominokit + domino-aggregator-apt + provided + + + org.dominokit + domino-mvp-apt-client + provided + + + org.dominokit + domino-mvp-client-test + test + + + org.dominokit + domino-mvp-apt-client-test + test + + + org.dominokit + domino-jackson + + + org.dominokit + domino-jackson + sources + + + org.dominokit + domino-jackson-processor + provided + + + org.dominokit + domino-history-shared + + + org.dominokit + domino-rest-client + + + + ${groupId} + ${artifactId}-shared + ${r"${project.version}"} + + + + ${groupId} + ${artifactId}-shared + ${r"${project.version}"} + sources + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + -Xlint:all + true + true + + + + net.ltgt.gwt.maven + gwt-maven-plugin + true + + ${rootPackage}.${subpackage}.${moduleName}ClientModule + + + + org.apache.maven.plugins + maven-source-plugin + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/ClientModule.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/ClientModule.java new file mode 100644 index 0000000..4679a87 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/ClientModule.java @@ -0,0 +1,19 @@ +package ${rootPackage}.${subpackage}.client; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.api.client.ModuleConfigurator; +import org.dominokit.domino.api.client.annotations.ClientModule; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@ClientModule(name="${moduleName}") +public class ${moduleName}ClientModule implements EntryPoint { + + private static final Logger LOGGER = LoggerFactory.getLogger(${moduleName}ClientModule.class); + + public void onModuleLoad() { + LOGGER.info("Initializing ${moduleName} frontend module ..."); + new ModuleConfigurator().configureModule(new ${moduleName}ModuleConfiguration()); + } +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/Proxy.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/Proxy.java new file mode 100644 index 0000000..a693dfd --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/Proxy.java @@ -0,0 +1,32 @@ +package ${rootPackage}.${subpackage}.client.presenters; + +import org.dominokit.domino.api.client.annotations.presenter.*; +import org.dominokit.domino.api.client.mvp.presenter.ViewBaseClientPresenter; +import org.dominokit.domino.api.shared.extension.PredefinedSlots; +import ${rootPackage}.${subpackage}.client.views.${prefix}View; +import ${rootPackage}.${subpackage}.shared.services.${prefix}ServiceFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@PresenterProxy(name = "${prefix}") +@AutoRoute(token = "${token}") +@Slot(PredefinedSlots.BODY_SLOT) +@AutoReveal +public class ${prefix}Proxy extends ViewBaseClientPresenter<${prefix}View> implements ${prefix}View.${prefix}UiHandlers { + + private static final Logger LOGGER = LoggerFactory.getLogger(${prefix}Proxy.class); + + @OnInit + public void on${prefix}Init(){ + LOGGER.info("${prefix} initialized"); + } + + @OnReveal + public void on${prefix}Revealed() { + LOGGER.info("${prefix} view revealed"); + ${prefix}ServiceFactory.INSTANCE.greeting("${prefix}") + .onSuccess(message -> view.welcomeMessage(message)) + .onFailed(failedResponse -> view.welcomeMessage("Sadly no response from server.!")) + .send(); + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/View.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/View.java new file mode 100644 index 0000000..5430c09 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/View.java @@ -0,0 +1,13 @@ +package ${rootPackage}.${subpackage}.client.views; + +import org.dominokit.domino.api.client.mvp.view.ContentView; +import org.dominokit.domino.api.client.mvp.view.HasUiHandlers; +import org.dominokit.domino.api.client.mvp.view.UiHandlers; + +public interface ${prefix}View extends ContentView, HasUiHandlers<${prefix}View.${prefix}UiHandlers> { + + void welcomeMessage(String message); + + interface ${prefix}UiHandlers extends UiHandlers { + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/module.gwt.xml b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/module.gwt.xml new file mode 100644 index 0000000..8f8d81d --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/source/module.gwt.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ClientModuleTestSuite.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ClientModuleTestSuite.java new file mode 100644 index 0000000..4d84b43 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ClientModuleTestSuite.java @@ -0,0 +1,9 @@ +package ${rootPackage}.${subpackage}.client; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses(${prefix}ProxyTest.class) +public class ${moduleName}ClientModuleTestSuite { +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/FakeView.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/FakeView.java new file mode 100644 index 0000000..fa5de9c --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/FakeView.java @@ -0,0 +1,31 @@ +package ${rootPackage}.${subpackage}.client.views; + +import org.dominokit.domino.api.client.annotations.UiView; +import org.dominokit.domino.test.api.client.FakeElement; +import org.dominokit.domino.test.api.client.FakeView; +import ${rootPackage}.${subpackage}.client.presenters.${prefix}Proxy_Presenter; + +@UiView(presentable= ${prefix}Proxy_Presenter.class) +public class Fake${prefix}View extends FakeView implements ${prefix}View { + + private FakeElement root; + private ${prefix}UiHandlers uiHandlers; + private String message; + + protected void init(FakeElement root) { + this.root = root; + } + + public void setUiHandlers(${prefix}UiHandlers uiHandlers) { + this.uiHandlers = uiHandlers; + } + + @Override + public void welcomeMessage(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/PresenterSpy.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/PresenterSpy.java new file mode 100644 index 0000000..2411a60 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/PresenterSpy.java @@ -0,0 +1,4 @@ +package ${rootPackage}.${subpackage}.client.presenters; + +public class ${prefix}PresenterSpy extends ${prefix}Proxy_Presenter{ +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ProxyTest.java b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ProxyTest.java new file mode 100644 index 0000000..c9197d4 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/frontend/test/ProxyTest.java @@ -0,0 +1,56 @@ +package ${rootPackage}.${subpackage}.client; + +import org.dominokit.domino.api.client.annotations.ClientModule; +import org.dominokit.domino.test.api.client.DominoTestCase; +import org.dominokit.domino.test.api.client.DominoTestRunner; +import org.dominokit.domino.test.api.client.annotations.FakeView; +import org.dominokit.domino.test.api.client.annotations.PresenterSpy; +import org.dominokit.domino.test.api.client.annotations.TestConfig; +import ${rootPackage}.${subpackage}.client.presenters.${prefix}PresenterSpy; +import ${rootPackage}.${subpackage}.client.presenters.${prefix}Proxy; +import ${rootPackage}.${subpackage}.client.views.Fake${prefix}View; +import ${rootPackage}.${subpackage}.shared.services.${prefix}ServiceFactory; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(DominoTestRunner.class) +@ClientModule(name = "Test${prefix}") +@TestConfig(modules= {${moduleName}ModuleConfiguration.class}) +public class ${prefix}ProxyTest extends DominoTestCase{ + + @PresenterSpy(${prefix}Proxy.class) + ${prefix}PresenterSpy presenterSpy; + + @FakeView(${prefix}Proxy.class) + Fake${prefix}View fakeView; + + public ${prefix}ProxyTest() { + super(new ${prefix}ProxyTest_Config()); + } + + @Before + public void start(){ + testClient.withServer(getTestContext()).start(); + } + + @Test + public void given${prefix}Module_whenRoutingTo${prefix}_thenShouldDisplayWelcomeMessage() { + clientContext.forRequest(${prefix}ServiceFactory.${prefix}Service_greeting.class) + .returnResponse("hello : ${prefix} proxy"); + clientContext.history().fireState("${token}"); + assertThat(presenterSpy.isActivated()).isTrue(); + assertThat(fakeView.getMessage()).isEqualTo("hello : ${prefix} proxy"); + } + + @Test + public void given${prefix}Module_whenRoutingTo${prefix}AndServerFailed_thenDisplayErrorMessage() { + clientContext.forRequest(${prefix}ServiceFactory.${prefix}Service_greeting.class) + .thenFail(); + clientContext.history().fireState("${token}"); + assertThat(presenterSpy.isActivated()).isTrue(); + assertThat(fakeView.getMessage()).isEqualTo("Sadly no response from server.!"); + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/pom.ftl b/src/main/resources/projects-templates/v1/module/gwt/multi/pom.ftl new file mode 100644 index 0000000..d6ca46b --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/pom.ftl @@ -0,0 +1,49 @@ + + + 4.0.0 + + + ${groupId} + ${rootArtifactId} + ${version} + + + ${artifactId} + pom + + ${artifactId} + http://maven.apache.org + + + + org.assertj + assertj-core + test + + + org.slf4j + slf4j-simple + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + <#if generateBackend> + ${artifactId}-backend + + ${artifactId}-frontend + ${artifactId}-frontend-ui + ${artifactId}-shared + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/shared/pom.xml b/src/main/resources/projects-templates/v1/module/gwt/multi/shared/pom.xml new file mode 100644 index 0000000..ba07061 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/shared/pom.xml @@ -0,0 +1,63 @@ + + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${artifactId}-shared + jar + + ${artifactId}-shared + http://maven.apache.org + + + + org.dominokit + domino-mvp-api-shared + + + org.dominokit + domino-jackson + + + org.dominokit + domino-jackson + sources + + + org.dominokit + domino-jackson-processor + provided + + + org.dominokit + domino-rest-shared + + + + org.dominokit + domino-rest-processor + provided + + + + + + + src/main/java + + + + + org.apache.maven.plugins + maven-source-plugin + + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/shared/source/Service.java b/src/main/resources/projects-templates/v1/module/gwt/multi/shared/source/Service.java new file mode 100644 index 0000000..198b5b2 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/shared/source/Service.java @@ -0,0 +1,17 @@ +package ${rootPackage}.${subpackage}.shared.services; + +import org.dominokit.rest.shared.request.service.annotations.RequestFactory; + +import javax.ws.rs.Path; +import javax.ws.rs.GET; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +@RequestFactory +public interface ${prefix}Service { + @Path("/hello/{name}") + @GET + @Produces(MediaType.TEXT_PLAIN) + String greeting(@PathParam("name") String name); +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/ui/pom.xml b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/pom.xml new file mode 100644 index 0000000..68c771a --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/pom.xml @@ -0,0 +1,96 @@ + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + + ${artifactId}-frontend-ui + ${artifactId}-frontend-ui + gwt-lib + + + + com.google.gwt + gwt-user + provided + + + org.dominokit + domino-mvp-api-client + + + org.dominokit + domino-mvp-api-client + sources + + + org.dominokit + domino-slf4j-logger + + + org.dominokit + domino-mvp-gwt-view + + + org.dominokit + domino-mvp-apt-client + provided + + + org.dominokit + domino-mvp-client-test + test + + + org.dominokit + domino-mvp-apt-client-test + test + + + org.dominokit + domino-ui + + + ${groupId} + ${artifactId}-shared + ${r"${project.version}"} + + + ${groupId} + ${artifactId}-frontend + ${r"${project.version}"} + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + -Xlint:all + true + true + + + + net.ltgt.gwt.maven + gwt-maven-plugin + true + + ${rootPackage}.${subpackage}.${moduleName}UIClientModule + + + + org.apache.maven.plugins + maven-source-plugin + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/UIClientModule.java b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/UIClientModule.java new file mode 100644 index 0000000..bb26d1c --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/UIClientModule.java @@ -0,0 +1,19 @@ +package ${rootPackage}.${subpackage}.client; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.api.client.ModuleConfigurator; +import org.dominokit.domino.api.client.annotations.ClientModule; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@ClientModule(name="${moduleName}UI") +public class ${moduleName}UIClientModule implements EntryPoint { + + private static final Logger LOGGER = LoggerFactory.getLogger(${moduleName}UIClientModule.class); + + public void onModuleLoad() { + LOGGER.info("Initializing ${moduleName} frontend UI module ..."); + new ModuleConfigurator().configureModule(new ${moduleName}UIModuleConfiguration()); + } +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/ViewImpl.java b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/ViewImpl.java new file mode 100644 index 0000000..a34d6c5 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/ViewImpl.java @@ -0,0 +1,34 @@ +package ${rootPackage}.${subpackage}.client.views.ui; + +import elemental2.dom.HTMLDivElement; +import org.dominokit.domino.view.BaseElementView; + +import org.dominokit.domino.api.client.annotations.UiView; +import org.dominokit.domino.ui.utils.DominoElement; + +import ${rootPackage}.${subpackage}.client.presenters.${prefix}Proxy; +import ${rootPackage}.${subpackage}.client.views.${prefix}View; + +import static org.jboss.elemento.Elements.h; + +@UiView(presentable = ${prefix}Proxy.class) +public class ${prefix}ViewImpl extends BaseElementView implements ${prefix}View{ + + private ${prefix}UiHandlers uiHandlers; + private DominoElement root = DominoElement.div(); + + @Override + public HTMLDivElement init() { + return root.element(); + } + + @Override + public void welcomeMessage(String message) { + root.appendChild(h(1).textContent(message)); + } + + @Override + public void setUiHandlers(${prefix}UiHandlers uiHandlers) { + this.uiHandlers = uiHandlers; + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/module.gwt.xml b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/module.gwt.xml new file mode 100644 index 0000000..ee6f429 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/multi/ui/source/module.gwt.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/frontend-dependency.ftl b/src/main/resources/projects-templates/v1/module/gwt/single/frontend-dependency.ftl new file mode 100644 index 0000000..bb9f3e0 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/frontend-dependency.ftl @@ -0,0 +1,6 @@ + + ${groupId} + ${artifactId} + ${r"${project.version}"} + gwt-lib + diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/pom.xml b/src/main/resources/projects-templates/v1/module/gwt/single/pom.xml new file mode 100644 index 0000000..9e547ec --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/pom.xml @@ -0,0 +1,127 @@ + + + 4.0.0 + + + ${groupId} + ${rootArtifactId} + ${version} + + + ${artifactId} + gwt-lib + + ${artifactId} + http://maven.apache.org + + + + com.google.gwt + gwt-user + provided + + + org.dominokit + domino-mvp-api-shared + + + org.dominokit + domino-mvp-api-client + + + org.dominokit + domino-mvp-api-client + sources + + + org.dominokit + domino-slf4j-logger + + + org.dominokit + domino-aggregator-apt + provided + + + org.dominokit + domino-mvp-apt-client + provided + + + org.dominokit + domino-mvp-client-test + test + + + org.dominokit + domino-mvp-apt-client-test + test + + + org.dominokit + domino-ui + + + org.dominokit + domino-mvp-gwt-view + + + + org.slf4j + slf4j-simple + test + + + + org.dominokit + domino-jackson + + + org.dominokit + domino-jackson + sources + + + org.dominokit + domino-jackson-processor + provided + + + + org.dominokit + domino-rest-client + + + org.dominokit + domino-rest-processor + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + -Xlint:all + true + true + + + + net.ltgt.gwt.maven + gwt-maven-plugin + true + + ${rootPackage}.${subpackage}.${moduleName}ClientModule + + + + org.apache.maven.plugins + maven-source-plugin + + + + diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/source/ClientModule.java b/src/main/resources/projects-templates/v1/module/gwt/single/source/ClientModule.java new file mode 100644 index 0000000..4679a87 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/source/ClientModule.java @@ -0,0 +1,19 @@ +package ${rootPackage}.${subpackage}.client; + +import com.google.gwt.core.client.EntryPoint; +import org.dominokit.domino.api.client.ModuleConfigurator; +import org.dominokit.domino.api.client.annotations.ClientModule; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@ClientModule(name="${moduleName}") +public class ${moduleName}ClientModule implements EntryPoint { + + private static final Logger LOGGER = LoggerFactory.getLogger(${moduleName}ClientModule.class); + + public void onModuleLoad() { + LOGGER.info("Initializing ${moduleName} frontend module ..."); + new ModuleConfigurator().configureModule(new ${moduleName}ModuleConfiguration()); + } +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/source/Proxy.java b/src/main/resources/projects-templates/v1/module/gwt/single/source/Proxy.java new file mode 100644 index 0000000..6537d75 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/source/Proxy.java @@ -0,0 +1,28 @@ +package ${rootPackage}.${subpackage}.client.presenters; + +import org.dominokit.domino.api.client.annotations.presenter.*; +import org.dominokit.domino.api.client.mvp.presenter.ViewBaseClientPresenter; +import org.dominokit.domino.api.shared.extension.PredefinedSlots; +import ${rootPackage}.${subpackage}.client.views.${prefix}View; +import ${rootPackage}.${subpackage}.shared.events.${prefix}Event; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@PresenterProxy(name = "${prefix}") +@AutoRoute(token = "${token}") +@Slot(PredefinedSlots.BODY_SLOT) +@AutoReveal +public class ${prefix}Proxy extends ViewBaseClientPresenter<${prefix}View> implements ${prefix}View.${prefix}UiHandlers { + + private static final Logger LOGGER = LoggerFactory.getLogger(${prefix}Proxy.class); + + @OnInit + public void on${prefix}Init(){ + LOGGER.info("${prefix} initialized"); + } + + @OnReveal + public void on${prefix}Revealed() { + LOGGER.info("${prefix} view revealed"); + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/source/Service.java b/src/main/resources/projects-templates/v1/module/gwt/single/source/Service.java new file mode 100644 index 0000000..198b5b2 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/source/Service.java @@ -0,0 +1,17 @@ +package ${rootPackage}.${subpackage}.shared.services; + +import org.dominokit.rest.shared.request.service.annotations.RequestFactory; + +import javax.ws.rs.Path; +import javax.ws.rs.GET; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +@RequestFactory +public interface ${prefix}Service { + @Path("/hello/{name}") + @GET + @Produces(MediaType.TEXT_PLAIN) + String greeting(@PathParam("name") String name); +} diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/source/View.java b/src/main/resources/projects-templates/v1/module/gwt/single/source/View.java new file mode 100644 index 0000000..5430c09 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/source/View.java @@ -0,0 +1,13 @@ +package ${rootPackage}.${subpackage}.client.views; + +import org.dominokit.domino.api.client.mvp.view.ContentView; +import org.dominokit.domino.api.client.mvp.view.HasUiHandlers; +import org.dominokit.domino.api.client.mvp.view.UiHandlers; + +public interface ${prefix}View extends ContentView, HasUiHandlers<${prefix}View.${prefix}UiHandlers> { + + void welcomeMessage(String message); + + interface ${prefix}UiHandlers extends UiHandlers { + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/source/ViewImpl.java b/src/main/resources/projects-templates/v1/module/gwt/single/source/ViewImpl.java new file mode 100644 index 0000000..a34d6c5 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/source/ViewImpl.java @@ -0,0 +1,34 @@ +package ${rootPackage}.${subpackage}.client.views.ui; + +import elemental2.dom.HTMLDivElement; +import org.dominokit.domino.view.BaseElementView; + +import org.dominokit.domino.api.client.annotations.UiView; +import org.dominokit.domino.ui.utils.DominoElement; + +import ${rootPackage}.${subpackage}.client.presenters.${prefix}Proxy; +import ${rootPackage}.${subpackage}.client.views.${prefix}View; + +import static org.jboss.elemento.Elements.h; + +@UiView(presentable = ${prefix}Proxy.class) +public class ${prefix}ViewImpl extends BaseElementView implements ${prefix}View{ + + private ${prefix}UiHandlers uiHandlers; + private DominoElement root = DominoElement.div(); + + @Override + public HTMLDivElement init() { + return root.element(); + } + + @Override + public void welcomeMessage(String message) { + root.appendChild(h(1).textContent(message)); + } + + @Override + public void setUiHandlers(${prefix}UiHandlers uiHandlers) { + this.uiHandlers = uiHandlers; + } +} \ No newline at end of file diff --git a/src/main/resources/projects-templates/v1/module/gwt/single/source/module.gwt.xml b/src/main/resources/projects-templates/v1/module/gwt/single/source/module.gwt.xml new file mode 100644 index 0000000..cb13d16 --- /dev/null +++ b/src/main/resources/projects-templates/v1/module/gwt/single/source/module.gwt.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/main/resources/projects-templates/v2/api/resource/application.properties b/src/main/resources/projects-templates/v2/api/resource/application.properties index 7cf3b93..2d80a39 100644 --- a/src/main/resources/projects-templates/v2/api/resource/application.properties +++ b/src/main/resources/projects-templates/v2/api/resource/application.properties @@ -1 +1,2 @@ -quarkus.http.port=9090 \ No newline at end of file +quarkus.http.port=9090 +quarkus.http.cors=true \ No newline at end of file diff --git a/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java b/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java index 44b21ca..e8a7e69 100644 --- a/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java +++ b/src/main/resources/projects-templates/v2/app/gwt/basic/client/source/App.java @@ -21,14 +21,17 @@ public void onModuleLoad() { var layout = AppLayout.create("Domino-ui starter"); layout.withLeftDrawer((parent, drawer) -> { - Tree.create("Menu") + drawer.appendChild(Tree.create("Menu") .appendChild(TreeItem.create(Icons.widgets(), "Menu 1")) .appendChild(TreeItem.create(Icons.widgets(), "Menu 2")) .addSelectionListener((source, selection) -> { - layout.setContent(Card.create(source.get().getValue()) - .appendChild(p("Welcome to domino-ui , you are viewing "+source.get().getValue()+" content"))); + layout.withContent((parent1, content) -> { + content.clearElement() + .appendChild(Card.create(source.get().getValue()) + .appendChild(p("Welcome to domino-ui , you are viewing "+source.get().getValue()+" content"))); + }); - }); + })); }); body().appendChild(layout); } diff --git a/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.java b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.java index de6db61..ae2355d 100644 --- a/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.java +++ b/src/main/resources/projects-templates/v2/app/j2cl/basic/client/source/App.java @@ -16,7 +16,7 @@ public class App implements EntryPoint { */ public void onModuleLoad() { HTMLDivElement div= Js.cast(DomGlobal.document.createElement("div")); - HTMLHeadingElement h1= Js.cast(DomGlobal.document.createElement("h1")); + HTMLHeadingElement h1 = Js.cast(DomGlobal.document.createElement("h1")); h1.textContent ="Hello from j2cl"; div.appendChild(h1); DomGlobal.document.body.appendChild(div); From e1fe2f90a9894a53b797e5fdae29724cb199ddfb Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Mon, 11 Sep 2023 16:25:18 +0300 Subject: [PATCH 5/6] prepare for release 2.0.0-RC1 --- pom.xml | 6 +----- src/main/java/org/dominokit/cli/VersionProfile.java | 12 ++++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 0602e47..c778f31 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ HEAD-SNAPSHOT HEAD-SNAPSHOT - 2.0.0 + 2.0.0-RC1 0.0.0-HEAD-SNAPSHOT 3.11.0 17 @@ -144,10 +144,6 @@ since everything set in the file can't be overwritten via command line --> ${bump.digit} - - verify - verify - master diff --git a/src/main/java/org/dominokit/cli/VersionProfile.java b/src/main/java/org/dominokit/cli/VersionProfile.java index 09c0df6..43fbc85 100644 --- a/src/main/java/org/dominokit/cli/VersionProfile.java +++ b/src/main/java/org/dominokit/cli/VersionProfile.java @@ -42,25 +42,25 @@ private static VersionProfile get(String version){ switch (version){ case "v1" : return new VersionProfile(version, version, - ToolVersion.of("domino_ui_version", "1.0.1"), + ToolVersion.of("domino_ui_version", "1.0.2"), ToolVersion.of("domino_history_version", "1.0.0"), ToolVersion.of("domino_mvp_version", "1.0.0"), ToolVersion.of("domino_rest_version", "1.0.0"), ToolVersion.of("domino_jackson_version", "1.0.0"), ToolVersion.of("quarkus_version", "2.16.7.Final"), - ToolVersion.of("vertx_version", "3.9.0"), + ToolVersion.of("vertx_version", "3.9.4"), ToolVersion.of("gwt_version", "2.10.0"), ToolVersion.of("j2cl_maven_plugin_version", "0.21") ); case "v2" : return new VersionProfile(version, version, - ToolVersion.of("domino_ui_version", "2.0.0-RC1"), + ToolVersion.of("domino_ui_version", "2.0.0-RC2"), ToolVersion.of("domino_history_version", "1.0.0"), - ToolVersion.of("domino_mvp_version", "HEAD-SNAPSHOT"), + ToolVersion.of("domino_mvp_version", "2.0.0-RC1"), ToolVersion.of("domino_rest_version", "1.0.0"), ToolVersion.of("domino_jackson_version", "1.0.0"), ToolVersion.of("quarkus_version", "2.16.7.Final"), - ToolVersion.of("vertx_version", "3.9.0"), + ToolVersion.of("vertx_version", "3.9.4"), ToolVersion.of("gwt_version", "2.10.0"), ToolVersion.of("j2cl_maven_plugin_version", "0.21") ); @@ -72,7 +72,7 @@ private static VersionProfile get(String version){ ToolVersion.of("domino_rest_version", "HEAD-SNAPSHOT"), ToolVersion.of("domino_jackson_version", "HEAD-SNAPSHOT"), ToolVersion.of("quarkus_version", "2.16.7.Final"), - ToolVersion.of("vertx_version", "3.9.0"), + ToolVersion.of("vertx_version", "3.9.4"), ToolVersion.of("gwt_version", "2.10.0"), ToolVersion.of("j2cl_maven_plugin_version", "0.21") ); From b0e00d2cbfc119bba2a3e0ae1ff23be89efe6c48 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Mon, 11 Sep 2023 16:52:05 +0300 Subject: [PATCH 6/6] Update versions for release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c778f31..8bf1db3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.dominokit domino-cli - HEAD-SNAPSHOT + 2.0.0-RC1 HEAD-SNAPSHOT 2.0.0-RC1