说明

系统 MAC

JAVA版本1.8

(Linux,ubuntu,centos 只要更改相应目录即可)

TOMCAT版本8.5

intellij idea 版本2017

MAVEN版本3.3.9

TOMCAT 8

http://tomcat.apache.org/download-80.cgi

mkdir -p ~/java
cd ~/java
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.13/bin/apache-tomcat-8.5.13.tar.gz
tar zxvf apache-tomcat-8.5.13.tar.gz
mv apache-tomcat-8.5.13 tomcat-8.5.13

风.fox

MAVEN

http://maven.apache.org/download.cgi Binary tar.gz archive

cd ~/java
wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar zxvf apache-maven-3.3.9-bin.tar.gz

设置MAVEN 环境变量 略

具体看如下链接

http://blog.csdn.net/fenglailea/article/details/53304479

配置

Preferences->Build,Execution,Deployment->Build Tools->Maven
以下信息根据个人配置进行设置

Maven home directory:        /Users/fox/java/apache-maven-3.3.9
User settings file:               /Users/fox/java/apache-maven-3.3.9/conf/settings.xml

Preferences->Build,Execution,Deployment->Build Tools->Maven->Importing

JDK for importer 选择 本地配置好的JDK

Preferences->Build,Execution,Deployment->Build Tools->Maven->Runner

JRE 选择 本地配置好的JDK

Preferences->Build,Execution,Deployment->Application Servers->

intellij idea 2017 maven 项目导入






intellij idea 2017 Tomcat 设置

菜单 Run->Edit Configurations

Defaults 展开,并滚动到 Tomcat Server 处,




intellij idea 2017 编译执行

intellij idea 2017 打包war

intellij idea 2017 Tomcat 设置中,点击FIX按钮时,弹出的 MVNFHM:WAR就是打war包

查看或设置 打包的,File->Project Stucture->Project Settings ->Artifacts

Logo

更多推荐