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

Task with name 'aggregateJacocoReport' not found in root project ''. #254

Closed
smac89 opened this issue Jan 25, 2020 · 6 comments
Closed

Task with name 'aggregateJacocoReport' not found in root project ''. #254

smac89 opened this issue Jan 25, 2020 · 6 comments
Assignees

Comments

@smac89
Copy link

smac89 commented Jan 25, 2020

I'm getting this error with the latest version of the project (0.31.2).

It happens when I apply the plugin 'org.kordamp.gradle.java-project', and still occurs even after I add the following to the root project and all subprojects:

beforeEvaluate {
    config {
        coverage {
            jacoco {
                enabled = false
            }
            coveralls {
                enabled = false
            }
        }
    }
}

Here is a stacktrace:

Caused by: org.gradle.api.UnknownTaskException: Task with name 'aggregateJacocoReport' not found in root project 'littlecity'.
	at org.gradle.api.internal.tasks.DefaultTaskCollection.createNotFoundException(DefaultTaskCollection.java:102)
	at org.gradle.api.internal.tasks.DefaultTaskCollection.createNotFoundException(DefaultTaskCollection.java:46)
	at org.gradle.api.internal.DefaultNamedDomainObjectCollection.named(DefaultNamedDomainObjectCollection.java:359)
	at org.gradle.api.internal.tasks.DefaultTaskCollection.named(DefaultTaskCollection.java:112)
	at org.kordamp.gradle.plugin.coveralls.CoverallsPlugin$2.execute(CoverallsPlugin.groovy:85)
	at org.kordamp.gradle.plugin.coveralls.CoverallsPlugin$2.execute(CoverallsPlugin.groovy)
	at org.kordamp.gradle.plugin.coveralls.CoverallsPlugin$_configureRootProject_closure1.doCall(CoverallsPlugin.groovy:79)
@aalmiray aalmiray self-assigned this Jan 25, 2020
@aalmiray
Copy link
Collaborator

There's no need to use the beforeEvaluate block.
Did you apply the org.kordamp.gradle.coveralls plugin before org.kordamp.gradle.java-project?

@aalmiray aalmiray added the bug Something isn't working label Jan 25, 2020
@smac89
Copy link
Author

smac89 commented Jan 27, 2020

No I did not apply the coveralls plugin, only the java-project plugin.

@aalmiray
Copy link
Collaborator

I'm afraid I can't replicate this problem. Could you tell me more about your setup? What are the contents of settings.gradle and how are all plugins applied for example.

@smac89
Copy link
Author

smac89 commented Jan 30, 2020

@aalmiray
Copy link
Collaborator

Thanks. I see what's happening now. The org.kordamp.gradle.java-project plugin must be applied to the root project. A config block must be added to the root, containing default configuration that all children projects inherit.

Here's the minimum configuration required to get the MVCE to work

plugins {
    id 'base'
    id 'org.kordamp.gradle.java-project' version '0.31.2'
}

group 'org.example'
version '1.0-SNAPSHOT'

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }
}

config {
    info {
        vendor      = rootProject.name
        description = rootProject.name
        scm {
            url = 'https://github.com/MVCE-Superstars/KordmapPluginMVCE'
        }
        organization {
            url = 'https://github.com/MVCE-Superstars'
        }
    }

    licensing { enabled = false }
}

subprojects {
    apply plugin: 'java'

    sourceCompatibility = '11'

    config {
        info {
            name        = project.name
            description = project.name
        }
    }
}

wrapper {
    distributionType = Wrapper.DistributionType.BIN
    gradleVersion = '5.6.4'
}

@smac89
Copy link
Author

smac89 commented Jan 31, 2020

Thanks for the explanation

@smac89 smac89 closed this as completed Jan 31, 2020
@aalmiray aalmiray removed the bug Something isn't working label Feb 1, 2020
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

2 participants