Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Plugin development

David Shapiro November 22, 2011

Hello,

I was directed to https://developer.atlassian.com/display/DOCS/Developing+with+the+Atlassian+Plugin+SDK to turn a service we had with 4.1.3 Jira into a plugin because it stopped working when we went to 4.4.3. I followed the directions to create a skeleton of a Hello World plugin that is supposed to show up in their mini-jira application you can startup on your desktop. You are supposed to see whatever plugin you specified in the first steps of their directions show up under Administration-->Plugins. However, I see no plugins there and definitely nothing that says Hello World. It has directions to pull up the skeleton of the plugin in eclipse, which I was able to do, but nothing in the skeleton says Hello World either. What did I miss in the steps?

The next thing is it starts talking about needing modules to create "stubs" to get the functionality you need to do what your code needs to do. With our old non-plugin code we essentially connected to our active diretory, got users, compared what was in the Jira database and adjusted it to include new users and retire users that have left by changing their names to include gone as part of their names. Any thoughts on the "modules" I would need to use out of the 30 plus they have listed?

7 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
AdrienA November 28, 2011

So you did:

  • atlas-create-jira-plugin
  • You typed 1) Regular ol JIRA 4
  • groupId: com.sas.mis.jira.plugins
  • artifactId: des
  • Wait for the script to finish.
  • cd des
  • You could see the file ./src/main/java/com/sas/mis/jira/plugins/MyPlugin.java (among other files)
  • You've changed the pom.xml manually to: <jira.version>4.4.1</jira.version> and you've added <jira.data.version>4.4</jira.data.version>, didn't you?
  • atlas-run
  • The url showed up (something like http://your-machine-name:2990/jira)
  • You went to Administration -> Plugins and you didn't see the plugin.

I can see the plugin ("des"), so did I miss something?

0 votes
David Shapiro November 27, 2011

(continued)

<build>

<plugins>

<plugin>

<groupId>com.atlassian.maven.plugins</groupId>

<artifactId>maven-jira-plugin</artifactId>

<version>3.7.2</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.6</source>

<target>1.6</target>

</configuration>

</plugin>

</plugins>

</build>

<properties>

<jira.version>4.4.1</jira.version>

<jira.data.version>4.4</jira.data.version>

<amps.version>3.7.2</amps.version>

</properties>

</project>

0 votes
David Shapiro November 27, 2011
<?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.sas.mis.jira.plugins</groupId>
    <artifactId>des</artifactId>
    <version>1.0-SNAPSHOT</version>

    <organization>
        <name>Example Company</name>
        <url>http://www.example.com/</url>
    </organization>

    <name>des</name>
    <description>This is the com.sas.mis.jira.plugins:des 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>

    

0 votes
David Shapiro November 27, 2011

Thanks Adrien,

The setup is just plan confusing as the url links kind of go in circles.

I followed for setup the following:

https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK#InstallingtheAtlassianPluginSDK-

Step3.InstalltheAtlassianPluginSDK

I took the Exclipse path to here:

https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

And at the bottom once you are done it goes to here to create your first plugin:

https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

I think you have to skip steps 1 as that covers things taken care of when setting up your skeleton in eclipse.It then wants you to start your

application in step 2 (I have no appliation as far as I can tell. Eclipse shows me nothing under src/main/java other than package

com.sas.mis.jira.plugins with MyPlugin.java, which has nothing in it about hello world. If I start up tha Jira like they ask in step 2 and go

to plugins, nothing shows there. Step 3 looks like what I already did with configuring sdk for Exclipse.Finally, step 4 wants you to run:

Run atlas-create-jira-plugin-module. which I do not understand as far as what to pick when it does this. The service I had before that I am

trying to port into plugin2 simply used the scheduler feature to schedule the run of our code that would get the Active Dirctory users and compare and update the Jira users.

So, I am confused following the web page links on how to get to a point where a plugin shows up (I think it is supposed ot be a basic hello world module (servlet?). I am also ocnfused on what to do with step 4 to get what I need setup to allow me to plugin my code.

0 votes
David Shapiro November 27, 2011

This is the 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.sas.mis.jira.plugins</groupId>
    <artifactId>des</artifactId>
    <version>1.0-SNAPSHOT</version>

    <organization>
        <name>Example Company</name>
        <url>http://www.example.com/</url>
    </organization>

    <name>des</name>
    <description>This is the com.sas.mis.jira.plugins:des 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.7.2</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.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <jira.version>4.4.1</jira.version>
        <jira.data.version>4.4</jira.data.version>
        <amps.version>3.7.2</amps.version>
    </properties>

</project>

It is a it confusing. I followed for setup the following:

https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK#InstallingtheAtlassianPluginSDK-Step3.InstalltheAtlassianPluginSDK

I took the Exclipse path to here:

https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

And at the bottom once you are done it goes to here to create your first plugin:

https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

I think you have to skip steps 1 as that covers things taken care of when setting up your skeleton in eclipse.It then wants you to start your application in step 2 (I have no appliation as far as I can tell. Eclipse shows me nothing under src/main/java other than package com.sas.mis.jira.plugins with MyPlugin.java, which has nothing in it about hello world. If I start up tha Jira like they ask in step 2 and go to plugins, nothing shows there. Step 3 looks like what I already did with configuring sdk for Exclipse.Finally, step 4 wants you to run:

Run <tt>atlas-create-jira-plugin-module. which I do not understand as far as what to pick when it does this. The service I had before that I am trying to port into plugin2 simply used the scheduler feature to schedule the run of our code that would get the Active Dirctory users and compare and update the Jira users. </tt>

<tt>So, I am confused following the web page links on how to get to a point where a plugin shows up (I think it is supposed ot be a basic hello world module (servlet?). I am also ocnfused on what to do with step 4 to get what I need setup to allow me to plugin my code.</tt>

<tt></tt>

0 votes
AdrienA November 27, 2011

Hi David,

Would you mind showing us your pom.xml and, eventually, your atlassian-plugin.xml? Things can be pretty different depending on the settings you've entered.

Thanks,

Adrien

0 votes
AdrienA November 27, 2011

Hi David,

Would you mind showing us your pom.xml and, eventually, your atlassian-plugin.xml? Things can be pretty different depending on the settings you've entered.

Thanks,

Adrien

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events