Maven 插件 执行install同时执行groovy脚本

pom.xml


<plugin>
    <groupId>org.codehaus.gmavengroupId>
    <artifactId>gmaven-pluginartifactId>
    <version>1.5version>
    <executions>
        <execution>
        
            <phase>generate-resourcesphase>
            <goals>
                <goal>executegoal>
                <goal>compilegoal>
            goals>
        execution>
    executions>
    <configuration>
        <source>${basedir}/src/main/resources/build.groovysource>
        <lifecycleMappingMetadata>
            <pluginExecutions>
                <pluginExecution>
                    <pluginExecutionFilter>
                        <groupId>org.codehaus.gmavengroupId>
                        <artifactId>gmaven-pluginartifactId>
                        <versionRange>[1.3.0,)versionRange>
                        <goals>
                            <goal>executegoal>
                            <goal>compilegoal>
                        goals>
                    pluginExecutionFilter>
                    <action>
                        <ignore>ignore>
                    action>
                pluginExecution>
            pluginExecutions>
        lifecycleMappingMetadata>
    configuration>
          <dependencies>
        <dependency>
            <groupId>org.codehaus.groovygroupId>
            <artifactId>groovy-allartifactId>
            <version>${groovy.version}version>
        dependency>
        <dependency>
            <groupId>org.apache.antgroupId>
            <artifactId>antartifactId>
            <version>1.10.3version>
        dependency>
    dependencies>
plugin>

build.groovy


log.info("Test");

你可能感兴趣的:(Maven 插件 执行install同时执行groovy脚本)