Maven问题 - 您指定的目标需要执行项目,但此目录中没有POM

时间:2013-09-05 12:21:35

标签: svn maven maven-release-plugin

我正在使用maven发布插件2.2.1。在我的情况下,release:cleanrelease:prepare正在成功执行。但是当我尝试执行release:perform时,它会显示以下错误。

EXIMR-IM-187:rabbit_trunk manojkumarbardhan$ mvn release:perform
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Curo Fabric Component for RabbitMQ 2.0.20-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-release-plugin:2.2.1:perform (default-cli) @ curo-fabric-component-rabbitmq-experiments ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd /Users/manojkumarbardhan/QURO_PROJECT/rabbit_trunk/target && svn --non-interactive checkout http://ssygh.dgxxxgdf.xxx.com:1080/SVNROOT/CURO/Experiments/migration/tags/curo-fabric-component-rabbitmq-experiments-2.0.19 /Users/manojkumarbardhan/QURO_PROJECT/rabbit_trunk/target/checkout
[INFO] Working directory: /Users/manojkumarbardhan/QURO_PROJECT/rabbit_trunk/target
[INFO] Executing goals 'deploy'...
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 0.115s
[INFO] [INFO] Finished at: Thu Sep 05 17:40:01 GMT+05:30 2013
[INFO] [INFO] Final Memory: 2M/81M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/manojkumarbardhan/QURO_PROJECT/rabbit_trunk/target/checkout). Please verify you invoked Maven from the correct directory. -> [Help 1]
[INFO] [ERROR] 
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR] 
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.528s
[INFO] Finished at: Thu Sep 05 17:40:01 GMT+05:30 2013
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:perform (default-cli) on project curo-fabric-component-rabbitmq-experiments: Maven execution failed, exit code: '1' -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我不知道我做错了什么。

我遵循的流程是: -

  1. 从svn退房
  2. cd到该结帐目录
  3. 执行必要的svn命令
  4. 执行mvn release:clean
  5. 执行mvn release:prepare
  6. 执行mvn release:perform,但失败了。
  7. 先谢谢。

1 个答案:

答案 0 :(得分:1)

开发人员连接来自:

<scm>
  <developerConnection>scm:svn:https://svn.mycompany.com/repos/myapplication/trunk/mycomponent/</developerConnection>
</scm>

应指向您想要发布的maven项目。

此外,任意位置可用于插件配置中的释放标记:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5.2</version>
  <configuration>
    <tagBase>https://svn.mycompany.com/repos/myapplication/releases</tagBase>
  </configuration>
</plugin>

一个人必须正确阅读使用页面(我也没做过),一切都会正常工作。

尽管如此,我认为插件日志记录应该提供有关问题(或可能存在的问题)的更准确信息。