in PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-hdinsight/src/main/java/com/microsoft/azure/hdinsight/projects/MavenProjectGenerator.java [85:131]
private void createPom(String root) throws Exception {
File file = null;
switch (this.sparkVersion) {
case SPARK_1_5_2:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_1_5_2_pom.xml");
break;
case SPARK_1_6_2:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_1_6_2_pom.xml");
break;
case SPARK_1_6_3:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_1_6_3_pom.xml");
break;
case SPARK_2_0_2:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_0_2_pom.xml");
break;
case SPARK_2_1_0:
file = this.templatesType != HDInsightTemplatesType.ScalaFailureTaskDebugSample ?
StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_1_0_pom.xml") :
StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_1_0_failure_task_debug_pom.xml");
break;
case SPARK_2_2_0:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_2_0_pom.xml");
break;
case SPARK_2_3_0:
file = this.templatesType != HDInsightTemplatesType.ScalaFailureTaskDebugSample ?
StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_3_0_pom.xml") :
StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_3_0_failure_task_debug_pom.xml");
break;
case SPARK_2_3_2:
file = this.templatesType != HDInsightTemplatesType.ScalaFailureTaskDebugSample ?
StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_3_2_pom.xml") :
StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_3_2_failure_task_debug_pom.xml");
break;
case SPARK_2_4_0:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_2_4_0_pom.xml");
break;
case SPARK_3_0_1:
file = StreamUtil.getResourceFile("/hdinsight/templates/pom/spark_3_0_1_pom.xml");
break;
}
if (null == file) {
DefaultLoader.getUIHelper().showError("Failed to get the sample resource folder for project", "Create Sample Project");
} else {
FileUtil.copy(file, new File(root + "/pom.xml"));
}
}