Defining Multitarget Application Archives

You package the MTA deployment descriptor and module binaries in an MTA archive. You can manually do so as described below, or alternatively use the MTA Archive Builder tool.

For more information about the MTA Archive Builder tool, see Multitarget Application Archive Builder.

The Multitarget Application (MTA) archive is created in a way compatible with the JAR file specification. This allows us to use common tools for creating, modifying, and signing such types of archives.

An MTA archive consists of the following:

  • The MANIFEST.MF file
  • The mtad.yaml MTA deployment descriptor file
  • Content that is going to be deployed

The following example shows the basic structure of an MTA archive. It contains a Java application .war file and a META-INF directory, which contains an MTA deployment descriptor with a module and a MANIFEST.MF file.

The MANIFEST.MF file has to contain a name section for each MTA module part of the archive that has a file content. In the name section, the following information has to be added:

  • Name - the path within the MTA archive, where the corresponding module is located. If it leads to a directory, add a forward slash (/) at the end.
  • Content-Type - the type of the file that is used to deploy the corresponding module
  • MTA-module - the name of the module as it has been defined in the deployment descriptor

Sample content of the META-INF/MANIFEST.MF file:

The example above instructs the SAP Cloud Platform to:
  • Look for the example.war file within the root of the MTA archive when working with module example-java-app
  • Interpret the content of the example.war file as an application/zip