mvn archetype:generate -DgroupId=com.tony.bank -DartifactId=consumerBB -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
根据 maven 教程输入上面命令创建新项目时,会出现如下错误 :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate (default-cli) on project consumerBB: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
创建一个新的空的目录,执行上面的 maven 命令。
如果不是空目录就可能会出现上面错误。
maven 教程 : maven, tutorialspoint
参考 : Error when creating a new maven project,stackoverflow