首页 > 技术文档 > IntelliJ IDEA 学习笔记
2017
12-28

IntelliJ IDEA 学习笔记

编译运行报错1
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
解决方法
添加以下到pom.xml
<build>
<defaultGoal>compile</defaultGoal>
</build>

 

编译运行报错2
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

解决方法
添加以下到pom.xml
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

编译运行报错3
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile

解决方法
http://blog.csdn.net/lmb55/article/details/76168451

IntellIJ IDEA 配置 Maven 以及 修改 默认 Repository
https://www.cnblogs.com/phpdragon/p/7216626.html

IntelliJ IDEA 14 如何运行maven程序
https://www.cnblogs.com/phpdragon/p/7216626.html

 

maven VM Options 设置

打开 Ctrl+Atl+S

-Xms128m -Xmx512m -Duser.language-zh -Dfile.encoding=UTF-8

最后编辑:
作者:dnybz
这个作者貌似有点懒,什么都没有留下。