The ABL App level package task is used to generate an OpenEdge Application Archive (Oear) file, which is a specific type of ZIP file that contains web application resources that can be deployed to a PAS instance in a single operation.

Oear extends the Zip task type of Gradle and supports all the properties and methods supported by Zip task type. The following tables describe the extra configurations added by Oear task type along with some common configurations inherited from the Zip task type of Gradle.

Methods

Method Description Example
tlr(configureClosure)

Adds content to the tlr/ archive directory.

Execute the given closure configuration to configure org.gradle.api.file.CopySpec

tlr { 
    from 'src/main/tlr'
    include '**/*.properties'
    exclude '**/*.txt' 
}
webapps(configureClosure)

Adds content to the webApps/ archive directory.

Execute the given closure configuration to configure org.gradle.api.file.CopySpec

webapps { from 'src/main/webapps' }
openedge(configureClosure)

Adds content to the openedge/ archive directory.

Execute the given closure configuration to configure org.gradle.api.file.CopySpec

openedge { 
    from 'src/main/openedge'
    include '**/*.r'
    exclude '**/*.txt'
}
conf(configureClosure)

Adds content to the conf/ archive directory.

Execute the given closure configuration to configure org.gradle.api.file.CopySpec

conf { from 'src/main/conf' }
bin(configureClosure)

Optional. Adds content to the bin/ archive directory.

Execute the given closure configuration to configure org.gradle.api.file.CopySpec

bin { from 'src/main/bin' }
instance(configureClosure)

Optional. Adds content to the instance/ archive directory.

Execute the given closure configuration to configureorg.gradle.api.file.CopySpec

instance { from 'src/main/instance' }
manifest(configureClosure)

Configures the manifest for Oear archive type.

Execute the given closure configuration to configure the manifest property.

manifest {
	attributes "Implementation-Title": "My ABL Application"
	attributes "Implementation-Version": "1.0.0"
	from ("<another-manifest-file-path>")
}

Properties

Property Required? Description Example Default value
ablAppName

Yes

The name of the ABL application.

ablAppName ="myABLApp"

None

archiveBaseName

No

The base name of the archive.

archiveBaseName ="myABLApp"

ablAppName

archiveAppendix

No

The appendix part of the archive name, if any.

archiveAppendix ="appendixName"

None

archiveVersion

No

The version part of the archive name.

archiveVersion ="1.0.0"

None

archiveClassifier

No

The classifier part of the archive name, if any.

archiveClassifier ="source"

None

archiveExtension

No

The extenstion type used for the archive.

archiveExtension ="customExt"

oear

archiveFileName

No

Displays the archive name in the following format:

[archiveBaseName] -[archiveAppendix] -[archiveVersion] -[archiveClassifier] .[archiveExtension]

archiveFileName ="myArchive.customExt"

${ablAppName}.oear
destinationDirectory

No

The directory where the archive is placed.

destinationDirectory=project.file "${buildDir}/dist"

project.distsDir

manifest

No

The manifest for the Oear archive, which is placed in the conf/ folder.

You can configure it the same way as you configure org.gradle.api. java.archives.Manifest

Note: The format for Build-Date is DateTimeFormatter. ISO_OFFSET_DATE_TIME.
manifest.attributes "Implementation-Title": "My Server ABL Application"
manifest.attributes "Implementation-Version": "1.0.0"
Manifest-Version: 1.0
ABL-Application-Name: ${ablAppName}
ABL-Application-Version: 0.0.0.0
Package-Type: oear
Build-Date: <build-date-time>
OpenEdge-Tool: OpenEdge DevOps Framework
instanceDirectory

No

Exports the ABL application from an existing PAS for OpenEdge instance location.

An ABL App with the name ablAppName should exist for the instance.

When you use the instanceDirectory property in combination with folder copies, the final archive appends the contents. For more information, refer to Sample code snippet 2.

instanceDirectory=project.file "${WRK}/myABLApp"

None

fullExport No

Determines whether to perform a full export or incremental export of web applications present as part of the ABL App.

Note: The fullExport property is applicable only when instanceDirectory is specified.
fullExport = false true

Sample code snippet 1

The following code snippet is an example of using the Oear task type :

task createABLAppArchive(type: Oear){
  ablAppName = "myABLApp"
  destinationDirectory = project.file "${buildDir}/dist"  //will create 'myABLApp.oear' file at this location
  tlr { 
    from 'src/main/tlr'
    include '**/*.properties'
    exclude '**/*.txt' 
  }
  webapps { from 'src/main/webapps' }
  openedge {
    from 'src/main/openedge'
    include '**/*.r'
    exclude '**/*.txt'
  }
  conf { 
    from 'src/main/conf'
    exclude '**/*.MF'   //exclude direct copy of manifest file and append using manifest section
  }
  manifest {
    attributes "Implementation-Title": "My ABL Application"
    attributes "Implementation-Version": "1.0.0"
    from ("src/main/conf/MANIFEST.MF")
  }
}  
    

Sample code snippet 2

The following code snippet is an example of using the Oear task type with the instanceDirectory property configured.

task createABLAppArchiveFromInstance(type: Oear){
  ablAppName = "oepas1"
  instanceDirectory = project.file "C:/OpenEdge/WRK/oepas1"
  fullExport = false
  destinationDirectory = project.file "${buildDir}/dist" //will create 'oepas1.oear' file at this location
  manifest {
    attributes "Implementation-Title": "My ABL Application"
    attributes "Implementation-Version": "1.0.0"
  }
}