Skip to content

Commit

Permalink
Merge pull request #934 from cherylking/updateFieldDocs
Browse files Browse the repository at this point in the history
Add documentation to all extension classes.
  • Loading branch information
cherylking authored Feb 24, 2025
2 parents f98d729 + b9fb3e7 commit bc54b2e
Show file tree
Hide file tree
Showing 14 changed files with 196 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015, 2019.
* (C) Copyright IBM Corporation 2015, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,16 @@ package io.openliberty.tools.gradle.extensions

class CleanExtension {

// Delete all the files in the `${wlp_output_dir}/<server name>/logs` directory. The default value is `true`.
boolean logs = true

// Delete all the files in the `${wlp_output_dir}/<server name>/workarea` directory. The default value is `true`.
boolean workarea = true

// Delete all the files in the `${wlp_user_dir}/servers/<server name>/dropins` directory. The default value is `false`.
boolean dropins = false

// Delete all the files in the `${wlp_user_dir}/servers/<server name>/apps` directory. The default value is `false`.
boolean apps = false
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2019.
* (C) Copyright IBM Corporation 2019, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,10 @@ package io.openliberty.tools.gradle.extensions

class CompileJSPExtension {

// Sets the JSP version to use. Valid values are `2.2` or `2.3`. The default value is `2.3`.
String jspVersion

// Maximum time to wait (in seconds) for all the JSP files to compile.
// The server is stopped and the goal ends after this specified time. The default value is 30 seconds.
int jspCompileTimeout = 40
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015, 2020.
* (C) Copyright IBM Corporation 2015, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,8 +17,18 @@ package io.openliberty.tools.gradle.extensions

class DeployExtension {

// List of `war` and `ear` task objects used to create applications to copy to the `apps` folder.
// If no `apps` or `dropins` are configured and this project applies the `war` or `ear` plugin, the default application is installed using the `deploy` task.
// If the application is not configured in the server.xml file, application configuration is added to the `configDropins` folder.
List<Object> apps

// List of `war` or `ear` objects used to create applications to copy to the `dropins` folder.
List<Object> dropins

// The optional directory to which loose application dependencies referenced by the loose application configuration file are copied.
// For example, if you want loose application dependencies to be contained within the build directory, you could set this parameter to target.
// The loose application configuration file will reference this directory for the loose application dependencies instead of the local repository cache.
// Only applicable when `looseApplication` is true, which is the default.
File copyLibsDirectory
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2020, 2024.
* (C) Copyright IBM Corporation 2020, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,13 +17,40 @@
package io.openliberty.tools.gradle.extensions

class DevExtension {
// If set to `true`, run the server in the container specified by the `containerfile` parameter.
// Setting this to `true` and using the `libertyDev` task is equivalent to using the `libertyDevc` task.
// The default value is `false` when the `libertyDev` task is used, and `true` when the `libertyDevc` task is used.
boolean container = false

// Location of a Containerfile or Dockerfile to be used by dev mode to build the image for the container that will run your Liberty server.
// The default location is `Containerfile` or `Dockerfile` in the project root. This attribute replaces the deprecated `dockerfile` attribute and will take precedence.
File containerfile

// The container build context directory to be used by dev mode for the container `build` command.
// The default location is the directory of the Containerfile/Dockerfile. This attribute replaces the deprecated `dockerBuildContext` attribute and will take precedence.
File containerBuildContext

// Specifies options to add to the container `run` command when using dev mode to launch your server in a container.
// For example, `-e key=value` is recognized by `docker run` to define an environment variable with the name `key` and value `value`.
// This attribute replaces the deprecated `dockerRunOpts` attribute and will take precedence.
String containerRunOpts

// Maximum time to wait (in seconds) for the completion of the container operation to build the image.
// The value must be an integer greater than 0. The default value is `600` seconds.
// This attribute replaces the deprecated `dockerBuildTimeout` attribute and will take precedence.
int containerBuildTimeout

// If set to `true`, dev mode will not publish the default container port mappings of `9080:9080` (HTTP) and `9443:9443` (HTTPS).
// Use this option if you would like to specify alternative local ports to map to the exposed container ports for HTTP and HTTPS using the `containerRunOpts` parameter.
boolean skipDefaultPorts = false

// If set to `true`, dev mode will not delete the temporary modified copy of your Containerfile/Dockerfile used to build the container image.
// This file is handy in case you need to debug the process of building the container image.
// The path of the temporary Containerfile/Dockerfile can be seen when dev mode displays the container `build` command.
// The default value is `false`. This attribute replaces the deprecated `keepTempDockerfile` attribute and will take precedence.
boolean keepTempContainerfile = false

// If set to `true`, change the action for running on demand tests from `Enter` to type `t` and press `Enter`. The default value is `false`.
boolean changeOnDemandTestsAction = false

//Docker aliases to maintain backwards compatability
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015, 2019.
* (C) Copyright IBM Corporation 2015, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,10 @@ package io.openliberty.tools.gradle.extensions

class DumpExtension {

// Comma-separated list of diagnostic information to include in the dump. Valid values include `thread`, `system`, and `heap`.
String include

// Location of the target dump file.
String archive
String os
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2023.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,20 @@
package io.openliberty.tools.gradle.extensions

class FeatureExtension {
// Specifies the list of feature names to be installed. This can be a local ESA file, an IBM-Shortname or a Subsystem-SymbolicName of the Subsystem archive.
// If this list is not provided, the server must be created so that the configured feature list is used.
List<String> name

// Accept feature license terms and conditions. The default value is `false`, so you must add this property to get features installed if it is required.
boolean acceptLicense = false

// Specify where to install the feature. The feature can be installed to any configured product extension location, or as a user feature (usr, extension).
// If this option is not specified the feature will be installed as a user feature.
String to

// Specifies a single directory-based repository as the source of the assets. The default is to install from the online Liberty repository.
String from

// Specifies how features must be verified during a process or an installation. Supported values are `enforce`, `skip`, `all`, and `warn`. If this option is not specified, the default value is enforce.
String verify = "enforce"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2019.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,12 +17,36 @@ package io.openliberty.tools.gradle.extensions

class InstallExtension {

// WebSphere Liberty server license code. See [installLiberty task](installLiberty.md#installliberty-task).
String licenseCode

// Exact or wildcard version of the WebSphere Liberty server to install.
// Available versions are listed in the [index.yml](http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml) file.
// Only used if `runtimeUrl` is not set and `libertyRuntime` is not configured. By default, the latest stable release is used.
String version

// URL to the WebSphere Liberty server's `.jar` or a `.zip` file on your repository or on the [Liberty repository](https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/).
// `runtimeUrl` can also point to an [Open Liberty](https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/) `.zip`.
// If not set and `libertyRuntime` is not configured, the Liberty repository will be used to find the Liberty runtime archive.
String runtimeUrl

// Username needed for basic authentication.
String username

// Password needed for basic authentication.
String password

// Maximum time in seconds the download can take. The default value is `0` (no maximum time).
String maxDownloadTime

// Liberty runtime type to download from the Liberty repository.
// Currently, the following types are supported: `kernel`, `webProfile6`, `webProfile7`, `webProfile8`, `javaee7`, and `javaee8`.
// Only used if `runtimeUrl` is not set and `libertyRuntime` is not configured.
// The default value is `webProfile7` if `useOpenLiberty` is `false`.
// If using Open Liberty and no type is specified, the default Open Liberty runtime is used.
String type

// Specifies whether to install Open Liberty or WebSphere Liberty runtime when `runtimeUrl` is not specified and `libertyRuntime` is not configured.
// The default value is `true`.
String useOpenLiberty
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,11 +22,16 @@ import javax.inject.Inject

class LibertyExtension {

// Path to the WebSphere Liberty server installation `wlp` directory. To use a pre-installed version of Liberty, set this property to the path of the Liberty `wlp` directory, including `wlp` in the path. Additionally, `installDir` can be specified in the `gradle.properties` file or from the [command line](installLiberty.md#override-installDir).
String installDir
// Deprecated. Value of the `${wlp_output_dir}` variable. The default value is `${installDir}/usr/servers/${serverName}`. This parameter has moved to the `server` block.
String outputDir
// Value of the `${wlp_user_dir}` variable. The default value is `${installDir}/usr/`.
String userDir

// The base installation directory. The actual installation directory of WebSphere Liberty server will be `${baseDir}/wlp`. The default value is `${project.getLayout().getBuildDirectory().getAsFile().get()}`. This was moved from the properties in the `install` block in version 3.0.
String baseDir
// The directory used for caching downloaded files such as the license or `.jar` files. The default value is `${java.io.tmpdir}/wlp-cache`. This was moved from the properties in the `install` block in version 3.0.
String cacheDir

// For overriding the group, name or version of the libertyRuntime installed from Maven Central repository.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2019.
* (C) Copyright IBM Corporation 2019, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,10 +17,26 @@ package io.openliberty.tools.gradle.extensions

class PackageExtension {

// Controls the package contents. Can be used with values `all`, `usr`, `minify`, `wlp`, `runnable`, `all,runnable` and `minify,runnable`.
// The default value is `all`. The `runnable`, `all,runnable` and `minify,runnable` values are supported beginning with 8.5.5.9 and works with `jar` type packages only.
String include

// Directory of the packaged file. The default value is `${project.getLayout().getBuildDirectory().getAsFile().get()}/libs`.
// If the directory is not absolute, it is created in `${project.getLayout().getBuildDirectory().getAsFile().get()}/libs`.
String packageDirectory

// Name of the packaged file. The default value is `${project.name}`.
String packageName

// Type of package. Can be used with values `zip`, `jar`, `tar`, or `tar.gz`. Defaults to `jar` if `runnable` is specified for the `include` property.
// Otherwise the default value is `zip`.
String packageType

// Specifies the root server folder name in the packaged file.
String serverRoot

// A comma-delimited list of operating systems that you want the packaged server to support.
// To specify that an operating system is not to be supported, prefix it with a minus sign ("-").
// The 'include' attribute __must__ be set to `minify`.
String os
}
Loading

0 comments on commit bc54b2e

Please sign in to comment.