在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):LendingClub/gradle-maven-plugin开源软件地址(OpenSource Url):https://github.com/LendingClub/gradle-maven-plugin开源编程语言(OpenSource Language):Java 99.3%开源软件介绍(OpenSource Introduction):gradle-maven-pluginThis is a maven plugin that makes it easy to invoke Gradle tasks from within Maven. ObjectiveGradle is an awesome general-purpose tool. If your project/organization is committed to maven, switching to gradle may not be a practical option. The plugin is conceptually similar to the maven-antrun-plugin, which allows ant to be invoked from maven. Now instead of using Ant to perform ad-hoc tasks from within Maven, you can use Groovy/Gradle instead! UsageThe gradle-maven-plugin is now in Maven Central, so there is no need to declare a custom repository. To use the plugin, simply declare the plugin and bind it to the maven lifecycle phase of your choice: <plugin>
<groupId>org.fortasoft</groupId>
<artifactId>gradle-maven-plugin</artifactId>
<version>1.0.8</version>
<configuration>
<tasks>
<!-- this would effectively call "gradle doSomething" -->
<task>doSomething</task>
</tasks>
</configuration>
<executions>
<execution>
<!-- You can bind this to any phase you like -->
<phase>compile</phase>
<goals>
<!-- goal must be "invoke" -->
<goal>invoke</goal>
</goals>
</execution>
</executions>
</plugin> Now when you run maven, gradle will be invoked and execute the "doSomething" task defined in Obviously you can change the task(s) to suit your needs. In this example, the gradle invocation will happen during the maven "compile" phase, but this can be easily changed by changing the <phase> element value. OptionsThese options can be given in the <configuration> element:
Plugin TestingHere is some information on maven plugin testing. This project is currently using the maven-invoker-plugin for testing.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论