The OEWar task is used to package an ABL web application project and generate a WAR file.

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

Methods

Method Description Example
services(serviceNames)
Specifies the service names that should be exported. By default, all the services are exported.
Note: This method is applicable only when projectLocation property is provided.
services("service1")
services("service2", "service3")
webInf(configureClosure)

Adds the content to the WEB-INF/ archive directory.

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

webInf { from 'src/main/webInf' }
webInf {
	from("src/openedge")
	into("openedge")
	include "**/*.r"
	exclude "**/*.txt"
}
manifest(configureClosure)

Configures the manifest for OEWar archive type.

Execute the given closure configuration to configure the manifest property.

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

Properties

Property Required? Description Example Default value
webAppName

Yes

The name of the ABL web application.

webAppName ="myABLWebApp"

None

archiveBaseName

No

The base name of the archive.

archiveBaseName ="myABLWebApp"

webAppName

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 extension used for the OEWar archive type.

archiveExtension ="customExt"

war

archiveFileName

No

Displays the archive name in the following format:

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

archiveFileName="myArchive.customExt"

${webAppName}.war
destinationDirectory

No

The directory where the archive is placed.

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

project.distsDir

manifest

No

The manifest for the OEWar archive, which is placed in the WEB-INF/ 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-Web-Application-Name: ${webAppName}
ABL-Web-Application-Version: 0.0.0.0
Package-Type: war
Build-Date: <build-date-time>
OpenEdge-Tool: OpenEdge DevOps Framework 
projectLocation

No

Specifies the path with all the relevant files and folder to the Progress Developer Studio for OpenEdge server project. For example, .services/

, PASOEContent/, and so on.
projectLocation=project.file "<path-to-project>"

None

serviceList

No

Specifies the service names that should be exported. By default, all the services are exported.

Note: This property is applicable only when the projectLocation is specified.

servicesList = ["service1", "service2"]

None

verbose

No

Use this property to enable logs.

verbose = true

false

Sample code snippet 1

The following code snippet is an example of using the OEWar task type from a Progress Developer Studio for OpenEdge project:

task createWebAppArchive(type: OEWar){
  webAppName = "myABLWebApp"
  projectLocation = project.file "./"
  verbose = true
  destinationDirectory = project.file "${buildDir}/dist"
  manifest {
    attributes "Implementation-Title": "My ABL Web Application"
    attributes "Implementation-Version": "1.0.0"
    from ("PASOEContent/META-INF/MANIFEST.MF")
  }
}
    

Sample code snippet 2

The following code snippet is another example using the OEWar task type from a Progress Developer Studio for OpenEdge project:

task createWebAppArchive(type: OEWar){
  webAppName = "myABLWebApp"
  projectLocation = project.file "./"
  services("service2", "service3")
  verbose = true
  destinationDirectory = project.file "${buildDir}/dist"
  manifest {
    attributes "Implementation-Title": "My ABL Web Application"
    attributes "Implementation-Version": "1.0.0"
    from ("PASOEContent/META-INF/MANIFEST.MF")
  }
}

Sample code snippet 3

The following code snippet is another example using the OEWar task type from a custom project or folder structure:

task createWebAppArchive(type: OEWar){
  webAppName = "myABLWebApp"
  destinationDirectory = project.file "${buildDir}/dist"
  
  //add the template provided in DLC
  from("${abl.dlcHome}/servlets/oeabl") {
    exclude "<files-that-should-be-replaced>"
  }
  
  //fail for duplicates
  duplicatesStrategy = DuplicatesStrategy.FAIL
  
  //add folders/files inside the archive
  from("src/static") {
    into("static")
    include "**/*.js"
    include "**/*.json"
  }
  webInf {
    from("src/openedge")
    into("openedge")
    include "**/*.r"
    exclude "**/*.txt"
  }
  webInf {
    from("src/tlr")
    into("tlr")
  }
  
  //configure manifest
  manifest {
    attributes "ABL-Web-Application-Name": "myABLWebApp"
    attributes "ABL-Web-Application-Version": "0.0.0.0"
    attributes "Implementation-Title": "My ABL Web Application"
    attributes "Implementation-Version": "1.0.0"
    from ("<path-to-manifest-file>")
  }
}