问题
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 :-
- checking out from svn
- cd to that checkout directory
- Executing my necessary svn commands
- Executing
mvn release:clean
- Executing
mvn release:prepare
- 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