[TR-187] Maven support Created: 19/Jan/12  Updated: 01/Dec/15  Resolved: 01/Dec/15

Status: Resolved
Project: Terrier Core
Component/s: build
Affects Version/s: 3.5
Fix Version/s: 4.1

Type: Improvement Priority: Minor
Reporter: Benjamin Piwowarski Assignee: Richard McCreadie
Resolution: Fixed  
Labels: None

Attachments: XML File pom.xml    
Issue Links:
blocks TR-352 Build .tar.gz and .zip distributions ... Resolved
is blocked by TR-190 Upgrade to Jetty 6 Resolved
is related to TR-371 Finalize maven build routine and upda... Resolved


As a user of maven (for the dependency management system), I started to write the pom.xml that can be used for the moment to compile Terrier. It is not a finished one, since parts of the build process (e.g. tests, packaging, ...) are not ported, but by typing

mvn install

terrier (and its dependencies) are stored in the local maven repository, and I can use a simple

in my projects.

I also had to remove org/terrier/utility/SimpleJettyHTTPServer.java from the compilation (see the pom.xml) since there was no maven entry for jetty 5.1.15 (there is none below version 6). I sometimes selected versions a bit higher than those included with Terrier 3.5. For the moment, everything compiles fine and I will use this bug report if I make improvements to the maven build file.


Comment by Craig Macdonald [ 20/Jan/12 ]

Thanks Benjamin. It seems very much that everyone is using Maven these days, but I dont have any experience with it. If you could continue to post updates, that would be appreciated!

Question, why is version


Comment by Benjamin Piwowarski [ 20/Jan/12 ]

I will definitely do this.

is a mistake - it should be 3.5 - so used to make beta versions that the zero was typed before I thought of it.

By the way, I think it would be fairly easy to switch from ant to maven, but to complete the switch:
1) [optional, but better] Follow the maven layout
source files in src/main/java
antlr files in src/main/antlr
test files in src/test/java
2) optional, but much better since it is the only missing dependency, upgrade to jetty >= 6


Comment by Benjamin Piwowarski [ 20/Jan/12 ]

Updated pom.xml

Comment by Benjamin Piwowarski [ 20/Jan/12 ]


I just updated the pom.xml file with
1) antlr support [did not try to remove the java files]
2) test support [all the tests passed OK]

The pom.xml file is nearly complete (some developer information is missing, see the end of the file).

you can try it out yourself, by putting pom.xml into the base folder of terrier:
1) mvn compile : download the dependencies and compiles
2) mvn surefire:test : runs the tests
3) mvn install : install terrier in the local repository (after compiling & testing)

Comment by Craig Macdonald [ 20/Jan/12 ]

Depends on Jetty upgrade

Comment by Craig Macdonald [ 06/Nov/15 ]

Tagged for 4.1

Comment by Craig Macdonald [ 01/Dec/15 ]

Fixed for Terrier 4.1. Thanks to all contributors, including Benjamin and Nicola

Generated at Mon Dec 11 09:27:21 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.