Maven dependency (com.atlassian.jira.plugins...)

Hello

In the java import (is a maven application) "com.atlassian.jira.plugins.importer.external.beans.ExternalCustomField" Eclipse shows the error "The import com.atlassian can not be resolved".

What needs to be put in pom.xml (dependency, repository ...)?

I am developing a plugin for Jira 6.0.1.

In the pom.xml I have included:

<plugin>
<groupId> com.atlassian.maven.plugins </ groupId>
<artifactId> maven-jira-plugin </ artifactId>
<version>? </ version>
<extensions> true </ extensions>
<configuration>
<productVersion>? </ ProductVersion>
<productDataVersion>? </ productDataVersion>
</ configuration>
</ plugin>

I do not know which version to market.

Thank you!

9 answers

This widget could not be displayed.

Running the atlassian sdk's command does additional configuration of maven settings.

When running maven standalone, you are going to get the error "cannot resolve com.atlassian...".

Either run maven wrapped in the atlassian commands, or add additioanl configuration to your maven settings.xml or your pom.

Look into the code of the sdk to find details.

Have you added the atlassian maven repository?

Taken from sdk/apache-maven/conf/settings.xml:

...
...
       &lt;repositories&gt;
         &lt;repository&gt;
           &lt;id&gt;atlassian-public&lt;/id&gt;
           &lt;url&gt;https://maven.atlassian.com/repository/public&lt;/url&gt;
           &lt;snapshots&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
             &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
             &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
           &lt;/snapshots&gt;
           &lt;releases&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
             &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
           &lt;/releases&gt;
         &lt;/repository&gt;
 	      &lt;repository&gt;
 	        &lt;id&gt;atlassian-plugin-sdk&lt;/id&gt;
           &lt;url&gt;file://${env.ATLAS_HOME}/repository&lt;/url&gt;
           &lt;snapshots&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
           &lt;/snapshots&gt;
           &lt;releases&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
             &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
           &lt;/releases&gt;
         &lt;/repository&gt;
       &lt;/repositories&gt;
 
       &lt;pluginRepositories&gt;
         &lt;pluginRepository&gt;
           &lt;id&gt;atlassian-public&lt;/id&gt;
           &lt;url&gt;https://maven.atlassian.com/repository/public&lt;/url&gt;
           &lt;releases&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
             &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
           &lt;/releases&gt;
           &lt;snapshots&gt;
             &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
             &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
           &lt;/snapshots&gt;
         &lt;/pluginRepository&gt;
         &lt;pluginRepository&gt;
           &lt;id&gt;atlassian-plugin-sdk&lt;/id&gt;
           &lt;url&gt;file://${env.ATLAS_HOME}/repository&lt;/url&gt;
           &lt;releases&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
             &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
           &lt;/releases&gt;
           &lt;snapshots&gt;
             &lt;enabled&gt;true&lt;/enabled&gt;
           &lt;/snapshots&gt;
         &lt;/pluginRepository&gt;
       &lt;/pluginRepositories&gt;
       &lt;properties&gt;
         &lt;downloadSources&gt;true&lt;/downloadSources&gt;
         &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
       &lt;/properties&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
...

This widget could not be displayed.
This widget could not be displayed.

Thanks rambanam prasad!

But this has not solved the problem. Some of the libraries not working right now used to work before.

The libraries that fail with the pom.xml that you show me are:

com.google ...

com.atlassian.jira.plugins ...

com.example.plugins ...

Previously I solved the com.google libraries with dependencies:

<dependency>

<groupId> com.atlassian.jira </ groupId>

<artifactId> jira-api </ artifactId>

<version> 5.0 </ version>

<scope> provided </ scope>

</ dependency>

<dependency>

<groupId> com.google.guava </ groupId>

<artifactId> guava </ artifactId>

<version> r03 </ version>

</ dependency>

<dependency>

<groupId> org.apache.httpcomponents </ groupId>

<artifactId> httpcore </ artifactId>

<version> 4.0.1 </ version>

</ dependency>

But with these I lack the following:

com.atlassian.jira.plugins ...

com.example.plugins ...

:(

Any idea?

This widget could not be displayed.

try with following code

&lt;dependency&gt;
 &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
 &lt;artifactId&gt;guava&lt;/artifactId&gt;
&lt;version&gt;10.0.1&lt;/version&gt;
&lt;scope&gt;provided&lt;/scope&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt; org.apache.httpcomponents &lt;/ groupId&gt;
&lt;artifactId&gt; httpcore &lt;/ artifactId&gt;
&lt;version&gt; 4.0.1 &lt;/ version&gt;
&lt;scope&gt;provided&lt;/scope&gt;
&lt;/ dependency&gt;

dont forget to run atlas-mvn eclipse:eclipse run once you change pom.xml

This widget could not be displayed.

Maybe try to build your plugin with

atlas-mvn package

from terminal, then the atlassian deps will be resolved. Don't know if this is done differently with eclipse.

After this, the deps should be available from your local maven repo.

This widget could not be displayed.

Thanks rambanam and Philipp!

The last dependency has not solved the problem (I already used the r03 version of it).

I'm not using the Atlassian SDK, but I have run the same commands in Maven: "eclipse: eclipse" and "package", and clean the project in ecilpse, refresh, close&open...

Desperate!

This widget could not be displayed.

Thanks Philipp! I added the repositories and repositories plugins to settings.xml and Maven has been downloaded many artifacts, but imports continue failing, the "com.atlassian.jira.plugins..." and "com.example.plugins ..." imports.

Can be for not using the Atlassian SDK?

Thank you!

This widget could not be displayed.

Is there a reason for not using the SDK?

It is quite easy to install and may get your setup working.

See: https://developer.atlassian.com/display/DOCS/Set+up+the+Atlassian+Plugin+SDK+and+Build+a+Project

This widget could not be displayed.

I do not use the Atlassian SDK because throws an error with the class org.codehaus.classworlds.Launcher (class not found or loaded)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 5 hours ago in Europe

ABUG-20 Livestream: The 20th Atlassian Belgian User Group (including a Summit 2018 Recap)

You can't/couldn't make it to our User Group today? Don't worry, we'll be live streaming and recording the event for your sake. Comments, questions, basically any reactions can be posted below! New...

32 views 0 0
View post

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