How do I access classes from a different Plug-In

Hi, I am trying to adjust a JIRA plug-in which needs to use classes from a different plug-in of ours (in order to copy a custom field whose type is defined in that "different" plug-in). Both plug-ins are JIRA 7.x

I've found some older "manuals" or forum entries describing this very same issue, but was still unable to solve it. My (second) plug-in either is unable to start or the particular class is not found (ClassNotFound, ClassDeffNotFound) dependent on the particular configuration. 

At my last attempt, I've made the following adjustments to my pom.xml and atlassian-plugin.xml respectively:

 

pom.xml (1)

@see the <instructions> tag

 

<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>
          <jvmArgs>-Xmx2g</jvmArgs>
            <instructions>
              <Export-Package>
                de.xx.jira_tools
              </Export-Package>
            </instructions>
      </configuration>
    </plugin>
    <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
    </plugin>
  </plugins>
</build>

 

atlassian-plugin.xml (1)

no changes here

 

pom.xml (2)

 

<dependency>
    <groupId>de.xx.jira_tools</groupId>
    <artifactId>component-manager</artifactId>
    <version>3.0.4</version>
    <scope>provided</scope>
</dependency>
<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>
        <Import-Package>
          de.xx.jira_tools.*
        </Import-Package>
      </instructions> 
  </configuration>
</plugin>

 

atlassian-plugin.xml (2)

<custom-field-mapper key="ctSelectorMapper" 
class="de.xx.cpi.fields.custom.ComponentTopicSelectorMapper"/>

 

Thank you very much for your help!

 

MARTIN MINTÁL

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Agile

What is ChatOps? A guide to its evolution, adoption, and significance

I am the product of AIM. I can hear that door swinging open and closed in my mind with absolute fidelity. I’d recognize that ding anywhere. At 15, as I typed away into AOL IM, I never imagined that ...

25 views 1 5
Read article

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