[英]Creating project from maven archetype: running mvn archetype:generate only creates an App class
I'm trying to create a project in a new directory from an archetype. 我正在尝试从原型在新目录中创建一个项目。 I've created the archetype, and ran "mvn install" in the project's generated-sources/archetype directory.
我已经创建了原型,并在项目的generate-sources / archetype目录中运行了“ mvn install”。 I then change to a fresh directly and run "mvn archetype:generate".
然后,我直接更改为全新并运行“ mvn archetype:generate”。 I'm then prompted for groupID, artifactID, etc. I provide them, and the project is created.
然后,提示我输入groupID,artifactID等。我提供它们,然后创建项目。 However, when I open that new project, instead of having all the classes and such from the archetype, it only has a blank App.java class.
但是,当我打开新项目时,它没有原型中的所有类,而是只有一个空白的App.java类。 What am I doing wrong?
我究竟做错了什么?
Running mvn install archetype:update-local-catalog will make the custom archetype available. 运行mvn install archetype:update-local-catalog将使自定义原型可用。 Then running mvn archetype:generate -DarchetypeCatalog:local allowed me to be able to select my custom archetype to create the new project from.
然后运行mvn archetype:generate -DarchetypeCatalog:local使我能够选择自定义原型以从中创建新项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.