-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Liberty tools deep dive #2965
Merged
Merged
Liberty tools deep dive #2965
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1ee3920
Add Liberty Tools deep dive
awisniew90 1806b3a
Minor edits for liberty-tools-eclipse-deep-dive
yeekangc edf4bef
Merge pull request #2960 from OpenLiberty/yeekangc-patch-3
awisniew90 be61405
Review changes
awisniew90 56bc7c0
ID review changes
awisniew90 68656ae
Fix video link
awisniew90 f834dd0
Rename for publishing date
awisniew90 13ab35b
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle 7233878
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle 188b158
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle 51edf4d
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle ccc22ae
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle f526698
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle da22b30
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle c2f4272
Update posts/2023-03-08-liberty-tools-eclipse-deep-dive.adoc
dmuelle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
--- | ||
layout: post | ||
title: "Upgrade your cloud-native Java development experience with Liberty Tools for Eclipse IDE" | ||
categories: blog | ||
author_picture: https://avatars3.githubusercontent.com/awisniew90 | ||
author_github: https://github.com/awisniew90 | ||
seo-title: Upgrade your cloud-native Java development experience with Liberty Tools for Eclipse IDE | ||
seo-description: Take a deep dive into the features of the latest early release of Liberty Tools for Eclipe IDE | ||
blog_description: "Take a deep dive into the features of the latest early release of Liberty Tools for Eclipe IDE" | ||
open-graph-image: https://openliberty.io/img/blog/liberty-tools-actions.png | ||
--- | ||
= Upgrade your cloud-native Java development experience with Liberty Tools for Eclipse IDE | ||
Adam Wisniewski <https://github.com/awisniew90> | ||
|
||
Liberty Tools for Eclipse IDE provides a simplified yet powerful development experience. With capabilities like dev mode, Liberty config editing, and Jakarta EE and MicroProfile code assistance, you can code and manage your application without leaving your IDE. | ||
|
||
Try it out today by installing from the link:https://marketplace.eclipse.org/content/liberty-tools[Eclipse Marketplace]. | ||
|
||
Check out the following video for a deep dive walk-through of Liberty Tools for Eclipse IDE: | ||
|
||
video::OcgR_4BL12o[youtube, width="560", height="315", align="center"] | ||
|
||
Let's dive in! | ||
|
||
== What is Liberty Tools? | ||
|
||
Liberty Tools is the next generation IDE tooling for developing cloud-native Java applications with Liberty. It takes an app-centric approach, leveraging the capabilities of the Liberty Maven and Liberty Gradle plugins, so you no longer have to spend time creating and managing Liberty instances. By running dev mode behind the scenes, the Liberty runtime is automatically downloaded and started, and your app is built, packaged, and deployed to it. To save even more time, listeners detect any changes you make, and your app is automatically rebuilt and redeployed without having to restart the runtime. | ||
|
||
Keeping in line with the app-centric design, Liberty Tools provides code assistance for both Jakarta EE and MicroProfile APIs. Code completion, hover descriptions, diagnostics and quick-fixes save time, reduce errors, and keep you focused on your code. Liberty Tools accomplishes this by integrating with the link:https://github.com/eclipse/lsp4jakarta[Language Server for Jakarta EE] and the link:https://github.com/eclipse/lsp4mp[Language Server for MicroProfile], both open source projects that are continually adding new features and support. | ||
|
||
While much of the runtime mechanics are automated with Liberty Tools, some runtime configuration is, of course, necessary. However, this process has been streamlined with config assistance for `server.xml`, `bootstrap.properties`, and `server.env` files. Rather than having to refer to the documentation to find the correct Liberty feature to add or the appropriate value to set for your specific logging attribute, Liberty Tools provides lists of options and descriptions, all without having to leave Eclipse. | ||
|
||
Prefer another IDE? Liberty Tools for Eclipse IDE maintains functional parity with plugins for link:https://marketplace.visualstudio.com/items?itemName=Open-Liberty.liberty-dev-vscode-ext[Visual Studio Code] and link:https://plugins.jetbrains.com/plugin/14856-liberty-tools/[Intellij IDEA]. | ||
|
||
== Requirements | ||
|
||
Liberty Tools for Eclipse IDE is designed to work with link:https://github.com/OpenLiberty/liberty-tools-eclipse/blob/main/docs/user-guide.md#software-requirements[supported versions] of both | ||
the IDE for Java EE Developers and the IDE for Java Developers. While Java 17 is needed to run the tool, you can choose a different version of Java to run your application. | ||
|
||
Since Liberty Tools uses the Liberty Maven and Liberty Gradle plugins behind the scenes, these plugins must be configured in your application's `pom.xml` or `build.gradle` files. Liberty Tools will also need to run the Maven or Gradle executable which can be accomplished by configuring the Maven and Gradle home in the link:https://github.com/OpenLiberty/liberty-tools-eclipse/blob/main/docs/user-guide.md#setting-preferences[tool's preferences], or including a wrapper with the application. | ||
|
||
== Managing your applications | ||
|
||
Any application in your Eclipse workspace that contains `src/main/liberty/config/server.xml` is automatically enabled to run with Liberty Tools. Actions are available to manage these apps such as `Start`, `Stop`, `Debug` and `Run Tests`, and you can run these actions from either the Liberty Dashboard or the Eclipse **Run As** menu. | ||
|
||
=== Liberty Dashboard | ||
|
||
The Liberty Dashboard consolidates the Liberty enabled applications in your workspace into a single view. To open the dashboard, click on the Open Liberty UFO icon on the top tray or press **Alt** + **L**. To run an action, simply right-click on an app in the list. | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-dash-menu.png[Liberty Dashboard,width=70%,align="center"] | ||
|
||
=== Eclipse Run As menu | ||
|
||
Liberty Tools offers the same set of actions in the Eclipse **Run As** menu that appears when you right click on a project in the Project Explorer view. | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-runas-menu.png[Run As menu,width=70%,align="center"] | ||
|
||
=== Starting your app | ||
|
||
To start your application in dev mode, select either the **Start** or **Start...** actions. The latter opens a **Run Configurations** dialog box where you can add to the command-line parameters such as link:https://github.com/OpenLiberty/ci.maven/blob/main/docs/dev.md#additional-parameters[additional parameters to dev mode] or configure the JRE to use when running the app. When a start action is selected, Liberty Tools opens a **Terminal** tab and starts dev mode. | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-run-config.gif[Run Configurations,width=70%,align="center"] | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-terminal-start.png[Terminal Start,width=70%,align="center"] | ||
|
||
NOTE: The `Start in container` action will link:https://github.com/OpenLiberty/ci.maven/blob/main/docs/dev.md#devc-container-mode[start dev mode in a local Docker container] and requires link:https://github.com/OpenLiberty/liberty-tools-eclipse/blob/main/docs/user-guide.md#docker['docker' on the PATH]. | ||
|
||
=== Running tests | ||
|
||
Tests are important for any application. Liberty Tools makes it easy to run your unit and integration tests by either selecting the `Run tests` action, or simply clicking `Enter` in the terminal. You can even view the results of your latest run by selecting `View test reports`. | ||
|
||
=== Debugging your app | ||
|
||
By default, the Liberty runtime is configured with port 7777 for debugging. However, this configuration requires that port to be available on your system and for you to manually attach a debugger. With Liberty Tools, you can start your app using the `Debug` action, which finds an available port and automatically attaches the Eclipse debugger to it. | ||
|
||
== Get coding! | ||
Liberty Tools provides coding assistance for Jakarta EE and MicroProfile APIs, as well as select Liberty configuration files. | ||
|
||
dmuelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
=== Jakarta EE | ||
|
||
Code completion for Jakarta EE makes it easy to add classes and methods to your app. Just type **CTRL** + **Space** from within any Java file to choose from a list of available code snippets. Additionally, diagnostics flag errors and suggest quick-fixes to implement on the spot. | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-jakarta-snippet-2.gif[Jakarta code completion,width=70%,align="center"] | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-jakarta-quick-fix-2.gif[Jakarta quick fix,width=70%,align="center"] | ||
|
||
=== MicroProfile | ||
|
||
Similar code completion is available for MicroProfile, as well as type-ahead suggestions and hover descriptions for MicroProfile Config properties. You can easily see what values are set for injected properties directly from your code and get lists of available variables and values to add to your configuration. | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-mp-props-hover.png[MicroProfile config property hover,width=70%,align="center"] | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-mp-props.gif[MicroProfile code completion,width=70%,align="center"] | ||
|
||
=== Liberty config editing | ||
|
||
Liberty Tools streamlines the process of configuring the Liberty runtime through config completion for `server.xml`, `bootstrap.properties` and `server.env` files. Type **CTRL** + **Space** from within these files to get lists of suggested configuration elements, properties, and values. | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-server-config.gif[Server config code completion,width=70%,align="center"] | ||
|
||
[.img_border_light] | ||
image::/img/blog/liberty-tools-eclipse-bootstrap-props.gif[Bootstrap properties code completion,width=70%,align="center"] | ||
|
||
== Share your feedback | ||
|
||
Like what you see? Need support? Find us on link:https://app.gitter.im/#/room/#OpenLiberty_developer-experience:gitter.im[Gitter], or open an issue or enhancement link:https://github.com/OpenLiberty/liberty-tools-eclipse/issues[on Github]. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.