The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content

Application package

2612

An application package is a ZIP file. Polarion validates its structure during upload, unpacks it, and serves its content.

Layout

  • com.example.inspector.zip
    • com.example.inspector/ the identifier from manifest.json
      • manifest.json
      • card/ the folder named in a view's rootDirectory; views may share one
        • index.html
        • assets/
          • index-….js
          • index-….css
      • sidebar/
        • index.html
        • icon16.png
        • icon32.png
        • assets/
          • …
      • server-scripts/ optional
        • linked-tree.js
        • add-comment.js

Rules that Polarion checks:

  • Exactly one top-level folder, and its name must equal the identifier in the manifest.
  • manifest.json must be directly inside that folder and must be valid JSON.
  • Every rootDirectory referenced by a view must exist and contain the file named in document. Several views may name the same folder.
  • Every script referenced by an endpoint must exist in server-scripts/.

A ZIP that puts manifest.json at the root, or that nests the application one level deeper, fails with Application's zip structure is incorrect.

Validation and limits

On every upload and update, Polarion checks the ZIP against limits that protect the server. A package that exceeds one of them is rejected as a whole.

CheckDefault limitGlobal configuration property
Directory depth10 levels inside the ZIPpolarionapp.directoryDepthLimit
Number of entries1,000 files and folderspolarionapp.maxNumberOfEntries
Size of one entry10 MB per file, unpackedpolarionapp.entrySizeLimitMB
Total size30 MB, unpackedpolarionapp.totalSizeLimitMB
Length of an entry name128 characterspolarionapp.entryNameLengthLimit
Length of the ZIP file name64 characterspolarionapp.zipFileNameLengthLimit

A typical view built with Vite stays far below these limits: the example applications in this guide have 4 to 8 files and about 250 KB unpacked.

To change a limit, set the property in the global configuration:

  1. Log in as a user with global administration rights.
  2. Open Global Administration (avatar menu → Global Administration, or the wrench icon).
  3. Open Configuration Properties at the bottom of the administration navigation.
  4. Add the property to Current Configuration, for example:

    polarionapp.totalSizeLimitMB=50
    
  5. Save and reload the browser page.

Allowed file types

A package may contain only static web assets and images. Polarion checks the extension and the content type of every file; if one file is not on the list below, the whole package is rejected.

CategoryExtensionsAccepted MIME types
Web pages.html, .htmtext/html, application/xhtml+xml, text/plain
Stylesheets.csstext/css, text/plain
Scripts.jstext/javascript, application/javascript, text/plain
Data and configuration.jsonapplication/json, text/x-json, text/plain
Raster images.pngimage/png
.jpg, .jpeg, .jpeimage/jpeg
.gifimage/gif
.webpimage/webp
.icoimage/x-icon
Vector images.svgimage/svg+xml

Server scripts are .js files and therefore allowed. Executable and back-end formats such as .java, .py, .php, .sh or .exe are never accepted; this prevents remote code execution through an uploaded package.

Some build outputs are not on the list and have to stay out of the package:

  • Source maps (.map). Inline them into the JavaScript instead, or leave them out; see Local development.
  • Web fonts (.woff, .woff2, .ttf). Use system fonts, or load the font from a server outside the package.
  • Other files that tools place in the build folder, such as .txt license notes or .md files.

The manifest

manifest.json has three parts: identity, views and server scripts.

manifest.json
{
  "manifestVersion": "1.0",
  "identifier": "com.example.inspector",
  "title": "Work item inspector",
  "description": "Shows details and links of the selected work items.",
  "publisherName": "Example Publisher",
  "applicationVersion": "1.2.0",
  "views": {
    "formExtensions": [
      { "identifier": "card", "title": "Inspector", "rootDirectory": "card", "document": "index.html" }
    ],
    "sidebars": [
      { "identifier": "sidebar", "title": "Inspector", "rootDirectory": "sidebar", "document": "index.html",
        "menuIcon": "icon16.png", "icon": "icon32.png" }
    ],
    "navigationTopics": []
  },
  "serverScripts": {
    "endpoints": [
      { "urlPath": "linked-tree", "method": "GET", "script": "linked-tree.js" },
      { "urlPath": "add-comment", "method": "POST", "script": "add-comment.js" }
    ]
  }
}

Every field is described in the manifest.json reference.

Identifiers and what they become

The application identifier and the view identifiers are combined into several other names. Choosing them well avoids renaming later.

NameBuilt fromExample
Static file URLidentifier, rootDirectory/polarion/apps/com.example.inspector/card/index.html
View entry URLidentifier, view identifier/polarion/apps/com.example.inspector/views/card
Endpoint URL (appEndpoint)identifier, urlPath/polarion/apps/com.example.inspector/rest/linked-tree
Configuration id (applicationView id)identifier + . + view identifiercom.example.inspector.card
Sidebar URL parameterpolarion-application. + configuration id?sidebar=polarion-application.com.example.inspector.sidebar
Navigation topic URLproject URL + configuration id/polarion/#/project/test/com.example.inspector.overview

Recommendations:

  • Use reverse-DNS identifiers (com.company.product). Dots are allowed and conventional; stay with letters, digits, dots and hyphens, because the identifier also appears in URLs.
  • Keep view identifiers short and descriptive (card, sidebar, dashboard). Using the same value for identifier and rootDirectory keeps the package easy to navigate.
  • Do not rename an identifier after the application is in use. Polarion treats a changed identifier as a new application; the old one stays installed and every applicationView reference must be updated.

Views are static sites

A view folder is a self-contained static web site. Polarion does nothing to its content beyond serving it; there is no server-side templating or injection. Consequences:

  • All URLs inside the view must be relative (./assets/x.js, ./icon.png). With Vite, set base: './'.
  • Several views may share code at build time, but the package must contain the built output for each view in its own folder. Two views that need the same bundle simply contain two copies.
  • Only files inside view folders are guaranteed to be served; do not rely on files outside every rootDirectory.
  • The entry document is usually index.html, but any file name works.

Server scripts folder

Scripts in server-scripts/ are not served as static files. They are executed on the server when their endpoint is called. See Your own REST endpoints.

Size and content

Keep packages small: a typical React view is a few hundred kilobytes. Large media files belong on a separate server. The limits and the allowed file types are listed in Validation and limits and Allowed file types. Polarion stores the unpacked package itself; nothing is placed in the extensions/ folder and no restart is needed.