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 clean task fails in gradle [version 5.6.4 and 6.0.1] #12014

Closed
netbeansuser2019 opened this issue Jan 27, 2020 · 1 comment
Closed

Gradle clean task fails in gradle [version 5.6.4 and 6.0.1] #12014

netbeansuser2019 opened this issue Jan 27, 2020 · 1 comment
Labels

Comments

@netbeansuser2019
Copy link

Seems that from version 5.4 (e.g. 5.2.1 seems OK), but properly tested with 5.6.4 and 6.0.1.

Gradle: 5.6.4 for wrapped 6.0.1
JVM: 11.0.2 (Oracle Corporation 11.0.2+9)
IDE: Netbeans 11.2

Expected Behavior

Use prior proper handling of file-existence-checking or locking so do not fail in IDE clean task or at least report that as warn not as error (so do not stop cleaning of subproject) especially as build directory is deleted after this task.

Current Behavior

When it is executed "clean" task build is failed and you have to run possibly even N-times a clean task about each subproject that you have under root. But the build directory is deleted after execution such "clean" task.
See also: https://discuss.gradle.org/t/gradle-clean-task-fails-in-gradle-version-5-6-4-and-6-0-1/34218

Context

IDE: Netbeans 11.2
Task: clean
Clean all by one call not failing all the time and no need to run N-times.

Steps to Reproduce

  1. create root and subproject, but I think that I can see it wven with just simple new Netbeans gradle project.
  2. use listed version e.g. 5.6.4 via wrapper
  3. use IDE to clean that uses such wrapper to execute "clean"

I miss there attach so I put herein at least build.gradle:


apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'distribution'
apply plugin: 'application'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'eclipse'

buildscript {
repositories {
mavenCentral()
jcenter()
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
maven { url 'https://plugins.gradle.org/m2/' }
}

dependencies {
    classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.11.0'        
}

}

mainClassName = 'sandbox2.Main'

group = 'snadbox'
version = '3.0.0.0.SNAPSHOT'
sourceCompatibility='11'
targetCompatibility="${sourceCompatibility}"

if ("${gradle.gradleVersion}" != "5.6.4") {
logger.error("ERROR (Gradle ${gradle.gradleVersion}): Build script is not done for your version of Gradle, you have to use 5.6.4.")
}

repositories {
mavenCentral()
jcenter()

maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }

}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.10'
testCompile 'junit:junit:4.12'
}


Your Environment

Gradle: 5.6.4 for wrapped 6.0.1
JVM: 11.0.2 (Oracle Corporation 11.0.2+9)
IDE: Netbeans 11.2

@netbeansuser2019
Copy link
Author

Seems that it was IDE issue and seems fix in Netbeans 11.3

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

2 participants