EasyAnt comes with a module named skeleton that allows you to create or install project skeletons. This could be pretty useful to quickstart a project.
By default, this module works in interactive mode, which means that easyant will ask you questions for every required property. But you can still give parameters on the command line using -Dproperty. Interactive mode can be disabled by setting skeleton.interactive.mode=false.
> easyant skeleton:select
skeleton-select: [echo] Choose a skeleton in the following list: [ea:searchmodule] 0: std-java-webapplication v0.1 (Skeleton for creating standard java web application) [ea:searchmodule] 1: std-ant-plugin v0.1 (Skeleton for creating ant based plugin for easyant) [ea:searchmodule] 2: std-java-application v0.1 (Skeleton for creating standard java application) [ea:searchmodule] 3: std-skeleton v0.1 (Emtpy skeleton structure) [ea:searchmodule] Choose a number: (0, 1, 2, 3)
[input] The path where the skeleton project will be unzipped [.] [input] Organisation name of YOUR project org.mycompany [input] Module name of YOUR project myProject [input] Revision number of YOUR project [0.1]
If you prefer to use it in that way you should use ":generate" target. Example if your skeleton module is imported as "skeleton", you should use :
> easyant skeleton:create
[input] Organisation name of the skeleton project org.apache.easyant.skeletons [input] Module name of the skeleton project std-java-skeleton [input] Revision number of the skeleton project 0.1 [input] The path where the skeleton project will be unzipped [.] . [input] Organization name of YOUR project org.mycompany [input] Module name of YOUR project myProject [input] Revision number of YOUR project [0.1] 0.1
> easyant skeleton:newskeleton
[input] The path where the skeleton project will be unzipped [.] [input] Organisation name of YOUR project [org.apache.easyant.skeletons] [input] Module name of YOUR project myskeleton [input] Revision number of YOUR project [0.1]
. |-- module.ivy `-- src |-- main | `-- resources | `-- module.ivy.tpl `-- test `-- antunit `-- myskeleton-test.xml
Example : Supposing we want to create a project called "std-java-skeleton".
. |-- module.ivy `-- src |-- main | `-- resources | |-- module.ivy.tpl | `-- src | |-- main | | `-- resources | | `-- temp-plugin.ant.tpl | `-- test | `-- antunit | `-- temp-plugin-test.xml.tpl `-- test `-- antunit