Skip to content

Setting Up a New Maven Project (Eclipse)

Malte Isberner edited this page Feb 7, 2014 · 3 revisions

Maven Archetypes are the most convenient way of creating your own (Maven) projects that use LearnLib. In this page, we will explain how you set up your own project using the Eclipse IDE.

Prerequisites

We assume that you have a sufficiently recent version of Eclipse for Java developers installed (see the Eclipse Downloads page for more information). The bundled "Eclipse for Java Developers" already contains the Java Development Tools (JDT) and the Maven 2 Eclipse Plugin (m2eclipse). If you have a customized installation of Eclipse, make sure that these plugins are installed.

How To

Start up Eclipse and select your desired workspace. Then, click File > New > Other, and from the list, select Maven > Maven Project. Then, click Next. In the next dialog, you have the option of creating a simple project (without archetypes). Do not check this box! You can leave the other two options (Workspace location and working sets) untouched, unless you want to adjust these settings.

In the next dialog, you have the option of selecting an archetype catalog. The default is "All catalogs", which is fine for us. LearnLib archetypes are deployed to the central Maven repository, and should thus be available on all systems.

In the filter box, enter "learnlib" so we do not have to search through the whole list. You will see some archetype artifacts from the group de.learnlib.archetypes, most likely core, complete, typical. Click on an item to read its description. By default, only the most recent versions of archetypes are shown; if you want to use an older version, uncheck the respective box.

After clicking Next, you will be prompted for the group and artifact id of your project. Enter whatever is appropriate here. The LearnLib archetypes only offer one additional option, namely the version of LearnLib to use. The default is always the version corresponding to the archetype version, and it is generally a good idea to leave it as-is. Changing it may lead to problems such as missing dependencies etc.

After clicking Finish, you should see a new project in your Package explorer, with src/main/java and src/test/java folders already created. You can expand the "Maven Dependencies" shown in the package explorer to see what modules of LearnLib are available for project. Of course, further dependencies can later on be added in your pom.xml.