Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'compilerClassPathFromMaven' doesn't have a configured value. #1003

Closed
DemonWitch opened this issue May 30, 2022 · 20 comments
Closed

'compilerClassPathFromMaven' doesn't have a configured value. #1003

DemonWitch opened this issue May 30, 2022 · 20 comments
Assignees
Labels

Comments

@DemonWitch
Copy link

when i use 1.6.0 , and exexcute "runIde", i got this error

A problem was found with the configuration of task ':instrumentCode' (type 'IntelliJInstrumentCodeTask').

  • In plugin 'org.jetbrains.intellij' type 'org.jetbrains.intellij.tasks.IntelliJInstrumentCodeTask' property 'compilerClassPathFromMaven' doesn't have a configured value.

macos
arm64

@YannCebron
Copy link
Member

please link your project, or provide at minimum your target platform type/version used

@DemonWitch
Copy link
Author

DemonWitch commented May 31, 2022

here is my 'build.gradle.kts':

plugins {
    id("org.jetbrains.intellij") version "1.6.0"
    java
}
intellij {
    version.set("2022.1.1")
}

and my idea version is also 2022.1.1
my os is macos 12.3.1 arm64

@hsz
Copy link
Member

hsz commented Jun 1, 2022

@DemonWitch, please provide full logs.
Has your environment access to Internet?

@ekudel
Copy link

ekudel commented Jun 2, 2022

I have the same issue. It seems to happen time to time.

  • IntelliJ version: 213-EAP-SNAPSHOT
  • IntelliJ-Gradle plugin's version: 1.6.0
  • Gradle: 7.4.2
  • Internet works

I also get the following messages before the failure:

[gradle-intellij-plugin :common-rest-client:common-rest-client:instrumentCode] Cannot resolve java-compiler-ant-tasks in version: 213-EAP-SNAPSHOT
[gradle-intellij-plugin :common-rest-client:common-rest-client:instrumentCode] Cannot resolve java-compiler-ant-tasks in version: 213
Download https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-gui-forms-rt/212.5712.53/java-gui-forms-rt-212.5712.53.jar, took 365 ms (30.58 kB)
Download https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-instrumentation-util/212.5712.53/java-compiler-instrumentation-util-212.5712.53.jar, took 392 ms (55.49 kB)
Download https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-gui-forms-compiler/212.5712.53/java-gui-forms-compiler-212.5712.53.jar, took 532 ms (137.45 kB)
[gradle-intellij-plugin :common-rest-client:common-rest-client:instrumentCode] Cannot resolve java-compiler-ant-tasks in version: 212.5712.53

@ekudel
Copy link

ekudel commented Jun 2, 2022

Hmm... I've switched to mobile internet and it has started working. So the reason is probably that the JetBrains' resource is not accessible in some situations :(

@DemonWitch
Copy link
Author

> Task :instrumentCode
[gradle-intellij-plugin :koca-plugin:instrumentCode] Cannot resolve java-compiler-ant-tasks in version: 212.5080.55
[gradle-intellij-plugin :koca-plugin:instrumentCode] Cannot resolve java-compiler-ant-tasks in version: 212.5080.55

> Task :instrumentCode FAILED
6 actionable tasks: 3 executed, 3 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':instrumentCode' (type 'IntelliJInstrumentCodeTask').
  - In plugin 'org.jetbrains.intellij' type 'org.jetbrains.intellij.tasks.IntelliJInstrumentCodeTask' property 'compilerClassPathFromMaven' doesn't have a configured value.
    
    Reason: This property isn't marked as optional and no value has been configured.
    
    Possible solutions:
      1. Assign a value to 'compilerClassPathFromMaven'.
      2. Mark property 'compilerClassPathFromMaven' as optional.

My Internet works fine, and any other version(1.5.3 1.4.0 and so on) can run successfully

I've also switched to mobile internet but I still got this error.
Maybe @ekudel. is right, the reason is probably that the JetBrains' resource is not accessible in some situations
Or maybe not? I have no idea.

@ekudel
Copy link

ekudel commented Jun 10, 2022

I tried to run "gradlew --refresh-dependencies" and it didn't help

@ekudel
Copy link

ekudel commented Jun 13, 2022

Actually it probably was just a coincidence. It may not be connected with the resources availability. I've just faced the following:

  1. Got the error
  2. Enabled VPN
  3. Got the same error
  4. Disabled VPN
  5. The error disappeared

@hsz
Copy link
Member

hsz commented Jun 21, 2022

Thank you for providing more details on that! I'll close this issue as not reproducible, networking issue.

@hsz hsz closed this as completed Jun 21, 2022
@ekudel
Copy link

ekudel commented Jun 21, 2022

Actually my last comment pointed that this is probably not networking issue, because it started working after I just enable and then disable VPN. Also please note that this issue appeared about 1-2 months ago (I'm not sure about the exact moment) and never appeared previously.

However I haven't seen the issue since my last comment (about a week).

hsz added a commit that referenced this issue Jun 21, 2022
@hsz hsz reopened this Jun 22, 2022
@hsz
Copy link
Member

hsz commented Jun 22, 2022

Could you please verify if the latest snapshot release fixed this issue?
https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#snapshot-release

@hsz
Copy link
Member

hsz commented Jun 22, 2022

Also – which Java version do you use?

@hsz hsz added bug and removed cannot recreate labels Jun 22, 2022
@SingingBush
Copy link

this is definitely not a network problem. I've just encountered it locally when doing some work to update a plugin to use Intellij 2022.1 as target version and Kotlin api version to 1.6 (because Intellij 2022.1 is bundled with bundled Kotlin 1.6.20):

> Task :instrumentTestCode FAILED
:instrumentTestCode (Thread[Execution worker for ':',5,main]) completed. Took 2.889 secs.

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':instrumentTestCode' (type 'IntelliJInstrumentCodeTask').
  - In plugin 'org.jetbrains.intellij' type 'org.jetbrains.intellij.tasks.IntelliJInstrumentCodeTask' property 'compilerClassPathFromMaven' doesn't have a configured value.
    
    Reason: This property isn't marked as optional and no value has been configured.
    
    Possible solutions:
      1. Assign a value to 'compilerClassPathFromMaven'.
      2. Mark property 'compilerClassPathFromMaven' as optional.
    
    Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#value_not_set for more details about this problem.

I'm using gradle-intellij-plugin 1.5.3 as 1.6.0 won't work due to #998

@SingingBush
Copy link

Seems that this problem may have been due to a previous error in which the Java process had not finished. After killing all my java processes and re-running I was able to successfully build without this problem.

@hsz
Copy link
Member

hsz commented Jun 25, 2022

After a pretty exhaustive investigation, I have spotted two very different reasons that end up with such an error:

  1. When running Gradle using Java 11.0.2, there's an issue with fetching resources via HTTPS – described in JDK-8220723 issue. To fix that, update your environment t use the latest available patch of your JDK.
  2. For isolated environments, like in the case of a corporate network that relies on an internal Maven repo that mirrors all necessary dependencies, the plugin-related repositories were pushed to the top of the list that Gradle used for resolving dependencies. Now I have changed to keep the project-level custom repository on the top, then use plugin-level repositories and common public repositories, like Maven Central, Google, etc.

@SingingBush, is it possible to reproduce your case (in case it wasn't caused by any of the above issues)? A full stack trace, and running task with at least --info would be helpful here.

Folks, please run your tasks with the --refresh-dependencies flag to ensure it re-fetches the latest available 1.7.0-SNAPSHOT as it may become stale due to the unchanged version number.

@SingingBush
Copy link

I've pushed a branch with the plugin updated to 1.7.0-SNAPSHOT it results in a test that fails due to a java.lang.NoClassDefFoundError yet the change intellij-dlanguage/intellij-dlanguage@d6b6110 is only the update to plugin version.

JDK's used are:
11.0.15 for the 2022.1.* builds
17.0.3 for the EAP_SNAPSHOT build

of course being Github Action there is no mirror for maven

https://github.com/intellij-dlanguage/intellij-dlanguage/actions/runs/2561940012

@SingingBush
Copy link

I've pushed a commit that adds --debug to the gradle build. See builds here: https://github.com/intellij-dlanguage/intellij-dlanguage/actions/runs/2562056971

@hsz hsz closed this as completed Jul 6, 2022
@ralphhuang
Copy link

ralphhuang commented Sep 9, 2022

jdk11.0.2 has this error
jdk11.0.16 error disappeared

-----other env
'org.jetbrains.intellij' version '1.9.0'
MAC OSX
gradle 7.5.1

@adietish
Copy link

jdk11.0.2 has this error jdk11.0.16 error disappeared

-----other env 'org.jetbrains.intellij' version '1.9.0' MAC OSX gradle 7.5.1

I can confirm the solution. With java.net 11.0.2 I ran into this error while I didn't when I used liberica jdk 11.0.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants