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 for Rider plugin #403

Closed
r-bennett opened this issue Jun 25, 2019 · 3 comments
Closed

Gradle fails to resolve java-compiler-ant-tasks for Rider plugin #403

r-bennett opened this issue Jun 25, 2019 · 3 comments
Assignees
Milestone

Comments

@r-bennett
Copy link

I'm trying to get started writing an Intellij platform plugin for Rider as per https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html#creating-a-gradle-based-intellij-platform-plugin-with-new-project-wizard and https://www.jetbrains.com/help/resharper/sdk/Products/Rider.html#plugin-project-jvm

My build.gradle is:

plugins {
    id 'org.jetbrains.intellij' version '0.4.9'
}

group 'co.uk.my_company'
version '1.0'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

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

intellij {
    type = 'RD'
    version '2019.1.2'
    downloadSources = false
}
patchPluginXml {
    changeNotes """
      Add change notes here.<br>
      <em>most HTML tags may be used</em>"""
}

The runIde task then gives me the following error:

12:17:18: Executing task 'runIde'...

:compileJava UP-TO-DATE
:patchPluginXml
:processResources UP-TO-DATE
:classes UP-TO-DATE
:instrumentCode FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':instrumentCode'.
> Could not resolve all files for configuration ':detachedConfiguration2'.
   > Could not find com.jetbrains.intellij.java:java-compiler-ant-tasks:191.7141.354.
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
         https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
         https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
         https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
         file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/com.jetbrains.intellij.java/java-compiler-ant-tasks/191.7141.354/ivy-191.7141.354.xml
         file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/java-compiler-ant-tasks-191.7141.354-withKotlin.xml
         file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/com.jetbrains.intellij.java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
         file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/java-compiler-ant-tasks.jar
         https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
         https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
         https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
         https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
         https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
         https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.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

BUILD FAILED in 1s
4 actionable tasks: 2 executed, 2 up-to-date
Could not find com.jetbrains.intellij.java:java-compiler-ant-tasks:191.7141.354.
Searched in the following locations:
    https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
    https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
    https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
    https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
    file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/com.jetbrains.intellij.java/java-compiler-ant-tasks/191.7141.354/ivy-191.7141.354.xml
    file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/java-compiler-ant-tasks-191.7141.354-withKotlin.xml
    file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/com.jetbrains.intellij.java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
    file:/C:/Users/labuser/IdeaProjects/test_plugin/build/riderRD-2019.1.2/java-compiler-ant-tasks.jar
    https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
    https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
    https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
    https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
    https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.pom
    https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/191.7141.354/java-compiler-ant-tasks-191.7141.354.jar
Required by:
    project :
12:17:19: Task execution finished 'runIde'.

Have tried a few different Rider versions, but I can't see any com.jetbrains.intellij.rider build numbers which have a matching com.jetbrains.intellij.java:java-compiler-ant-tasks version available on https://www.jetbrains.com/intellij-repository/releases

It runs fine as an IDEA plugin.

Looks similar to #369 and #361 but for Rider rather than CLion

@liiri
Copy link

liiri commented Oct 16, 2019

@r-bennett did you have any luck with this? I'm getting the same issue, tried will all kind of Rider versions

@liiri
Copy link

liiri commented Oct 16, 2019

I managed to find how to work around this problem. Add the following section to your build.gradle

instrumentCode {
    compilerVersion = "192.6817.32" // latest build of com.jetbrains.intellij.java from https://www.jetbrains.com/intellij-repository/releases/
}

Full working plugin example: https://github.com/ReallyLiri/interface-pairing-rider-plugin

@zolotov zolotov self-assigned this Oct 30, 2019
@zolotov zolotov added this to the 0.4.11 milestone Oct 30, 2019
@zolotov
Copy link
Member

zolotov commented Oct 30, 2019

will be fixed in the next update for Rider-2019.3-SNAPSHOT and all further releases. For previous builds please use the workaround described in the comments above.

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

3 participants