JIRA plug-in development- Scheduled task reference methods

Hi,

I've written a scheduled task to run on JIRA version 6.0.6(following the tutorial in the JIRA cookbook). It says to add your jar file to "WEB-INF/lib" folders and reference it in "WEB-INF/classes/schduler-config.xml " in the following manner.

<job name="ATask" class="com.a.b.APluginPackage.ScheduledTask" />

This method works fine.

What I would like to know is, if there is a way of adding the jar file to a different location, like "/jira_home/plugins/installed-plugins" location (ideally upload the jar as a plug-in and reference it in the scheduler-config.xml )and reference this from the scheduled task in the following way.

<job name="ATask" class="<full path to installed directory>com.a.b.APluginPackage.ScheduledTask" />

I've tried this method but it does not seem to work and throws the errors at startup.

/jira_home/plugins/installed-plugins/com.a.b.APluginPackage.ScheduledTask
2014-01-06 12:11:17,378 localhost-startStop-1 FATAL      [atlassian.jira.scheduler.JiraSchedulerLauncher] A RuntimeException occurred during JiraSchedulerLauncher servlet context initialisation - null.
java.lang.NullPointerException
        at com.atlassian.scheduler.SchedulerUtil.initializeAndStart(SchedulerUtil.java:28)
        at com.atlassian.jira.scheduler.JiraSchedulerLauncher.proceedIfAllClear(JiraSchedulerLauncher.java:60)
        at com.atlassian.jira.scheduler.JiraSchedulerLauncher.start(JiraSchedulerLauncher.java:27)

Is it possible to use this method or is it mandotory for the jar file to be in the WEB-INF/lib folder?

Any help would be greatly appreciated.

Thanks.

1 answer

1 accepted

0 vote
WEB-INF plugins are generally plugins v1 plugins and upm plugins are v2. https://developer.atlassian.com/display/JIRADEV/Differences+between+Plugins1+and+Plugins2has more details

So can a V2 plug-in be referenced from a scheduled task, and if so how should it be referenced?

Thank you very much for your prompt response.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

181 views 0 5
Read article

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