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.53k stars 4.02k forks source link

Clash with IntelliJ IDEA output? #7126

Closed wiradikusuma closed 6 years ago

wiradikusuma commented 6 years ago
Overview of the issue
$ ./gradlew
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileScala'.
> scala.collection.immutable.$colon$colon.hd$1()Ljava/lang/Object;
Motivation for or Use Case

Scala should be supported.

Reproduce the error
  1. Create new JHipster Gradle project
  2. Add Scala support: a. apply plugin: 'scala' b. Follow http://stackoverflow.com/a/23261076/193550 c. compile "org.scala-lang:scala-library:2.12.4"
  3. Import and open in IntelliJ IDEA
  4. Create some Scala class there
  5. ./gradlew

(If you don't see the error: Ctrl-C, update the Scala class to trigger IDEA compilation, ./gradlew again)

Related issues

Nothing that I know of.

Suggest a Fix

Clean the project before running it (but annoying):

  1. ./gradlew clean
  2. ./gradlew (don't forget to run npm/yarn as well)
JHipster Version(s)

4.14.0

JHipster configuration
Using JHipster version installed locally in current project's node_modules
Executing jhipster:info
Options: 
Welcome to the JHipster Information Sub-Generator

##### **JHipster Version(s)**

```
itb@0.0.0 /Users/wiradikusuma/Documents/code/itb
└── generator-jhipster@4.14.0 

```

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**

<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "my.com.mandrill.itb",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "4.14.0",
    "baseName": "itb",
    "packageName": "my.com.mandrill.itb",
    "packageFolder": "my/com/mandrill/itb",
    "serverPort": "8080",
    "authenticationType": "session",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "mariadb",
    "prodDatabaseType": "mariadb",
    "searchEngine": "elasticsearch",
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "gradle",
    "enableSocialSignIn": false,
    "enableSwaggerCodegen": false,
    "rememberMeKey": "replaced-by-jhipster-info",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ]
  }
}
</pre>
</details>

##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>

</pre>
</details>

##### **Environment and Tools**

java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

git version 2.16.0

node: v9.5.0

npm: 5.6.0

yarn: 1.3.2

Congratulations, JHipster execution is complete!
Entity configuration(s) entityName.json files generated in the .jhipster directory

Not applicable.

Browsers and Operating System

macOS, Chrome.

atomfrede commented 6 years ago

Regarding your issue title, have you setup idea correctly? In particular delegating all idea tasks to gradle? https://www.jetbrains.com/help/idea/gradle.html#delegate_build_gradle

Furthermore if you have changed the output folder of scala and java as in the stackoverflow post, you work against the gradle defaults (since 4.0) where each language has a seperate output folder. https://docs.gradle.org/4.0/release-notes.html#build-cache-improvements

If you can share your build.gradle that could help, but I think this is not a jhipster issue, so stackoverflow might be the better choice to get help here.

deepu105 commented 6 years ago

Yes please use stack overflow for questions and support, this is only for bugs and features