gpt4 book ai didi

java - NullPointerException原型(prototype):crawl

转载 作者:行者123 更新时间:2023-12-02 05:58:57 24 4
gpt4 key购买 nike

我正在尝试发现本地存储库中安装的原型(prototype)。我读到可以运行以下命令:

mvn archetype:crawl

现在,当我运行此命令时,我收到此错误:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:crawl (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:crawl failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:crawl (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:crawl failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:crawl failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.NullPointerException
at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.closeZipFile(DefaultArchetypeArtifactManager.java:584)
at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.isFileSetArchetype(DefaultArchetypeArtifactManager.java:196)
at org.apache.maven.archetype.repositorycrawler.DefaultRepositoryCrawler.crawl(DefaultRepositoryCrawler.java:72)
at org.apache.maven.archetype.mojos.CrawlRepositoryMojo.execute(CrawlRepositoryMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 20 more

最佳答案

我也遇到了同样的问题。在构建失败之前出现“打开 zip 文件时出错”的空指针。我通过删除有问题的文件来修复它,该文件是我本地 Maven 存储库中损坏的 jar(尝试使用 winrar 打开它时出现错误)。

关于java - NullPointerException原型(prototype):crawl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22833438/

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