使用 Maven 构建 Geoserver 时出现 MojoExecutionException

MojoExecutionException when building Geoserver with maven

我正在尝试从源代码构建 GeoServer。尝试从 'geoserver/src'.

运行 maven 命令时出现以下错误
[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.15:revision (default) on project geoserver: Could not complete Mojo execution... Unable to find commits until some tag: Walk failure. Missing commit b3af7f46250c529c51402d2eb948987385690d3d -> [Help 1]

我尝试通过设置代理来解决,但失败了。任何人都可以帮助我吗?在此先感谢。

PS:这是我 运行 mvn -X clean install

时错误的完整堆栈跟踪
    [ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.15:revision (default) on project geoserver: Could not complete Mojo execution... Unable to find commits until some tag: Walk failure. Missing commit b3af7f46250c529c51402d2eb948987385690d3d -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.15:revision (default) on project geoserver: Could not complete Mojo execution...
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    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:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not complete Mojo execution...
    at pl.project13.maven.git.GitCommitIdMojo.handlePluginFailure(GitCommitIdMojo.java:457)
    at pl.project13.maven.git.GitCommitIdMojo.execute(GitCommitIdMojo.java:393)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: java.lang.RuntimeException: Unable to find commits until some tag
    at pl.project13.jgit.JGitCommon.findCommitsUntilSomeTag(JGitCommon.java:286)
    at pl.project13.jgit.DescribeCommand.call(DescribeCommand.java:298)
    at pl.project13.maven.git.JGitProvider.getGitDescribe(JGitProvider.java:234)
    at pl.project13.maven.git.JGitProvider.getGitDescribe(JGitProvider.java:125)
    at pl.project13.maven.git.GitDataProvider.maybePutGitDescribe(GitDataProvider.java:139)
    at pl.project13.maven.git.GitDataProvider.loadGitData(GitDataProvider.java:104)
    at pl.project13.maven.git.GitCommitIdMojo.loadGitDataWithJGit(GitCommitIdMojo.java:585)
    at pl.project13.maven.git.GitCommitIdMojo.loadGitData(GitCommitIdMojo.java:558)
    at pl.project13.maven.git.GitCommitIdMojo.execute(GitCommitIdMojo.java:376)
    ... 22 more
Caused by: org.eclipse.jgit.errors.RevWalkException: Walk failure.
    at org.eclipse.jgit.revwalk.RevWalk.iterator(RevWalk.java:1306)
    at pl.project13.jgit.JGitCommon.findCommitsUntilSomeTag(JGitCommon.java:274)
    ... 30 more
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing commit b3af7f46250c529c51402d2eb948987385690d3d
    at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:149)
    at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:884)
    at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:145)
    at org.eclipse.jgit.revwalk.PendingGenerator.next(PendingGenerator.java:148)
    at org.eclipse.jgit.revwalk.StartGenerator.next(StartGenerator.java:186)
    at org.eclipse.jgit.revwalk.RevWalk.next(RevWalk.java:422)
    at org.eclipse.jgit.revwalk.RevWalk.iterator(RevWalk.java:1304)
    ... 31 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

这个麻烦的原因是我使用的是地理服务器的浅克隆。克隆整个存储库将解决此问题。

感谢 Mark Prins 在 Geoserver-users 邮件列表中回答了我的问题