简体   繁体   English

龙目岛与Maven和Eclipse

[英]Lombok with Maven and Eclipse

<dependency> 
    <groupId>org.projectlombok</groupId> 
    <artifactId>lombok</artifactId>  
    <version>1.16.6</version>
   <scope>provided</scope>
</dependency>

Add the above lines in pom.xml ref https://projectlombok.org/mavenrepo/index.html 将以上行添加到pom.xml ref https://projectlombok.org/mavenrepo/index.html中

What these lines will do? 这些行会做什么?

Will they download and install Lombok in my project? 他们会在我的项目中下载并安装Lombok吗?

If yes, this is not working. 如果是,则不起作用。

@Data anotation not creating getter setters. @Data注释未创建getter的setter。

You cannot use Lombok by simply putting it as a dependency, you must install it to your favorite IDE, too. 您不能仅通过将Lombok用作依赖项来使用它,还必须将其安装到您喜欢的IDE中。 See the documentation here : 请参阅此处文档

Project Lombok is available as a single jar file on the project site. Lombok项目可以在项目站点上以单个jar文件的形式获得。 It includes the APIs for development as an installer for IDE integration. 它包括用于开发的API,作为IDE集成的安装程序。 On most systems, simply double-clicking the jar file will launch the installer. 在大多数系统上,只需双击jar文件即可启动安装程序。 If the system is not configured to correctly launch jar files, it can also be run from the command line as follows: 如果系统未配置为正确启动jar文件,则也可以从命令行如下运行它:

java -jar lombok.jar java -jar lombok.jar

The dependencies are additionally to that, not instead. 依赖关系是对此的补充,而不是替代。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM