This archetype can be used to generate a skeleton project for building an EXPath Package that is deployable to Elemental.
Whilst this repository contains the source code for the archetype, you do not need that to just use the archetype. The archetype has been deployed to Maven Central and will be downloaded for you when you invoke it.
From your Terminal or Command Line, change into a directory on your system where you keep your projects, and then run Maven with this archetype to create a Maven Project that you can use as a skeleton for your new EXPath Package.
$ cd my-projects
$ mvn archetype:generate \
-DarchetypeGroupId=xyz.elemental.expath \
-DarchetypeArtifactId=elemental-expath-package-archetype \
-DarchetypeVersion=1.0.1
Maven will then prompt you for a groupId
, artifactId
, version
, and package
for your project.
You need only specify the groupId
and artifactId
, for the others you may accept the defaults (or modify them as you wish).
-
groupId
is similar to a Java package name. If you are going to publish your XAR publicly it should be some sub-coordinate of a domain name that you have responsibility for supplied in reverse order notation. For example, if your company is "My Organisation Ltd" you might own the domain namemyorganisation.com
, you might decide that a suitable subdomain for your EXPath Package might beapp.myorganisation.com
. Note: this subdomain does not have to be able to be de-referenced. -
artifactId
is just a simple name without spaces for the App itself. Together thegroupId:appId
coordinate must be unique. -
version
the version number of your package. In Maven terms-SNAPSHOT
are development versions. Your first version should always be1.0.0-SNAPSHOT
, whereby the first release subsequently becomes1.0.0
.
NOTE: If you wish to specify a different version of Elemental for your EXPath Package to be compatible with you can add -DelementalVersion=x.y.z
to the above command (where x.y.z
should be substituted for your desired version).
e.g.:
Define value for property 'groupId': : com.myorganisation.app
Define value for property 'artifactId': : my-app1
Define value for property 'version': 1.0.0-SNAPSHOT: :
Define value for property 'package': com.myorganisation.app: :
Confirm properties configuration:
groupId: com.myorganisation.app
artifactId: my-app1
version: 1.0.0-SNAPSHOT
package: com.myorganisation.app
Y: : y
After running this process, a new directory will have been created for you that matches the artifactId
name that you specified above.
NOTE: The project has been set up to expect to be under Git version control. If you are not already in a Git repository, you should then create one:
$ cd my-app1
$ git init
$ git add .gitignore pom.xml src/ xar-assembly.xml xquery-license-style.xml LICENSE README.md
$ git commit -m "Start of my EXPath Package"
You should now consult the README.md
of your my-app1
for further instructions and documentation.