Maven的配置
- 步骤一:Window/Preferences/Maven/Installations/add
- 步骤一:Window/Preferences/Maven/User Setting
Maven的简介和使用
Maven介绍
Maven核心特性
Maven的坐标
Maven的目录结构
Maven依赖管理
Maven本地仓库和中央仓库
项目打包(jar)
流程
- 步骤一:安装插件
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.5</version>
<configuration>
<archive>
<manifest>
<mainClass>com.imooc.maven.PinyinTestor</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
- 步骤二: Run Configurations.../Maven Build/New Configuration,配置运行
Maven构建web项目
创建
-
步骤一:创建Server
-
步骤二:File/New MavenProjct/Create a simple project
- 步骤三:JRE System Library目录/Properties
- 步骤四:工程目录/Properties/Java Compiler
- 步骤五:main目录/New Folder/webapp
- 步骤六:工程目录/Properties/Project Facets/Convert fo facted form...
- 步骤七:Futher configuration available
- 步骤八:工程目录/Properties/Deployment Assembly/Add/Java Build Path Entries/Next/Maven Dependencies
打包(war)
- 步骤一:安装插件
<packaging>war</packaging>
<build>
<finalName>maven-web</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
</plugins>
</build>
- 步骤二:Run Configurations.../Maven Build/New Configuration