diff --git a/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerBuildSupport.java b/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerBuildSupport.java index 3a71e56b0..836745cd5 100644 --- a/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerBuildSupport.java +++ b/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerBuildSupport.java @@ -676,9 +676,15 @@ private List getDependencyJars(DependencyModulesResult dependen attributes.add(optionalAttribute); } attributes.add(buildServerAttribute); - attributes.add(JavaCore.newClasspathAttribute("groupId", mavenDependencyModule.getOrganization())); - attributes.add(JavaCore.newClasspathAttribute("artifactId", mavenDependencyModule.getName())); - attributes.add(JavaCore.newClasspathAttribute("version", mavenDependencyModule.getVersion())); + + String groupId = mavenDependencyModule.getOrganization(); + String artifactId = mavenDependencyModule.getName(); + String version = mavenDependencyModule.getVersion(); + if (!StringUtils.isAllEmpty(groupId, artifactId, version)) { + attributes.add(JavaCore.newClasspathAttribute("groupId", groupId)); + attributes.add(JavaCore.newClasspathAttribute("artifactId", artifactId)); + attributes.add(JavaCore.newClasspathAttribute("version", version)); + } dependencyEntries.add(JavaCore.newLibraryEntry( new Path(artifact.getAbsolutePath()),