Releases: OpenLiberty/ci.gradle
Liberty Gradle Plug-in 3.1.1
Version 3.1.1 of the Liberty Gradle Plugin is a minor fix release that primarily contains fixes for dev mode with containers.
The following fixes related to the libertyDevc
task are included in this release:
- Support installing features on Open Liberty images with the
kernel-slim
tag. - Fixed an issue where various characters in the project name were causing the docker build to fail.
- Fixed an issue where an error message was shown when manually stopping the container started by
libertyDevc
. - Fixed an issue with using
libertyDevc
in a Windows VM. - Fixed an issue with using ADD or COPY commands with URLs in the Dockerfile.
The following additional fixes are also included in this release:
- Added Github Actions for builds.
See the commit log for the full set of the changes since the previous milestone release.
The Liberty Gradle Plugin 3.1.1 release is available on the Maven Central repository.
Liberty Gradle Plug-in 3.1
Version 3.1 of the Liberty Gradle Plugin is a minor release that contains new functionality, plus some minor fixes. The new functionality includes the libertyDevc
task.
libertyDevc task
This release includes the general availability of the new libertyDevc
task for Liberty Dev mode to start the server in a Docker container. Refer to the docs for the libertyDevc task for more information.
The following fixes related to the libertyDev
and libertyDevc
tasks are included in this release since the previous milestone release.
Startup changes:
- Skip installing local runtime when starting
libertyDevc
- Auto-resolve port conflicts on
libertyDevc
startup - Pull the latest parent image specified in the Dockerfile during
libertyDevc
startup - Check for supported Docker version on
libertyDevc
startup - Disabled OpenJ9 SCC when
libertyDevc
builds docker image - The
libertyDev
andlibertyDevc
startup message format was improved and nowlibertyDevc
startup displays:
-- internal container ports and mapped host ports
-- container name, IP address, and connected Docker network
Updated messaging:
- Changed Docker port mapping errors to warnings
- Added an error message when incompatible Java versions are used between the host and container.
- Display warning when users attempt to install features not included with the beta runtime
- Fixed an issue where a
docker stop
error was shown when the container failed to start
File tracking changes:
- Track Dockerfile changes and rebuild image on changes
- Track folders specified in Dockerfile COPY commands and rebuild image on changes
- Track folders and files specified in Dockerfile ADD commands and rebuild image on changes
Other fixes:
- Changed dev mode's container naming convention to use hyphens instead of underscores
- Let user provided container name override dev mode default container name
- Fixed an issue with auto-resolving port conflicts on Windows
- Added an option to keep the temporary Dockerfile that dev mode uses to build the Docker image
Additional fixes
The following fixes are also included in this release since the previous milestone release.
- Fixed resolution of Liberty directory properties in the location attribute of the include element in the server.xml file
- Fixed a .classpath issue affecting Eclipse and VS Code IDEs
See the commit log for the full set of the changes since the previous milestone release.
The Liberty Gradle Plugin 3.1 release is available on the Maven Central repository.
Liberty Gradle Plugin 3.1-M3 Pre-release
Version 3.1-M3 of the Liberty Gradle Plugin is a pre-release milestone. It contains a technology preview of the libertyDevc
task, plus some fixes detailed below.
This pre-release milestone includes a technology preview of the new libertyDevc
task for Liberty Dev mode to start the server in a Docker container. The features and attributes supported by this task are subject to change in future milestones or releases of the Liberty Gradle Plugin. Refer to the docs for the libertyDevc task for more information.
The following fixes are also included in this pre-release milestone.
- Added dev mode support for applications configured as ear or war files without requiring loose application.
- Added an option to specify the Docker build timeout for the
libertyDevc
task. - Added an option to skip binding default HTTP/HTTPS ports for the
libertyDevc
task to avoid port conflicts. - Added support for multiple concurrent instances of the
libertyDevc
task when run on different projects. - Using container related parameters with the
libertyDev
task no longer forces container mode to be true. - Fixed an issue on Linux where the target directory could not be cleaned after running the
libertyDevc
task. - Improved the display of Docker output messages during the
libertyDevc
task. - Improved dev mode startup messages.
- Added a way to restart the server or container within dev mode.
- Fixed a NullPointerException for the
installFeature
task. - Made some fixes to the
mergeServerEnv
behavior. - Use the correct combined bootstrap properties (from properties and parameters) when checking for application configuration and status.
See the commit log for the full set of the changes.
The Liberty Gradle Plugin 3.1-M3 pre-release milestone is available on the Maven Central repository.
Liberty Gradle Plugin 3.1-M2 Pre-release
Version 3.1-M2 of the Liberty Gradle Plugin is a pre-release milestone. It contains a technology preview of the libertyDevc
task, plus some fixes detailed below.
This pre-release milestone includes a technology preview of the new libertyDevc
task for Liberty Dev mode to start the server in a Docker container. The features and attributes supported by this task are subject to change in future milestones or releases of the Liberty Gradle Plugin. Refer to the docs for the libertyDevc task for more information.
The following fixes are also included in this pre-release milestone.
- Linux is supported for the
libertyDevc
task when running as either root or non-root user. - Fixed an issue when using the
libertyDevc
task and changing configuration files on Linux. - Fixed some issues where the
libertyDevc
task was not displaying error messages from Docker or Liberty. - Fixed the
mergeServerEnv
support by changing incorrect references fromappendServerEnv
tomergeServerEnv
. - Added some clean up code to delete copied and generated config files in the target server before copying or generating new config files.
- Fixed an issue where the plugin could not be applied through the
plugins
block. Added the liberty-ant and liberty-common dependencies to the buildscript classpath.
See the commit log for the full set of the changes.
The Liberty Gradle Plugin 3.1-M2 pre-release milestone is available on the Maven Central repository.
Liberty Gradle Plug-in 3.1-M1 Pre-release
Version 3.1-M1 of the Liberty Gradle Plugin is a pre-release milestone. It contains a technology preview of the libertyDevc
task, plus some enhancements and fixes detailed below.
This pre-release milestone includes a technology preview of the new libertyDevc
task for Liberty Dev mode to start the server in a Docker container. The features and attributes supported by this task are subject to change in future milestones or releases of the Liberty Gradle Plugin. Both macOS and Windows are supported. Linux is supported for the libertyDevc
task when running as root user. Refer to the docs for the libertyDevc task for more information.
The following enhancements and fixes are also included in this pre-release milestone.
- Added support for the
copyLibsDirectory
attribute on the deploy task. - Added support for merging server environment properties with an existing server.env file. See the
mergeServerEnv
attribute in the server extension properties for more information. - Added testing with version 20.0.0.6 of Open Liberty and WebSphere Liberty.
- The
uninstallFeature
task now uninstalls features individually to improve error handling. - The
compileJsp
task now includes the configured features in the Liberty server during the compilation. - Fixed the
configureArquillian
task to look for variables in the generated variable configuration file.
See the commit log for the full set of the changes.
The Liberty Gradle Plugin 3.1-M1 pre-release milestone is available on the Maven Central repository.
Liberty Gradle Plug-in 3.0
The enhancements and changes for the Liberty Gradle Plug-in 3.0 release are described in the 3.0-M1 release notes.
Additional minor fixes are included, as well as most deprecation warnings are addressed when running with version 6.x of Gradle. Two deprecation warnings remain related to baseName
property and the libertyRuntimeConfiguration
property and will be addressed in a future release.
Please take note that the plugin is now available under the new io.openliberty.tools
group id in the Maven Central repository.
Liberty Gradle Plug-in 3.0-M1
Version 3.0-M1 of the Liberty Gradle Plugin introduces new functionality and configurations. When moving from 2.x, there are new features and behavior differences to take into consideration when updating your project.
The plugin is available under the new io.openliberty.tools
group id in the Maven Central repository.
New capabilities in the liberty-gradle-plugin
There are new capabilities available in the liberty-gradle-plugin
that you might what to use when moving to release 3.0-M1 of the plug-in.
Dev Mode
There is a new libertyDev
task that starts a Liberty server in dev mode. Dev mode provides three key features. Code changes are detected, recompiled, and picked up by your running server. Tests are run on demand when you press Enter in the command terminal where dev mode is running, or optionally on every code change to give you instant feedback on the status of your code. Finally, it allows you to attach a debugger to the running server at any time to step through your code.
Liberty configuration with Gradle project properties
Support is added to specify Liberty configuration using Gradle project properties as described in the Server extension properties. This provides an easy mechanism to override or add Liberty configuration from the command line or as Gradle project properties in the build.gradle
file or gradle.properties
file. The new properties are env
for specifying server.env
variables, defaultVar
for specifying server variables with default values, and var
for specifying server variables with values. The bootstrapProperties
property is also changed from a Map to a Property object. The jvmOptions
can also be specified or overridden using project properties. The libertyCreate
task shows examples of using project properties for Liberty configuration.
Behavior differences in the liberty-gradle-plugin
Changes in property names and defaults for Server extension
In the past, the configFile
, bootstrapPropertiesFile
, jvmOptionsFile
, and serverEnv
Server extension properties had default values. Now these Server extension properties have no default values. If values are specified for these Server extension properties, they will take precedence over files located in the configDirectory
. The configDirectory
defaults to /src/main/liberty/config
. Also, bootstrapProperties
will take precedence over bootstrapPropertiesFile
, and jvmOptions
will take precedence over jvmOptionsFile
. No merging is done.
Previous property name | Previous default value | New property name | New default value |
---|---|---|---|
configFile | ${basedir}/src/main/liberty/config/server.xml |
serverXmlFile | None |
bootstrapPropertiesFile | ${basedir}/src/main/liberty/config/bootstrap.properties |
bootstrapPropertiesFile | None |
jvmOptionsFile | ${basedir}/src/main/liberty/config/jvm.options |
jvmOptionsFile | None |
serverEnv | ${basedir}/src/main/liberty/config/server.env |
serverEnvFile | None |
Order of precedence (from highest to lowest):
- Inlined configuration - bootstrapProperties, jvmOptions
- Specified file - bootstrapPropertiesFile, jvmOptionsFile, serverEnvFile, serverXmlFile
- File located in
configDirectory
(which defaults to${basedir}/src/main/liberty/config
)
Moved properties from install block
The buildDir
and cacheDir
properties are moved from the install block to the general runtime properties.
Simplified server installation
In the past, if no libertyRuntime
dependency or install
block was specified, the latest Liberty runtime was installed from DHE. Now by default, the latest Open Liberty kernel is installed from Maven Central. The new liberty.runtime
properties can be specified on the command line or as a Gradle project property to override the group
, name
or version
of Liberty that is installed. These are general runtime properties shared by all goals.
Changed libertyPackage task
The libertyPackage
task is changed. The new packageType
property supports values zip
, jar
, tar
, and tar.gz
. The archive
property is removed. The packageName
, packageDirectory
and packageType
should be used instead. The serverRoot
property is also added. When runnable
is specified in the include
property, the packageType
defaults to jar. If jar
is specified for packageType
without runnable
in the include
property, a self-extracting jar file is created.
Changed deploy task and undeploy task and removed installApps task
The deploy
task is changed to handle both copying and deploying of applications to a Liberty server, depending on the status of the server. If the server is not running, the applications are simply copied onto the server. If the server is running, the applications are deployed and verified to have started on the server. The installApps
task is removed. For the undeploy
task either the apps
property or dropins
property must be specified to indicate which tasks/files should be undeployed.
Liberty Gradle Plugin 2.7
Version 2.7 of the Liberty Gradle Plugin provides the following changes:
- Ability to run server in embedded mode
noPassword
option used when creating the serverconfigDirectory
now defaults to/src/main/liberty/config
- Eclipse will now use the same output directory as Gradle
See the commit log for the full set of the changes.
The Liberty Gradle Plugin 2.7 release is available on the Maven Central repository.
Liberty Gradle Plugin 2.6.5
Version 2.6.5 of the Liberty Gradle Plugin provides the following key bugfixes:
- Fixed an issue where the liberty-plugin-config.xml file was not being created inside the build directory of subprojects when the Liberty installation was located outside of the subproject's build directory.
- Updated the version of ci.common.
See the commit log for the full set of the changes.
The Liberty Gradle Plugin 2.6.5 release is available on the Maven Central repository.
Liberty Gradle Plugin 2.6.4
Version 2.6.4 of the Liberty Gradle Plugin should not be used. It contains a snapshot dependency that will not resolve causing builds to break.