Create scheduled task plugin ?

Hi ,

 

When i searched regarding the scheduled task in JIRA, i found the below link about scheduled task with sample example . it was perfect example , but still i have some queries on that .

http://www.j-tricks.com/tutorials/scheduled-tasks-in-jira

 

The below is the folder structure created in that sample example package:

scheduled-task-plugin\pom.xml

scheduled-task-plugin\src\main\java\com\jtricks\JTricksScheduledJob.java

 

1,How to build Jar for this above example .

2,what is purpose of having pom.xml.

 

pom.xml:

 

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.jtricks</groupId>
    <artifactId>scheduled-task-plugin</artifactId>
    <version>1.0</version>

    <organization>
        <name>J Tricks</name>
        <url>http://www.j-tricks.com/</url>
    </organization>

    <name>scheduled-task-plugin</name>
    <description>This is the Example com.jtricks:scheduled-task-plugin plugin for Atlassian JIRA.</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-func-tests</artifactId>
            <version>${jira.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>3.0.6</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.data.version}</productDataVersion>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <jira.version>4.0.2</jira.version>
        <jira.data.version>4.0</jira.data.version>
    </properties>

</project>

 


 



 

 

1 answer

1 accepted

0 votes

You don't really need a pom for this. You can create the jar from eclipse or simply by packaging the files. In this case, pom was added just to make it easy to build the jar and also to start a JIRA instance for testing wink

Btw, you might also want to look at this tutorial. Involves a little bit more work up front but then you don't have to modify the scheduler-config.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,879 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot