Gradleに移植しようとしている既存のMavenプロジェクトがあります。
1つのサブモジュールはfmpp/freemarkerを使用して、ビルドにフィードバックされる大量のJavaファイルを生成します。
私はgradleを初めて使用しますが、これを行う簡単な方法を誰かが知っているかどうか疑問に思っていました。
どんな助けでもいただければ幸いです。
私の現在のpom.xmlは次のようになります。
<build>
<plugins>
<!-- Freemarker maven plugin for code generation -->
<plugin>
<groupId>com.googlecode.fmpp-maven-plugin</groupId>
<artifactId>fmpp-maven-plugin</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.unix4j</groupId>
<artifactId>unix4j-tools</artifactId>
<version>0.1-SNAPSHOT</version>
<optional>true</optional>
</dependency>
</dependencies>
<configuration>
<cfgFile>src/main/resources/codegen/config.fmpp</cfgFile>
<outputDirectory>target/generated-sources/main/java</outputDirectory>
<templateDirectory>src/main/resources/codegen/templates</templateDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/generated</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>