Version 3

    This page details how to setup an Eclipse development environment for Teiid 7.x - it is not applicable to later Teiid versions.

     

    Pre-Requisites

     

     

    Check-out the Teiid Integration Server Project

     

    This can be done via Eclipse or the command-line. For command-line follow these commands. Before you go further, make sure you have the "settings.xml" file copied and edited as defined above.

     

    mkdir teiid

    cd teiid

    svn co http://svn.jboss.org/repos/teiid/branches/branch .

     

    the above will check out Teiid source code from Teiid commiters SVN. You can replace with "anonymous" SVN url if you are not a commiter. Also, replace branch with the specific branch. For example:

     

    svn co http://svn.jboss.org/repos/teiid/branches/7.2.x .

     

    Commiter SVN:https://svn.jboss.org/repos/teiid

    Anonymous SVN: http://anonsvn.jboss.org/repos/teiid/

     

    Performing a check-out from Eclipse

     

     

    Once complete there will be a folder named "teiid" in the workspace folder of the file system. For example, /home/me/workspace/teiid.

     

    You are now ready to import the Maven projects from the local workspace into the Eclipse workspace.

     

    Compiling and building Teiid Runtime Artifacts


    Now that you have downloaded the Teiid sources, if you are just looking to quickly compile and build Teiid runtime artifacts, you can do using the maven just execute following commands.

     

    cd teiid

    mvn clean install -P release

     

    Once the above maven process is finished, you can find the distributable files inside "teiid/build/target" directory. If you are ready to get your hands dirty and would like to submit patches keep following the guidelines below in setting up your Eclipse environment.

     

    Importing the Teiid projects into the Eclipse workspace

     

    At this point it is assumed that you have performed a check-out of the Teiid project and have a local copy in the "teiid" folder of your workspace.

     

    • In Eclipse select File -> Import...
    • Expand and select General -> Maven Projects
    • Click Next >
    • Click the Browse... button and navigate to and select the "teiid" folder located in your local workspace
      • Click OK
    • Ensure that all Maven projects are selected
    • If you desire the projects to be assigned to a working set, indicate which working set to use
    • Click Finish

     

    It may take a couple of minutes for the import to complete.

     

    You are now ready to generate the Maven sources and then build the Maven projects.

     

    Generating Maven sources

     

    Teiid uses JavaCC to generate its parser.  When using Maven from the command line JavaCC will be run automatically during the build.  Maven Eclipse integration however is not aware that additional sources will be generated, it it must be added manually. In your workspace you should have a project named teiid-engine. If this project does not exist at the root level of your workspace the Maven project import may have failed.

     

    • In Eclipse from the Resource or Java perspective, open the teiid-engine project
    • In the engine project, right-click on pom.xml and select Run As > Maven generate-sources
      • You should see BUILD SUCCESSFUL in the Console output
    • You should now see a folder named generated-sources under the target folder of the engine project
      • If you do not see the folder, a refresh may be necessary
        • Right-click on the engine project and select Refresh
    • Expand and right-click on engine/target/generated-sources/javacc and select Build Path -> Use as Source Folder

     

    Once the generate-sources have been created and added as a source folder to the engine project you are ready to do a complete build of the Teiid project within Eclipse.

     

    Sharing the Eclipse project with SVN

     

    If you performed the SVN check-out from the command-line or through a method other than using Eclipse you will want to share the Teiid project with SVN so that you can synchronize your Eclipse workspace with the project from SVN.

     

    • In Eclipse from the Resource or Java perspective, select all Teiid projects that were imported
    • Right-click on a selected project and select Team -> Share Projects...

     

    • If you used a standard SVN tool to check-out the Teiid project you should now see an a dialog that gives you an option to "Reconnect all from"
      • Set the analysis depth
      • Click Next >
      • Ensure that Create location using project settings is selected
      • Click Next >
    • Verify or enter the repository URL and enter your user name and password for the repository
      • Click Finish

     

    The Teiid projects in your Eclipse workspace should now be shared with the repository. At this point you may want to do a synchronize to pickup any changes from the repository.