ist dies eine groovy Skriptdatei MavenInit.groovy, führen Sie in einer pom.xml wie folgt, die var 'SCRIPTS_GROOVY' ist in einer anderen pom.xml definiert, was mich verwirren kann ich nicht finden wo die "DIR_TARGET" Definition und wie ohne direkte ant können ant = new AntBuilder()
Wie verwendet die Ameise in groovy
SCRIPTS_GROOVY=project.properties['SCRIPTS_GROOVY']
ant.pathconvert(targetos:"unix", property:"DIR_TARGET") {
path(location:project.build.directory)
}
DIR_TARGET=ant.project.properties['DIR_TARGET']
project.properties.setProperty('DIR_TARGET', "${DIR_TARGET}")
project.properties.setProperty('DIR_LOGS', "${DIR_TARGET}/logs")
ant.mkdir(dir:"${DIR_TARGET}/logs")
die pom.xml die MavenInit.groovy excute als
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<executions>
<execution>
<id>set-maven-property</id>
<phase>initialize</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<scripts>
<script>file:///${SCRIPTS_GROOVY}/MavenInit.groovy</script>
</scripts>
</configuration>
</execution>
<execution>
<id>Windows-package</id>
<phase>compile</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<scripts>
<script>file:///${SCRIPTS_GROOVY}/PackageWindows.groovy</script>
</scripts>
</configuration>
</execution>
</executions>
</plugin>
folgen, wie kann ich die 'DIR_TARGET anfänglichen finden definiert und ändern Sie den Wert
Vielen Dank, und könnten Sie bitte erraten, wo die $ {DIR_TARGET} definierte Ausgangs kann? ich lokale globale Suche verwenden, kann aber n ot finden wo die $ {DIR_TARGET} definiert –
@TJSeason Ich habe meine Antwort aktualisiert. – aristotll