Alignment API: To our Maven users

The Alignment API is not a native Maven project. It is built using Ant. There are reason for that: we think that maven is putting too much hassle to developpers with respect to delivered benefits.

However, we have no reason to not help our Maven users as long as this is not too difficult.

Adding the Alignment API to a local repository

Since the Alignment API jar files have readble POM files, it is possible to add them to a local repository even if you use the Maven central repository otherwise. This can be achieved by:

$ mvn install:install-file -Dfile=${DIR}/lib/align.jar -DpomFile=${DIR}/lib/align.pom -Dpackaging=jar $ mvn install:install-file -Dfile=${DIR}/lib/procalign.jar -DpomFile=${DIR}/lib/procalign.pom -Dpackaging=jar $ mvn install:install-file -Dfile=${DIR}/lib/ontowrap.jar -DpomFile=${DIR}/lib/ontowrap.pom -Dpackaging=jar $ mvn install:install-file -Dfile=${DIR}/lib/alignsvc.jar -DpomFile=${DIR}/lib/alignsvc.pom -Dpackaging=jar
such that ${DIR} is the directory in which the Alignment API has been compiled.

Generating a local repository

The same can be achieved from ant. One can generate a local maven repository by simply applying:

$ ant mavenize Buildfile: /Java/alignapi/build.xml bind: init: mavenize: [echo] Mavenizing... [delete] Deleting directory /Java/alignapi/mvn-repo [mkdir] Created dir: /Java/alignapi/mvn-repo [artifact:install] [INFO] Installing /Java/alignapi/lib/align.jar to /Java/alignapi/mvn-repo/org/semanticweb/owl/align/4.4/align-4.4.jar ... BUILD SUCCESSFUL Total time: 1 second
This will generate a directory mvn-repo which is a local maven repository.

It can be used in your project POM, by including:

<repository> <id>in-project</id> <name>local maven repository</name> <url>file://${project.basedir}/mvn-repo</url> </repository>

This is obtained by using the maven-ant-tasks ant plug-ins, but it is equivalent to the command lines:

$ mvn -Dmaven.repo.local=mvn-repo install:install-file -Dfile=lib/align.jar -DpomFile=lib/align.pom -Dpackaging=jar ...

About POM files

We are using the POM format, not exactly as Maven but as a practical way to record information about shipped libraries. We ship external libraries because we want users to be ready to work right away.

Included libraries and associated POM files are maintained by hand. They do not contain dependency information because we think that the way Maven maintains dependency information both in the POM file, in the directory structure and in the JAR name is too much. Moreover, we think that maintaining this information at the exact version level defeats the purpose of modular software.

The Alignment API POM files themselves are generated on the fly from ant from the templates found in the distrib repository.

We need your help

Any constructive feedback for improving the process, improving the content of our POM files (especially if it is for allowing you to do better things) is welcome.

If you know of a good way to replace some component of our local repository by officially well maintained versions of global repository we want to hear you. If you know how to generate better Alignment API POM files, we want to hear you.

The best for us is if you can just do it (particularly in ant or shell, but even maven command lines should be OK) and send us the procedure.

If you want to publish the Alignment API in a repository, then you are welcome, but in the current state of Maven and its repositories, do not count on us to maintain it.