- 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>
推薦閱讀
- Facebook Application Development with Graph API Cookbook
- C#程序設(shè)計實訓(xùn)指導(dǎo)書
- Developing Middleware in Java EE 8
- Ray分布式機器學(xué)習(xí):利用Ray進(jìn)行大模型的數(shù)據(jù)處理、訓(xùn)練、推理和部署
- Visual Basic程序設(shè)計習(xí)題解答與上機指導(dǎo)
- HTML5+CSS3網(wǎng)站設(shè)計教程
- Getting Started with Python Data Analysis
- Visual C++數(shù)字圖像處理技術(shù)詳解
- SharePoint Development with the SharePoint Framework
- Modern JavaScript Applications
- Visual Basic程序設(shè)計實驗指導(dǎo)(第二版)
- PySide 6/PyQt 6快速開發(fā)與實戰(zhàn)
- Mastering ROS for Robotics Programming
- Learning Nessus for Penetration Testing
- Scratch從入門到精通