# smartboot-archetype **Repository Path**: hadoopeco/smartboot-archetype ## Basic Information - **Project Name**: smartboot-archetype - **Description**: maven脚手架,用于快速创建smart-boot工程 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2016-11-15 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ##通过脚手架构建工程 mvn -X archetype:generate -DarchetypeGroupId=org.smartboot.maven.archetype -DarchetypeArtifactId=smartboot-archetype -DarchetypeVersion=1.0.0 -DarchetypeCatalog=local -DgroupId=com.test -DartifactId=hello-world -Dversion=1.0.0 -Dpackage=com.test 常见问题 1. 当出现如下错误提示时,可能您在执行`mvn install` 和 `mvn archetype:generate`命令都是在smart-boot-archetype工程目录下进行的。**其实这种操作方式是错误的**。在smart-boot-archetype工程目录下执行`mvn install`是为了将脚手架发布至本地maven仓库,`mvn archetype:generate`则需要在一个不包含pom.xml文件的目录下执行,执行完毕后会在当前目录下生成一个完整的maven工程 > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project smart-boot-archetype: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom' ##使用Maven中央仓库的脚手架构建工程 mvn -X archetype:generate -DarchetypeGroupId=org.smartboot.maven.archetype -DarchetypeArtifactId=smartboot-archetype -DarchetypeVersion=1.0.0 -DarchetypeCatalog=remote -DgroupId=com.test -DartifactId=hello-world -Dversion=1.0.0 -Dpackage=com.test