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

Better handling for dependencies w/o versions #5773

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Apr 4, 2023

Consider dependency declaration as follows:

dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-web'
        developmentOnly 'org.springframework.boot:spring-boot-devtools'
        testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

there's no version specified for `spring-boot-devtools.

The [https://github.com/apache/netbeans/blob/master/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java#L1502](code that reports developmentOnly_directChildren) handles such situations using GAV without version (as specified in the buildfile) - org.springframework.boot:spring-boot-devtools:.

The issue is that when resolved artifacts GAVs are matched against these direct children, the module dependency with resolved version is not matched to the version-less child. So I have added a path that attempts to strip a version and match again.

@sdedic sdedic added Gradle [ci] enable "build tools" tests LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests labels Apr 4, 2023
@sdedic sdedic added this to the NB18 milestone Apr 4, 2023
@sdedic sdedic self-assigned this Apr 4, 2023
@sdedic sdedic merged commit e761e5e into apache:master Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gradle [ci] enable "build tools" tests LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants