Home » Java » How to change the default project name generated by maven archetype

How to change the default project name generated by maven archetype

Posted by: admin July 15, 2018 Leave a comment

Questions:

Is there a way to change the default Project Name in Maven archetype? in this case it defaults to artifactId I want to set the Project Name = __artifactId__-system.

I’m creating the new project with this command:

mvn archetype:generate -DarchetypeGroupId=some.group.name -DarchetypeArtifactId=project-template-archetype -DarchetypeVersion=1.0.0

I have all the default properties and some custom ones.

package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=basic
configName=vars_basic_
boost=boost_

This is the structure generated by my mvn clean install test project:

project
 |
 +-- basic
 |
 +-- basic
     |
     +-- src
         |
         +-- config
             |
             +-- assembly
             +-- main
                 |
                 +-- bw-conf
                 +--ems-conf
                     |
                     +-- 0.1-SNAPSHOT
         +-- main
             |
             +-- bw-basic
                 |
                 +-- AESchemas
                     |
                     +-- ae
                 +-- defaultVars
                     |
                     +-- modules
                         |
                         +-- module.1
                             |
                             +-- starterConfig.1
                     +-- system
                         |
                         +-- jms
                             |
                             +-- default
                                 |
                                 +-- queues
                                     |
                                     +-- module.1
                                 |
                                 +-- topics
                                     |
                                     +-- module.1
                 +-- deployment
                 +-- modules
                     |
                     +-- module.1
                         |
                         +-- businessProcesses
                         +-- sharedResources
                         +-- starterProcesses
                             |
                             +-- http
                             +-- jms
                         +-- unitTestProcesses

Thanks in advance.

Answers: