mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-120502 Support renamed gmaven-plugin plugin (groovy-maven-plugin)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.idea.maven.importing;
|
||||
|
||||
public class GroovyGmavenImporter extends GroovyImporter {
|
||||
public GroovyGmavenImporter() {
|
||||
super("org.codehaus.gmaven", "groovy-maven-plugin");
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
<extensions defaultExtensionNs="org.jetbrains.idea.maven">
|
||||
<importer implementation="org.jetbrains.idea.maven.importing.Groovy_1_0_Importer"/>
|
||||
<importer implementation="org.jetbrains.idea.maven.importing.Groovy_1_1_plus_Importer"/>
|
||||
<importer implementation="org.jetbrains.idea.maven.importing.GroovyGmavenImporter"/>
|
||||
|
||||
<pluginDescriptor mavenId="org.codehaus.groovy.maven:gmaven-plugin">
|
||||
<param name="source" languageProvider="org.jetbrains.idea.maven.plugins.groovy.MavenGroovyLanguageProvider"/>
|
||||
@@ -10,6 +11,10 @@
|
||||
<pluginDescriptor mavenId="org.codehaus.gmaven:gmaven-plugin">
|
||||
<param name="source" languageProvider="org.jetbrains.idea.maven.plugins.groovy.MavenGroovyLanguageProvider"/>
|
||||
</pluginDescriptor>
|
||||
|
||||
<pluginDescriptor mavenId="org.codehaus.gmaven:groovy-maven-plugin">
|
||||
<param name="source" languageProvider="org.jetbrains.idea.maven.plugins.groovy.MavenGroovyLanguageProvider"/>
|
||||
</pluginDescriptor>
|
||||
</extensions>
|
||||
|
||||
<extensions defaultExtensionNs="org.intellij.groovy">
|
||||
|
||||
+30
@@ -101,6 +101,36 @@ public class GroovyImporterTest extends MavenImportingTestCase {
|
||||
assertTestResources("project", "src/test/resources");
|
||||
}
|
||||
|
||||
public void testAddingGroovySpecificSources2() throws Exception {
|
||||
createStdProjectFolders();
|
||||
createProjectSubDirs("src/main/groovy",
|
||||
"src/test/groovy");
|
||||
|
||||
importProject("<groupId>test</groupId>" +
|
||||
"<artifactId>project</artifactId>" +
|
||||
"<version>1</version>" +
|
||||
|
||||
"<build>" +
|
||||
" <plugins>" +
|
||||
" <plugin>" +
|
||||
" <groupId>org.codehaus.gmaven</groupId>" +
|
||||
" <artifactId>groovy-maven-plugin</artifactId>" +
|
||||
" </plugin>" +
|
||||
" </plugins>" +
|
||||
"</build>");
|
||||
|
||||
assertModules("project");
|
||||
|
||||
assertSources("project",
|
||||
"src/main/java",
|
||||
"src/main/groovy");
|
||||
assertResources("project", "src/main/resources");
|
||||
assertTestSources("project",
|
||||
"src/test/java",
|
||||
"src/test/groovy");
|
||||
assertTestResources("project", "src/test/resources");
|
||||
}
|
||||
|
||||
public void testAddingCustomGroovySpecificSources() throws Exception {
|
||||
createStdProjectFolders();
|
||||
createProjectSubDirs("src/main/groovy",
|
||||
|
||||
+39
@@ -107,6 +107,45 @@ class MavenGroovyInjectionTest extends LightCodeInsightFixtureTestCase {
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
""")
|
||||
|
||||
myFixture.completeBasic()
|
||||
|
||||
def lookups = myFixture.lookupElementStrings
|
||||
assert lookups.containsAll(["String", "StringBuffer", "StringBuilder"])
|
||||
}
|
||||
|
||||
public void testCompletion3() {
|
||||
myFixture.configureByText("pom.xml", """
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>simpleMaven</groupId>
|
||||
<artifactId>simpleMaven</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmaven</groupId>
|
||||
<artifactId>groovy-maven-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<configuration>
|
||||
<!-- http://groovy.codehaus.org/The+groovydoc+Ant+task -->
|
||||
<source>
|
||||
String<caret>
|
||||
</source>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
""")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user