Gradle counterpart to Maven archetype?
Use build init plugin:
~$ mkdir newproj
~$ cd newproj
~/newproj$ gradle init --type java-library
At the moment java-library
, scala-library
, groovy-library
, java-application
, pom
and basic
supported. The feature is incubating, thus it can be changed in future releases, so keep an eye on docs.
Gradle doesn't support this (yet). There's a open feature request opened already.
There is no gradle counterpart as far as I know. However following the steps given below is enough for most cases:
- Generate project with maven and your selection of maven archetype.
- Convert the maven project to gradle project. You can do that by executing the below command in the directory where your master pom.xml is located:
gradle init
It is supposed to work with all basic maven archetypes.
While this is not yet supported by Gradle, the gradle:templates plugin looks promising:
Gradle don't support build-in archetype-like feature, but you can use plug-in named Gradle templates
Read more:
Does gradle have Maven archetype-like functionality?
Gradle archetypes issue