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

Could not find com.jetbrains.intellij.java:java-compiler-ant-tasks:211.4961.33. #592

Closed
NekoCaffeine opened this issue Jan 29, 2021 · 17 comments
Assignees
Milestone

Comments

@NekoCaffeine
Copy link

Hi, I am migrating my plugin to idea 2021.1 Pre, but I can't finish the build.

build.gradle

buildscript {
  repositories {
    mavenCentral()
    maven { url "https://plugins.gradle.org/m2/" }
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url 'https://dl.bintray.com/jetbrains/intellij-plugin-service' }
    maven { url "https://jetbrains.bintray.com/intellij-third-party-dependencies" }
  }
}

plugins {
    id 'java'
    id "org.jetbrains.intellij" version "0.6.5"
}

log

Execution failed for task ':instrumentCode'.
> Could not resolve all files for configuration ':detachedConfiguration3'.
   > Could not find com.jetbrains.intellij.java:java-compiler-ant-tasks:211.4961.33.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/f97fbeb72fc61318adbf062e2e648d57c00adf27/ideaIC-LATEST-EAP-SNAPSHOT/com.jetbrains.intellij.java/java-compiler-ant-tasks/211.4961.33/ivy-211.4961.33.xml
       - file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/f97fbeb72fc61318adbf062e2e648d57c00adf27/ideaIC-LATEST-EAP-SNAPSHOT/java-compiler-ant-tasks-211.4961.33-withKotlin-withSources-withoutAnnotations.xml
       - file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/com.jetbrains.intellij.java/java-compiler-ant-tasks-211.4961.33.xml
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
@zolotov
Copy link
Member

zolotov commented Jan 29, 2021

what is "idea 2021.1 Pre"? What exactly build you use and how?

@NekoCaffeine
Copy link
Author

NekoCaffeine commented Jan 29, 2021

what is "idea 2021.1 Pre"?

intellij {
    type 'IC'
    plugins = ['java']
}

IntelliJ IDEA 2021.1 EAP (Community Edition)
Build #IC-211.4961.33, built on January 28, 2021

What exactly build you use and how?

gradle build or Execute the 'build' task in idea

@NekoCaffeine
Copy link
Author

full log

4:08:39: Executing task 'build'...

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
4 actionable tasks: 1 executed, 3 up-to-date

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:211.4961.33.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/f97fbeb72fc61318adbf062e2e648d57c00adf27/ideaIC-LATEST-EAP-SNAPSHOT/com.jetbrains.intellij.java/java-compiler-ant-tasks/211.4961.33/ivy-211.4961.33.xml
       - file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/f97fbeb72fc61318adbf062e2e648d57c00adf27/ideaIC-LATEST-EAP-SNAPSHOT/java-compiler-ant-tasks-211.4961.33-withKotlin-withSources-withoutAnnotations.xml
       - file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/com.jetbrains.intellij.java/java-compiler-ant-tasks-211.4961.33.xml
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
       - https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.4961.33/java-compiler-ant-tasks-211.4961.33.pom
     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 11s
4:08:50: Task execution finished 'build'.

@NekoCaffeine
Copy link
Author

Okay, I spent two minutes disabling this task better than trying to fix it.
I may be a victim of JetBrains' paid users.

@NekoCaffeine
Copy link
Author

IntelliJ IDEA 2021.1 EAP Pre 1

I think my emphasis on Pre is tantamount to an emphasis on EAP.
You should try to reproduce the issue in the latest version instead of pointlessly obsessing over a version number description.

Thank you very much for your reply, I won't come back here to give feedback on my problem next time.

@NekoCaffeine
Copy link
Author

Anyone who has taken a look at my posted log should be able to see "211.4961.33".
image

@zolotov
Copy link
Member

zolotov commented Jan 31, 2021

Try to set version to LATEST-EAP-SNAPSHOT. Does it help?

intellij {
  verison 'LATEST-EAP-SNAPSHOT'
}

Anyone who has taken a look at my posted log should be able to see "211.4961.33".

I believe the key is in how you set it.

Thanks for the report by the way.

@zolotov zolotov reopened this Jan 31, 2021
@zolotov zolotov self-assigned this Jan 31, 2021
@NekoCaffeine
Copy link
Author

Try to set version to LATEST-EAP-SNAPSHOT. Does it help?

2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file 'D:\Project\NekoCaffeine\Amadeus\Chocological\chocological-idea\build.gradle' line: 55
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred evaluating root project 'chocological-idea'.
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > No signature of method: build_78jqczz4mzwj4r8bt0vqmlw14.intellij() is applicable for argument types: (build_78jqczz4mzwj4r8bt0vqmlw14$_run_closure5) values: [build_78jqczz4mzwj4r8bt0vqmlw14$_run_closure5@5a274b4c]
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org

@zolotov
Copy link
Member

zolotov commented Feb 2, 2021

2021-02-02T06:53:17.203+0800 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file 'D:\Project\NekoCaffeine\Amadeus\Chocological\chocological-idea\build.gradle' line: 55

Please attach build.gradle. I cannot interpret the output without it.

Also, note, there is a typo in my snippet of code, there is verison instead of version.

@MykytaKostiuk
Copy link

MykytaKostiuk commented Feb 5, 2021

Hello @zolotov , @NekoCaffeine
Unfortunately, we faced the same issue.
Below you could find the stacktrace when an attempt to run "build"
version = "LATEST-EAP-SNAPSHOT".

Execution failed for task ':rt-ant:instrumentCode'.
> Could not resolve all files for configuration ':rt-ant:detachedConfiguration3'.
   > Could not find com.jetbrains.intellij.java:java-compiler-ant-tasks:211.5538.20.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.5538.20/java-compiler-ant-tasks-211.5538.20.pom
       - https://repo.maven.apache.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.5538.20/java-compiler-ant-tasks-211.5538.20.pom
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.5538.20/java-compiler-ant-tasks-211.5538.20.pom
       - file:/home/mykyta/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/368b20ac7c5f317f591f7517d78f89d25cd19b4a/ideaIC-LATEST-EAP-SNAPSHOT/com.jetbrains.intellij.java/java-compiler-ant-tasks/211.5538.20/ivy-211.5538.20.xml
       - file:/home/mykyta/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/368b20ac7c5f317f591f7517d78f89d25cd19b4a/ideaIC-LATEST-EAP-SNAPSHOT/java-compiler-ant-tasks-211.5538.20-withKotlin-withSources-withoutAnnotations.xml
       - https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.5538.20/java-compiler-ant-tasks-211.5538.20.pom
       - https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-third-party-dependencies/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.5538.20/java-compiler-ant-tasks-211.5538.20.pom
       - https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/jetbrains/intellij/java/java-compiler-ant-tasks/211.5538.20/java-compiler-ant-tasks-211.5538.20.pom
     Required by:
         project :rt-ant

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    idea
    kotlin("jvm")
    id("org.jetbrains.intellij") version "0.6.5"
}

sourceSets.main {
    java.srcDirs(
        file("src"),
        file("gen")
    )
    resources.srcDir(file("resources"))
}

allprojects {
    apply {
        plugin("java")
    }

    repositories {
        jcenter()
        mavenCentral()
    }

    java {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }

}

intellij {
    type = "IU"
    version = "LATEST-EAP-SNAPSHOT"
    pluginName = pluginName_
    downloadSources = false
    updateSinceUntilBuild = true

    // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
    setPlugins(*platformPlugins.split(',').map(String::trim).filter(String::isNotEmpty).toTypedArray())
}

tasks {

    buildSearchableOptions {
        enabled = false
    }

    withType<KotlinCompile>().configureEach {
        kotlinOptions {
            jvmTarget = sourceVersion
            apiVersion = kotlinApiVersion
            languageVersion = kotlinApiVersion
        }
    }

    runIde {
        jvmArgs = listOf(intellijJvmArgs)
    }

    patchPluginXml {
        version(pluginVersion)
        sinceBuild(pluginSinceBuild)
        untilBuild(pluginUntilBuild)
    }

    runPluginVerifier {
        ideVersions(pluginVerifierIdeVersions)
    }

    clean {
        doFirst {
            delete("out")
        }
    }
}

dependencies {

    implementation(kotlin("stdlib"))
    implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinReflect")
    implementation("org.jsoup:jsoup:$jsoupVersion")
    implementation("com.wutka:dtdparser:$dtdparserVersion")
    implementation("commons-io:commons-io:$commonsIOVersion")
    implementation("com.google.code.findbugs:jsr305:$findbugsVersion")
    implementation("org.apache.maven:maven-model:$mavenModelVersion")
    implementation("commons-codec:commons-codec:$commonsCodecVersion")
    implementation("org.apache.commons:commons-lang3:$commonsLang3Version")
    implementation("com.github.ben-manes.caffeine:caffeine:$caffeineVersion")
    implementation("org.apache.commons:commons-collections4:$commonsCollections4Version")

    implementation("org.apache.solr:solr-solrj:$solrjVersion") {
        exclude("org.slf4j", "slf4j-api")
        exclude("org.apache.httpcomponents", "httpclient")
        exclude("org.apache.httpcomponents", "httpcore")
        exclude("org.apache.httpcomponents", "httpmime")
    }

    implementation(project(":rt-ant"))
}

If you need any additional config info, please, let me know.

@NekoCaffeine
Copy link
Author

@MykytaKostiuk
You can finish the build by disabling the faulty task.
Here is that temporary solution, add it to build.gradle.

instrumentCode.enabled = false
postInstrumentCode.enabled = false

@NekoCaffeine
Copy link
Author

Incidentally, I have absolutely no use for these two stupid tasks.

@zolotov
Copy link
Member

zolotov commented Feb 10, 2021

@MykytaKostiuk thank you for the details. Indeed, as a workaround you can disable instrumentation. Do this if you don't use GUI Deisgner and ok with temporary disabling nullability assertions. In order to disable instrumentation use intellij { instrumentCode = false } option.

@zolotov zolotov added this to the 0.7.0 milestone Feb 10, 2021
@zolotov
Copy link
Member

zolotov commented Feb 10, 2021

@MykytaKostiuk the exception is coming from :rt-ant project: Execution failed for task ':rt-ant:instrumentCode'. But version = "LATEST-EAP-SNAPSHOT" is set only for root project. Is there any other place with intellij plugin applying in your project? If so, could you set version = "LATEST-EAP-SNAPSHOT" for it too? It's more correct workaround rather than disabling instrumenting tasks.

@MykytaKostiuk
Copy link

@zolotov ,
Hello, I've added

intellij {
    version = "LATEST-EAP-SNAPSHOT"
}

to the :rt-ant project as well and that helped, thanks!

cc @NekoCaffeine

@zolotov
Copy link
Member

zolotov commented Feb 10, 2021

@MykytaKostiuk thanks for the verification. the fix is coming in the next 0.7 version

zolotov added a commit that referenced this issue Feb 10, 2021
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