Merge pull request #12765 from jpountz/enhancement/convert-plugin-name

Tests: Move qa's convert-plugin-name macrodef to dev-tools.
This commit is contained in:
Adrien Grand 2015-08-10 12:03:56 +02:00
commit 1dfc022f89
2 changed files with 18 additions and 15 deletions

View File

@ -187,6 +187,24 @@
</sequential>
</macrodef>
<!-- Takes a plugin zip file and return the plugin name. For instance
'elasticsearch-analysis-icu-2.0.0.zip' would return
'elasticsearch-analysis-icu'. -->
<macrodef name="convert-plugin-name">
<attribute name="file"/>
<attribute name="outputproperty"/>
<sequential>
<local name="file.base"/>
<basename file="@{file}" property="file.base"/>
<filter-property src="file.base" dest="@{outputproperty}">
<chain>
<replaceregex pattern="^elasticsearch-" replace=""/>
<replacestring from="-${elasticsearch.version}.zip" to=""/>
</chain>
</filter-property>
</sequential>
</macrodef>
<!-- unzip the elasticsearch zip -->
<target name="setup-workspace" depends="stop-external-cluster">
<sequential>

View File

@ -4,21 +4,6 @@
<import file="${elasticsearch.integ.antfile.default}"/>
<macrodef name="convert-plugin-name">
<attribute name="file"/>
<attribute name="outputproperty"/>
<sequential>
<local name="file.base"/>
<basename file="@{file}" property="file.base"/>
<filter-property src="file.base" dest="@{outputproperty}">
<chain>
<replaceregex pattern="^elasticsearch-" replace=""/>
<replacestring from="-${elasticsearch.version}.zip" to=""/>
</chain>
</filter-property>
</sequential>
</macrodef>
<target name="start-external-cluster-with-plugins" depends="setup-workspace" unless="${shouldskip}">
<fail message="Expected ${expected.plugin.count} dependencies, are plugins missing from this pom.xml?">
<condition>