I'm developing a plugin (web panel) but it doesn't load any velocity template/code.
Following this: https://developer.atlassian.com/server/jira/platform/web-panel/#web-panel-examples
I tried the static resource and it rendered correctly but when it comes to velocity, the location nor the embedded version doesn't show anything.
My atlassian-plugin.xml
<web-panel key="release-page-key" location="path">
<resource name="view" type="velocity"><![CDATA[My name is test]]></resource>
<context-provider class="path-to-class"/>
<condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
</web-panel>
As you can see, I tried the embedded velocity code, but all it shows is empty blank page. Only the static version works, i.e.
<web-panel key="release-page-key" location="cz.oksystem.plugins.jira.webpanel:dependency-graph">
<resource name="view" type="static"><![CDATA[Hello World]]></resource>
<context-provider class="cz.oksystem.plugins.jira.webpanel.DependencyGraphServlet"/>
<condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
</web-panel>
Other than this, I didn't change anything. Am I missing something?
I'm currently using Atlassian plugin SDK 8.0.7
---
SOLUTION:
I imported this dependency
<dependency>
<groupId>com.atlassian.templaterenderer</groupId>
<artifactId>atlassian-template-renderer-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
OK nvm, I found my solution. The only thing I had to do was to import the dependency
<dependency>
<groupId>com.atlassian.templaterenderer</groupId>
<artifactId>atlassian-template-renderer-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
@Minh Trieu You will need to add location of velocity file, so your atlassian-plugin.xml should look like this,
<web-panel key="release-page-key" location="path">
<resource name="view" type="velocity" location="templates/view.vm" />
<context-provider class="path-to-class"/>
<condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
</web-panel>
and templates/view.vm (inside resources directory of your plugin) should look like,
<h1>My name is Test</h1>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already tried this, but it doesn't do anything. I tried the three variants mentioned here: https://developer.atlassian.com/server/jira/platform/web-panel/#web-panel-examples but none of them are working for velocity. The embedded and the location file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is how the project structure looks like. I tried again exactly what you've suggested but nothing happened. Still a blank page
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.