Creating a custom filed in jira

Hi All,

I’m trying to implement a custom field in jira using some java scripts with the help of Atlassian Plugin SDK.
I have done everything said in the tutorial given in the tutorial up to step 5.
But when came to step 6 i.e compiling and building the code. It showing some errors and the errors are as follows, please help me out of this.
Thanks in advance.

<<<<<------------------------------------------------------------------------------------>>>>>

D:\Custom-Field-plugin\tutorial-jira-custom-field>atlas-run
[INFO] Project POM found
Executing: “C:\Applications\Atlassian\atlassian-plugin-sdk-8.0.16\apache-maven-3.5.4\bin\mvn.cmd” com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:8.0.2:run -gs C:\Applications\Atlassian\atlassian-plugin-sdk-8.0.16\apache-maven-3.5.4/conf/settings.xml
[INFO] Scanning for projects…
[INFO]
[INFO] ----< com.example.plugins.tutorial.jira:tutorial-jira-custom-field >----
[INFO] Building tutorial-jira-custom-field 1.0-SNAPSHOT
[INFO] --------------------------[ atlassian-plugin ]--------------------------
[INFO]
[INFO] >>> amps-dispatcher-maven-plugin:8.0.2:run (default-cli) > package @ tutorial-jira-custom-field >>>
[INFO]
[INFO] — jira-maven-plugin:8.0.2:compress-resources (default-compress-resources) @ tutorial-jira-custom-field —
[INFO] Compiling javascript using YUI
[INFO] 0 Javascript file(s) were minified into target directory D:\Custom-Field-plugin\tutorial-jira-custom-field\target\classes
[INFO] 0 CSS file(s) were minified into target directory D:\Custom-Field-plugin\tutorial-jira-custom-field\target\classes
[INFO] Compressing XML files
[INFO] 0 XML file(s) were minified into target directory D:\Custom-Field-plugin\tutorial-jira-custom-field\target\classes
[INFO]
[INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ tutorial-jira-custom-field —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO]
[INFO] — jira-maven-plugin:8.0.2:filter-plugin-descriptor (default-filter-plugin-descriptor) @ tutorial-jira-custom-field —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ tutorial-jira-custom-field —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\Custom-Field-plugin\tutorial-jira-custom-field\target\classes
[INFO] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java: D:\Custom-Field-plugin\tutorial-jira-custom-field\src\main\java\com\example\plugins\tutorial\jira\customfields\MoneyCustomField.java uses or overrides a deprecated API.
[INFO] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java:[20,2] cannot find symbol
symbol: class Scanned
[ERROR] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java:[28,10] cannot find symbol
symbol: class JiraImport
location: class com.example.plugins.tutorial.jira.customfields.MoneyCustomField
[ERROR] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java:[29,10] cannot find symbol
symbol: class JiraImport
location: class com.example.plugins.tutorial.jira.customfields.MoneyCustomField
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.810 s
[INFO] Finished at: 2019-08-12T18:45:36+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project tutorial-jira-custom-field: Compilation failure: Compilation failure:
[ERROR] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java:[20,2] cannot find symbol
[ERROR] symbol: class Scanned
[ERROR] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java:[28,10] cannot find symbol
[ERROR] symbol: class JiraImport
[ERROR] location: class com.example.plugins.tutorial.jira.customfields.MoneyCustomField
[ERROR] /D:/Custom-Field-plugin/tutorial-jira-custom-field/src/main/java/com/example/plugins/tutorial/jira/customfields/MoneyCustomField.java:[29,10] cannot find symbol
[ERROR] symbol: class JiraImport
[ERROR] location: class com.example.plugins.tutorial.jira.customfields.MoneyCustomField
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

<<<<<<<<<----------------------------------------------------------------------->>>>>>>>>

I just recently finished my first JIRA Addon and I also had some trouble with this. My suggestion would be to use a good IDE, for example Intellij IDEA automatically suggests what you should import so you don’t have those missing symbol errors.

Thanks for your suggestion @Paulo
Very appreciated

1 Like