- Kotlin for Enterprise Applications using Java EE
- Raghavendra Rao K
- 62字
- 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>
推薦閱讀
- Extending Jenkins
- Python程序設(shè)計(jì)教程(第2版)
- Mastering AWS Lambda
- 零基礎(chǔ)學(xué)C++程序設(shè)計(jì)
- Learning Spring 5.0
- 深入淺出Electron:原理、工程與實(shí)踐
- Servlet/JSP深入詳解
- Processing互動編程藝術(shù)
- Rust Essentials(Second Edition)
- 移動界面(Web/App)Photoshop UI設(shè)計(jì)十全大補(bǔ)
- Learning JavaScript Data Structures and Algorithms
- Android系統(tǒng)原理及開發(fā)要點(diǎn)詳解
- Oracle GoldenGate 12c Implementer's Guide
- Scratch3.0趣味編程動手玩:比賽訓(xùn)練營
- Java編程從入門到精通