mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[maven] IDEA-360900 Use artIfact spelling preferred in Maven, instead of artEfact
GitOrigin-RevId: 390c20126b9cfede6efbfa7c085f6ce1730991e0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9d62ebad0b
commit
32c0cc0833
+2
-2
@@ -5,7 +5,7 @@ import com.intellij.util.xml.DomFileElement
|
||||
import com.intellij.util.xml.highlighting.DomElementAnnotationHolder
|
||||
import org.jetbrains.idea.maven.dom.model.MavenDomProjectModel
|
||||
|
||||
class MavenParentMissedGroupIdArtefactIdInspection : MavenParentMissedCoordinatesInspection() {
|
||||
class MavenParentMissedGroupIdArtifactIdInspection : MavenParentMissedCoordinatesInspection() {
|
||||
override fun checkFileElement(domFileElement: DomFileElement<MavenDomProjectModel?>,
|
||||
holder: DomElementAnnotationHolder) {
|
||||
val parent = getParentIfExists(domFileElement) ?: return
|
||||
@@ -19,6 +19,6 @@ class MavenParentMissedGroupIdArtefactIdInspection : MavenParentMissedCoordinate
|
||||
}
|
||||
|
||||
override fun getShortName(): String {
|
||||
return "MavenParentMissedGroupIdArtefactIdInspection"
|
||||
return "MavenParentMissedGroupIdArtifactIdInspection"
|
||||
}
|
||||
}
|
||||
@@ -207,10 +207,10 @@
|
||||
key="inspection.missed.parent.version"
|
||||
groupKey="inspection.group" enabledByDefault="true" level="ERROR"
|
||||
implementationClass="org.jetbrains.idea.maven.dom.inspections.MavenParentMissedVersionInspection"/>
|
||||
<localInspection language="XML" shortName="MavenParentMissedGroupIdArtefactIdInspection" bundle="messages.MavenDomBundle"
|
||||
<localInspection language="XML" shortName="MavenParentMissedGroupIdArtifactIdInspection" bundle="messages.MavenDomBundle"
|
||||
key="inspection.missed.parent.groupIdArtifactId"
|
||||
groupKey="inspection.group" enabledByDefault="true" level="ERROR"
|
||||
implementationClass="org.jetbrains.idea.maven.dom.inspections.MavenParentMissedGroupIdArtefactIdInspection"/>
|
||||
implementationClass="org.jetbrains.idea.maven.dom.inspections.MavenParentMissedGroupIdArtifactIdInspection"/>
|
||||
<localInspection language="XML" shortName="MavenDuplicatePluginInspection" bundle="messages.MavenDomBundle"
|
||||
key="inspection.duplicate.plugin.declaration"
|
||||
groupKey="inspection.group" enabledByDefault="true" level="WARNING"
|
||||
|
||||
@@ -38,7 +38,7 @@ MavenDuplicateDependenciesInspection.has.duplicates=<html><body>Dependency is du
|
||||
inspection.redundant.groupId.name=Redundant groupId
|
||||
|
||||
inspection.missed.parent.version=Parent version missed
|
||||
inspection.missed.parent.groupIdArtifactId=Parent groupId or artefactId is missed
|
||||
inspection.missed.parent.groupIdArtifactId=Parent groupId or artifactId is missed
|
||||
|
||||
inspection.redundant.groupId.fix=Remove unnecessary <groupId>
|
||||
inspection.redundant.groupId.fix.description=Definition of groupId is redundant, because it's inherited from the parent
|
||||
|
||||
+11
-11
@@ -22,7 +22,7 @@ import com.intellij.psi.ElementManipulators
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import com.intellij.psi.PsiFile
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.jetbrains.idea.maven.dom.inspections.MavenParentMissedGroupIdArtefactIdInspection
|
||||
import org.jetbrains.idea.maven.dom.inspections.MavenParentMissedGroupIdArtifactIdInspection
|
||||
import org.jetbrains.idea.maven.dom.inspections.MavenParentMissedVersionInspection
|
||||
import org.jetbrains.idea.maven.dom.inspections.MavenPropertyInParentInspection
|
||||
import org.jetbrains.idea.maven.dom.inspections.MavenRedundantGroupIdInspection
|
||||
@@ -487,7 +487,7 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
</parent>
|
||||
""".trimIndent())
|
||||
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtefactIdInspection::class.java)
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtifactIdInspection::class.java)
|
||||
checkHighlighting()
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
</parent>
|
||||
""".trimIndent())
|
||||
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtefactIdInspection::class.java)
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtifactIdInspection::class.java)
|
||||
checkHighlighting()
|
||||
}
|
||||
|
||||
@@ -516,7 +516,7 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
""".trimIndent())
|
||||
// In Maven 3, <groupId> and <artefactId> in <parent> are required even if the parent's POM could be found by relativePath.
|
||||
// In Maven 3, <groupId> and <artifactId> in <parent> are required even if the parent's POM could be found by relativePath.
|
||||
val subprojectPom = createModulePom("subdirectory", """
|
||||
<<error descr="'artifactId' child tag should be defined">parent</error>>
|
||||
<groupId>test</groupId>
|
||||
@@ -525,7 +525,7 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
</parent>
|
||||
<artifactId>subproject1</artifactId>
|
||||
""".trimIndent())
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtefactIdInspection::class.java)
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtifactIdInspection::class.java)
|
||||
checkHighlighting(subprojectPom)
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
""".trimIndent())
|
||||
// In Maven 3, <groupId> and <artefactId> in <parent> are required even if the parent's POM could be found by relativePath.
|
||||
// In Maven 3, <groupId> and <artifactId> in <parent> are required even if the parent's POM could be found by relativePath.
|
||||
val subprojectPom = createModulePom("subdirectory", """
|
||||
<<error descr="'groupId' child tag should be defined">parent</error>>
|
||||
<artifactId>project</artifactId>
|
||||
@@ -546,7 +546,7 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
</parent>
|
||||
<artifactId>subproject1</artifactId>
|
||||
""".trimIndent())
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtefactIdInspection::class.java)
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtifactIdInspection::class.java)
|
||||
checkHighlighting(subprojectPom)
|
||||
}
|
||||
|
||||
@@ -558,14 +558,14 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
""".trimIndent())
|
||||
// In Maven 4, it's possible to omit <groupId> and <artefactId> in <parent> if the parent's POM could be found by relativePath.
|
||||
// In Maven 4, it's possible to omit <groupId> and <artifactId> in <parent> if the parent's POM could be found by relativePath.
|
||||
val subprojectPom = createModulePom("sub/subdirectory", """
|
||||
<parent>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>subproject1</artifactId>
|
||||
""".trimIndent())
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtefactIdInspection::class.java)
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtifactIdInspection::class.java)
|
||||
checkHighlighting(subprojectPom)
|
||||
}
|
||||
|
||||
@@ -577,13 +577,13 @@ class MavenParentCompletionAndResolutionTest : MavenDomWithIndicesTestCase() {
|
||||
<artifactId>project</artifactId>
|
||||
<version>1</version>
|
||||
""".trimIndent())
|
||||
// In Maven 4, it's possible to omit <groupId> and <artefactId> in <parent> if the parent's POM could be found by relativePath.
|
||||
// In Maven 4, it's possible to omit <groupId> and <artifactId> in <parent> if the parent's POM could be found by relativePath.
|
||||
// If <relativePath> is not specified, the default value is used (../pom.xml)
|
||||
val subprojectPom = createModulePom("subdirectory", """
|
||||
<parent/>
|
||||
<artifactId>subproject1</artifactId>
|
||||
""".trimIndent())
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtefactIdInspection::class.java)
|
||||
fixture.enableInspections(MavenParentMissedGroupIdArtifactIdInspection::class.java)
|
||||
checkHighlighting(subprojectPom)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user