===================================================
maven 执行
官方说明:http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
mvn clean dependency:copy-dependencies package
This command will clean the project, copy dependencies, and package the project (executing all phases up to package, of course).
mvn eclipse:eclipse
======================================================
maven 安装
You can download the current documentation, i.e. this website, as:
Previous Releases
All previous releases of Maven can be found in the archives.
JDK |
1.5 or above (this is to execute Maven - it still allows you to build against 1.3 and prior JDK's) |
Memory |
No minimum requirement |
Disk |
No minimum requirement. Approximately 100MB will be used for your local repository, however this will vary depending on usage and can be removed and redownloaded at any time. |
Operating System |
No minimum requirement. On Windows, Windows NT and above or Cygwin is required for the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X. |
Maven is a Java tool, so you must have Java installed in order to proceed. More precisely, you need a Java Development Kit (JDK), the Java Runtime Environment (JRE) is not sufficient.
Additional optional installation steps are listed after the platform specific instructions.
Windows 2000/XP
- Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you wish to install Maven 3.0.4. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.4 will be created from the archive.
- Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.0.4. Be sure to omit any quotation marks around the path even if it contains spaces. Note: For Maven < 2.0.9, also be sure that the M2_HOME doesn't have a '\' as last character.
- In the same dialog, add the M2 environment variable in the user variables with the value %M2_HOME%\bin.
-
Optional: In the same dialog, add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the value -Xms256m -Xmx512m. This environment variable can be used to supply extra options to Maven.
- In the same dialog, update/create the Path environment variable in the user variables and prepend the value %M2% to add Maven available in the command line.
- In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02 and that %JAVA_HOME%\bin is in your Path environment variable.
- Open a new command prompt (Winkey + R then type cmd) and run mvn --version to verify that it is correctly installed.
Unix-based Operating Systems (Linux, Solaris and Mac OS X)
- Extract the distribution archive, i.e. apache-maven-3.0.4-bin.tar.gz to the directory you wish to install Maven 3.0.4. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.0.4 will be created from the archive.
- In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.4.
- Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.
-
Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven.
- Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.
- Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.5.0_02 and that $JAVA_HOME/bin is in your PATH environment variable.
- Run mvn --version to verify that it is correctly installed.
Optional configuration
Maven will work for most tasks with the above configuration, however if you have any environmental specific configuration outside of individual projects then you will need to configure settings. The following sections refer to what is available.
Settings
Maven has a settings file located in the Maven installation and/or user home directory that configure environmental specifics such as:
- HTTP proxy server
- repository manager location
- server authentication and passwords
- other configuration properties
For information on this file, see the Settings reference
Security
As of Maven 2.1.0+, you can encrypt passwords in your settings file, however you must first configure a master password. For more information on both server passwords and the master password, see the Guide to Password Encryption.
Toolchains
As of Maven 2.0.9+, you can build a project using a specific version of JDK independent from the one Maven is running with. For more information, see the Guide to Using Toolchains.
分享到:
相关推荐
maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装maven安装...
### Maven安装和使用详解 #### 一、Maven概述 Maven是一款强大的开源项目管理和构建工具,由Apache软件基金会维护。Maven适用于基于Java平台的项目管理,支持从小型开源库到大型企业级应用程序的构建需求。无论是...
** Maven安装包与Maven安装步骤详解 ** Maven,作为Java项目管理和构建工具,是开发者不可或缺的一部分。它简化了构建过程,通过依赖管理和项目对象模型(Project Object Model,POM)来统一项目的构建配置。以下将...
### Maven安装配置说明 #### Maven概述 Maven是一款强大的项目管理工具,主要用于Java项目的构建、依赖管理和项目信息管理。随着软件公司对项目管理规范性的需求日益增加,Maven的应用比例也在持续上升。通过Maven...
### Maven安装与配置详解 #### 一、Maven简介 Maven是一款由Apache软件基金会支持的项目管理和理解工具。它可以帮助开发者自动构建Java项目,并管理项目的依赖关系。Maven使用XML格式来描述项目的构建规则,这使得...
### Maven安装与环境变量配置详解 #### 一、Maven简介 Apache Maven 是一个软件项目管理工具,基于项目对象模型(POM),通过一小段描述信息来管理项目的构建、报告和文档。Maven 提供了一个项目对象模型(POM)来管理...
### Maven安装文件 Maven的安装文件通常以`.zip`或`.tar.gz`格式提供,你可以从Apache官方网站(https://maven.apache.org/download.cgi)下载最新版本。下载完成后,根据你的操作系统选择合适的解压工具进行解压。 ...
【Maven 安装使用详解】 Maven 是一个强大的项目管理工具,专为 Java 开发者设计,用于项目构建、依赖管理和项目信息管理。通过 Maven,开发者可以避免手动管理库文件,简化项目的构建过程,同时提供了一种标准化的...
### Maven 安装及配置详解 #### 一、Maven 的意义与优势 Maven 是一个流行的项目管理和构建工具,最初由 Sonatype 开发,现在是 Apache 软件基金会的一部分。它通过一种标准化的方式帮助开发者管理 Java 项目的...
【Maven安装与配置的详细步骤】 Maven是一款基于Java的开源项目管理工具,由Apache软件基金会开发。它采用Project Object Model(POM)的概念,将项目配置信息集中于一个名为POM.xml的文件中,使得Maven能够管理...
### Maven安装指南:详细步骤与环境配置教程 Maven是一个非常重要的项目管理和构建自动化工具,主要用于基于Java的应用程序。通过Maven,开发者可以方便地管理项目依赖、构建过程以及项目文档,大大提高了开发效率...
maven安装的文档,描述了maven的安装,环境变量配置,myeclipse配置。简单易懂,完整实用。
Maven 安装配置指南 本资源为 Maven 安装配置的详细指南,旨在帮助用户快速搭建 Maven 开发环境,并在 MyEclipse 中进行完美运行。以下是 Maven 安装配置的详细步骤: Step 1:下载 Maven 首先,需要下载 Maven ...
【 Maven 安装详解】 Maven 是一个项目管理和综合工具,它主要负责构建、依赖管理和项目信息管理。本文将详细讲解 Maven 的安装过程,帮助初学者快速掌握 Maven 的使用。 首先,我们需要准备以下工具: 1. JDK:...
### Maven安装与配置详解 #### 一、Maven简介及安装流程 Maven是一个非常流行的Java项目管理和构建工具,能够帮助开发者自动化构建过程中的许多任务,例如编译、测试、打包、部署等。通过Maven,可以有效地管理...
### 四、验证Maven安装 完成上述步骤后,打开命令行终端,输入`mvn -version`。如果正确安装,你应该能看到Maven的版本信息,表明已成功安装。 ### 五、配置Maven settings.xml Maven的配置文件`settings.xml`...
### Maven安装及Eclipse配置详解 #### Maven简介与安装步骤 **Maven**是一款由Apache组织提供的项目管理和构建工具,它能帮助开发者更好地管理项目的构建、依赖关系等。Maven的强大之处在于它提供了统一的标准流程...
6. **测试Maven安装**:通过命令行检查Maven是否正确安装,可以使用`echo %M2_HOME%`查看M2_HOME变量,以及`mvn -v`命令查看Maven版本信息,确认Maven可以正常使用。 7. **Maven的用途**:Maven通过POM文件管理项目...
"Maven安装与下载" Maven是一种基于项目对象模型(POM)的项目管理工具,由于其灵活性和可扩展性,广泛应用于 Java 项目开发中。下面我们将详细介绍 Maven 的安装和下载过程。 Maven 安装前的准备 在安装 Maven ...