diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 159f84258df..add518822e0 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -239,7 +239,7 @@ class BuildPlugin implements Plugin { /** Return the configuration name used for finding transitive deps of the given dependency. */ private static String transitiveDepConfigName(String groupId, String artifactId, String version) { - return "_transitive_${groupId}:${artifactId}:${version}" + return "_transitive_${groupId}_${artifactId}_${version}" } /** diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index 14074f241df..72c6eef6685 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -425,7 +425,7 @@ class ClusterFormationTasks { Project pluginProject = plugin.getValue() verifyProjectHasBuildPlugin(name, node.nodeVersion, project, pluginProject) - String configurationName = "_plugin_${prefix}_${pluginProject.path}" + String configurationName = pluginConfigurationName(prefix, pluginProject) Configuration configuration = project.configurations.findByName(configurationName) if (configuration == null) { configuration = project.configurations.create(configurationName) @@ -454,13 +454,21 @@ class ClusterFormationTasks { return copyPlugins } + private static String pluginConfigurationName(final String prefix, final Project project) { + return "_plugin_${prefix}_${project.path}".replace(':', '_') + } + + private static String pluginBwcConfigurationName(final String prefix, final Project project) { + return "_plugin_bwc_${prefix}_${project.path}".replace(':', '_') + } + /** Configures task to copy a plugin based on a zip file resolved using dependencies for an older version */ static Task configureCopyBwcPluginsTask(String name, Project project, Task setup, NodeInfo node, String prefix) { Configuration bwcPlugins = project.configurations.getByName("${prefix}_elasticsearchBwcPlugins") for (Map.Entry plugin : node.config.plugins.entrySet()) { Project pluginProject = plugin.getValue() verifyProjectHasBuildPlugin(name, node.nodeVersion, project, pluginProject) - String configurationName = "_plugin_bwc_${prefix}_${pluginProject.path}" + String configurationName = pluginBwcConfigurationName(prefix, pluginProject) Configuration configuration = project.configurations.findByName(configurationName) if (configuration == null) { configuration = project.configurations.create(configurationName) @@ -499,9 +507,9 @@ class ClusterFormationTasks { static Task configureInstallPluginTask(String name, Project project, Task setup, NodeInfo node, Project plugin, String prefix) { final FileCollection pluginZip; if (node.nodeVersion != VersionProperties.elasticsearch) { - pluginZip = project.configurations.getByName("_plugin_bwc_${prefix}_${plugin.path}") + pluginZip = project.configurations.getByName(pluginBwcConfigurationName(prefix, plugin)) } else { - pluginZip = project.configurations.getByName("_plugin_${prefix}_${plugin.path}") + pluginZip = project.configurations.getByName(pluginConfigurationName(prefix, plugin)) } // delay reading the file location until execution time by wrapping in a closure within a GString final Object file = "${-> new File(node.pluginsTmpDir, pluginZip.singleFile.getName()).toURI().toURL().toString()}" diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index 2f45cb5ab8f..6426f588352 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -106,7 +106,7 @@ List principals = [ "elasticsearch", "hdfs/hdfs.build.elastic.co" ] String realm = "BUILD.ELASTIC.CO" for (String principal : principals) { - Task create = project.tasks.create("addPrincipal#${principal}", org.elasticsearch.gradle.vagrant.VagrantCommandTask) { + Task create = project.tasks.create("addPrincipal#${principal}".replace('/', '_'), org.elasticsearch.gradle.vagrant.VagrantCommandTask) { command 'ssh' args '--command', "sudo bash /vagrant/src/main/resources/provision/addprinc.sh $principal" boxName box