Can I convert an artifactId to a classname prefix in my maven archetype?

后端 未结 3 1506
北海茫月
北海茫月 2021-02-19 03:19

I\'m creating a maven archetype and in the projects generated a want a class that is named after the artifact id of the generated project.

The artifact id will be format

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-19 03:52

    To variabilize your file name, you can set a requiredProperty and use other properties to build it

    RouteBuilder${flowName.toUpperCase()}${flowWay.substring(0,1).toUpperCase()}${flowWay.substring(1)}

    Then name the template file : __routeBuilderFileName__.java

提交回复
热议问题