Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 3.44 KB

GettingStarted.md

File metadata and controls

83 lines (59 loc) · 3.44 KB

Getting Started

Detailed instructions on how to import and configure your Liberty project to make use of the Liberty Tools IntelliJ Plugin.

Importing your Liberty project into IntelliJ

Startup IntelliJ IDEA and then choose "Import Project" from the main menu and select your Liberty project.

IntelliJ import project

Ensure your project is configured with the Liberty Maven Plugin or Liberty Gradle Plugin to make use of dev mode.

For Maven projects, configure the Liberty Maven Plugin in your pom.xml file.

<plugin>
    <groupId>io.openliberty.tools</groupId>
    <artifactId>liberty-maven-plugin</artifactId>
    <version>3.3.4</version>
</plugin>

For Gradle projects, configure the Liberty Gradle Plugin in your build.gradle file.

apply plugin: 'liberty'

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'io.openliberty.tools:liberty-gradle-plugin:3.2'
    }
}

Ensure you can access the Liberty tool window in IntelliJ. This can be enabled by selecting View > Tool Windows > Liberty. Your Liberty project should appear in the Liberty tool window. If it does not, ensure you have properly configured the Liberty Maven Plugin or Liberty Gradle plugin and refresh the tool window. Liberty tool window

Running Liberty in dev mode

When you run Liberty in dev mode, you can rapidly code, deploy, test, and debug your application.

Starting Liberty dev mode

Select Start dev mode via the Liberty tool window to start dev mode on the corresponding project. You will see dev mode run in a new terminal window.

Liberty start dev mode

If you would like to start dev mode with custom parameters, such as -DhotTests=true, select Start dev mode.... A popup window will appear prompting you for custom parameters. For a full list of supported parameters, check out the Liberty Maven dev goal parameters or the Liberty Gradle dev task parameters . Liberty start dev mode with custom parameters

If you would like to make use of dev mode for containers, select Start dev mode in a container. For more information on dev mode for containers, check out the Liberty Maven devc goal or the Liberty Gradle libertyDevc task . Liberty start dev mode in a container

Running dev mode tests

After dev mode has started on your project, you can select Run dev mode tests from the Liberty tool window. Tests will run in the corresponding terminal. Liberty run dev mode tests

Test reports can be viewed by selecting the View integration test report or View unit test report actions from the Liberty tool window. The test reports will open in the default browser.

Stopping dev mode

Select Stop dev mode from the Liberty tool window to stop dev mode on the corresponding project. Liberty run dev mode tests