Skip to main content Skip to complementary content

Creating a Maven project for unit test

Unit tests will be put in a separate project. We need to switch to the Java perspective and create a simple maven-based project.

For more information on how to switch to the Java perspective, see the GUI section of the Talend Studio User Guide.


  1. Right-click the blank area in the Package Explorer and select New>Project... in the context menu.
  2. The New Project wizard opens. Select Maven Project under the Maven node and click Next.
  3. In the Select project name and location view, the Use default Workspace location option is selected. Keep it and click Next.
  4. In the Select an Archetype view, the GroupId org.apache.maven.archetypes and ArtifactId maven-archetype-quickstart is selected. Keep the default settings and click Next.
  5. In the Specify Archetype parameters view, enter org.talend in the Group Id field and route-unit-test in the Artifact Id field. Click Finish. The project appears in the Package Explorer.
  6. Double-click the pom.xml file under the newly created project node to open it in the design workspace and edit it as shown below.
    <project xmlns="" xmlns:xsi=""
                <name>Snapshots bundles</name>

    As is shown above, the Maven dependencies are Junit and Camel unit testing framework, Utility JAR files required for Talend ESB Route, and Route JAR files published from the Studio.

    In this use case we will use the Route in Talend Artifact repository directly, so it needs to be added into the pom.xml file as a repository. The username and password is put in the repository URL for simplicity. You can also specify it in your ${Maven_HOME}/conf/settings.xml.

  7. Save your pom.xml file.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!