栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

在Maven构建中使用Eclipse Java Compiler(ecj)

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在Maven构建中使用Eclipse Java Compiler(ecj)

可以更改

javac
.NET使用的默认编译器
maven-compiler-plugin
。Eclipse编译器捆绑在工件中,
plexus-compiler-eclipse
并通过设置
eclipse
为的
compilerId
属性来声明它
maven-compiler-plugin

如果要为自定义配置文件激活此更改,则可以具有以下配置:

<profile>  <id>ecj</id>  <build>    <plugins>      <plugin>        <artifactId>maven-compiler-plugin</artifactId>        <version>3.6.0</version>        <configuration>          <compilerId>eclipse</compilerId>        </configuration>        <dependencies>          <dependency> <groupId>org.prehaus.plexus</groupId> <artifactId>plexus-compiler-eclipse</artifactId> <version>2.8.1</version>          </dependency>        </dependencies>      </plugin>    </plugins>  </build></profile>

该插件在

plexus-compiler
GitHub存储库中维护。版本2.8.1 使用JDT的3.11.1.v20150902-1521,尽管您可以通过
org.eclipse.tycho:org.eclipse.jdt.core
在Plexus编译器依赖项之后添加依赖项来使用自己的版本。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/398234.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号