Maven Issue - The goal you specified requires a project to execute but there is no POM in this directory

杀马特。学长 韩版系。学妹 提交于 2019-12-23 05:16:41

问题


I am using maven release plugin 2.2.1 . In my case release:clean and release:prepare is executing successfully . But when I am trying to execute release:perform it show the following error.

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

I do not know what wrong i did.

The process I am following is :-

  1. checking out from svn
  2. cd to that checkout directory
  3. Executing my necessary svn commands
  4. Executing mvn release:clean
  5. Executing mvn release:prepare
  6. Executing mvn release:perform , but it fails.

Thanks in Advance.


回答1:


Developer connection from:

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

should point to your maven project that you want to release.

Also, arbitrarily location can be used for release tag in plugin configuration:

<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>

One has to read usage page properly (which I also didn't do) and everything will work fine.

Still, I believe that plugin logging should give more precise information about the problem (or possible problems).



来源:https://stackoverflow.com/questions/18636196/maven-issue-the-goal-you-specified-requires-a-project-to-execute-but-there-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!