diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9d9f5579739..71f0259f450 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -99,14 +99,13 @@ jobs: strategy: matrix: app: - - full-default - - tomcat-mysql-ehcachexml - - undertow-simplecache - - tomcat-configserver - - undertow-consul - - tomcat-eureka - - tomcat-mongodb + - fullapp + - mysqlapp - flywayapp + - undertowapp + - eurekaapp + - consulapp + - mongodbapp - angularapp - reactapp - vueapp @@ -141,11 +140,21 @@ jobs: key: ${{ runner.os }}-maven-${{ matrix.app }}-${{ steps.cache_md5sum.outputs.md5sum_pom_xml }} restore-keys: | ${{ runner.os }}-maven- + - name: 'Test: starting Sonar' + working-directory: /tmp/jhlite/${{ matrix.app }}/ + run: | + docker-compose -f src/main/docker/sonar.yml up -d + sleep 30 + docker ps -a - name: 'Test: verify ${{ matrix.app }}' working-directory: /tmp/jhlite/${{ matrix.app }}/ run: | chmod +x mvnw - ./mvnw clean verify + ./mvnw clean verify sonar:sonar + - name: 'Test: check local Sonar Analysis' + run: | + sleep 15 + ./tests-ci/sonar.sh ${{ matrix.app }} #-------------------------------------------------- # Send analysis to Codecov #-------------------------------------------------- diff --git a/src/main/java/tech/jhipster/lite/common/domain/FileUtils.java b/src/main/java/tech/jhipster/lite/common/domain/FileUtils.java index 0a9ada62de8..90e6cc42d90 100644 --- a/src/main/java/tech/jhipster/lite/common/domain/FileUtils.java +++ b/src/main/java/tech/jhipster/lite/common/domain/FileUtils.java @@ -66,7 +66,7 @@ public static Path getPathOf(String... paths) { public static InputStream getInputStream(String... paths) { InputStream in = FileUtils.class.getResourceAsStream(FILE_SEPARATOR + getPath(paths)); if (in == null) { - throw new GeneratorException("File not found in classpath"); + throw new GeneratorException("File '" + getPath(paths) + "' not found in classpath"); } return in; } diff --git a/src/main/java/tech/jhipster/lite/generator/client/angular/core/domain/AngularDomainService.java b/src/main/java/tech/jhipster/lite/generator/client/angular/core/domain/AngularDomainService.java index 958f8dc98c5..49ff3d8344e 100644 --- a/src/main/java/tech/jhipster/lite/generator/client/angular/core/domain/AngularDomainService.java +++ b/src/main/java/tech/jhipster/lite/generator/client/angular/core/domain/AngularDomainService.java @@ -82,11 +82,11 @@ public void addAngularFiles(Project project) { public void addImages(Project project) { projectRepository.add( project, - getPath(SOURCE_WEBAPP, "/content/images"), + getPath(SOURCE_WEBAPP, "content/images"), "JHipster-Lite-neon-red.png", "src/main/webapp/content/images" ); - projectRepository.add(project, getPath(SOURCE_WEBAPP, "/content/images"), "AngularLogo.svg", "src/main/webapp/content/images"); + projectRepository.add(project, getPath(SOURCE_WEBAPP, "content/images"), "AngularLogo.svg", "src/main/webapp/content/images"); } public void addJestSonar(Project project) { diff --git a/src/main/resources/generator/client/angular/src/main/webapp/app/common/primary/app/app.component.html.mustache b/src/main/resources/generator/client/angular/src/main/webapp/app/common/primary/app/app.component.html.mustache index 199897e44e3..3973685e4cb 100644 --- a/src/main/resources/generator/client/angular/src/main/webapp/app/common/primary/app/app.component.html.mustache +++ b/src/main/resources/generator/client/angular/src/main/webapp/app/common/primary/app/app.component.html.mustache @@ -5,13 +5,13 @@
Recommended IDE setup: - VSCode + VSCode
- Angular Documentation + Angular Documentation | - Angular CLI Documentation + Angular CLI Documentation
diff --git a/src/main/resources/generator/client/vite/vue/webapp/app/common/primary/app/StyledApp.html.mustache b/src/main/resources/generator/client/vite/vue/webapp/app/common/primary/app/StyledApp.html.mustache index 7d5caa287d0..19ab5e0dead 100644 --- a/src/main/resources/generator/client/vite/vue/webapp/app/common/primary/app/StyledApp.html.mustache +++ b/src/main/resources/generator/client/vite/vue/webapp/app/common/primary/app/StyledApp.html.mustache @@ -5,17 +5,17 @@
Recommended IDE setup: - VSCode + VSCode + - Volar + Volar
- + Vite Documentation | - Vue 3 Documentation + Vue 3 Documentation
diff --git a/src/main/resources/generator/server/springboot/user/sqldatabase/UserEntity_without_sequence.java.mustache b/src/main/resources/generator/server/springboot/user/sqldatabase/UserEntity_without_sequence.java.mustache
index 6d88bf7110b..023c7284109 100644
--- a/src/main/resources/generator/server/springboot/user/sqldatabase/UserEntity_without_sequence.java.mustache
+++ b/src/main/resources/generator/server/springboot/user/sqldatabase/UserEntity_without_sequence.java.mustache
@@ -12,8 +12,7 @@ import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.BatchSize;
-
-import tech.jhipster.beer.user.domain.UserConstants;
+import {{packageName}}.user.domain.UserConstants;
/**
* A user.
diff --git a/tests-ci/config/consulapp.json b/tests-ci/config/consulapp.json
new file mode 100644
index 00000000000..6465fb38913
--- /dev/null
+++ b/tests-ci/config/consulapp.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/consulapp",
+ "generator-jhipster": {
+ "projectName": "ConsulApp Project",
+ "baseName": "consulapp",
+ "packageName": "tech.jhipster.consulapp"
+ }
+}
diff --git a/tests-ci/config/eurekaapp.json b/tests-ci/config/eurekaapp.json
new file mode 100644
index 00000000000..e1de26dd68a
--- /dev/null
+++ b/tests-ci/config/eurekaapp.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/eurekaapp",
+ "generator-jhipster": {
+ "projectName": "EurekaApp Project",
+ "baseName": "eurekaapp",
+ "packageName": "tech.jhipster.eurekaapp"
+ }
+}
diff --git a/tests-ci/config/full-default.json b/tests-ci/config/full-default.json
deleted file mode 100644
index d6f0a1b415f..00000000000
--- a/tests-ci/config/full-default.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/full-default",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/fullapp.json b/tests-ci/config/fullapp.json
new file mode 100644
index 00000000000..0d9370038f1
--- /dev/null
+++ b/tests-ci/config/fullapp.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/fullapp",
+ "generator-jhipster": {
+ "projectName": "Fullapp Project",
+ "baseName": "fullapp",
+ "packageName": "tech.jhipster.fullapp"
+ }
+}
diff --git a/tests-ci/config/fullstack.json b/tests-ci/config/fullstack.json
new file mode 100644
index 00000000000..c48144523bf
--- /dev/null
+++ b/tests-ci/config/fullstack.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/fullstack",
+ "generator-jhipster": {
+ "projectName": "Full Stack Project",
+ "baseName": "fullstack",
+ "packageName": "tech.jhipster.fullstack"
+ }
+}
diff --git a/tests-ci/config/mongodbapp.json b/tests-ci/config/mongodbapp.json
new file mode 100644
index 00000000000..5edeb33bf61
--- /dev/null
+++ b/tests-ci/config/mongodbapp.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/mongodbapp",
+ "generator-jhipster": {
+ "projectName": "MongoDB App Project",
+ "baseName": "mongodbapp",
+ "packageName": "tech.jhipster.mongodbapp"
+ }
+}
diff --git a/tests-ci/config/mysqlapp.json b/tests-ci/config/mysqlapp.json
new file mode 100644
index 00000000000..f89f02a1ae5
--- /dev/null
+++ b/tests-ci/config/mysqlapp.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/mysqlapp",
+ "generator-jhipster": {
+ "projectName": "MySQL Project",
+ "baseName": "mysqlapp",
+ "packageName": "tech.jhipster.mysqlapp"
+ }
+}
diff --git a/tests-ci/config/tomcat-configserver.json b/tests-ci/config/tomcat-configserver.json
deleted file mode 100644
index 1886c137038..00000000000
--- a/tests-ci/config/tomcat-configserver.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/tomcat-configserver",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/tomcat-eureka.json b/tests-ci/config/tomcat-eureka.json
deleted file mode 100644
index a3686c00e41..00000000000
--- a/tests-ci/config/tomcat-eureka.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/tomcat-eureka",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/tomcat-mongodb.json b/tests-ci/config/tomcat-mongodb.json
deleted file mode 100644
index a648a9b0945..00000000000
--- a/tests-ci/config/tomcat-mongodb.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/tomcat-mongodb",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/tomcat-mysql-ehcachexml.json b/tests-ci/config/tomcat-mysql-ehcachexml.json
deleted file mode 100644
index 2e63b57fbb2..00000000000
--- a/tests-ci/config/tomcat-mysql-ehcachexml.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/tomcat-mysql-ehcachexml",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/undertow-consul.json b/tests-ci/config/undertow-consul.json
deleted file mode 100644
index c40ff7344df..00000000000
--- a/tests-ci/config/undertow-consul.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/undertow-consul",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/undertow-simplecache.json b/tests-ci/config/undertow-simplecache.json
deleted file mode 100644
index 0ceff020e89..00000000000
--- a/tests-ci/config/undertow-simplecache.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folder": "/tmp/jhlite/undertow-simplecache",
- "generator-jhipster": {
- "projectName": "Beer Project",
- "baseName": "beer",
- "packageName": "tech.jhipster.beer"
- }
-}
diff --git a/tests-ci/config/undertowapp.json b/tests-ci/config/undertowapp.json
new file mode 100644
index 00000000000..bfedc78b3fd
--- /dev/null
+++ b/tests-ci/config/undertowapp.json
@@ -0,0 +1,8 @@
+{
+ "folder": "/tmp/jhlite/undertowapp",
+ "generator-jhipster": {
+ "projectName": "UndertowApp Project",
+ "baseName": "undertowapp",
+ "packageName": "tech.jhipster.undertowapp"
+ }
+}
diff --git a/tests-ci/generate.sh b/tests-ci/generate.sh
index 7412c14d939..123976edefc 100755
--- a/tests-ci/generate.sh
+++ b/tests-ci/generate.sh
@@ -1,7 +1,7 @@
#!/bin/bash
show_syntax() {
- echo "Usage: $0