jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

checkstyleMain FAILED #11402

Closed vw98075 closed 4 years ago

vw98075 commented 4 years ago
Overview of the issue

with a test framework selected, I get an error on "checkstyleMain FAILED". I have this problem on UAA, Gateway as well as microservices.


> Task :checkstyleMain FAILED
[ant:checkstyle] [ERROR] /.../uaa/src/main/java/com/example/microservices/uaa/config/CacheConfiguration.java:68:44: http:// URLs are not allowed but got 'http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html'. Use https:// instead. [NoHttp]

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleMain'.
> Checkstyle rule violations were found. See the report at: file:///.../uaa/build/reports/checkstyle/main.html
  Checkstyle files with violations: 1
  Checkstyle violations by severity: [error:1]
Motivation for or Use Case

Need to make a build

Reproduce the error

Running the build comand "./gradlew build".

Related issues
Suggest a Fix
JHipster Version(s)

6.7.1

JHipster configuration
uaa@0.0.0 /home/oem/Workspace-dev/2020-spring-microservices-with-kubernetes/uaa
├── generator-jhipster@6.7.1 
└─┬ generator-jhipster-spring-cloud-stream@1.0.0
  └── generator-jhipster@6.7.1  deduped
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.example.microservices.uaa"
    },
    "jhipsterVersion": "6.7.1",
    "applicationType": "uaa",
    "baseName": "uaa",
    "packageName": "com.example.microservices.uaa",
    "packageFolder": "com/example/microservices/uaa",
    "serverPort": "9999",
    "authenticationType": "uaa",
    "cacheProvider": "hazelcast",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "messageBroker": "kafka",
    "serviceDiscoveryType": false,
    "buildTool": "gradle",
    "enableSwaggerCodegen": false,
    "embeddableLaunchScript": false,
    "creationTimestamp": 1582847455109,
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [
      {
        "name": "generator-jhipster-vuejs2",
        "version": "1.1.12"
      },
      {
        "name": "generator-jhipster-spring-cloud-stream",
        "version": "1.0.0"
      }
    ],
    "enableTranslation": false,
    "clientPackageManager": "npm",
    "blueprints": [],
    "skipClient": true
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Environment and Tools

openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~16.04-b08) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

git version 2.7.4

node: v10.0.0

npm: 6.13.7

yeoman: 3.1.0

yarn: 1.9.4

Docker version 18.06.1-ce, build e68fc7a

docker-compose version 1.8.0, build unknown

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
atomfrede commented 4 years ago

Looks like we forgot to replace some http with https in our templates (just documentation, so not critical), but the no http plugin is quite strict

atomfrede commented 4 years ago

Are you sure you have used to generate the latest jhipster version? In our templates we have https. See https://github.com/jhipster/generator-jhipster/blob/cdb9ef09d7fb821402504ebc1c578c82a9026a93/generators/server/templates/src/main/java/package/config/CacheConfiguration.java.ejs#L333 Can you check your CacheConfiguration file? Did you do an update from an older version?

vw98075 commented 4 years ago

The error doesn't occur after changing from http to https on the line. The version of JHispter isn't newly installed, but upgrade from an older version.

atomfrede commented 4 years ago

Did you choose to not override the cache configuration file? Will close this issue.

vw98075 commented 4 years ago

The error occurs right out of the box. I need to modify the file to get rid of the error. I don't know that this one shall be closed without change JHipster code because it causes a compile problem for the end-users.

atomfrede commented 4 years ago

When you do an update and keep the old file it will happen as we have integrated the no http plugin. For newly created project it should not happen. Can you reproduce the problem with a newly generated project?

vw98075 commented 4 years ago

I don't know whether there is some miscommunication or not. I upgraded the version with the command displayed when I started an older version of jhipster. The error was from projects generated with the latest version 6.7.1 last night. On Friday, February 28, 2020, 08:52:57 AM PST, Frederik Hahne notifications@github.com wrote:

When you do an update and keep the old file it will happen as we have integrated the no http plugin. For newly created project it should not happen. Can you reproduce the problem with a newly generated project?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.