如何爲以下定義的gradle插件編寫等價的maven插件?gradle to maven插件轉換
/*
* Plugin to copy system properties from gradle JVM to testing JVM
* Code was copied from gradle discussion froum:
* http://forums.gradle.org/gradle/topics/passing_system_properties_to_test_task
*/
class SystemPropertiesMappingPlugin implements Plugin{
public void apply(Project project){
project.tasks.withType(Test){ testTask ->
testTask.ext.mappedSystemProperties = []
doFirst{
mappedSystemProperties.each{mappedPropertyKey ->
def systemPropertyValue = System.getProperty(mappedPropertyKey)
if(systemPropertyValue){
testTask.systemProperty(mappedPropertyKey, systemPropertyValue)
}
}
}
}
}
}
你想將java插件轉換爲maven嗎? –
是啊..我可以在maven pom中使用它作爲插件。 –
Okz嘗試http://crunchify.com/how-to-convert-existing-java-project-to-maven-in-eclipse/如果我錯了,請糾正我與解釋我如何做到這一點imean in你想要做的這個IDE –