Repository: jhipster/generator-jhipster
Pull request #9882 (2019-06-10 17:51:41)

Switch eclipse to use new generated sources directory
After upgrading to JHipster 6, the Eclipse build path for generated classes has changed from:

`build/generated/source/apt/main` 

to 

`build/generated/sources/annotationProcessor/java/main`

This is related to https://github.com/jhipster/generator-jhipster/issues/9134 and https://github.com/jhipster/generator-jhipster/pull/9468

-   Please make sure the below checklist is followed for Pull Requests.

-   [ ] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) are green
-   [X ] Tests are added where necessary
-   [X] Documentation is added/updated where necessary
-   [X] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed

<!--
Please also reference the issue number in a commit message to [automatically close the related Github issue](https://help.github.com/articles/closing-issues-via-commit-messages/)

Note: It is also possible to add `[skip ci]` to your commit message to skip Travis tests
-->



Patch:
diff --git a/README.md b/README.md
index f0aaddccd1..e0263bb74a 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,10 @@ Support this project by becoming a sponsor! [Become a sponsor](https://opencolle
 **Gold sponsors**
 
 [![Okta][okta-image]][okta-url]
+[Okta][okta-url]
+
+[![Octo Consulting Group][octoconsulting-image]][octoconsulting-url]
+[Octo Consulting Group][octoconsulting-url]
 
 **Bronze sponsors**
 
@@ -103,6 +107,8 @@ Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hip
 [backers-url]: https://opencollective.com/generator-jhipster
 [okta-image]: https://www.jhipster.tech/images/open-collective/okta.png
 [okta-url]: https://developer.okta.com/signup?utm_source=JHipster&utm_medium=logo&utm_campaign=Gold-Sponsor
+[octoconsulting-image]: https://www.jhipster.tech/images/open-collective/octoconsulting.png
+[octoconsulting-url]: http://www.octoconsulting.com/
 [forsyslab-image]: https://www.jhipster.tech/images/open-collective/forsyslab.jpg
 [forsyslab-url]: https://forsyslab.com/
 [cubaplatform-image]: https://www.jhipster.tech/images/open-collective/cubaplatform.png
diff --git a/generators/ci-cd/templates/.gitlab-ci.yml.ejs b/generators/ci-cd/templates/.gitlab-ci.yml.ejs
index 2028d617a6..240b0eee42 100644
--- a/generators/ci-cd/templates/.gitlab-ci.yml.ejs
+++ b/generators/ci-cd/templates/.gitlab-ci.yml.ejs
@@ -42,6 +42,7 @@ stages:
 
 <%_ if (buildTool === 'gradle') { _%>
 before_script:
+    - export NG_CLI_ANALYTICS="false"
     - export GRADLE_USER_HOME=`pwd`/.gradle
     <%_ if (!skipClient) { _%>
     - ./gradlew <%= clientPackageManager %>_install -PnodeInstall --no-daemon
@@ -143,6 +144,7 @@ deploy-to-production:
 
 <%_ if (buildTool === 'maven') { _%>
 before_script:
+    - export NG_CLI_ANALYTICS="false"
     - export MAVEN_USER_HOME=`pwd`/.maven
     <%_ if (!skipClient) { _%>
         <%_ if (clientPackageManager === 'yarn') { _%>
diff --git a/generators/ci-cd/templates/azure-pipelines.yml.ejs b/generators/ci-cd/templates/azure-pipelines.yml.ejs
index dd7be02f5b..1e97ed26c9 100644
--- a/generators/ci-cd/templates/azure-pipelines.yml.ejs
+++ b/generators/ci-cd/templates/azure-pipelines.yml.ejs
@@ -25,6 +25,7 @@ jobs:
     SPRING_OUTPUT_ANSI_ENABLED: NEVER
     SPRING_JPA_SHOW_SQL: false
     JHI_DISABLE_WEBPACK_LOGS: true
+    NG_CLI_ANALYTICS: "false"
 
   steps:
   #----------------------------------------------------------------------
diff --git a/generators/ci-cd/templates/travis.yml.ejs b/generators/ci-cd/templates/travis.yml.ejs
index 0a1276030b..e03feaf901 100644
--- a/generators/ci-cd/templates/travis.yml.ejs
+++ b/generators/ci-cd/templates/travis.yml.ejs
@@ -44,6 +44,7 @@ env:
     - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
     - SPRING_JPA_SHOW_SQL=false
     - JHI_DISABLE_WEBPACK_LOGS=true
+    - NG_CLI_ANALYTICS="false"
 before_install:
   - jdk_switcher use oraclejdk8
   - java -version
diff --git a/generators/client/templates/angular/package.json.ejs b/generators/client/templates/angular/package.json.ejs
index ef0e70ac3f..dbcab2fa77 100644
--- a/generators/client/templates/angular/package.json.ejs
+++ b/generators/client/templates/angular/package.json.ejs
@@ -175,7 +175,7 @@
     "clean-www": "rimraf <%= DIST_DIR %>app/{src,<%= BUILD_DIR %>}",
     <%_ if (protractorTests) { _%>
     "e2e": "protractor <%= TEST_SRC_DIR %>protractor.conf.js",
-    "postinstall": "node node_modules/webdriver-manager/bin/webdriver-manager update --gecko false",
+    "postinstall": "node node_modules/protractor/bin/webdriver-manager update --gecko false",
     <%_ } _%>
     "start": "<%= clientPackageManager %> run webpack:dev",
     "start-tls": "<%= clientPackageManager %> run webpack:dev <%= optionsForwarder %>--env.tls",
diff --git a/generators/client/templates/react/package.json.ejs b/generators/client/templates/react/package.json.ejs
index 5917013599..8bea0ed600 100644
--- a/generators/client/templates/react/package.json.ejs
+++ b/generators/client/templates/react/package.json.ejs
@@ -199,7 +199,7 @@ limitations under the License.
     "cleanup": "rimraf <%= DIST_DIR %>",
     <%_ if (protractorTests) { _%>
     "e2e": "protractor <%= TEST_SRC_DIR %>protractor.conf.js",
-    "postinstall": "node node_modules/webdriver-manager/bin/webdriver-manager update --gecko false",
+    "postinstall": "node node_modules/protractor/bin/webdriver-manager update --gecko false",
     <%_ } _%>
     "start": "<%= clientPackageManager %> run webpack:dev",
     "start-tls": "<%= clientPackageManager %> run webpack:dev <%= optionsForwarder %>--env.tls",
diff --git a/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs b/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs
index bedd153de0..9f4c24761c 100644
--- a/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs
+++ b/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs
@@ -823,7 +823,8 @@
         <%- keycloakRedirectUris %>
         "http://localhost:8100/*",
         "http://127.0.0.1:8761/*",
-        "http://localhost:9000/*"
+        "http://localhost:9000/*",
+        "dev.localhost.ionic:*"
       ],
       "webOrigins": [
         <%- keycloakRedirectUris %>
diff --git a/generators/entity-server/templates/src/main/java/package/domain/Entity.java.ejs b/generators/entity-server/templates/src/main/java/package/domain/Entity.java.ejs
index 395ead62d9..390fdc04bd 100644
--- a/generators/entity-server/templates/src/main/java/package/domain/Entity.java.ejs
+++ b/generators/entity-server/templates/src/main/java/package/domain/Entity.java.ejs
@@ -32,7 +32,7 @@ const uniqueEnums = {}; %><%- include imports -%>
             break;
         }
         isUsingMapsId = false;
-    } 
+    }
     for (idx in fields) {
         if ((prodDatabaseType === 'postgresql' || devDatabaseType === 'postgresql') && fields[idx].fieldTypeBlobContent === 'text') {
             hasTextBlob = true;
@@ -56,7 +56,7 @@ import io.swagger.annotations.ApiModelProperty;
 <%_ } if (enableHibernateCache) { _%>
 import org.hibernate.annotations.Cache;
 import org.hibernate.annotations.CacheConcurrencyStrategy;
-<%_ } if (hasTextBlob === true) { _%>
+<%_ } if (hasTextBlob === true || (fieldsContainUUID === true && ['mysql', 'mariadb'].includes(prodDatabaseType))) { _%>
 import org.hibernate.annotations.Type;
 <%_ } if (databaseType === 'mongodb') { _%>
 import org.springframework.data.annotation.Id;
@@ -101,12 +101,10 @@ import java.time.Duration;
 <%_ } if (importSet === true) { _%>
 import java.util.HashSet;
 import java.util.Set;
-<%_ } _%>
-import java.util.Objects;
-<%_ if (databaseType === 'couchbase' && hasRelationship) { _%>
+<%_ } if (databaseType === 'couchbase' && hasRelationship) { _%>
 import java.util.stream.Collectors;
 <%_ } _%>
-<%_ if (databaseType === 'cassandra') { _%>
+<%_ if (databaseType === 'cassandra' || fieldsContainUUID === true) { _%>
 import java.util.UUID;
 <%_ }
 Object.keys(uniqueEnums).forEach(function(element) { _%>
@@ -216,6 +214,9 @@ public class <%= asEntity(entityClass) %> implements Serializable {
     @Column(name = "<%-fieldNameAsDatabaseColumn %>"<% if (required) { %>, nullable = false<% } %><% if (unique) { %>, unique = true<% } %>)
         <%_ } else if (fieldType === 'BigDecimal') { _%>
     @Column(name = "<%-fieldNameAsDatabaseColumn %>", precision = 21, scale = 2<% if (required) { %>, nullable = false<% } %><% if (unique) { %>, unique = true<% } %>)
+        <%_ } else if (fieldType === 'UUID' && ['mysql', 'mariadb'].includes(prodDatabaseType)) { _%>
+    @Type(type = "uuid-char")
+    @Column(name = "<%-fieldNameAsDatabaseColumn %>", length = 36<% if (required) { %>, nullable = false<% } %><% if (unique) { %>, unique = true<% } %>)
         <%_ } else { _%>
     @Column(name = "<%-fieldNameAsDatabaseColumn %>"<% if (fieldValidate === true) { %><% if (fieldValidateRules.includes('maxlength')) { %>, length = <%= fieldValidateRulesMaxlength %><% } %><% if (required) { %>, nullable = false<% } %><% if (unique) { %>, unique = true<% } %><% } %>)
         <%_ }
diff --git a/generators/entity-server/templates/src/main/java/package/domain/imports.ejs b/generators/entity-server/templates/src/main/java/package/domain/imports.ejs
index 186eaeb553..0ceb035f86 100644
--- a/generators/entity-server/templates/src/main/java/package/domain/imports.ejs
+++ b/generators/entity-server/templates/src/main/java/package/domain/imports.ejs
@@ -35,9 +35,7 @@ if (!importApiModelProperty) {
 }
 
 for (idx in relationships) {
-    if (relationships[idx].relationshipType === 'one-to-many'
-        || relationships[idx].relationshipType === 'one-to-one' && relationships[idx].ownerSide === false
-        || relationships[idx].relationshipType === 'many-to-many' && relationships[idx].ownerSide === false) {
+    if (relationships[idx].ownerSide === false && ['one-to-many', 'one-to-one', 'many-to-many'].includes(relationships[idx].relationshipType)) {
         importJsonIgnore = true;
     } else if (relationships[idx].relationshipType === 'many-to-one') {
         importJsonIgnoreProperties = true;
diff --git a/generators/entity-server/templates/src/main/java/package/service/dto/EntityCriteria.java.ejs b/generators/entity-server/templates/src/main/java/package/service/dto/EntityCriteria.java.ejs
index 987d082d65..e5f3040f44 100644
--- a/generators/entity-server/templates/src/main/java/package/service/dto/EntityCriteria.java.ejs
+++ b/generators/entity-server/templates/src/main/java/package/service/dto/EntityCriteria.java.ejs
@@ -1,9 +1,6 @@
 package <%= packageName %>.service.dto;
 
 import java.io.Serializable;
-<%_ if (fieldsContainDuration === true) { _%>
-import java.time.Duration;
-<%_ } _%>
 import java.util.Objects;
 import io.github.jhipster.service.Criteria;
 <%_ for (idx in fields) { if (fields[idx].fieldIsEnum === true) { _%>
@@ -19,14 +16,17 @@ import io.github.jhipster.service.filter.StringFilter;
 <%_ if (fieldsContainBigDecimal === true) { _%>
 import io.github.jhipster.service.filter.BigDecimalFilter;
 <%_ } _%>
+<%_ if (fieldsContainDuration === true) { _%>
+import io.github.jhipster.service.filter.DurationFilter;
+<%_ } _%>
 <%_ if (fieldsContainInstant === true) { _%>
 import io.github.jhipster.service.filter.InstantFilter;
 <%_ } _%>
 <%_ if (fieldsContainLocalDate === true) { _%>
 import io.github.jhipster.service.filter.LocalDateFilter;
 <%_ } _%>
-<%_ if (fieldsContainDuration === true) { _%>
-import io.github.jhipster.service.filter.RangeFilter;
+<%_ if (fieldsContainUUID === true) { _%>
+import io.github.jhipster.service.filter.UUIDFilter;
 <%_ } _%>
 <%_ if (fieldsContainZonedDateTime === true) { _%>
 import io.github.jhipster.service.filter.ZonedDateTimeFilter;
@@ -42,8 +42,8 @@ import io.github.jhipster.service.filter.ZonedDateTimeFilter;
       var filterType;
       if (field.fieldIsEnum == true) {
         filterType = fieldType + 'Filter';
-        extraFilters[fieldType] = {type : filterType, superType: 'Filter<' + fieldType + '>', fieldType:fieldType};
-      } else if (['Duration', 'LocalDate', 'ZonedDateTime', 'Instant', 'String', 'Long', 'Integer', 'Float', 'Double', 'BigDecimal', 'Boolean'].includes(fieldType)) {
+        extraFilters[fieldType] = {type: filterType, superType: 'Filter<' + fieldType + '>', fieldType: fieldType};
+      } else if (['Duration', 'UUID', 'LocalDate', 'ZonedDateTime', 'Instant', 'String', 'Long', 'Integer', 'Float', 'Double', 'BigDecimal', 'Boolean'].includes(fieldType)) {
         filterType = fieldType + 'Filter';
       } else {
         filterType = 'Filter<' + fieldType + '>';
@@ -54,9 +54,6 @@ import io.github.jhipster.service.filter.ZonedDateTimeFilter;
             fieldInJavaBeanMethod: field.fieldInJavaBeanMethod });
     }
   });
-  if (fieldsContainDuration === true) {
-    extraFilters['java.time.Duration'] = {type : 'DurationFilter', superType: 'RangeFilter<Duration>', fieldType: 'Duration'};
-  }
   relationships.forEach((relationship) => {
     const relationshipType = relationship.relationshipType;
     // user has a String PK when using OAuth, so change relationships accordingly
diff --git a/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs b/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs
index 1ab8ce615b..8107a8804b 100644
--- a/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs
+++ b/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs
@@ -55,7 +55,7 @@ import java.util.HashSet;
 import java.util.Set;
 <%_ } _%>
 import java.util.Objects;
-<%_ if (databaseType === 'cassandra') { _%>
+<%_ if (databaseType === 'cassandra' || fieldsContainUUID === true) { _%>
 import java.util.UUID;
 <%_ } _%>
 <%_ if (fieldsContainBlob && databaseType === 'sql') { _%>
diff --git a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
index ecf15cd1c8..631dd60280 100644
--- a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
+++ b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
@@ -84,6 +84,8 @@
                 columnType="datetime";
             } else if (fieldType === 'Duration') {
                 columnType="bigint";
+            } else if (fieldType === 'UUID') {
+                columnType="${uuidType}";
             } else if (fieldType === 'byte[]' && fieldTypeBlobContent !== 'text') {
                 if (prodDatabaseType === 'mysql' || prodDatabaseType === 'postgresql' || prodDatabaseType === 'mariadb') {
                     columnType="longblob";
@@ -162,16 +164,17 @@
         <loadData
                   file="config/liquibase/data/<%= entityTableName %>.csv"
                   separator=";"
-                  tableName="<%= entityTableName %>"
-                  context="dev">
+                  tableName="<%= entityTableName %>">
             <column name="id" type="numeric"/>
             <%_ for (idx in fields) {
                 let loadColumnType = 'string';
                 let columnType = fields[idx].columnType;
                 if (columnType === 'integer' || columnType === 'bigint' || columnType === 'double' || columnType === 'decimal(21,2)' || columnType === '${floatType}') {
                     loadColumnType = 'numeric';
-                } else if (columnType === 'date' || columnType === 'datetime') {
+                } else if (columnType === 'date') {
                     loadColumnType = 'date';
+                } else if (columnType === 'datetime') {
+                    loadColumnType = 'datetime';
                 } else if (columnType === 'boolean') {
                     loadColumnType = 'boolean';
                 } else if (fields[idx].fieldIsEnum) {
diff --git a/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs b/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs
index d5d222f967..d5866c3d99 100644
--- a/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs
+++ b/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs
@@ -82,9 +82,13 @@ for (lineNb = 1; lineNb <= numberOfRows; lineNb++) {
                 max: fields[idx].fieldValidateRulesMax ? parseFloat(fields[idx].fieldValidateRulesMax) : undefined,
                 min: fields[idx].fieldValidateRulesMin ? parseFloat(fields[idx].fieldValidateRulesMin) : undefined
             });
+        } else if (columnType === '${uuidType}') {
+            data = this.faker.random.uuid();
         } else if (columnType === 'boolean') {
             data = this.faker.random.boolean();
-        } else if (columnType === 'date' || columnType === 'datetime') {
+        } else if (columnType === 'date') {
+            data = this.faker.date.recent().toISOString().split('T')[0];
+        } else if (columnType === 'datetime') {
             // Write the date without milliseconds so Java can parse it
             // See https://stackoverflow.com/a/34053802/150868
             data = this.faker.date.recent().toISOString().split('.')[0];
diff --git a/generators/entity/index.js b/generators/entity/index.js
index 6ee1deaf71..385747e259 100644
--- a/generators/entity/index.js
+++ b/generators/entity/index.js
@@ -310,12 +310,20 @@ class EntityGenerator extends BaseBlueprintGenerator {
                 } else if (entityTableName === '') {
                     this.error('The table name cannot be empty');
                 } else if (jhiCore.isReservedTableName(entityTableName, prodDatabaseType)) {
-                    this.warning(
-                        chalk.red(
-                            `The table name cannot contain the '${entityTableName.toUpperCase()}' reserved keyword, so it will be prefixed with '${jhiTablePrefix}_'.\n${instructions}`
-                        )
-                    );
-                    context.entityTableName = `${jhiTablePrefix}_${entityTableName}`;
+                    if (jhiTablePrefix) {
+                        this.warning(
+                            chalk.red(
+                                `The table name cannot contain the '${entityTableName.toUpperCase()}' reserved keyword, so it will be prefixed with '${jhiTablePrefix}_'.\n${instructions}`
+                            )
+                        );
+                        context.entityTableName = `${jhiTablePrefix}_${entityTableName}`;
+                    } else {
+                        this.warning(
+                            chalk.red(
+                                `The table name contain the '${entityTableName.toUpperCase()}' reserved keyword but you have defined an empty jhiPrefix so it won't be prefixed and thus the generated application might not work'.\n${instructions}`
+                            )
+                        );
+                    }
                 } else if (prodDatabaseType === 'oracle' && entityTableName.length > 26 && !skipCheckLengthOfIdentifier) {
                     this.error(`The table name is too long for Oracle, try a shorter name.\n${instructions}`);
                 } else if (prodDatabaseType === 'oracle' && entityTableName.length > 14 && !skipCheckLengthOfIdentifier) {
@@ -685,6 +693,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
 
                 context.fieldsContainDate = false;
                 context.fieldsContainInstant = false;
+                context.fieldsContainUUID = false;
                 context.fieldsContainZonedDateTime = false;
                 context.fieldsContainDuration = false;
                 context.fieldsContainLocalDate = false;
@@ -731,6 +740,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
                         'Instant',
                         'ZonedDateTime',
                         'Duration',
+                        'UUID',
                         'Boolean',
                         'byte[]',
                         'ByteBuffer'
@@ -756,8 +766,17 @@ class EntityGenerator extends BaseBlueprintGenerator {
                     if (_.isUndefined(field.fieldNameAsDatabaseColumn)) {
                         const fieldNameUnderscored = _.snakeCase(field.fieldName);
                         const jhiFieldNamePrefix = this.getColumnName(context.jhiPrefix);
-                        if (jhiCore.isReservedTableName(fieldNameUnderscored, context.databaseType)) {
-                            field.fieldNameAsDatabaseColumn = `${jhiFieldNamePrefix}_${fieldNameUnderscored}`;
+                        if (jhiCore.isReservedTableName(fieldNameUnderscored, context.prodDatabaseType)) {
+                            if (!jhiFieldNamePrefix) {
+                                this.warning(
+                                    chalk.red(
+                                        `The field name '${fieldNameUnderscored}' is regarded as a reserved keyword, but you have defined an empty jhiPrefix. This might lead to a non-working application.`
+                                    )
+                                );
+                                field.fieldNameAsDatabaseColumn = fieldNameUnderscored;
+                            } else {
+                                field.fieldNameAsDatabaseColumn = `${jhiFieldNamePrefix}_${fieldNameUnderscored}`;
+                            }
                         } else {
                             field.fieldNameAsDatabaseColumn = fieldNameUnderscored;
                         }
@@ -816,6 +835,8 @@ class EntityGenerator extends BaseBlueprintGenerator {
                         context.fieldsContainDate = true;
                     } else if (fieldType === 'BigDecimal') {
                         context.fieldsContainBigDecimal = true;
+                    } else if (fieldType === 'UUID') {
+                        context.fieldsContainUUID = true;
                     } else if (fieldType === 'byte[]' || fieldType === 'ByteBuffer') {
                         context.blobFields.push(field);
                         context.fieldsContainBlob = true;
@@ -908,7 +929,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
                         if (!relationship.otherEntityTableName) {
                             relationship.otherEntityTableName = this.getTableName(otherEntityName);
                         }
-                        if (jhiCore.isReservedTableName(relationship.otherEntityTableName, context.prodDatabaseType)) {
+                        if (jhiCore.isReservedTableName(relationship.otherEntityTableName, context.prodDatabaseType) && jhiTablePrefix) {
                             const otherEntityTableName = relationship.otherEntityTableName;
                             relationship.otherEntityTableName = `${jhiTablePrefix}_${otherEntityTableName}`;
                         }
diff --git a/generators/entity/prompts.js b/generators/entity/prompts.js
index 4ceb3a8b50..4196fcfbf7 100644
--- a/generators/entity/prompts.js
+++ b/generators/entity/prompts.js
@@ -533,6 +533,10 @@ function askForField(done) {
                     value: 'enum',
                     name: 'Enumeration (Java enum type)'
                 },
+                {
+                    value: 'UUID',
+                    name: 'UUID'
+                },
                 {
                     value: 'byte[]',
                     name: '[BETA] Blob'
diff --git a/generators/generator-base.js b/generators/generator-base.js
index 72ac9b69fc..d31b122dc4 100644
--- a/generators/generator-base.js
+++ b/generators/generator-base.js
@@ -1137,7 +1137,7 @@ module.exports = class extends PrivateBase {
             this.warning(`entityTableName is missing in .jhipster/${context.name}.json, using entity name as fallback`);
             context.entityTableName = this.getTableName(context.name);
         }
-        if (jhiCore.isReservedTableName(context.entityTableName, context.prodDatabaseType)) {
+        if (jhiCore.isReservedTableName(context.entityTableName, context.prodDatabaseType) && context.jhiPrefix) {
             context.entityTableName = `${context.jhiTablePrefix}_${context.entityTableName}`;
         }
         context.fields.forEach(field => {
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index 70f7145239..fa2763c75b 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -18,17 +18,17 @@
  */
 
 // version of docker images
-const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v5.0.1';
-const DOCKER_JAVA_JRE = 'adoptopenjdk/openjdk11:alpine-jre';
+const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v5.0.2';
+const DOCKER_JAVA_JRE = 'adoptopenjdk:11-jre-hotspot';
 const DOCKER_MYSQL = 'mysql:8.0.16';
 const DOCKER_MARIADB = 'mariadb:10.4.5';
 const DOCKER_POSTGRESQL = 'postgres:11.3';
-const DOCKER_MONGODB = 'mongo:4.0.9';
+const DOCKER_MONGODB = 'mongo:4.0.10';
 const DOCKER_COUCHBASE = 'couchbase:6.0.1';
 const DOCKER_CASSANDRA = 'cassandra:3.11.4';
 const DOCKER_MSSQL = 'microsoft/mssql-server-linux:latest';
 const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.12';
-const DOCKER_MEMCACHED = 'memcached:1.5.15-alpine';
+const DOCKER_MEMCACHED = 'memcached:1.5.16-alpine';
 const DOCKER_KEYCLOAK = 'jboss/keycloak:6.0.1';
 const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:6.4.3'; // The version should be coerent with the one from spring-data-elasticsearch project
 const DOCKER_KAFKA = 'confluentinc/cp-kafka:5.2.1';
@@ -45,11 +45,11 @@ const DOCKER_CONSUL = 'consul:1.5.1';
 const DOCKER_CONSUL_CONFIG_LOADER = 'jhipster/consul-config-loader:v0.3.0';
 const DOCKER_PROMETHEUS = 'prom/prometheus:v2.10.0';
 const DOCKER_PROMETHEUS_ALERTMANAGER = 'prom/alertmanager:v0.17.0';
-const DOCKER_GRAFANA = 'grafana/grafana:6.2.0';
+const DOCKER_GRAFANA = 'grafana/grafana:6.2.2';
 const DOCKER_JENKINS = 'jenkins:latest';
 const DOCKER_SWAGGER_EDITOR = 'swaggerapi/swagger-editor:latest';
 const DOCKER_COMPOSE_FORMAT_VERSION = '2';
-const DOCKER_PROMETHEUS_OPERATOR = 'quay.io/coreos/prometheus-operator:v0.30.0';
+const DOCKER_PROMETHEUS_OPERATOR = 'quay.io/coreos/prometheus-operator:v0.30.1';
 const DOCKER_GRAFANA_WATCHER = 'quay.io/coreos/grafana-watcher:v0.0.8';
 
 // Kubernetes versions
@@ -70,7 +70,7 @@ const YARN_VERSION = '1.16.0';
 const NPM_VERSION = '6.9.0';
 
 // Libraries version
-const JIB_VERSION = '1.2.0';
+const JIB_VERSION = '1.3.0';
 
 // all constants used throughout all generators
 
diff --git a/generators/languages/templates/src/main/webapp/i18n/da/user-management.json b/generators/languages/templates/src/main/webapp/i18n/da/user-management.json
index 30c125b6d0..f5c5e48a22 100644
--- a/generators/languages/templates/src/main/webapp/i18n/da/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/da/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Create or edit a user"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "Are you sure you want to delete user {{ login }}?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/en/user-management.json b/generators/languages/templates/src/main/webapp/i18n/en/user-management.json
index 30c125b6d0..f5c5e48a22 100644
--- a/generators/languages/templates/src/main/webapp/i18n/en/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/en/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Create or edit a user"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "Are you sure you want to delete user {{ login }}?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/es/user-management.json b/generators/languages/templates/src/main/webapp/i18n/es/user-management.json
index 66db478dd1..cdb57bb7ac 100644
--- a/generators/languages/templates/src/main/webapp/i18n/es/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/es/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Crear o editar un usuario"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "¿Seguro que quieres eliminar el usuario {{ login }}?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/gl/user-management.json b/generators/languages/templates/src/main/webapp/i18n/gl/user-management.json
index bc76796b63..2e8502e479 100644
--- a/generators/languages/templates/src/main/webapp/i18n/gl/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/gl/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Crear ou editar un usuario"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "Seguro que quere eliminar o usuario {{ login }}?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/hu/user-management.json b/generators/languages/templates/src/main/webapp/i18n/hu/user-management.json
index 013c5c07b8..7024d7a473 100644
--- a/generators/languages/templates/src/main/webapp/i18n/hu/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/hu/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Felhasználó létrehozás vagy módosítás"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "Biztos benne, hogy törölni szeretné az {{ login }} azonosítóval rendelkező felhasználót?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/ja/user-management.json b/generators/languages/templates/src/main/webapp/i18n/ja/user-management.json
index 30c125b6d0..f5c5e48a22 100644
--- a/generators/languages/templates/src/main/webapp/i18n/ja/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/ja/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Create or edit a user"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "Are you sure you want to delete user {{ login }}?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/ko/user-management.json b/generators/languages/templates/src/main/webapp/i18n/ko/user-management.json
index e7b9e14642..6cf5401d00 100644
--- a/generators/languages/templates/src/main/webapp/i18n/ko/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/ko/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "사용자 생성 또는 수정"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "정말로 {{ login }} 사용자를 삭제하시겠습니까?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/pt-pt/user-management.json b/generators/languages/templates/src/main/webapp/i18n/pt-pt/user-management.json
index dad0d35148..0b4ddaba82 100644
--- a/generators/languages/templates/src/main/webapp/i18n/pt-pt/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/pt-pt/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Criar ou editar utilizador"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "Tem a certeza que deseja eliminar o utilizador {{ login }}?"
         },
diff --git a/generators/languages/templates/src/main/webapp/i18n/tr/user-management.json b/generators/languages/templates/src/main/webapp/i18n/tr/user-management.json
index 859f7587ff..b8bd7c9c30 100644
--- a/generators/languages/templates/src/main/webapp/i18n/tr/user-management.json
+++ b/generators/languages/templates/src/main/webapp/i18n/tr/user-management.json
@@ -6,8 +6,8 @@
             "createOrEditLabel": "Kullanıcı oluştur veya düzenle"
         },
         "created": "A new user is created with identifier {{ param }}",
-        "updated": "An user is updated with identifier {{ param }}",
-        "deleted": "An user is deleted with identifier {{ param }}",
+        "updated": "A user is updated with identifier {{ param }}",
+        "deleted": "A user is deleted with identifier {{ param }}",
         "delete": {
             "question": "{{ login }} kullanıcısını silmek istediğinize emin misiniz?"
         },
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs
index 240d777a74..470acdf767 100644
--- a/generators/server/templates/build.gradle.ejs
+++ b/generators/server/templates/build.gradle.ejs
@@ -95,7 +95,7 @@ eclipse {
     sourceSets {
         main {
             java {
-                srcDirs += ["build/generated/source/apt/main"]
+                srcDirs += ["build/generated/sources/annotationProcessor/java/main"]
             }
         }
     }
@@ -255,8 +255,6 @@ repositories {
         }
     }
     <%_ } _%>
-    // TODO To remove after final JHipster release
-    maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
     //jhipster-needle-gradle-repositories - JHipster will add additional repositories
 }
 
diff --git a/generators/server/templates/gradle.properties.ejs b/generators/server/templates/gradle.properties.ejs
index fa3dcca6b6..6afd2ff23a 100644
--- a/generators/server/templates/gradle.properties.ejs
+++ b/generators/server/templates/gradle.properties.ejs
@@ -25,7 +25,7 @@ npm_version=<%= NPM_VERSION %>
 yarn_version=<%= YARN_VERSION %>
 
 # Dependency versions
-jhipster_dependencies_version=3.0.2-SNAPSHOT
+jhipster_dependencies_version=3.0.2
 # The spring-boot version should match the one managed by
 # https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster_dependencies_version}
 spring_boot_version=2.1.5.RELEASE
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index aab5373f67..b2e2724e90 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -41,17 +41,6 @@
             </releases>
         </repository>
 <%_ } _%>
-        <!-- TODO To remove after final JHipster release -->
-        <repository>
-            <id>oss.sonatype.org-snapshot</id>
-            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
-            <releases>
-                <enabled>false</enabled>
-            </releases>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-        </repository>
         <!-- jhipster-needle-maven-repository -->
     </repositories>
 
@@ -91,7 +80,7 @@
         <profile.tls />
 
         <!-- Dependency versions -->
-        <jhipster-dependencies.version>3.0.2-SNAPSHOT</jhipster-dependencies.version>
+        <jhipster-dependencies.version>3.0.2</jhipster-dependencies.version>
         <!-- The spring-boot version should match the one managed by
         https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster-dependencies.version} -->
         <spring-boot.version>2.1.5.RELEASE</spring-boot.version>
diff --git a/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs b/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs
index 8e2a564b29..93abe5e533 100644
--- a/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs
+++ b/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs
@@ -823,7 +823,8 @@
         "http://localhost:*",
         "https://localhost:*",
         "http://127.0.0.1:*",
-        "https://127.0.0.1:*"
+        "https://127.0.0.1:*",
+        "dev.localhost.ionic:*"
       ],
       "webOrigins": ["*"],
       "notBefore": 0,
diff --git a/generators/server/templates/src/main/java/package/config/DatabaseConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/DatabaseConfiguration.java.ejs
index 2f67bc75d1..4377e9e76e 100644
--- a/generators/server/templates/src/main/java/package/config/DatabaseConfiguration.java.ejs
+++ b/generators/server/templates/src/main/java/package/config/DatabaseConfiguration.java.ejs
@@ -116,6 +116,7 @@ import java.time.ZonedDateTime;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.UUID;
 <%_ } _%>
 
 @Configuration
@@ -244,6 +245,8 @@ public class DatabaseConfiguration {
         converters.add(BigDecimalToStringConverter.INSTANCE);
         converters.add(StringToBigDecimalConverter.INSTANCE);
         converters.add(StringToByteConverter.INSTANCE);
+        converters.add(UUIDToStringConverter.INSTANCE);
+        converters.add(StringToUUIDConverter.INSTANCE);
         return new CouchbaseCustomConversions(converters);
     }
 
@@ -344,5 +347,34 @@ public class DatabaseConfiguration {
             return Base64.decodeBase64(source);
         }
     }
+
+    /**
+    * Simple singleton to convert {@link UUID}s to their {@link String} representation.
+    */
+    @WritingConverter
+    public enum UUIDToStringConverter implements Converter<UUID, String> {
+
+        INSTANCE;
+
+        @Override
+        public String convert(UUID source) {
+            return source == null ? null : source.toString();
+        }
+    }
+
+    /**
+    * Simple singleton to convert from {@link String} {@link UUID} representation.
+    */
+    @ReadingConverter
+    public enum StringToUUIDConverter implements Converter<String, UUID> {
+
+        INSTANCE;
+
+        @Override
+        public UUID convert(String source) {
+            return source == null ? null : UUID.fromString(source);
+        }
+
+    }
 <%_ } _%>
 }
diff --git a/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs b/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs
index 6b1cb2f1df..0e301055fc 100644
--- a/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs
+++ b/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs
@@ -20,13 +20,17 @@
 
     <property name="floatType" value="float4" dbms="postgresql, h2"/>
     <property name="floatType" value="float" dbms="mysql, oracle, mssql, mariadb"/>
-    <%_ if (prodDatabaseType === 'postgresql' || devDatabaseType === 'postgresql') { _%>
+    <%_ if (prodDatabaseType === 'postgresql') { _%>
     <property name="clobType" value="longvarchar" dbms="h2"/>
     <%_ } else { _%>
     <property name="clobType" value="clob" dbms="h2"/>
     <%_ } _%>
-    
     <property name="clobType" value="clob" dbms="mysql, oracle, mssql, mariadb, postgresql"/>
+    <%_ if (prodDatabaseType === 'mysql' || prodDatabaseType === 'mariadb') { _%>
+    <property name="uuidType" value="varchar(36)" dbms="h2, <%= prodDatabaseType %>"/>
+    <%_ } else { _%>
+    <property name="uuidType" value="uuid" dbms="h2, <%= prodDatabaseType %>"/>
+    <%_ } _%>
 
     <include file="config/liquibase/changelog/00000000000000_initial_schema.xml" relativeToChangelogFile="false"/>
     <!-- jhipster-needle-liquibase-add-changelog - JHipster will add liquibase changelogs here -->
diff --git a/package-lock.json b/package-lock.json
index 55a47040e4..9d859d5389 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -568,9 +568,9 @@
             "dev": true
         },
         "chevrotain": {
-            "version": "4.3.3",
-            "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.3.3.tgz",
-            "integrity": "sha512-DsmAmF5urXboHHXqEr26Ot//S+l3yrOr7UwwgWQ+aNNlYpmnYK1flxplwJ5cIUgP9toKFsJ0VeLT1sq350A9Hg==",
+            "version": "4.4.0",
+            "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.4.0.tgz",
+            "integrity": "sha512-CS0auzIhlLxo9RCVarVZJIsKj339jJrLIdCbX3rwk/kTu7+VkYdiXiAD8aJOXJEcRc1GGcbOQ587e/85+xLxaA==",
             "requires": {
                 "regexp-to-ast": "0.4.0"
             }
@@ -2689,11 +2689,11 @@
             }
         },
         "jhipster-core": {
-            "version": "3.6.14",
-            "resolved": "https://registry.npmjs.org/jhipster-core/-/jhipster-core-3.6.14.tgz",
-            "integrity": "sha512-X8rQ1hPXMaj9ri4QvbGyUmbMOAsLn2dbJQH14dE/A/4HBT+ODBu83ptQCLXtSmysumyqgHrOiHiLVYa3Qq74rg==",
+            "version": "4.0.0",
+            "resolved": "https://registry.npmjs.org/jhipster-core/-/jhipster-core-4.0.0.tgz",
+            "integrity": "sha512-lxcdMzqgbsdvHnEDnluiXShG5vooMts+jlmY/Op6s3BmkAeu5IhgTNCt1yZRA66O2RuFRv8kmJ8ySlWw2+bwfQ==",
             "requires": {
-                "chevrotain": "4.3.3",
+                "chevrotain": "4.4.0",
                 "fs-extra": "8.0.1",
                 "lodash": "4.17.11",
                 "winston": "3.2.1"
@@ -5331,9 +5331,9 @@
             },
             "dependencies": {
                 "readable-stream": {
-                    "version": "3.3.0",
-                    "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
-                    "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
+                    "version": "3.4.0",
+                    "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
+                    "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
                     "requires": {
                         "inherits": "^2.0.3",
                         "string_decoder": "^1.1.1",
diff --git a/package.json b/package.json
index f971d1c250..63bb171314 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "generator-jhipster",
-    "version": "6.0.1",
+    "version": "6.1.0",
     "description": "Spring Boot + Angular/React in one handy generator",
     "files": [
         "cli",
@@ -59,7 +59,7 @@
         "glob": "7.1.3",
         "gulp-filter": "5.1.0",
         "insight": "0.10.1",
-        "jhipster-core": "3.6.14",
+        "jhipster-core": "4.0.0",
         "js-object-pretty-print": "0.3.0",
         "js-yaml": "3.13.1",
         "lodash": "4.17.11",


Test patch:
diff --git a/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs b/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs
index b03e1a95e7..0671bbe960 100644
--- a/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs
+++ b/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs
@@ -129,7 +129,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 <%_ } _%>
 import java.util.List;
-<%_ if (databaseType === 'cassandra') { _%>
+<%_ if (databaseType === 'cassandra' || fieldsContainUUID === true) { _%>
 import java.util.UUID;
 <%_ } _%>
 <%_ if (databaseType === 'couchbase') { _%>
diff --git a/test-integration/samples/.jhipster/BankAccount.json b/test-integration/samples/.jhipster/BankAccount.json
index bf556dbd1f..b9133f7b36 100644
--- a/test-integration/samples/.jhipster/BankAccount.json
+++ b/test-integration/samples/.jhipster/BankAccount.json
@@ -22,6 +22,10 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "guid",
+            "fieldType": "UUID"
+        },
         {
             "fieldName": "bankNumber",
             "fieldType": "Integer"
diff --git a/test-integration/samples/.jhipster/FieldTestEntity.json b/test-integration/samples/.jhipster/FieldTestEntity.json
index 0635b10132..59d3ef4d33 100644
--- a/test-integration/samples/.jhipster/FieldTestEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestEntity.json
@@ -233,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidTom",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredTom",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageTom",
             "fieldType": "byte[]",
diff --git a/test-integration/samples/.jhipster/FieldTestInfiniteScrollEntity.json b/test-integration/samples/.jhipster/FieldTestInfiniteScrollEntity.json
index 01c015e5e8..519575cf64 100644
--- a/test-integration/samples/.jhipster/FieldTestInfiniteScrollEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestInfiniteScrollEntity.json
@@ -198,6 +198,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "durationHugo",
+            "fieldType": "Duration"
+        },
+        {
+            "fieldName": "durationRequiredHugo",
+            "fieldType": "Duration",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "booleanHugo",
             "fieldType": "Boolean"
@@ -222,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidHugo",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredHugo",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageHugo",
             "fieldType": "byte[]",
diff --git a/test-integration/samples/.jhipster/FieldTestMapstructEntity.json b/test-integration/samples/.jhipster/FieldTestMapstructEntity.json
index 6fd3a8e189..22ca066141 100644
--- a/test-integration/samples/.jhipster/FieldTestMapstructEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestMapstructEntity.json
@@ -198,6 +198,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "durationEva",
+            "fieldType": "Duration"
+        },
+        {
+            "fieldName": "durationRequiredEva",
+            "fieldType": "Duration",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "booleanEva",
             "fieldType": "Boolean"
@@ -222,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidEva",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredEva",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageEva",
             "fieldType": "byte[]",
diff --git a/test-integration/samples/.jhipster/FieldTestPagerEntity.json b/test-integration/samples/.jhipster/FieldTestPagerEntity.json
index d73cb22f85..ae8b6367e8 100644
--- a/test-integration/samples/.jhipster/FieldTestPagerEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestPagerEntity.json
@@ -198,6 +198,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "durationJade",
+            "fieldType": "Duration"
+        },
+        {
+            "fieldName": "durationRequiredJade",
+            "fieldType": "Duration",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "booleanJade",
             "fieldType": "Boolean"
@@ -222,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidJade",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredJade",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageJade",
             "fieldType": "byte[]",
diff --git a/test-integration/samples/.jhipster/FieldTestPaginationEntity.json b/test-integration/samples/.jhipster/FieldTestPaginationEntity.json
index db9bb53efa..4fdeda9f0c 100644
--- a/test-integration/samples/.jhipster/FieldTestPaginationEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestPaginationEntity.json
@@ -198,6 +198,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "durationAlice",
+            "fieldType": "Duration"
+        },
+        {
+            "fieldName": "durationRequiredAlice",
+            "fieldType": "Duration",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "booleanAlice",
             "fieldType": "Boolean"
@@ -222,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidAlice",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredAlice",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageAlice",
             "fieldType": "byte[]",
diff --git a/test-integration/samples/.jhipster/FieldTestServiceClassEntity.json b/test-integration/samples/.jhipster/FieldTestServiceClassEntity.json
index cb3e761f65..5666a7feb1 100644
--- a/test-integration/samples/.jhipster/FieldTestServiceClassEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestServiceClassEntity.json
@@ -198,6 +198,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "durationBob",
+            "fieldType": "Duration"
+        },
+        {
+            "fieldName": "durationRequiredBob",
+            "fieldType": "Duration",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "booleanBob",
             "fieldType": "Boolean"
@@ -222,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidBob",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredBob",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageBob",
             "fieldType": "byte[]",
diff --git a/test-integration/samples/.jhipster/FieldTestServiceImplEntity.json b/test-integration/samples/.jhipster/FieldTestServiceImplEntity.json
index 2c09197c41..bdcb03bd57 100644
--- a/test-integration/samples/.jhipster/FieldTestServiceImplEntity.json
+++ b/test-integration/samples/.jhipster/FieldTestServiceImplEntity.json
@@ -198,6 +198,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "durationMika",
+            "fieldType": "Duration"
+        },
+        {
+            "fieldName": "durationRequiredMika",
+            "fieldType": "Duration",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "booleanMika",
             "fieldType": "Boolean"
@@ -222,6 +233,17 @@
                 "required"
             ]
         },
+        {
+            "fieldName": "uuidMika",
+            "fieldType": "UUID"
+        },
+        {
+            "fieldName": "uuidRequiredMika",
+            "fieldType": "UUID",
+            "fieldValidateRules": [
+                "required"
+            ]
+        },
         {
             "fieldName": "byteImageMika",
             "fieldType": "byte[]",
diff --git a/test/templates/export-jdl/.jhipster/Employee.json b/test/templates/export-jdl/.jhipster/Employee.json
index 25582d4aa3..9a064a710d 100644
--- a/test/templates/export-jdl/.jhipster/Employee.json
+++ b/test/templates/export-jdl/.jhipster/Employee.json
@@ -24,6 +24,10 @@
             "fieldName": "employeeId",
             "fieldType": "Long"
         },
+        {
+            "fieldName": "employeeUuid",
+            "fieldType": "UUID"
+        },
         {
             "fieldName": "firstName",
             "javadoc": "The firstname attribute.",
diff --git a/test/templates/import-jdl/jdl.jdl b/test/templates/import-jdl/jdl.jdl
index ebedec62b9..a13fcdacf0 100644
--- a/test/templates/import-jdl/jdl.jdl
+++ b/test/templates/import-jdl/jdl.jdl
@@ -1,5 +1,6 @@
 entity Region {
 	regionName String
+	guid UUID
 }
 
 entity Country {