我已经使用以下方法配置了一个maven项目来检查项目:
<scm>
<developerConnection>scm:git:git@git.github.com:example/myproject.git</developerConnection>
</scm>
使用:mvn scm:checkout
该项目检查正常。
我希望如果scm:checkout工作,scm:update也应该工作。但事实并非如此。 通过运行“-e”选项(mvn -e scm:update)来获取完整的堆栈跟踪,它将显示一些模糊的错误消息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.8.1:update (default-cli) on project mysampleproject: Command failed.The git-log command failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.8.1:update (default-cli) on project mysampleproject: Command failed.The git-log command failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command failed.The git-log command failed.
at org.apache.maven.scm.plugin.AbstractScmMojo.checkResult(AbstractScmMojo.java:439)
at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:93)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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
现在这个错误应该告诉我什么?这可能是Maven-scm-Plugin中的一个错误吗?因为“git-log”当然不存在,它的“git log”可以为你提供Git日志历史记录。
此外,给定的帮助链接也无济于事(从我的角度来看)。