Working with skeletons of project
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.
How to create a new project using a project skeleton ?
You must use the :create 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
foo
[input] Module name of YOUR project
bar
[input] Revision number of YOUR project [0.1]
0.1
How to install a new project skeleton on a repository ?
You must use the :install target.
Example if your skeleton module is imported as "skeleton", you should use :
> easyant skeleton:install
This target will package a directory and publish it on a repository.
If you need to use pattern replacement, you must add a .tpl at the end of your file.
Example :
Supposing we want to create a project called "std-java-skeleton".
- we need to create a directory structure (src/main/java, src/main/resources etc...)
- then we will create module.ivy template namedmodule.ivy.tpl
This file will look like this<ivy-module version="2.0">
By default easyant comes with 3 replacement patterns:
<info organisation="@project.organization.name@" module="@project.module.name@" revision="@project.revision.number@" status="integration" >
<ea:build organisation="org.apache.easyant.buildtypes" module="build-std-java" revision="0.2"/>
</info>
<configurations>
<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf"/>
<conf name="test" visibility="private" description="this scope
indicates that the dependency is not required for normal use of
the application, and is only available for the test compilation
and execution phases."/>
</configurations>
<dependencies/>
</ivy-module>
- project.organisation
- project.module
- project.revision
- run a :install target (by settings the required property on the command line or by answering easyant questions)
Example :
[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 that will be packaged [.]
.
[input] The repository name where the skeleton will be published [local]
local
[input] The status of the skeleton that will be published [release]
release
List of existing project skeletons
Here you can find a list of skeletons provided by easyant distribution.| Organisation | Module | Revision | Description |
| org.apache.easyant.skeletons | std-java-application | 0.1 | Project skeleton used to create standard java application |
| org.apache.easyant.skeletons | std-java-webapplication | 0.1 | Project skeleton used to create standard java web application |
| org.apache.easyant.skeletons | std-ant-plugin | 0.1 | Project skeleton used to create easyant plugins |