spring-boot-quickstart-archtype icon indicating copy to clipboard operation
spring-boot-quickstart-archtype copied to clipboard

InvalidPackaging: Unable to add module to the current project

Open xilu-wang opened this issue 6 years ago • 0 comments

Hi, mvn clean install success, but fail to generate the project from mvn archetype:generate.

Error message:

$ mvn archetype:generate \

 -DarchetypeGroupId=com.romeh.spring-boot-archetypes \
 -DarchetypeArtifactId=spring-boot-quickstart \
 -DarchetypeVersion=1.0.0 \
 -DgroupId=com.test \
 -DartifactId=sampleapp \
 -Dversion=1.0.0-SNAPSHOT \
 -DinteractiveMode=false

[INFO] Scanning for projects... [INFO] [INFO] ------< com.romeh.spring-boot-archetypes:spring-boot-quickstart >------- [INFO] Building Spring Boot Maven Archetype: Quickstart 1.0.0 [INFO] --------------------------[ maven-archetype ]--------------------------- [INFO] [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ spring-boot-quickstart >>> [INFO] [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ spring-boot-quickstart <<< [INFO] [INFO] [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ spring-boot-quickstart --- [INFO] Generating project in Batch mode [INFO] Archetype repository not defined. Using the one from [com.romeh.spring-boot-archetypes:spring-boot-quickstart:1.0.0] found in catalog local [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: spring-boot-quickstart:1.0.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: com.test [INFO] Parameter: artifactId, Value: sampleapp [INFO] Parameter: version, Value: 1.0.0-SNAPSHOT [INFO] Parameter: package, Value: com.test [INFO] Parameter: packageInPathFormat, Value: com/test [INFO] Parameter: package, Value: com.test [INFO] Parameter: groupId, Value: com.test [INFO] Parameter: artifactId, Value: sampleapp [INFO] Parameter: version, Value: 1.0.0-SNAPSHOT WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.dom4j.io.SAXContentHandler (file:/Users/XXXXXX/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding() WARNING: Please consider reporting this to the maintainers of org.dom4j.io.SAXContentHandler WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.286 s [INFO] Finished at: 2019-09-16T08:54:52-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project spring-boot-quickstart: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

xilu-wang avatar Sep 16 '19 16:09 xilu-wang