How to serve a file for download as part of a plugin

I want to add a small desktop client application to my confluence server plugin. Users shall be able to download the installer by clicking a menu item in the global administration menu. How do I have to add the installer file in the atlassian-plugin.xml so that it is included to the plugin and what is the resulting download url?

I think the key part is to use WebResourceManager.getStaticPluginResource method in Java, or build url yourself (see javadoc for the method) and respond with redirect url in servlet

Probable atlassian-plugin.xml:

<web-section key="installer-menu" name="Installer Menu Section" location="find_link" i18n-name-key="installer.menu" system="true" weight="100">
</web-section>
<web-item key="installer-item" name="Installer Menu Item" section="find_link/installer-menu" i18n-name-key="installer.item">
    <label key="installer.item"/>
    <link linkId="installer-link"><![CDATA[/plugins/servlet/installer]]></link>
</web-item>

<web-resource key="installer-resources" name="Installer Resources">
   <resource type="download" name="installer.jar" location="lib/installer.jar" />
</web>

<servlet name="Installer" key="installer-servlet" class="jira.plugin.installer.servlet.InstallerServlet">
    <description>Installer Servlet</description>
    <url-pattern>/installer</url-pattern>
</servlet>

Assuming file is in src/main/resources/lib/installer.jar

Thanks for the tip! This solved the issue. However, WebResourceManager seems to be depricated, so I have to find an alternative in the long run.