Sure, here’s the translation: Maven:构建项目批处理

huangapple go评论64阅读模式
英文:

Maven : Build project batch

问题

我在使用Maven(Windows)生成项目时遇到了一些问题。

首先,我使用命令“mvn archetype:generate” -> 没有问题。

其次,我尝试使用批处理构建项目:

mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetype -DarchetypeArtifactId=maven.archetype.quickstart -DarchetypeVersion=1.1 -DgroupId=org.example.demo -DartifactId=ticket.batch -Dpackage=org.example.demo.batch

但是我遇到了错误:构建失败:

[ERROR] 无法执行目标 org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate(default-cli),项目 ticket 上的所需原型不存在(org.apache.maven.archetype:maven.archetype.quickstart:1.1)

我做错了吗?

谢谢。

英文:

i have some problems for generate project with Maven (Windows).

First, i use the command "mvn archetype:generate" -> No problem

Second, i try to build project with batch with :

mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetype -DarchetypeArtifactId=maven.archetype.quickstart -DarchetypeVersion=1.1 -DgroupId=org.example.demo -DartifactId=ticket.batch -Dpackage=org.example.demo.batch

But i have the error : BUILD FAILURE :

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project ticket: The desired archetype does not exist (org.apache.maven.archetype:maven.archetype.quickstart:1.1)

Am I doing it wrong?

Thanks.

答案1

得分: 1

似乎你正在搜索一个并不存在的原型,异常中已经表明。

你可能在搜索这个:

maven-archetype-quickstart

而不是原始的:

maven.archetype.quickstart

这是基本命令(你需要在这些命令之后添加你的自定义选项):

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

如果有帮助,请随意将其接受为答案 Sure, here’s the translation:
Maven:构建项目批处理

如果没有,我会回来的。

英文:

Seems like you'are searching for an archetype that does not exists as the exception "says".

You're propably seaching for this one :

maven-archetype-quickstart

and not the original

maven.archetype.quickstart

Here is the basic command (you have to had your customs options after theses ones):

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

Don't hesitate to accept as an answer if it help Sure, here’s the translation:
Maven:构建项目批处理

if no i will came back

huangapple
  • 本文由 发表于 2020年7月26日 19:20:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/63099417.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定