how to include a pdf in your jira plugin

Natalie Pan November 8, 2017

I'm trying to include a pdf for our end user license agreement

 

In my atlassian-plugin.xml

<resource type="download" name="resources/" location="resources/"/>
<resource type="download" name="resources/EULA.pdf" location="resources/EULA.pdf"/>

 

my link to the EULA pdf

{resourceRoot}/resources/EULA.pdf

 

If someone knows how to attach a pdf.

 

when I go the the pdf I get the following  in my console.log

java.lang.RuntimeException: Cannot read resource resources/EULA.pdf</pre><blockquote id="stacktrace" style="overflow-x: auto;"><pre>java.lang.RuntimeException: Cannot read resource resources/EULA.pdf
at com.atlassian.plugin.webresource.impl.snapshot.Resource$1.writeTo(Resource.java:197) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.helpers.ResourceServingHelpers$2.lambda$writeTo$0(ResourceServingHelpers.java:188) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.cache.filecache.impl.PassThroughCache.cache(PassThroughCache.java:18) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.helpers.ResourceServingHelpers$2.writeTo(ResourceServingHelpers.java:188) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Controller.lambda$sendCachedInProduction$0(Controller.java:319) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.cache.filecache.impl.PassThroughCache.cache(PassThroughCache.java:18) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Controller.sendCachedInProduction(Controller.java:319) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Controller.sendCached(Controller.java:282) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Controller.serveResource(Controller.java:213) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Controller.serveResource(Controller.java:62) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Router$2.apply(Router.java:45) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.http.Router$2.apply(Router.java:43) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.support.http.BaseRouter.callHandler(BaseRouter.java:167) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.impl.support.http.BaseRouter.dispatch(BaseRouter.java:144) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.webresource.servlet.PluginResourceDownload.serveFile(PluginResourceDownload.java:65) [atlassian-plugins-webresource-3.5.39.jar:?]
at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:28) [atlassian-plugins-webresource-common-4.5.0.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:?]
at ...

0 answers

Suggest an answer

Log in or Sign up to answer