官术网_书友最值得收藏!

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>
主站蜘蛛池模板: 东乡族自治县| 革吉县| 樟树市| 基隆市| 前郭尔| 军事| 云安县| 沈阳市| 沈丘县| 子长县| 太仆寺旗| 循化| 郓城县| 台东市| 从化市| 平泉县| 日照市| 邹城市| 灵宝市| 唐河县| 灵宝市| 四子王旗| 崇仁县| 铜陵市| 大丰市| 靖江市| 陈巴尔虎旗| 彭泽县| 将乐县| 崇阳县| 隆安县| 确山县| 晋江市| 霍州市| 手游| 潞西市| 响水县| 浦江县| 墨脱县| 韶山市| 额尔古纳市|