GateNLP / gate-core

The GATE Embedded core API and GATE Developer application
GNU Lesser General Public License v3.0
76 stars 29 forks source link

Make `mvn install` in the root directory be sufficient #34

Closed johann-petrak closed 6 years ago

johann-petrak commented 6 years ago

Currently, an extra mvn compile in ./distro is needed, it would be better if that could be avoided.

ianroberts commented 6 years ago

This is a difficult one. The "correct" Maven way to do this would be to have another aggregator POM that calls both gate-core and distro, but (a) this introduces another level of directories and (b) it ties the lifecycles of the two projects together - if you "install" the aggregator then it calls install on all its modules, you can't make it install one and then compile the other one. And we don't want this because it would mean generating a whole distro ZIP and installing that into your ~/.m2 every time you want to rebuild the gate-core JAR.

We considered the maven invoker plugin but that's designed for running integration tests and operates by making a copy of the sub-projects and building that copy, rather than building in the actual sub-project dir (there's supposedly a way to switch that off but there's a bug in the latest release that prevents it from working - when they release a version where this works then we can re-instate that approach).

johann-petrak commented 6 years ago

Hmm, bummer, yet another way of how Maven can be more annoying and unnecessarily clumsy to use as it would have to be. :(

greenwoodma commented 6 years ago

I've put the way of using maven invoker into the pom.xml but commented out so that as soon as they release 3.1.0 of the plugin we should be able to get this working properly, and with it being commented out hopefully we won't forget to do so at some point