我在Windows上从源代码构建apache hive。这样做是要求我执行以下命令:
mvn clean install -Phadoop-2,dist
麻烦的是,如果我尝试在没有cygwin的情况下执行以下命令,我会收到此错误:
[ERROR] Unknown lifecycle phase "dist". 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, i
nitialize, 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-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
但是,如果我从cygwin启动相同的命令,编译工作完美。 可以肯定的是,我检查过使用和不使用cygwin的maven之间没有任何版本差异:
mvn -version
没有cygwin
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
Maven home: C:\apache-maven-3.1.1
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: C:\PROGRA~1\Java\jdk1.7.0_51\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
mvn -version
与cygwin
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
Maven home: C:\apache-maven-3.1.1
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: C:\PROGRA~1\Java\jdk1.7.0_51\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
正如你所看到的,他们是一样的。
这是由于蜂巢,还是windows-native maven和cygwin maven之间有什么区别?