这是我第一次在公共论坛寻求帮助。所以无论如何微软 Windows 一直是我作为开发环境的舒适区,最近我在工作中被扔进了一个 linux 环境,我似乎已经掌握了一些东西,但是当我尝试设置 Maven2 时遇到了一些问题,稍后我将讨论问题部分,但这就是我设置 maven 的方式
提取maven到/usr/local/maven/apache-maven-2.2.1
使用以下命令创建了指向“/usr/bin”的符号链接
sudo ln -s /usr/local/maven/apache-maven-2.2.1 /usr/bin/mvn
当我mvn --version
输出 :
Apache Maven 2.2.1 (r801777; 2009-08-07 00:46:01+0530) Java 版本:1.7.0_25 Java 主页:/usr/local/java/jdk1.7.0_25/jre 默认语言环境:en_US,平台编码:UTF-8 操作系统名称:“linux”版本:“2.6.32-24-generic”arch:“i386”系列:“unix”
但是当我尝试做
mvn clean
输出 :
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).