gpt4 book ai didi

java - 在 Intellij 中执行 Maven Clean 构建时无法执行提取错误

转载 作者:行者123 更新时间:2023-12-04 09:34:13 26 4
gpt4 key购买 nike

我在执行 maven clean install 时收到错误“无法执行提取”。虽然同样的事情在其他人的 Intellij 中工作。我已经检查了 Maven settings.xml 和其他配置,它与其他队友相同但无法找出根本原因。此外,我能够登录到我的 Bitbucket 帐户。以下是获取构建错误时的堆栈跟踪:

org.eclipse.jgit.api.errors.TransportException: https:SomeBitbucketURL/project.git: Authentication is required but no CredentialsProvider has been registered
at org.eclipse.jgit.api.FetchCommand.call (FetchCommand.java:254)
at pl.project13.maven.git.JGitProvider.fetch (JGitProvider.java:352)
at pl.project13.maven.git.JGitProvider.getAheadBehind (JGitProvider.java:339)
at pl.project13.maven.git.GitDataProvider.lambda$loadGitData$17 (GitDataProvider.java:174)
at pl.project13.maven.git.GitDataProvider.lambda$memoize$23 (GitDataProvider.java:272)
at pl.project13.maven.git.GitDataProvider.lambda$loadGitData$18 (GitDataProvider.java:175)
at pl.project13.maven.git.GitDataProvider.maybePut (GitDataProvider.java:255)
at pl.project13.maven.git.GitDataProvider.loadGitData (GitDataProvider.java:175)
at pl.project13.maven.git.GitCommitIdMojo.loadGitDataWithJGit (GitCommitIdMojo.java:604)
at pl.project13.maven.git.GitCommitIdMojo.loadGitData (GitCommitIdMojo.java:563)
at pl.project13.maven.git.GitCommitIdMojo.execute (GitCommitIdMojo.java:458)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
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)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: org.eclipse.jgit.errors.TransportException: https:SomeBitbucketURL/project.git: Authentication is required but no CredentialsProvider has been registered
at org.eclipse.jgit.transport.TransportHttp.connect (TransportHttp.java:537)
at org.eclipse.jgit.transport.TransportHttp.openFetch (TransportHttp.java:362)
at org.eclipse.jgit.transport.FetchProcess.executeImp (FetchProcess.java:138)
at org.eclipse.jgit.transport.FetchProcess.execute (FetchProcess.java:124)
at org.eclipse.jgit.transport.Transport.fetch (Transport.java:1271)
at org.eclipse.jgit.api.FetchCommand.call (FetchCommand.java:243)
at pl.project13.maven.git.JGitProvider.fetch (JGitProvider.java:352)
at pl.project13.maven.git.JGitProvider.getAheadBehind (JGitProvider.java:339)
at pl.project13.maven.git.GitDataProvider.lambda$loadGitData$17 (GitDataProvider.java:174)
at pl.project13.maven.git.GitDataProvider.lambda$memoize$23 (GitDataProvider.java:272)
at pl.project13.maven.git.GitDataProvider.lambda$loadGitData$18 (GitDataProvider.java:175)
at pl.project13.maven.git.GitDataProvider.maybePut (GitDataProvider.java:255)
at pl.project13.maven.git.GitDataProvider.loadGitData (GitDataProvider.java:175)
at pl.project13.maven.git.GitCommitIdMojo.loadGitDataWithJGit (GitCommitIdMojo.java:604)
at pl.project13.maven.git.GitCommitIdMojo.loadGitData (GitCommitIdMojo.java:563)
at pl.project13.maven.git.GitCommitIdMojo.execute (GitCommitIdMojo.java:458)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
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)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)

最佳答案

也许您可以通过以下方式找到解决方法:https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/421

在 3.0.0 中,我们获得了两个新属性 (git.local.branch.ahead/git.local.branch.behind),它们几乎只有在使用 git pull prior 时才是正确的。此 git pull 可能会导致此类传输异常(并且需要互联网)。

随着 3.0.1 将有一个更明确的离线选项。真正的解决办法是,除非另有说明,否则我们会让插件在离线模式下工作。当用户在离线模式下操作并使用上述选项时,此插件会生成警告。

<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<configuration>
<offline>true</offline>
</configuration>
</plugin>
</plugins>
</build>

或其他方式

<configuration>
<excludeProperties>
<excludeProperty>^git.local.branch.*$</excludeProperty>
</excludeProperties>
</configuration>

关于java - 在 Intellij 中执行 Maven Clean 构建时无法执行提取错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62671770/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com