I am trying to build a modified version of select (multiple choices), however class is not available even after enabling jira-core deps in pom filereferred to this https://community.atlassian.com/forums/Jira-questions/Not-able-to-import-quot-MultiSelectCFType-quot/qaq-p/1051794however could not solve the issue.Any help here is appreciated!
Hi @Rajit Kuthiala
Could you share your pom.xml's related part as well as the stack trace that you are getting?
Hi @Tuncay Senturk _Snapbytes_ thanks for the quick response here is my pom file , upon running atlas-package , it was not able to find jndi file , hence I have external downloaded it from the web and copied the files in m2 maven directory
<?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.zscaler</groupId> <artifactId>select-new</artifactId> <version>1.0.0-SNAPSHOT</version> <organization> <name>Example Company</name> <url>http://www.example.com/</url> </organization> <name>select-new</name> <description>This is the com.zscaler:select-new plugin for Atlassian JIRA.</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>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-annotation</artifactId> <version>${atlassian.spring.scanner.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> <scope>provided</scope> </dependency> <!-- WIRED TEST RUNNER DEPENDENCIES --> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit --> <!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit --> <!-- <dependency> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-client</artifactId> <version>${testkit.version}</version> <scope>test</scope> </dependency> --> </dependencies> <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>jira-maven-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <!-- Uncomment to install TestKit backdoor in JIRA. --> <!-- <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version> </pluginArtifact> </pluginArtifacts> --> <enableQuickReload>true</enableQuickReload> <!-- See here for an explanation of default instructions: --> <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins --> <instructions> <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key> <!-- Add package to export here --> <Export-Package> com.zscaler.api,</Export-Package> <!-- Add package import here --> <Import-Package> org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package> <!-- Ensure plugin is spring powered --> <Spring-Context>*</Spring-Context> </instructions> </configuration> </plugin> <plugin> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-maven-plugin</artifactId> <version>${atlassian.spring.scanner.version}</version> <executions> <execution> <goals> <goal>atlassian-spring-scanner</goal> </goals> <phase>process-classes</phase> </execution> </executions> <configuration> <verbose>false</verbose> </configuration> </plugin> </plugins> </build> <properties> <jira.version>9.12.2</jira.version> <amps.version>9.1.1</amps.version> <plugin.testrunner.version>2.0.9</plugin.testrunner.version> <atlassian.spring.scanner.version>2.2.4</atlassian.spring.scanner.version> <!-- This property ensures consistency between the key in atlassian-plugin.xml and the OSGi bundle's key. --> <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key> <!-- TestKit version 6.x for JIRA 6.x --> <testkit.version>6.3.11</testkit.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties></project>
additionally there isn't much on the stack trace side , it is not able to find class MutliSelectCFType when creating a customfield type derived from original custom fieldatlassian-plugin.xml
<customfield-type key="rajit" name="Rajit" i18n-name-key="my.plugin.name" class="com.atlassian.jira.issue.customfields.impl.MultiSelectCFType"> <description key="admin.customfield.type.multiselect.desc">Choose multiple values in a select list.</description> <resource type="download" name="customfieldpreview.png" location="/images/customfieldpreview/multiselect.png"> <param name="source" value="webContextStatic"/> </resource> <resource type="velocity" name="view" location="templates/plugins/fields/view/view-multiselect.vm"/> <resource type="velocity" name="edit" location="templates/plugins/fields/edit/edit-multiselect.vm"/> <resource type="velocity" name="xml" location="templates/plugins/fields/xml/xml-multiselect.vm"/></customfield-type>
Did you try using your own wrapper class?
I mean instead of referencing com.atlassian.jira.issue.customfields.impl.MultiSelectCFType directly in atlassian-plugin.xml, create your own class that extends it (as below)
MyCustomMultiSelectCFType extends MultiSelectCFType
Then use it in your atlassian-plugin.xml.
Additionally, I am not 100% sure but you may need to import com.atlassian.jira.issue.customfields.impl in your OSGi Import-Package if it's not being resolved automatically.
<Import-Package>com.atlassian.jira.issue.customfields.impl,...</Import-Package>
Hi @Tuncay Senturk _Snapbytes_ I did try to build a psedu class for this , however intellij says it is not able to resolve the importI tried adding it to OSGi Import Package , however it did not solve.If you have any good github repo or other reference source it would be great help!
is it possible that intellij is not able to resolve , but class can be still imported ?
It looks like you're new here. Sign in or register to get started.