Skip to content

How to deal with build failing with "colcon build"? #234

@lyp92

Description

@lyp92

When I compiled my project with "colcon build",it failed.I found error info in 'stdout_stderr.log':

  • What went wrong:
    Execution failed for task ':compileJava'.
    Configuration with name 'compile' not found.

And this is my 'build.gradle':

apply plugin: 'java'
apply plugin: 'org.ros2.tools.gradle'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

buildscript {
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
}

dependencies {
classpath 'gradle.plugin.org.ros2.tools.gradle:ament:0.7.0'
}
}

repositories {
mavenCentral()
}

ament {
entryPoints {
consoleScripts = [
'my_node = tld.domain.MyNode'
]
}
}

I got Ubuntu 22.04 with ROS2 Humble, Gradle 8.3 and Java 8 installed. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions