eXist-db / exist-apps-archetype

Maven Archetype for generating an eXist-db App skeleton
GNU Lesser General Public License v2.1
8 stars 5 forks source link
apps exist-db maven maven-archetype

Maven Archetype for eXist Apps

CI

This repository contains the code for a Maven Archetype for eXist Apps.

This archetype can be used to generate a skeleton project for building an eXist-db App (EXPath Package) using Maven.

Usage

Switch to a directory on your computer where you keep the projects, and then run Maven for this archetype to create a new project directory. e.g.:

$ cd my-projects
$ mvn archetype:generate \
    -DarchetypeGroupId=org.exist-db \
    -DarchetypeArtifactId=exist-apps-archetype \
    -DarchetypeVersion=3.0.1

NOTE: the above will generate a project for eXist-db 6.x.x, if you want a project for eXist-db 5.x.x, then use archetypeVersion=2.1.0, or if you want a project for eXist-db 4.7.1, then use archetypeVersion=1.10.1 instead.

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.

e.g.:

Define value for property 'groupId': : com.myorganisation.existdb.app
Define value for property 'artifactId': : my-app1
Define value for property 'version':  1.0.0-SNAPSHOT: : 
Define value for property 'package':  com.myorganisation.existdb.app: : 
Confirm properties configuration:
groupId: com.myorganisation.existdb.app
artifactId: my-app1
version: 1.0-SNAPSHOT
package: com.myorganisation.existdb.app
 Y: : y

You will then have a new directory named after the artifactId of your project, e.g.: my-app1.

NOTE: The project is setup to expect to be under Git version control. If you are not already in a Git repository, you should create one:

$ cd my-app1
$ git init
$ git add pom.xml src/ xar-assembly.xml xquery-license-style.xml LICENSE README.md
$ git commit -m "Start of my eXist-db App"

You should now consult the README.md of your my-app1 for further instructions and documentation.