mvn archetype:create-from-project 构建模板错误
mvn archetype:create-from-project 构建模板错误
peizhenfly 发表于2年前
mvn archetype:create-from-project 构建模板错误
  • 发表于 2年前
  • 阅读 248
  • 收藏 1
  • 点赞 0
  • 评论 0
摘要: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2 .4:create-from-project (default-cli) on project caseimagesys: Error configuring command-line. Reason: Maven executable not found at: F:\developworkspace\apache- maven-3.3.3\bin\mvn.bat
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.4:create-from-project (default-cli) on project caseimagesys: Error configuring
command-line. Reason: Maven executable not found at: F:\developworkspace\apache-
maven-3.3.3\bin\mvn.bat -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.maven.plugins:maven-archetype-plugin:2.4:create-from-project (default-
cli) on project caseimagesys: Error configuring command-line. Reason: Maven exec
utable not found at: F:\developworkspace\apache-maven-3.3.3\bin\mvn.bat
        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.buildProje
ct(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.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:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.MojoFailureException: Error configuring comma
nd-line. Reason: Maven executable not found at: F:\developworkspace\apache-maven
-3.3.3\bin\mvn.bat
        at org.apache.maven.archetype.mojos.CreateArchetypeFromProjectMojo.execu
te(CreateArchetypeFromProjectMojo.java:260)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
        ... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc

eption

错误原因:mvn.bat 未找到,maven 3.3.3 的 mvn 是 mvn.cmd ,但archetype-plugin 2.4 未能更新这一变化

解决方法:复制 mvn.cmd 为 mvn.bat

共有 人打赏支持
粉丝 0
博文 36
码字总数 1188
×
peizhenfly
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: