Terrier Core

Maven support

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 3.5
  • Fix Version/s: None
  • Component/s: build
  • Description:
    Hide
    Hi,

    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
        
        <dependency>
          <groupId>org.terrier</groupId>
          <artifactId>terrier</artifactId>
          <version>0.3.5</version>
        </dependency>

    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.

    Benjamin
        
    Show
    Hi, 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          <dependency>       <groupId>org.terrier</groupId>       <artifactId>terrier</artifactId>       <version>0.3.5</version>     </dependency> 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. Benjamin     
  1. pom.xml
    (5 kB)
    Benjamin Piwowarski
    20/Jan/12 11:56 AM

Issue Links

Activity

Hide
Craig Macdonald added a comment - 20/Jan/12 11:32 AM

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
<version>0.3.5</version>
?

Craig

Show
Craig Macdonald added a comment - 20/Jan/12 11:32 AM 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 <version>0.3.5</version> ? Craig
Hide
Benjamin Piwowarski added a comment - 20/Jan/12 11:35 AM - edited

I will definitely do this.

<version>0.3.5</version>
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

benjamin

Show
Benjamin Piwowarski added a comment - 20/Jan/12 11:35 AM - edited I will definitely do this. <version>0.3.5</version> 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 benjamin
Hide
Benjamin Piwowarski added a comment - 20/Jan/12 11:52 AM

Updated pom.xml

Show
Benjamin Piwowarski added a comment - 20/Jan/12 11:52 AM Updated pom.xml
Hide
Benjamin Piwowarski added a comment - 20/Jan/12 11:56 AM

Craig,

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)

Show
Benjamin Piwowarski added a comment - 20/Jan/12 11:56 AM Craig, 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)
Hide
Craig Macdonald added a comment - 20/Jan/12 1:42 PM

Depends on Jetty upgrade

Show
Craig Macdonald added a comment - 20/Jan/12 1:42 PM Depends on Jetty upgrade

People

Dates

  • Created:
    19/Jan/12 3:27 PM
    Updated:
    20/Jan/12 1:42 PM