Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 2.67 KB

libertyPackage.md

File metadata and controls

62 lines (42 loc) · 2.67 KB

libertyPackage task

Package a Liberty server.

The libertyPackage task is used to create a ZIP or JAR archive of your Liberty runtime and server. Starting with WebSphere Liberty 8.5.5.9, it is possible to package a server into an executable jar file by setting the include parameter to runnable. The created JAR file can be executed using the java -jar command.

dependsOn

libertyPackage depends on installLiberty.
libertyPackage also depends on installApps and installFeature if configured.

Properties

See the Liberty server configuration properties for common server configuration.

The libertyPackage task uses a packageLiberty block to define task specific behavior.

Attribute Type Since Description Required
include String 1.0 Packaging type. 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 archives only. This must be declared in the packageLiberty block. Yes, only when the os option is set.
archive String 1.0 Location of the target file or directory. If the 'archive' is set to an existing directory, the contents of the server instance will be compressed into ${archive}/${project.name}.zip|jar file. If the target file or directory doesn't exist, the contents of the server instance will be compressed into the specified file. If the archive option is not set, it defaults to ${buildDir}/libs/${project.name}.zip|jar. A jar file is created when the packaging type is either runnable,all,runnable or minify,runnable. A zip file is created for other packaging types. No
os String 1.0 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. No

This example shows you how to package a minified ZIP archive.

apply plugin: 'liberty'

liberty {

    server {
        name = 'myServer'

        packageLiberty {
            archive = "MyPackage.zip"
            include = "minify"
            os = "Linux"
        }
    }
}

This example shows you how to package a runnable JAR file.

apply plugin: 'liberty'

liberty {

    server {
        name = 'myServer'

        packageLiberty {
            archive = "MyPackage.jar"
            include = "runnable"
        }   
    }
}