Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: build
    • Labels:
      None

      Description

      The current Makefile used to build Terrier are not usable on Windows, where many of our developers work. Consider an alternative building process, such as ant.

        Attachments

          Activity

          craigm Craig Macdonald created issue -
          craigm Craig Macdonald made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          craigm Craig Macdonald made changes -
          Component/s build [ 10000 ]
          Hide
          juanito Giovanni Stilo added a comment -

          You also consider Maven. That for a API like Terrier-Core is more indicated.

          Show
          juanito Giovanni Stilo added a comment - You also consider Maven. That for a API like Terrier-Core is more indicated.
          Hide
          craigm Craig Macdonald added a comment -

          I guess I should enumerate our requirements for a build process:

          • Compile source files to jar(s)
          • Execute unit test (junit)
          • Execute end-to-end test (shell script)
          • Compile Javadoc
          • Build tar and zip files, optionally running files through unix2dos before zip

          Stilo, Did you say that you have a Maven build script already for Terrier?

          Show
          craigm Craig Macdonald added a comment - I guess I should enumerate our requirements for a build process: Compile source files to jar(s) Execute unit test (junit) Execute end-to-end test (shell script) Compile Javadoc Build tar and zip files, optionally running files through unix2dos before zip Stilo, Did you say that you have a Maven build script already for Terrier?
          Hide
          juanito Giovanni Stilo added a comment -

          >Yes i have it but if u want to use it u need a lib repository.
          Then i think the only point that isn't yet covered by maven
          is:

          • Build tar and zip files, optionally running files through unix2dos before zip

          but really i don't know very well maven. But i know u can also invoke ant from it.

          Show
          juanito Giovanni Stilo added a comment - >Yes i have it but if u want to use it u need a lib repository. Then i think the only point that isn't yet covered by maven is: Build tar and zip files, optionally running files through unix2dos before zip but really i don't know very well maven. But i know u can also invoke ant from it.
          Hide
          craigm Craig Macdonald added a comment -

          How difficult is it set up this lib repository? Would this let people download Terrier automatically?

          I would prefer that people have to go through the Terrier download process for the moment.

          Show
          craigm Craig Macdonald added a comment - How difficult is it set up this lib repository? Would this let people download Terrier automatically? I would prefer that people have to go through the Terrier download process for the moment.
          Hide
          juanito Giovanni Stilo added a comment -

          No people have to download by the web site; only dependency will be automaticcaly availabe.
          The if u want to offer terrier as lib this is another problem.
          The repos it's quite simple to setup is basiccally a directory structure that contain jar and descriptor available to the user by web server.
          Basically doesn't change nothing because u have to download the terrier-core source and the maven descriptor in the same way u do now.
          But then when u build maven automatically download the dependencies (lib).
          In this way u don't have to put all the time the lib in the distribution but if u need to change some lib version there is'nt problem, so maven have
          meccanism to manage different version of library so for one version of terrier u could specify a particular version of lib.
          That's it.

          Show
          juanito Giovanni Stilo added a comment - No people have to download by the web site; only dependency will be automaticcaly availabe. The if u want to offer terrier as lib this is another problem. The repos it's quite simple to setup is basiccally a directory structure that contain jar and descriptor available to the user by web server. Basically doesn't change nothing because u have to download the terrier-core source and the maven descriptor in the same way u do now. But then when u build maven automatically download the dependencies (lib). In this way u don't have to put all the time the lib in the distribution but if u need to change some lib version there is'nt problem, so maven have meccanism to manage different version of library so for one version of terrier u could specify a particular version of lib. That's it.
          Hide
          craigm Craig Macdonald added a comment -

          Hmmm. I would prefer that Terrier is downloaded with all of its dependencies, as people have enough problems using Terrier, without trying to help them install Maven, and configure it to use a proxy server so it can download the dependencies and compile the jar file.

          Does this mean that the main advantage of Maven is that it downloads the dependenies. But I'd rather ship Terrier pre-built with all the requisite jar files. Is there another advantage that I have missed?

          Show
          craigm Craig Macdonald added a comment - Hmmm. I would prefer that Terrier is downloaded with all of its dependencies, as people have enough problems using Terrier, without trying to help them install Maven, and configure it to use a proxy server so it can download the dependencies and compile the jar file. Does this mean that the main advantage of Maven is that it downloads the dependenies. But I'd rather ship Terrier pre-built with all the requisite jar files. Is there another advantage that I have missed?
          Hide
          juanito Giovanni Stilo added a comment -

          Probably u've right for end-users.
          But i think that terrier its more oriented in developer-users.
          the second class of users would appreciate maven to build their "custom" code.
          At the end i think Terrier Team can provide two type of distribution the maven one and normal one
          that is already builded (with maven) by the team.

          Show
          juanito Giovanni Stilo added a comment - Probably u've right for end-users. But i think that terrier its more oriented in developer-users. the second class of users would appreciate maven to build their "custom" code. At the end i think Terrier Team can provide two type of distribution the maven one and normal one that is already builded (with maven) by the team.
          Hide
          craigm Craig Macdonald added a comment -

          What about if ant was configured to build packages, given a pre-determined layout for their source? That would nullify the need for maven to build custom code?

          Show
          craigm Craig Macdonald added a comment - What about if ant was configured to build packages, given a pre-determined layout for their source? That would nullify the need for maven to build custom code?
          Hide
          juanito Giovanni Stilo added a comment -

          Obvious.
          The same if u still use make well preconfigured.

          Show
          juanito Giovanni Stilo added a comment - Obvious. The same if u still use make well preconfigured.
          craigm Craig Macdonald made changes -
          Workflow jira [ 10001 ] Terrier Open Source [ 10040 ]
          Status In Progress [ 3 ] Open [ 1 ]
          Hide
          dunka Alan Dunk added a comment -

          Please find the attached terrier_ant_build_components.zip file for this issue, which contains an Ant build for Terrier to meet the build process requirements listed above.

          Running unix2dos and the end to end tests currently requires bash to be executed, which is the reason for the additional shell scripts. The directory structure indicates where they should live based on a build of Terrier 2.2.1.

          The build was developed using Apache Ant 1.7.1 which is a pre-requisite for running the build.

          I've tested it for Unix and Windows platforms, and creating release builds worked in both cases.

          One caveat is that running the end to end tests is dependent on running the build target within a Unix environment. If the end to end tests need to be run in a Windows environment, consider using Cygwin to run equivalent shell commands within a batch script rather than a shell script. (e.g. to run egrep within Cygwin, call <cygwin_home>\bin\grep -e.)

          Show
          dunka Alan Dunk added a comment - Please find the attached terrier_ant_build_components.zip file for this issue, which contains an Ant build for Terrier to meet the build process requirements listed above. Running unix2dos and the end to end tests currently requires bash to be executed, which is the reason for the additional shell scripts. The directory structure indicates where they should live based on a build of Terrier 2.2.1. The build was developed using Apache Ant 1.7.1 which is a pre-requisite for running the build. I've tested it for Unix and Windows platforms, and creating release builds worked in both cases. One caveat is that running the end to end tests is dependent on running the build target within a Unix environment. If the end to end tests need to be run in a Windows environment, consider using Cygwin to run equivalent shell commands within a batch script rather than a shell script. (e.g. to run egrep within Cygwin, call <cygwin_home>\bin\grep -e.)
          dunka Alan Dunk made changes -
          Attachment terrier_ant_build_components.zip [ 10180 ]
          dunka Alan Dunk made changes -
          Comment [ Contains an ant build for terrier and the required scripts which the ant build executes. ]
          Hide
          craigm Craig Macdonald added a comment -

          Thanks for the Alan, I'll check it out and leave some feedback. Regards!

          Show
          craigm Craig Macdonald added a comment - Thanks for the Alan, I'll check it out and leave some feedback. Regards!
          Hide
          craigm Craig Macdonald added a comment -

          Duplicate of TR-65

          Show
          craigm Craig Macdonald added a comment - Duplicate of TR-65
          craigm Craig Macdonald made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.0 [ 10030 ]
          Resolution Duplicate [ 3 ]
          Hide
          rec Richard Eckart de Castilho added a comment -

          Even though this issue is already closed: one can use the Maven Assembly Plugin to create convenient distributions that include all dependencies and more.

          Show
          rec Richard Eckart de Castilho added a comment - Even though this issue is already closed: one can use the Maven Assembly Plugin to create convenient distributions that include all dependencies and more.

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: