• Community
  • Products
  • Jira
  • Questions
  • I'm new to jira plug-indevelopment,so as given in atlassian documentation,i'm creating jira event listener with event library, all worked fine but at step5 i got this error.

I'm new to jira plug-indevelopment,so as given in atlassian documentation,i'm creating jira event listener with event library, all worked fine but at step5 i got this error.

URL:

https://developer.atlassian.com/jiradev/jira-platform/guides/other/tutorial-writing-jira-event-listeners-with-the-atlassian-event-library

C:\Users\goutham\Desktop\atla-plugin\new-listener-plugin>atlas-run
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.14\apache-maven-3
.2.1\bin\mvn.bat" com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:"6.2.
11":run -gs C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.14\apache-maven-3
.2.1/conf/settings.xml
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; sup
port was removed in 8.0
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
com.example.tutorial.plugins:new-listener-plugin:atlassian-plugin:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found d
uplicate declaration of plugin com.atlassian.maven.plugins:maven-jira-plugin @ l
ine 86, column 14
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ line 78, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Example Company 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-amps-dispatcher-plugin:6.2.11:run (default-cli) @ new-listener-
plugin >>>
[INFO]
[INFO] --- maven-jira-plugin:5.0.4:copy-bundled-dependencies (default-copy-bundl
ed-dependencies) @ new-listener-plugin ---
[INFO]
[INFO] --- maven-jira-plugin:5.0.4:compress-resources (default-compress-resource
s) @ new-listener-plugin ---
[INFO] Compiling javascript using YUI
[INFO] compressing to C:\Users\goutham\Desktop\atla-plugin\new-listener-plugin\t
arget\classes\js\new-listener-plugin-min.js
[INFO] compressing to C:\Users\goutham\Desktop\atla-plugin\new-listener-plugin\t
arget\classes\css\new-listener-plugin-min.css
[INFO] Compressing XML files
[INFO] compressing to C:\Users\goutham\Desktop\atla-plugin\new-listener-plugin\t
arget\classes\atlassian-plugin.xml
[INFO] compressing to C:\Users\goutham\Desktop\atla-plugin\new-listener-plugin\t
arget\classes\META-INF\spring\plugin-context.xml
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ new-list
ener-plugin ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-jira-plugin:5.0.4:filter-plugin-descriptor (default-filter-plug
in-descriptor) @ new-listener-plugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ new-listener-
plugin ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
uild is platform dependent!
[INFO] Compiling 3 source files to C:\Users\goutham\Desktop\atla-plugin\new-list
ener-plugin\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[3,61] package com.
atlassian.plugin.spring.scanner.annotation.export does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[4,62] package com.
atlassian.plugin.spring.scanner.annotation.imports does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[8,20] package java
x.inject does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[9,20] package java
x.inject does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[11,2] cannot find
symbol
symbol: class ExportAsService
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[12,2] cannot find
symbol
symbol: class Named
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[15,6] cannot find
symbol
symbol: class ComponentImport
location: class com.example.tutorial.plugins.impl.MyPluginComponentImpl
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[18,6] cannot find
symbol
symbol: class Inject
location: class com.example.tutorial.plugins.impl.MyPluginComponentImpl
[INFO] 8 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.713 s
[INFO] Finished at: 2017-02-21T11:53:43+05:30
[INFO] Final Memory: 50M/302M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
6.1:compile (default-compile) on project new-listener-plugin: Compilation failur
e: Compilation failure:
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[3,61] package com.
atlassian.plugin.spring.scanner.annotation.export does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[4,62] package com.
atlassian.plugin.spring.scanner.annotation.imports does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[8,20] package java
x.inject does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[9,20] package java
x.inject does not exist
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[11,2] cannot find
symbol
[ERROR] symbol: class ExportAsService
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[12,2] cannot find
symbol
[ERROR] symbol: class Named
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[15,6] cannot find
symbol
[ERROR] symbol: class ComponentImport
[ERROR] location: class com.example.tutorial.plugins.impl.MyPluginComponentImpl
[ERROR] /C:/Users/goutham/Desktop/atla-plugin/new-listener-plugin/src/main/java/
com/example/tutorial/plugins/impl/MyPluginComponentImpl.java:[18,6] cannot find
symbol
[ERROR] symbol: class Inject
[ERROR] location: class com.example.tutorial.plugins.impl.MyPluginComponentImpl
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption

my pom.xml is:

<?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.example.tutorial.plugins</groupId>
<artifactId>new-listener-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<organization>
<name>Example Company</name>
<url>http://www.example.com/</url>
</organization>
<name>Example Company</name>
<description>This plugin implements a simple issue event listener for JIRA using atlassian-event.This plugin implements a simple issue event listener for JIRA using atlassian-event.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
<!--
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
-->

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.6.SEC02</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-tests</artifactId>
<version>${jira.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-func-tests</artifactId>
<version>${jira.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<instructions/>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<log4jProperties>src/aps/log4j.properties</log4jProperties>
</configuration>
</plugin>

</plugins>
</build>
<properties>
<jira.version>6.3.12</jira.version>
<amps.version>5.0.4</amps.version>
</properties>
</project>

1 answer

0 votes

This question is about P2 add-on development; which will only work for Server and not Cloud. Removed the cloud labels.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

25,567 views 2 7
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