書名: Kotlin for Enterprise Applications using Java EE作者名: Raghavendra Rao K本章字?jǐn)?shù): 62字更新時(shí)間: 2021-06-10 18:49:30
Using the no-org plugin in Maven
Using the no-org compiler plugin is the same as the all-open plugin. The kotlin-maven-noarg dependency has to be added to the pom.xml file and we specify the plugin in the plugin section:
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<configuration>
<compilerPlugins>
<plugin>no-arg</plugin>
</compilerPlugins>
<pluginOptions>
<option>no-arg:annotation=org.rao.kotlin.javaee.MyClass</option>
<!-- <option>no-arg:invokeInitializers=true</option> -->
</pluginOptions>
</configuration>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-noarg</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
推薦閱讀
- Mastering JavaScript Functional Programming
- C++程序設(shè)計(jì)(第3版)
- ASP.NET MVC4框架揭秘
- 零基礎(chǔ)學(xué)Scratch少兒編程:小學(xué)課本中的Scratch創(chuàng)意編程
- 控糖控脂健康餐
- R語言數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南
- Windows Presentation Foundation Development Cookbook
- 從學(xué)徒到高手:汽車電路識圖、故障檢測與維修技能全圖解
- Python數(shù)據(jù)分析從0到1
- Python Data Science Cookbook
- Learning Splunk Web Framework
- jQuery從入門到精通(微課精編版)
- Python預(yù)測分析與機(jī)器學(xué)習(xí)
- PHP動態(tài)網(wǎng)站開發(fā)實(shí)踐教程
- Java 7 Concurrency Cookbook