Component Project Structure

A Tesla Component Project is an Eclipse Java Project, enhanced by a few features that simplify the integration into Tesla. However, Tesla makes several assumptions about the project layout, which are described here.

.java and .class files
Tesla assumes that the source code of your project can be found in a directory named src, and that the compiled .class-files will be stored in the directory bin. The component wizard takes care of this, but you should not modify these settings afterwards.
If a component requires external libraries, these have to be added in a directory named libraries within the component project. Note that if you chose a different directory, the server will not find the libraries, and your component cannot be executed.
Often components make use of resources, such as dictionaries, language models, or similar. Such resources must be stored in a directory named resources, and they must be accessed by the method de.uni_koeln.spinfo.tesla.runtime.TeslaComponent.getResource() - visit the tutorial How to add and access local resources for a detailed explanation. The component de.uni_koeln.spinfo.tesla.component.stanfordparser.StanfordParser shows how external resources can be used in Tesla.
Additional Roles
If you start developing new roles for the Tesla Role System, a file named roles.xml must be generated in the directory src/META-INF within the project. Usually, the role wizard takes care of this - have a look at the tutorial How to create custom roles.
To add a licence agreement to your component, simply create a file named licence.txt in the component project, and paste the licence text into it. Afterwards, the licence agreement can than be accessed via the context menu of Tesla's Components View.
To add custom templates to a component, create and modify the file src/META-INF/templates.xml. External template content can be placed in the directory src/META-INF/templates. Have a look at de.uni_koeln.spinfo.tesla.component.gazetteer.GazetteerComponent for an example of how to use templates. The tutorial How to create configuration templates also provides additional information.
Users might find it helpful if a component offers additional documentation. Therefore, you can add documentation resources (recommended file format is plain text or PDF) to the directory docs - this files will be accessible via the context menu in Tesla's Components View.