Available 'variables/properties/references' for injection into atlassian-plugin.xml

Trying to find a list of what is available to use for injection purposes in atlassian-plugin.xml. I'm coding a web-item and trying to define the link element something like the below:

<link linkId="rules_diff_link">/plugins/servlet/rulesdiff?planKey=${plan.key}&amp;planBuildNumber=${plan.buildNumber}</link>

Obviously those variables are not present but I want to be able to do something like that at runtime so that each time the link is displayed (our case it's being displayed on the BuildResult page) it's populated w/ plan specific info. Is there a list of what variables/refernences can be used for injection and/or how to do something like what I'm asking? A way to reference the current plan or resultssummary would be great assuming I can do so. Thanks AOT.

2 answers

1 accepted

This widget could not be displayed.

through trial/error and some digging through the internets I found a few examples where people used the following variables:

${buildNumber}

${planKey}

This was enough to pass to my servlet to get the necessary plan-build to get what I need. I only wish there was more documentation on what variables are available for use w/in atlassian-plugin.xml.

This widget could not be displayed.

Just for clearance: You want a link which changes with every build of your plugin, right?

You can use ${project.artifactId} and ${project.version} in your link.

For a more advanced manipulation I suggest, defining a atlassian-plugin.xml.template file, using variables or other placeholders and using maven-antrun-plugin in your pom. You can do pretty much everything. I do it to populate timestamps and svn commit numbers in a properties file.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

125 views 5 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you