mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[maven][IDEA-340182] use default plugin groupid in case if plugin groupid is not set in pom
GitOrigin-RevId: 478103a9490270e2625b66cefb447d1bf33af025
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7a7b2f2cac
commit
0f11b2bf73
+2
-1
@@ -490,7 +490,8 @@ class MavenProjectPreImporter(val project: Project, val coroutineScope: Coroutin
|
||||
} ?: emptyList()
|
||||
|
||||
val id = extractId(it)
|
||||
val plugin = MavenPlugin(id.groupId, id.artifactId, id.version, false, false, it.getChild("configuration"), executions, emptyList())
|
||||
val groupId = id.groupId.nullize(true) ?: "org.apache.maven.plugins"
|
||||
val plugin = MavenPlugin(groupId, id.artifactId, id.version, false, false, it.getChild("configuration"), executions, emptyList())
|
||||
plugins[trimVersion(id)] = plugin
|
||||
}
|
||||
return plugins
|
||||
|
||||
+27
@@ -216,6 +216,33 @@ class MavenPreimportingTest : MavenMultiVersionImportingTestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testImportProjectWithCompilerConfigWithoutGroupId() = runBlocking {
|
||||
importProjectAsync("""
|
||||
<groupId>test</groupId>
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<source>14</source>
|
||||
<target>14</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
""".trimIndent())
|
||||
|
||||
|
||||
readAction {
|
||||
val module = getModule("project")
|
||||
assertEquals(LanguageLevel.JDK_14, LanguageLevelUtil.getEffectiveLanguageLevel(module))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testImportProjectWithCompilerConfigOfParent() = runBlocking {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user