Create a Squash TF Project with IntelliJ


Pre-requisites

If you are using a Maven > 3.0.0, you’ll need to add the following section to your settings.xml (located in the conf directory of your Maven folder, or in \plugins\maven\lib\maven3\conf in your IntelliJ directory for the bundled version) :

<profiles>
    <profile>
        <repositories>
            <repository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>archetype</id>
                <name>squashTA</name>
                <url>http://repo.squashtest.org/maven2/releases/</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>squashTA</id>
                <name>squashTA</name>
                <url>http://repo.squashtest.org/maven2/releases/</url>
            </pluginRepository>
        </pluginRepositories>
        <id>squashTA</id>
    </profile>
</profiles>
<activeProfiles>
    <activeProfile>squashTA</activeProfile>
</activeProfiles>
../_images/create-project-intellij-maven-config.png

Add the following to your file :

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>archetype</id>
                    <name>squashTA</name>
                    <url>http://repo.squashtest.org/maven2/releases/</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>squashTA</id>
                    <name>squashTA</name>
                    <url>http://repo.squashtest.org/maven2/releases/</url>
                </pluginRepository>
            </pluginRepositories>
            <id>squashTA</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>squashTA</activeProfile>
    </activeProfiles>
</settings>
../_images/create-project-intellij-bundled-maven-config.png


Creating your Squash TF project

Launch IntelliJ IDEA then click on “Create New Project” :

../_images/create-new-project-intellij.png

Select in the left column the Maven type then check the “Create from archetype” box.

Click on “Add Archetype…” to add the one needed.

../_images/create-project-intellij-add-archetype.png

Insert the following informations :

  • GroupId : org.squashtest.ta
  • ArtifactId : squash-ta-project-archetype
  • Version : You can check the last version of the Squash Keyword Framework on our website
  • Repository : http://repo.squashtest.org/maven2/releases (Only if your Maven is < 3.0.0)
../_images/create-project-intellij-archetype-info.png

Select the newly created archetype and click on “Next”.

../_images/create-project-intellij-add-archetype-2.png

Insert your groupId, ArtifactId, Version, and click on “Next”.

../_images/create-new-project-intellij-2.png

Select your Maven. It should be the one with the repository in the settings.xml. Click on “Next”.

../_images/create-project-intellij-select-maven.png

Select a project name and location, and click on “Finish”.

../_images/create-new-project-intellij-3.png

You may need to wait a little bit.

You should have a build success and the following structure :

../_images/create-new-project-intellij-4.png