Maven 新手,我应该使用什么命令 运行 构建 reddison
New to Maven, what command should I run to build reddison
我正在尝试构建 https://github.com/mrniko/redisson
当我运行mvn时,它报错
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, 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]
如果我使用一些随机的东西 mvn deploy
,jar 文件会在目标文件夹中创建,但是
[INFO] --- maven-deploy-plugin:2.8.1:deploy (default-deploy) @ redisson ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:11.837s
[INFO] Finished at: Wed Sep 23 17:12:52 IST 2015
[INFO] Final Memory: 29M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project redisson: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
只是好奇,正确的 mvn
命令是什么?
Maven 是一个构建工具,除非您指定使用命令行或在 pom.xml
中设置一些默认值,否则它本身并不知道任何事情
您通常也应该使用前面提到的 "mvn clean install" 来生成必要的可执行文件
"deploy" 目标用于将您的 jar/artifacts 推送到 MAVEN REPO,这是一个不同的服务器 - 该服务器保存工件,而不是像 github 或 SVN 这样的 SCM
因此,错误表明您需要在 POM 文件或 Maven 执行的 setting.xml 文件中指定 MAVEN REPO 服务器的详细信息
我正在尝试构建 https://github.com/mrniko/redisson
当我运行mvn时,它报错
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, 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]
如果我使用一些随机的东西 mvn deploy
,jar 文件会在目标文件夹中创建,但是
[INFO] --- maven-deploy-plugin:2.8.1:deploy (default-deploy) @ redisson ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:11.837s
[INFO] Finished at: Wed Sep 23 17:12:52 IST 2015
[INFO] Final Memory: 29M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project redisson: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
只是好奇,正确的 mvn
命令是什么?
Maven 是一个构建工具,除非您指定使用命令行或在 pom.xml
中设置一些默认值,否则它本身并不知道任何事情您通常也应该使用前面提到的 "mvn clean install" 来生成必要的可执行文件
"deploy" 目标用于将您的 jar/artifacts 推送到 MAVEN REPO,这是一个不同的服务器 - 该服务器保存工件,而不是像 github 或 SVN 这样的 SCM 因此,错误表明您需要在 POM 文件或 Maven 执行的 setting.xml 文件中指定 MAVEN REPO 服务器的详细信息