Source

atlassian-jruby-example-plugin / src / main / resources / atlassian-plugin.xml

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
    <plugin-info>
        <description>${project.description}</description>
        <version>${project.version}</version>
        <vendor name="${project.organization.name}" url="${project.organization.url}"/>
    </plugin-info>

    <resource type="i18n" name="i18n" location="com.atlassian.plugins.polyglot.jruby.strings"/>

    <resource name="img/" type="download" location="/img"/>

    <web-resource key="jruby-plugin-resources" name="JRuby Example Resources">
        <resource type="download" name="underscore.js" location="/js/underscore-min.js"/>
        <resource type="download" name="bootstrap.css" location="/css/bootstrap.min.css"/>
    </web-resource>

    <web-item key="confluence-sinatra-link" name="Link to Confluence on Sinatra"
              section="system.browse"
              weight="1000">
        <description key="links.global.linkto.sinatra.desc">Confluence on Sinatra</description>
        <label key="links.global.linkto.sinatra.label"/>
        <link linkId="sinatraHome">/plugins/servlet/sinatra/</link>
    </web-item>

    <web-item key="confluence-example-servlet-link" name="Ruby Example Script output"
              section="system.browse"
              weight="1000">
        <description key="links.global.linkto.example.servlet.desc">Simple example servlet</description>
        <label key="links.global.linkto.example.servlet.label"/>
        <link linkId="sinatraHome">/plugins/servlet/jruby?url=http://www.example.com</link>
    </web-item>

    <servlet name="Sinatra Servlet" key="jrubySinatraServlet"
             class="com.atlassian.plugins.polyglot.jrubyexample.servlet.SinatraAdapterServlet">
        <description>Using Sinatra apps</description>
        <!-- /CONTEXT_PATH/plugins/servlet/sinatra -->
        <url-pattern>/sinatra*</url-pattern>
        <init-param>
            <param-name>servletName</param-name>
            <param-value>sinatra</param-value>
        </init-param>
    </servlet>

    <servlet name="Scripting Servlet" key="jrubyExampleScriptingServlet"
             class="com.atlassian.plugins.polyglot.jrubyexample.servlet.ExampleRubyServlet">
        <description>Simple example scripting servlet</description>
        <!-- /CONTEXT_PATH/plugins/servlet/jruby -->
        <url-pattern>/jruby</url-pattern>
    </servlet>

    <component-import key="velocity-renderer" interface="com.atlassian.templaterenderer.TemplateRenderer"/>
</atlassian-plugin>