Maven: rebase to master
This commit is contained in:
@@ -34,6 +34,7 @@ import org.jetbrains.idea.maven.dom.model.*
|
|||||||
import org.jetbrains.idea.maven.model.MavenId
|
import org.jetbrains.idea.maven.model.MavenId
|
||||||
import org.jetbrains.idea.maven.utils.MavenArtifactScope
|
import org.jetbrains.idea.maven.utils.MavenArtifactScope
|
||||||
import org.jetbrains.jps.model.java.JavaSourceRootType
|
import org.jetbrains.jps.model.java.JavaSourceRootType
|
||||||
|
import org.jetbrains.kotlin.idea.configuration.RepositoryDescription
|
||||||
import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator
|
import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator
|
||||||
import org.jetbrains.kotlin.psi.psiUtil.getChildrenOfType
|
import org.jetbrains.kotlin.psi.psiUtil.getChildrenOfType
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@@ -225,12 +226,20 @@ class PomFile(val xmlFile: XmlFile) {
|
|||||||
return addRepository(id, name, url, snapshots, releases, { domModel.pluginRepositories.pluginRepositories }, { domModel.pluginRepositories.addPluginRepository() })
|
return addRepository(id, name, url, snapshots, releases, { domModel.pluginRepositories.pluginRepositories }, { domModel.pluginRepositories.addPluginRepository() })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addPluginRepository(description: RepositoryDescription) {
|
||||||
|
addPluginRepository(description.id, description.name, description.url, description.isSnapshot, true)
|
||||||
|
}
|
||||||
|
|
||||||
fun addLibraryRepository(id: String, name: String, url: String, snapshots: Boolean = false, releases: Boolean = true): MavenDomRepository {
|
fun addLibraryRepository(id: String, name: String, url: String, snapshots: Boolean = false, releases: Boolean = true): MavenDomRepository {
|
||||||
ensureRepositories()
|
ensureRepositories()
|
||||||
|
|
||||||
return addRepository(id, name, url, snapshots, releases, { domModel.repositories.repositories }, { domModel.repositories.addRepository() })
|
return addRepository(id, name, url, snapshots, releases, { domModel.repositories.repositories }, { domModel.repositories.addRepository() })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addLibraryRepository(description: RepositoryDescription) {
|
||||||
|
addLibraryRepository(description.id, description.name, description.url, description.isSnapshot, true)
|
||||||
|
}
|
||||||
|
|
||||||
private fun addRepository(id: String, name: String, url: String, snapshots: Boolean, releases: Boolean, existing: () -> List<MavenDomRepository>, create: () -> MavenDomRepository): MavenDomRepository {
|
private fun addRepository(id: String, name: String, url: String, snapshots: Boolean, releases: Boolean, existing: () -> List<MavenDomRepository>, create: () -> MavenDomRepository): MavenDomRepository {
|
||||||
|
|
||||||
val repository =
|
val repository =
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
|
|||||||
class KotlinJavaMavenConfigurator : KotlinMavenConfigurator(KotlinJavaMavenConfigurator.STD_LIB_ID, KotlinJavaMavenConfigurator.TEST_LIB_ID, false, KotlinJavaMavenConfigurator.NAME, KotlinJavaMavenConfigurator.PRESENTABLE_TEXT) {
|
class KotlinJavaMavenConfigurator : KotlinMavenConfigurator(KotlinJavaMavenConfigurator.STD_LIB_ID, KotlinJavaMavenConfigurator.TEST_LIB_ID, false, KotlinJavaMavenConfigurator.NAME, KotlinJavaMavenConfigurator.PRESENTABLE_TEXT) {
|
||||||
|
|
||||||
override fun isKotlinModule(module: Module): Boolean {
|
override fun isKotlinModule(module: Module): Boolean {
|
||||||
return hasKotlinRuntimeInScope(module)
|
return hasKotlinJvmRuntimeInScope(module)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isRelevantGoal(goalName: String): Boolean {
|
override fun isRelevantGoal(goalName: String): Boolean {
|
||||||
|
|||||||
+3
-3
@@ -18,15 +18,15 @@ package org.jetbrains.kotlin.idea.maven.configuration
|
|||||||
|
|
||||||
import com.intellij.openapi.module.Module
|
import com.intellij.openapi.module.Module
|
||||||
import org.jetbrains.idea.maven.dom.model.MavenDomPlugin
|
import org.jetbrains.idea.maven.dom.model.MavenDomPlugin
|
||||||
|
import org.jetbrains.kotlin.idea.configuration.hasKotlinJsRuntimeInScope
|
||||||
import org.jetbrains.kotlin.idea.maven.PomFile
|
import org.jetbrains.kotlin.idea.maven.PomFile
|
||||||
import org.jetbrains.kotlin.idea.project.ProjectStructureUtil
|
|
||||||
import org.jetbrains.kotlin.js.resolve.JsPlatform
|
import org.jetbrains.kotlin.js.resolve.JsPlatform
|
||||||
import org.jetbrains.kotlin.resolve.TargetPlatform
|
import org.jetbrains.kotlin.resolve.TargetPlatform
|
||||||
|
|
||||||
class KotlinJavascriptMavenConfigurator : KotlinMavenConfigurator(KotlinJavascriptMavenConfigurator.STD_LIB_ID, null, false, KotlinJavascriptMavenConfigurator.NAME, KotlinJavascriptMavenConfigurator.PRESENTABLE_TEXT) {
|
class KotlinJavascriptMavenConfigurator : KotlinMavenConfigurator(KotlinJavascriptMavenConfigurator.STD_LIB_ID, null, false, KotlinJavascriptMavenConfigurator.NAME, KotlinJavascriptMavenConfigurator.PRESENTABLE_TEXT) {
|
||||||
|
|
||||||
override fun isKotlinModule(module: Module): Boolean {
|
override fun isKotlinModule(module: Module): Boolean {
|
||||||
return ProjectStructureUtil.isJsKotlinModule(module)
|
return hasKotlinJsRuntimeInScope(module)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isRelevantGoal(goalName: String): Boolean {
|
override fun isRelevantGoal(goalName: String): Boolean {
|
||||||
@@ -35,7 +35,7 @@ class KotlinJavascriptMavenConfigurator : KotlinMavenConfigurator(KotlinJavascri
|
|||||||
|
|
||||||
override fun createExecutions(pomFile: PomFile, kotlinPlugin: MavenDomPlugin, module: Module) {
|
override fun createExecutions(pomFile: PomFile, kotlinPlugin: MavenDomPlugin, module: Module) {
|
||||||
createExecution(pomFile, kotlinPlugin, PomFile.DefaultPhases.Compile, PomFile.KotlinGoals.Js, module, false)
|
createExecution(pomFile, kotlinPlugin, PomFile.DefaultPhases.Compile, PomFile.KotlinGoals.Js, module, false)
|
||||||
createExecution(pomFile, kotlinPlugin, PomFile.DefaultPhases.Compile, PomFile.KotlinGoals.TestJs, module, true)
|
createExecution(pomFile, kotlinPlugin, PomFile.DefaultPhases.TestCompile, PomFile.KotlinGoals.TestJs, module, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getTargetPlatform(): TargetPlatform {
|
override fun getTargetPlatform(): TargetPlatform {
|
||||||
|
|||||||
+8
-12
@@ -36,9 +36,7 @@ import org.jetbrains.idea.maven.model.MavenId
|
|||||||
import org.jetbrains.idea.maven.project.MavenProjectsManager
|
import org.jetbrains.idea.maven.project.MavenProjectsManager
|
||||||
import org.jetbrains.idea.maven.utils.MavenArtifactScope
|
import org.jetbrains.idea.maven.utils.MavenArtifactScope
|
||||||
import org.jetbrains.kotlin.idea.KotlinPluginUtil
|
import org.jetbrains.kotlin.idea.KotlinPluginUtil
|
||||||
import org.jetbrains.kotlin.idea.configuration.KotlinProjectConfigurator
|
import org.jetbrains.kotlin.idea.configuration.*
|
||||||
import org.jetbrains.kotlin.idea.configuration.NotificationMessageCollector
|
|
||||||
import org.jetbrains.kotlin.idea.configuration.createConfigureKotlinNotificationCollector
|
|
||||||
import org.jetbrains.kotlin.idea.framework.ui.ConfigureDialogWithModulesAndVersion
|
import org.jetbrains.kotlin.idea.framework.ui.ConfigureDialogWithModulesAndVersion
|
||||||
import org.jetbrains.kotlin.idea.maven.PomFile
|
import org.jetbrains.kotlin.idea.maven.PomFile
|
||||||
import org.jetbrains.kotlin.idea.maven.excludeMavenChildrenModules
|
import org.jetbrains.kotlin.idea.maven.excludeMavenChildrenModules
|
||||||
@@ -123,12 +121,17 @@ abstract class KotlinMavenConfigurator protected constructor(private val stdlibA
|
|||||||
pom.addDependency(MavenId(GROUP_ID, testArtifactId, "\${$KOTLIN_VERSION_PROPERTY}"), MavenArtifactScope.TEST, null, false, null)
|
pom.addDependency(MavenId(GROUP_ID, testArtifactId, "\${$KOTLIN_VERSION_PROPERTY}"), MavenArtifactScope.TEST, null, false, null)
|
||||||
}
|
}
|
||||||
if (addJunit) {
|
if (addJunit) {
|
||||||
|
// TODO currently it is always disabled: junit version selection could be shown in the configurator dialog
|
||||||
pom.addDependency(MavenId("junit", "junit", "4.12"), MavenArtifactScope.TEST, null, false, null)
|
pom.addDependency(MavenId("junit", "junit", "4.12"), MavenArtifactScope.TEST, null, false, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSnapshot(version)) {
|
if (isSnapshot(version)) {
|
||||||
pom.addLibraryRepository(SNAPSHOT_REPOSITORY_ID, SONATYPE_OSS_REPOSITORY_NAME, SONATYPE_OSS_REPOSITORY_URL, true, false)
|
pom.addLibraryRepository(SNAPSHOT_REPOSITORY)
|
||||||
pom.addPluginRepository(SNAPSHOT_REPOSITORY_ID, SONATYPE_OSS_REPOSITORY_NAME, SONATYPE_OSS_REPOSITORY_URL, true, false)
|
pom.addPluginRepository(SNAPSHOT_REPOSITORY)
|
||||||
|
}
|
||||||
|
if (isEap(version)) {
|
||||||
|
pom.addLibraryRepository(EAP_REPOSITORY)
|
||||||
|
pom.addPluginRepository(EAP_REPOSITORY)
|
||||||
}
|
}
|
||||||
|
|
||||||
val plugin = pom.addPlugin(MavenId(GROUP_ID, MAVEN_PLUGIN_ID, "\${$KOTLIN_VERSION_PROPERTY}"))
|
val plugin = pom.addPlugin(MavenId(GROUP_ID, MAVEN_PLUGIN_ID, "\${$KOTLIN_VERSION_PROPERTY}"))
|
||||||
@@ -156,9 +159,6 @@ abstract class KotlinMavenConfigurator protected constructor(private val stdlibA
|
|||||||
val GROUP_ID = "org.jetbrains.kotlin"
|
val GROUP_ID = "org.jetbrains.kotlin"
|
||||||
val MAVEN_PLUGIN_ID = "kotlin-maven-plugin"
|
val MAVEN_PLUGIN_ID = "kotlin-maven-plugin"
|
||||||
private val KOTLIN_VERSION_PROPERTY = "kotlin.version"
|
private val KOTLIN_VERSION_PROPERTY = "kotlin.version"
|
||||||
private val SNAPSHOT_REPOSITORY_ID = "sonatype.oss.snapshots"
|
|
||||||
private val SONATYPE_OSS_REPOSITORY_NAME = "Sonatype OSS Snapshot Repository"
|
|
||||||
private val SONATYPE_OSS_REPOSITORY_URL = "http://oss.sonatype.org/content/repositories/snapshots"
|
|
||||||
|
|
||||||
private fun hasJavaFiles(module: Module): Boolean {
|
private fun hasJavaFiles(module: Module): Boolean {
|
||||||
return !FileTypeIndex.getFiles(JavaFileType.INSTANCE, GlobalSearchScope.moduleScope(module)).isEmpty()
|
return !FileTypeIndex.getFiles(JavaFileType.INSTANCE, GlobalSearchScope.moduleScope(module)).isEmpty()
|
||||||
@@ -176,10 +176,6 @@ abstract class KotlinMavenConfigurator protected constructor(private val stdlibA
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isSnapshot(version: String): Boolean {
|
|
||||||
return version.contains("SNAPSHOT")
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun canConfigureFile(file: PsiFile): Boolean {
|
private fun canConfigureFile(file: PsiFile): Boolean {
|
||||||
return WritingAccessProvider.isPotentiallyWritable(file.virtualFile, null)
|
return WritingAccessProvider.isPotentiallyWritable(file.virtualFile, null)
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-59
@@ -28,126 +28,87 @@ import java.util.regex.Pattern;
|
|||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class ConfigureProjectByChangingFileTestGenerated extends AbstractConfigureProjectByChangingFileTest {
|
public class MavenConfigureProjectByChangingFileTestGenerated extends AbstractMavenConfigureProjectByChangingFileTest {
|
||||||
@TestMetadata("idea/testData/configuration/gradle")
|
@TestMetadata("idea/idea-maven/testData/configurator/jvm")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Gradle extends AbstractConfigureProjectByChangingFileTest {
|
public static class Jvm extends AbstractMavenConfigureProjectByChangingFileTest {
|
||||||
public void testAllFilesPresentInGradle() throws Exception {
|
public void testAllFilesPresentInJvm() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/gradle"), Pattern.compile("(\\w+)_before\\.gradle$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-maven/testData/configurator/jvm"), Pattern.compile("^([^\\.]+)$"), false);
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("default_before.gradle")
|
|
||||||
public void testDefault() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/default_before.gradle");
|
|
||||||
doTestGradle(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("eapVersion_before.gradle")
|
|
||||||
public void testEapVersion() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/eapVersion_before.gradle");
|
|
||||||
doTestGradle(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("missedLibrary_before.gradle")
|
|
||||||
public void testMissedLibrary() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/missedLibrary_before.gradle");
|
|
||||||
doTestGradle(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("plugin_present_before.gradle")
|
|
||||||
public void testPlugin_present() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/plugin_present_before.gradle");
|
|
||||||
doTestGradle(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("rcVersion_before.gradle")
|
|
||||||
public void testRcVersion() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/rcVersion_before.gradle");
|
|
||||||
doTestGradle(fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("idea/testData/configuration/maven")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Maven extends AbstractConfigureProjectByChangingFileTest {
|
|
||||||
public void testAllFilesPresentInMaven() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/maven"), Pattern.compile("^([^\\.]+)$"), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("fixExisting")
|
@TestMetadata("fixExisting")
|
||||||
public void testFixExisting() throws Exception {
|
public void testFixExisting() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/fixExisting/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/fixExisting/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("libraryMissed")
|
@TestMetadata("libraryMissed")
|
||||||
public void testLibraryMissed() throws Exception {
|
public void testLibraryMissed() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/libraryMissed/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/libraryMissed/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("pluginMissed")
|
@TestMetadata("pluginMissed")
|
||||||
public void testPluginMissed() throws Exception {
|
public void testPluginMissed() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/pluginMissed/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/pluginMissed/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleProject")
|
@TestMetadata("simpleProject")
|
||||||
public void testSimpleProject() throws Exception {
|
public void testSimpleProject() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/simpleProject/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProject/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleProjectEAP")
|
@TestMetadata("simpleProjectEAP")
|
||||||
public void testSimpleProjectEAP() throws Exception {
|
public void testSimpleProjectEAP() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/simpleProjectEAP/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProjectEAP/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleProjectRc")
|
@TestMetadata("simpleProjectRc")
|
||||||
public void testSimpleProjectRc() throws Exception {
|
public void testSimpleProjectRc() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/simpleProjectRc/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProjectRc/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleProjectSnapshot")
|
@TestMetadata("simpleProjectSnapshot")
|
||||||
public void testSimpleProjectSnapshot() throws Exception {
|
public void testSimpleProjectSnapshot() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/maven/simpleProjectSnapshot/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProjectSnapshot/");
|
||||||
doTestWithMaven(fileName);
|
doTestWithMaven(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("idea/testData/configuration/js-maven")
|
@TestMetadata("idea/idea-maven/testData/configurator/js")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Js_maven extends AbstractConfigureProjectByChangingFileTest {
|
public static class Js extends AbstractMavenConfigureProjectByChangingFileTest {
|
||||||
public void testAllFilesPresentInJs_maven() throws Exception {
|
public void testAllFilesPresentInJs() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/js-maven"), Pattern.compile("^([^\\.]+)$"), false);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-maven/testData/configurator/js"), Pattern.compile("^([^\\.]+)$"), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("libraryMissed")
|
@TestMetadata("libraryMissed")
|
||||||
public void testLibraryMissed() throws Exception {
|
public void testLibraryMissed() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/js-maven/libraryMissed/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/libraryMissed/");
|
||||||
doTestWithJSMaven(fileName);
|
doTestWithJSMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("pluginMissed")
|
@TestMetadata("pluginMissed")
|
||||||
public void testPluginMissed() throws Exception {
|
public void testPluginMissed() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/js-maven/pluginMissed/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/pluginMissed/");
|
||||||
doTestWithJSMaven(fileName);
|
doTestWithJSMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleProject")
|
@TestMetadata("simpleProject")
|
||||||
public void testSimpleProject() throws Exception {
|
public void testSimpleProject() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/js-maven/simpleProject/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/simpleProject/");
|
||||||
doTestWithJSMaven(fileName);
|
doTestWithJSMaven(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleProjectSnapshot")
|
@TestMetadata("simpleProjectSnapshot")
|
||||||
public void testSimpleProjectSnapshot() throws Exception {
|
public void testSimpleProjectSnapshot() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/js-maven/simpleProjectSnapshot/");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/simpleProjectSnapshot/");
|
||||||
doTestWithJSMaven(fileName);
|
doTestWithJSMaven(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<version>${kotlin.version}</version>
|
<version>${kotlin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>js</goal>
|
<goal>js</goal>
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
<version>${kotlin.version}</version>
|
<version>${kotlin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>js</goal>
|
<goal>js</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js-test</id>
|
<id>test-compile</id>
|
||||||
<phase>test-compile</phase>
|
<phase>test-compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>test-js</goal>
|
<goal>test-js</goal>
|
||||||
|
|||||||
@@ -27,14 +27,14 @@
|
|||||||
<version>${kotlin.version}</version>
|
<version>${kotlin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>js</goal>
|
<goal>js</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js-test</id>
|
<id>test-compile</id>
|
||||||
<phase>test-compile</phase>
|
<phase>test-compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>test-js</goal>
|
<goal>test-js</goal>
|
||||||
|
|||||||
@@ -29,14 +29,14 @@
|
|||||||
<version>${kotlin.version}</version>
|
<version>${kotlin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>js</goal>
|
<goal>js</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js-test</id>
|
<id>test-compile</id>
|
||||||
<phase>test-compile</phase>
|
<phase>test-compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>test-js</goal>
|
<goal>test-js</goal>
|
||||||
|
|||||||
+4
-4
@@ -23,7 +23,7 @@
|
|||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
@@ -57,14 +57,14 @@
|
|||||||
<version>${kotlin.version}</version>
|
<version>${kotlin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>js</goal>
|
<goal>js</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>js-test</id>
|
<id>test-compile</id>
|
||||||
<phase>test-compile</phase>
|
<phase>test-compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>test-js</goal>
|
<goal>test-js</goal>
|
||||||
|
|||||||
+47
-43
@@ -7,39 +7,25 @@
|
|||||||
<groupId>maventest</groupId>
|
<groupId>maventest</groupId>
|
||||||
<artifactId>maventest</artifactId>
|
<artifactId>maventest</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<build>
|
|
||||||
<plugins>
|
<properties>
|
||||||
<plugin>
|
<kotlin.version>$VERSION$</kotlin.version>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
</properties>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
|
||||||
<version>${kotlin.version}</version>
|
<dependencies>
|
||||||
<executions>
|
<dependency>
|
||||||
<execution>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<id>compile</id>
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
<phase>compile</phase>
|
<version>${kotlin.version}</version>
|
||||||
<goals>
|
</dependency>
|
||||||
<goal>compile</goal>
|
<dependency>
|
||||||
</goals>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<configuration>
|
<artifactId>kotlin-test</artifactId>
|
||||||
<sourceDirs>
|
<version>${kotlin.version}</version>
|
||||||
<source></source>
|
<scope>test</scope>
|
||||||
</sourceDirs>
|
</dependency>
|
||||||
</configuration>
|
</dependencies>
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>test-compile</id>
|
|
||||||
<phase>test-compile</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test-compile</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sourceDirs></sourceDirs>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<releases>
|
<releases>
|
||||||
@@ -53,6 +39,7 @@
|
|||||||
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<releases>
|
<releases>
|
||||||
@@ -66,16 +53,33 @@
|
|||||||
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
<build>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<sourceDirectory></sourceDirectory>
|
||||||
<artifactId>kotlin-stdlib</artifactId>
|
<plugins>
|
||||||
<version>${kotlin.version}</version>
|
<plugin>
|
||||||
</dependency>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
</dependencies>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
<properties>
|
<version>${kotlin.version}</version>
|
||||||
<kotlin.version>$VERSION$</kotlin.version>
|
<executions>
|
||||||
</properties>
|
<execution>
|
||||||
|
<id>compile</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>test-compile</id>
|
||||||
|
<phase>test-compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test-compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+47
-43
@@ -7,39 +7,25 @@
|
|||||||
<groupId>maventest</groupId>
|
<groupId>maventest</groupId>
|
||||||
<artifactId>maventest</artifactId>
|
<artifactId>maventest</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<build>
|
|
||||||
<plugins>
|
<properties>
|
||||||
<plugin>
|
<kotlin.version>$VERSION$</kotlin.version>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
</properties>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
|
||||||
<version>${kotlin.version}</version>
|
<dependencies>
|
||||||
<executions>
|
<dependency>
|
||||||
<execution>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<id>compile</id>
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
<phase>compile</phase>
|
<version>${kotlin.version}</version>
|
||||||
<goals>
|
</dependency>
|
||||||
<goal>compile</goal>
|
<dependency>
|
||||||
</goals>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<configuration>
|
<artifactId>kotlin-test</artifactId>
|
||||||
<sourceDirs>
|
<version>${kotlin.version}</version>
|
||||||
<source></source>
|
<scope>test</scope>
|
||||||
</sourceDirs>
|
</dependency>
|
||||||
</configuration>
|
</dependencies>
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>test-compile</id>
|
|
||||||
<phase>test-compile</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test-compile</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sourceDirs></sourceDirs>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<releases>
|
<releases>
|
||||||
@@ -53,6 +39,7 @@
|
|||||||
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<releases>
|
<releases>
|
||||||
@@ -66,16 +53,33 @@
|
|||||||
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
<url>http://dl.bintray.com/kotlin/kotlin-eap</url>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
<build>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<sourceDirectory></sourceDirectory>
|
||||||
<artifactId>kotlin-stdlib</artifactId>
|
<plugins>
|
||||||
<version>${kotlin.version}</version>
|
<plugin>
|
||||||
</dependency>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
</dependencies>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
<properties>
|
<version>${kotlin.version}</version>
|
||||||
<kotlin.version>$VERSION$</kotlin.version>
|
<executions>
|
||||||
</properties>
|
<execution>
|
||||||
|
<id>compile</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>test-compile</id>
|
||||||
|
<phase>test-compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test-compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+2
-2
@@ -29,7 +29,7 @@
|
|||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>false</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
|
|||||||
+12
@@ -41,6 +41,12 @@ public class GradleConfigureProjectByChangingFileTestGenerated extends AbstractG
|
|||||||
doTestGradle(fileName);
|
doTestGradle(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("eapVersion_before.gradle")
|
||||||
|
public void testEapVersion() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/eapVersion_before.gradle");
|
||||||
|
doTestGradle(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("missedLibrary_before.gradle")
|
@TestMetadata("missedLibrary_before.gradle")
|
||||||
public void testMissedLibrary() throws Exception {
|
public void testMissedLibrary() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/missedLibrary_before.gradle");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/missedLibrary_before.gradle");
|
||||||
@@ -52,4 +58,10 @@ public class GradleConfigureProjectByChangingFileTestGenerated extends AbstractG
|
|||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/plugin_present_before.gradle");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/plugin_present_before.gradle");
|
||||||
doTestGradle(fileName);
|
doTestGradle(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("rcVersion_before.gradle")
|
||||||
|
public void testRcVersion() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/rcVersion_before.gradle");
|
||||||
|
doTestGradle(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user