将自定义maven pom配置转换为自定义build.gradle配置

时间:2017-04-07 19:12:44

标签: java maven gradle plugins

我目前有一项任务是将我的项目从maven转移到gradle,并且想知道如何实现自定义插件的执行:

我的PoM:

<plugins>
  <plugin>
    <groupId>myproj.tool</groupId>
    <artifactId>my.plugin</artifactId>
    <executions>
      <execution>
        <goals>
          <goal>generate</goal>
        </goals>
        <phase>generate-sources</phase>
        <configuration>
          <dictFile>${basedir}/src/main/resources/project7.xml</dictFile>
          <packaging>custom.api</packaging>
          <fieldPackage>custom.api.field</fieldPackage>
          <!-- optional configs schemaDirectory, outputDirectory, decimal, orderedFields -->
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

到目前为止我的build.gradle文件

group = 'myproj.tool.plugin'
description = ''
dependencies {
  compile project('quickfixj-api')
}

0 个答案:

没有答案