To enable a directory/project to use ply, simply run init from within the directory:
$ ply init
This will create the .ply/config
directory and also a project.properties
file with the following properties set
- namespace - will default to be the name of the project directory. The namespace is analogous to groupId in maven.
- name - will default to be the name of the project directory. The name is analogous to artifactId in maven.
- version - will default to be
1.0
.
Additionally the project.src.dir
and project.res.dir
directories will be created for you in the default and test
scopes.
So issuing the following sequence of commands:
$ mkdir electric-chilly
$ cd electric-chilly/
$ ply init
Will create directories .ply/config
under electric-chilly
and the following project.properties
file within .ply/config
namespace=electric-chilly
name=electric-chilly
version=1.0
Also, directories src/main/java
, src/main/resources
, src/test/java
and src/test/resources
will be created under electric-chilly
.
The created property values can be verified via ply itself by doing:
$ ply get
Here's an image of the steps:
In case the default values are not desired, you can use the ad hoc properties of ply to override any value. For instance, to specify a different namespace, say net.ocheyedan, you would invoke ply init
with an ad hoc property:
$ ply init -Pproject.namespace=net.ocheyedan
Everything would be created as in the original example except the namespace would be net.ocheyedan instead of the default (i.e., the name of the project directory).
Continue on to Building