Creating a configuration for custom field type - compilation errors

Ivana Navratilova August 8, 2017

I'm trying to create a configurable custom item, following the tutorial in Practical JIRA Plugins book. My problem is that when I try to create the configuration class EditConfiguration (following this source code  EditConfiguration class), I get this error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project jiraPlugin: Compilation failure
[ERROR] xxxx/jira/customfields/EditConfiguration.java:[125,17] name clash: setErrorMessages(java.util.Collection<java.lang.String>) in xxxx.jira.customfields.EditConfiguration and setErrorMessages(java.util.Collection) in webwork.action.ActionSupport have the same erasure, yet neither overrides the other

 There seems to be a problem with method setErrorMessages, which needs to be overriden, but the overriden version is the same as the generic one in com.atlassian.jira.util.ErrorCollection class.

I suppose the main problem is that the book is working with some older JIRA version, but being very new to JIRA development, I have no idea how to solve this.

 

UPDATE:

The problem seems to be in conflict with OpenSymphony webwork framework. When I add dependency to newest version 2.2.5, problem disappears, but I get another error

[ERROR] xxx/jira/customfields/EditConfiguration.java:[13,8] cannot access webwork.action.CommandDriven
[ERROR] class file for webwork.action.CommandDriven not found

Logically, because this class was either moved somewhere else or removed completely in this version. When I go back to lower version 1.4, which does contain the CommandDriven class, I also go back to the error mentioned earlier.

JiraActionSupport class seems to be implementing the CommandDriven interface, so I have to stick with the older version of OpenSymphony webwork, which gives me the name clash error.

I have these in my pom.xml, which I think is right.

<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>

And I have tried to add this with both 1.4 and 2.2.5 versions, getting the said errors.

<dependency>
<groupId>opensymphony</groupId>
<artifactId>webwork</artifactId>
<version>1.4</version>
</dependency>

I also have this set to jira.version - that was default when I created the project.

<jira.version>7.4.1</jira.version>

 

0 answers

Suggest an answer

Log in or Sign up to answer