If you have cloned our repositories and installed Maven on your machine, you can run the following commands from all local repository directories:
mvn compile: the BaseX source files are compiled. To launch the project, type in
java -cp target/classes org.basex.BaseX, or have a look at our Start Scripts.
mvn package: JAR archives are created in the
mvn install: the JAR archive is installed to the local repository, and made available to other Maven projects. This is particularly useful if you are compiling a beta version of BaseX, for which no archives exist in the repositories.
By adding the flag
-DskipTests=true you can skip running the JUnit tests and speed up the packaging procedure. You may as well use Eclipse and m2eclipse to compile the BaseX sources.
You can easily embed BaseX into your own Maven projects by adding the following XML snippets to your
<repositories> <repository> <id>basex</id> <name>BaseX Maven Repository</name> <url>http://files.basex.org/maven</url> </repository> </repositories>
BaseX Main Package
<dependency> <groupId>org.basex</groupId> <artifactId>basex</artifactId> <version>7.1.1</version> </dependency>
<dependency> <groupId>org.basex</groupId> <artifactId>basex-api</artifactId> <version>7.1.1</version> </dependency>