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

Gradle fails to resolve java-compiler-ant-tasks #361

Closed
Janrupf opened this issue Jan 28, 2019 · 9 comments
Closed

Gradle fails to resolve java-compiler-ant-tasks #361

Janrupf opened this issue Jan 28, 2019 · 9 comments

Comments

@Janrupf
Copy link

Janrupf commented Jan 28, 2019

I'm trying to make a Clion plugin but gradle failes to resolve dependencies required for instrumentCode.
It can find java-compiler-ant-tasks.

Gradle output:

> Task :compileJava
> Task :patchPluginXml
> Task :processResources
> Task :classes
> Task :instrumentCode FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':instrumentCode'.
> Could not resolve all files for configuration ':detachedConfiguration3'.
   > Could not find com.jetbrains.intellij.java:java-compiler-ant-tasks:183.5153.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.pom
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.jar
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.pom
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.jar
       - file:/home/<username>/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.clion/clion/2018.3.3/909c28051adddf94bc5b2dca0d8cafe646df6f54/clion-2018.3.3/com.jetbrains.intellij.java/java-compiler-ant-tasks/183.5153/ivy-183.5153.xml
       - file:/home/<username>/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.clion/clion/2018.3.3/909c28051adddf94bc5b2dca0d8cafe646df6f54/clion-2018.3.3/java-compiler-ant-tasks-183.5153-withKotlin-withSources.xml
       - file:/home/<username>/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.clion/clion/2018.3.3/909c28051adddf94bc5b2dca0d8cafe646df6f54/clion-2018.3.3/com.jetbrains.intellij.java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.jar
       - file:/home/<username>/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.clion/clion/2018.3.3/909c28051adddf94bc5b2dca0d8cafe646df6f54/clion-2018.3.3/java-compiler-ant-tasks.jar
       - https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.pom
       - https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.jar
       - https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.pom
       - https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.jar
       - https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.pom
       - https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/183.5153/java-compiler-ant-tasks-183.5153.jar
     Required by:
         project :

Build script:

plugins {
    id 'java'
    id 'org.jetbrains.intellij' version '0.4.2'
}

group 'net.jan'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

intellij {
    version '2018.3.3'
    type 'CL'
}
patchPluginXml {
    changeNotes """
      Add change notes here.<br>
      <em>most HTML tags may be used</em>"""
}
@amakeev
Copy link
Member

amakeev commented Jan 28, 2019

CLion builds using gradle-intellij-plugin are currently officially supported since 2019.1 EAP.
2018.3 artifacts might become available soon, since version 2018.3.4.

Meanwhile, please try using 191-EAP-SNAPSHOT as CLion version.

@Janrupf
Copy link
Author

Janrupf commented Jan 28, 2019

Ok, thank you. I guess it wont matter if I use them :). When we are at it already, is there any documentation about the Clion specific modules?

EDIT: Can confirm changing to EAP fixed the issue, however, what I'm trying todo is still not working... even copied the docs and it wont work.

@amakeev
Copy link
Member

amakeev commented Jan 29, 2019

I'm afraid not at the moment, since there is no official public API for CLion yet.

Should you have question feel free to ask either in the CLion's community forum or in the IntelliJ Platform SDK tracker.

@breandan
Copy link
Contributor

I also ran into this problem and tried to use version=CL-191-EAP-SNAPSHOT as suggested by @amakeev, but encountered the following error:


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'hatchery'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
   > Could not find com.jetbrains.intellij.clion:clion:191.4738.15.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.pom
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.jar
       - https://jitpack.io/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.pom
       - https://jitpack.io/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.jar
       - https://jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.pom
       - https://jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.jar
       - https://jcenter.bintray.com/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.pom
       - https://jcenter.bintray.com/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.jar
       - https://raw.githubusercontent.com/rosjava/rosjava_mvn_repo/master/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.pom
       - https://raw.githubusercontent.com/rosjava/rosjava_mvn_repo/master/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.jar
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.pom
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/191.4738.15/clion-191.4738.15.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s

@zolotov
Copy link
Member

zolotov commented Feb 15, 2019

@breandan please share the entire build.gradle. the report looks weird. If you set CL-191-EAP-SNAPSHOT, the plugin cannot request 191.4738.15, it just cannot know this version.

@breandan
Copy link
Contributor

Here is the full build.gradle.kts script. This is the specific line I've been having trouble with. Tried setting the version to version = "CL-191-EAP-SNAPSHOT" directly, but no luck.

@zolotov
Copy link
Member

zolotov commented Feb 18, 2019

@breandan I don't see any problems in the build.gradle file. Anyway, check where 191.4738.15 comes from. Do you have this version defined anywhere?

@zolotov
Copy link
Member

zolotov commented Feb 28, 2019

@breandan any updates on it?

@breandan
Copy link
Contributor

I was able to resolve this after updating to version 0.4.3 of the gradle-intellij-plugin, and adding the EAP-SNAPSHOT suffix. Thank you.

@zolotov zolotov closed this as completed Feb 28, 2019
Lawrencemm added a commit to Lawrencemm/conan-clion-plugin that referenced this issue Jul 9, 2021
It isn't actually officially supported with gradle-intellij-plugin: JetBrains/intellij-platform-gradle-plugin#361 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants