Simple way to use JRJC?

Hello everyone,

got an big issue.

Well i want to create an REST service on my jira 4.3.2 instance.

I found these jar-libs -> https://marketplace.atlassian.com/plugins/com.atlassian.jira.jira-rest-java-client/versions but they didnt work for me because some classes missing.

Q1: Are any of this .jar versions even fit with my jira instance?

Seems i need to create a maven project...

I downloaded the sdk from atlassian (maven included). Installed maven ofc. succesfully and changed the environment paths.

I found the required pom.xml: https://bitbucket.org/atlassian/jira-rest-java-client/src/a76b751e2ef2dfa63dabe9a8a03f263fe5394f4a/pom.xml?at=master

Q2: Which are the following steps to continue?

Sorry if my questions seems a bit dumb, but its really disturbing if you only want to create a simple client and need to go in the maven dungeon.

Hope for some good advice :)

11 answers

1 accepted

I'm a bit confused - what do you want achieve? I see two totaly different goals:

* you want create new REST resource in JIRA to access it using REST calls - if yes then you don't need JRJC

* you want use JIRA REST API from JAVA - if this is true then JRJC can be helpful :)

The easiest way to use JRJC is to just pull it by adding dependency to pom.xml (as maven will sort all dependencies for you!).

<dependency>
   <groupId>com.atlassian.jira</groupId>
   <artifactId>jira-rest-java-client-core</artifactId>
   <version>2.0.0-m25</version>
</dependency>

So if your goal is to create standalone JAVA project that connects to JIRA via REST then the above dependency is all you need add to your pom.xml (you already did generated empty maven project, right? ;)) - then you can start coding (please refer to JRJC source code for examples - integration tests are the best place to learn how to use JRJC) :)

Good place to start playing with maven: http://maven.apache.org/guides/getting-started/

Personally I use Intelij IDEA for java maven projects - it helps a lot :)

Given jar is just maven artifact without any dependencies included - this is why it's best to use maven for your project. Plus maven helps a lot with java projects :).

You can also include all required jars manually if you want - in such case please search for my other answers in answers.atlassian.com - I already described how to download all artifacts somewhere.

First of all, thank you for your quick reply!!

Well no i didnt generated already a empty maven project. (if you have a good cookbook just let me know :)) And yes i want to create a standalone Java project. I will try that.

But just for my knowledge: Why you recommand using Maven insted of just using on of this jar libs? -> https://marketplace.atlassian.com/plugins/com.atlassian.jira.jira-rest-java-client/versions

Ok i tried it. I started with that command:

mvn archetype:generate \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app

Then i added this to the pom.xml:

<dependency>
   <groupId>com.atlassian.jira</groupId>
   <artifactId>jira-rest-java-client-core</artifactId>
   <version>2.0.0-m25</version>
</dependency>

There was an error cuz maven couldnt download the jar. So i manually installed it -> works.

Changed the repository and the proxy at the settings.xml.

I used the command: mvn package and i get a .jar file in my target.

When i include the .jar in my eclipse project there is only the default app class in it.

Could you gimme an advice what i exactly need to do or what i did wrong.

Just want that JRJC client ;-)

Hope you could answer the one more question.

Best regards!

 

It was a long time since I touch eclipse ;). Probably you need to follow some eclipse-maven guide, like this one http://maven.apache.org/guides/mini/guide-ide-eclipse.html - but I really don't remember how-to eclipse&maven. Since I started using Intelij Idea I can't go back to eclipse - it's terrible comparing to Idea ;).

Error when downloading jar was caused missing atlassian maven repository in settings.xml - I forgot to metion it, sorry. When you work longer with maven you think that everything is obvoius ;)

I've just created simple example project - I help it will aswer all your questions :)

https://bitbucket.org/atlassian/jrjc-example/

After you run mvn package on it you should be able to execute produced jar using java -jar jar-file-name.jar

Please analyse pom.xml to see how I got this working. I cannot help you with eclipse, as I even don't have it installed on my PC, sorry :<. But google should be helpful here (eclipse + maven). I just can advice switching do Idea if you can ;).

Thx for the reply. Just one more issue.. ;-)

I download your example. But i changed the pom from:

		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-rest-java-client-core</artifactId>
			<version>2.0.0-m24</version>
		</dependency>

to:

&lt;dependency&gt;
			&lt;groupId&gt;com.atlassian.jira&lt;/groupId&gt;
			&lt;artifactId&gt;jira-rest-java-client-core&lt;/artifactId&gt;
			&lt;version&gt;2.0.0-m25&lt;/version&gt;
		&lt;/dependency&gt;

because i couldnt find the "24" version, where you get this one from?

After i did: mvn package with the "25" i get the following error:

2 errors: package com.atlassian.jira.rest.client.api + api.domain does not exist

also 1 more:

could not parse errror message: symbol: class JiraRestClient
could not parse error message: class file for com.atlassian.jira.rest.api.JiraRestClient not found

Seems this class doesnt exist in this package.

Could you explain me that?;)

Thank you so much dude for that!

Thx for the reply. Just one more issue.. ;-)

I download your example. But i changed the pom from:

		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-rest-java-client-core</artifactId>
			<version>2.0.0-m24</version>
		</dependency>

to:

&lt;dependency&gt;
			&lt;groupId&gt;com.atlassian.jira&lt;/groupId&gt;
			&lt;artifactId&gt;jira-rest-java-client-core&lt;/artifactId&gt;
			&lt;version&gt;2.0.0-m25&lt;/version&gt;
		&lt;/dependency&gt;

because i couldnt find the "24" version, where you get this one from?

After i did: mvn package with the "25" i get the following error:

2 errors: package com.atlassian.jira.rest.client.api + api.domain does not exist

also 1 more:

could not parse errror message: symbol: class JiraRestClient
could not parse error message: class file for com.atlassian.jira.rest.api.JiraRestClient not found

Seems this class doesnt exist in this package.

Could you explain me that?;)

Thank you so much dude for that!

Have you added atlassian plublic repository to your maven settings.xml (https://maven.atlassian.com/repository/public)? Those artifacts are there, so it should work fine.

We push all atlassian artifacts to our repository instead of maven central.

Right, m24 was probably broken during release and it didn't get there, sorry (looks that m24 is somehow in my local repository so it worked fine).

It works for mi with m25. Have you tried mvn clean package to cleanup working directory? This error comes when you run maven package or when?

I've just removed .m2/repository/com/atlassian/jira/jira-rest-java-client* to be sure that I use artifacts from maven repository and it worked fine.

So the version m25 is fine - problem must be somewhere else ;). Maybe try cleaning maven local repostiory to be sure that you don't have broken artifact?

Plase share the output from maven if is failing on mvn package - maybe I can spot something there.

Sry for my late reply.

I was using your example and run the "mvn package" command and getting this result:

C:\Users\myuser\atlassian-plugin-sdk\atlassian-jrjc-example-54673b037ab7>mvn pac
kage
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - jrjc-example:jrjc-example:jar:1.0-SNAPSHOT
[INFO]    task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\myuser\atlassian-plugin-sdk\
atlassian-jrjc-example-54673b037ab7\src\main\resources
Downloading: https://maven.atlassian.com/repository/public/com/atlassian/jira/ji
ra-rest-java-client-core/2.0.0-m25/jira-rest-java-client-core-2.0.0-m25.pom
[WARNING] Unable to get resource 'com.atlassian.jira:jira-rest-java-client-core:
pom:2.0.0-m25' from repository atlassian-public (https://maven.atlassian.com/rep
ository/public): Error transferring file: maven.atlassian.com
Downloading: file://C:\Users\myuser\atlassian-plugin-sdk/repository/com/atlassia
n/jira/jira-rest-java-client-core/2.0.0-m25/jira-rest-java-client-core-2.0.0-m25
.pom
[INFO] Unable to find resource 'com.atlassian.jira:jira-rest-java-client-core:po
m:2.0.0-m25' in repository atlassian-plugin-sdk (file://C:\Users\myuser\atlassia
n-plugin-sdk/repository)
Downloading: http://repo1.maven.org/maven2/com/atlassian/jira/jira-rest-java-cli
ent-core/2.0.0-m25/jira-rest-java-client-core-2.0.0-m25.pom
[INFO] Unable to find resource 'com.atlassian.jira:jira-rest-java-client-core:po
m:2.0.0-m25' in repository central (http://repo1.maven.org/maven2)
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to C:\Users\myuser\atlassian-plugin-sdk\atlassian
-jrjc-example-54673b037ab7\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

C:\Users\myuser\atlassian-plugin-sdk\atlassian-jrjc-example-54673b037ab7\src\mai
n\java\com\atlassian\jira\rest\client\example\Main.java:[20,41] error: package c
om.atlassian.jira.rest.client.api does not exist

C:\Users\myuser\atlassian-plugin-sdk\atlassian-jrjc-example-54673b037ab7\src\mai
n\java\com\atlassian\jira\rest\client\example\Main.java:[21,48] error: package c
om.atlassian.jira.rest.client.api.domain does not exist

C:\Users\myuser\atlassian-plugin-sdk\atlassian-jrjc-example-54673b037ab7\src\mai
n\java\com\atlassian\jira\rest\client\example\Main.java:[33,8] error: cannot fin
d symbol

could not parse error message:   symbol:   class JiraRestClient
  location: class Main
C:\Users\myuser\atlassian-plugin-sdk\atlassian-jrjc-example-54673b037ab7\src\mai
n\java\com\atlassian\jira\rest\client\example\Main.java:33: error: cannot access
 JiraRestClient
                final JiraRestClient restClient = factory.createWithBasicHttpAut
hentication(jiraServerUri, "admin", "admin");

           ^

could not parse error message:   class file for com.atlassian.jira.rest.client.a
pi.JiraRestClient not found
C:\Users\myuser\atlassian-plugin-sdk\atlassian-jrjc-example-54673b037ab7\src\mai
n\java\com\atlassian\jira\rest\client\example\Main.java:35: error: cannot find s
ymbol
                        final Issue issue = restClient.getIssueClient().getIssue
("DEMO-1").claim();
                              ^


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Sep 30 09:50:26 CEST 2013
[INFO] Final Memory: 18M/110M
[INFO] ------------------------------------------------------------------------

Also getting same error when i use "mvn clean package".

Would be great if you could anser! :))

Best regards!

That's strange - in logs I can see that maven is trying to get pom from atlassain repository, but it gets error instead of pom.

https://maven.atlassian.com/repository/public/com/atlassian/jira/ji
ra-rest-java-client-core/2.0.0-m25/jira-rest-java-client-core-2.0.0-m25.pom
[WARNING] Unable to get resource 'com.atlassian.jira:jira-rest-java-client-core:
pom:2.0.0-m25' from repository atlassian-public (https://maven.atlassian.com/rep
ository/public): Error transferring file: maven.atlassian.com

Can you access this url from browser? https://maven.atlassian.com/repository/public/com/atlassian/jira/jira-rest-java-client-core/2.0.0-m25/jira-rest-java-client-core-2.0.0-m25.pom

This should open XML file (pom of JRJC core module). Do you have some proxy configured? It looks like maven is unable to get that file (it work for me from office and from home computer).

Yes i can access that file from browser, and yes i did proxy settings in my settings.xml.

Are you using the atlassian sdk (maven included) oder the normal maven2?

Btw. i used the default settings.xml from the atlassian sdk.

Uploaded you the settings.xml here.

&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
--&gt;

&lt;!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user, 
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in 
 |                 ${maven.home}/conf/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |--&gt;
&lt;settings xmlns="http://maven.apache.org/settings/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  &lt;!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository--&gt;
 &lt;!-- &lt;localRepository&gt;C:\Users\myuser\.m2&lt;/localRepository&gt;--&gt;
  

  &lt;!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  &lt;interactiveMode&gt;true&lt;/interactiveMode&gt;
  --&gt;

  &lt;!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  &lt;offline&gt;false&lt;/offline&gt;
  --&gt;

  &lt;!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |--&gt;
  &lt;pluginGroups&gt;
     &lt;!-- The Atlassian maven plugins group used for all Atlassian Maven plugins --&gt;
     &lt;pluginGroup&gt;com.atlassian.maven.plugins&lt;/pluginGroup&gt;
  &lt;/pluginGroups&gt;

  &lt;!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |--&gt;
  &lt;proxies&gt;
    &lt;!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |--&gt;
	 
	 &lt;!--my proxy here --&gt;
    
  &lt;/proxies&gt;

  &lt;!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |--&gt;
  &lt;servers&gt;
    &lt;!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     | 
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are 
     |       used together.
     |
    &lt;server&gt;
      &lt;id&gt;deploymentRepo&lt;/id&gt;
      &lt;username&gt;repouser&lt;/username&gt;
      &lt;password&gt;repopwd&lt;/password&gt;
    &lt;/server&gt;
    --&gt;
    
    &lt;!-- Another sample, using keys to authenticate.
    &lt;server&gt;
      &lt;id&gt;siteServer&lt;/id&gt;
      &lt;privateKey&gt;/path/to/private/key&lt;/privateKey&gt;
      &lt;passphrase&gt;optional; leave empty if not used.&lt;/passphrase&gt;
    &lt;/server&gt;
    --&gt;
  &lt;/servers&gt;

  &lt;!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   | 
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred 
   | server for that repository.
   |--&gt;
  &lt;mirrors&gt;
    &lt;!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    &lt;mirror&gt;
      &lt;id&gt;mirrorId&lt;/id&gt;
      &lt;mirrorOf&gt;repositoryId&lt;/mirrorOf&gt;
      &lt;name&gt;Human Readable Name for this Mirror.&lt;/name&gt;
      &lt;url&gt;http://my.repository.com/repo/path&lt;/url&gt;
    &lt;/mirror&gt;
     --&gt;
  &lt;/mirrors&gt;
  
  &lt;!-- profiles
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
   | specific paths and repository locations which allow the build to work in the local environment.
   |
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
   | your Tomcat instance is installed, you can provide a variable here such that the variable is 
   | dereferenced during the build process to configure the cactus plugin.
   |
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
   | section of this document (settings.xml) - will be discussed later. Another way essentially
   | relies on the detection of a system property, either matching a particular value for the property,
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a 
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
   | Finally, the list of active profiles can be specified directly from the command line.
   |
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
   |       repositories, plugin repositories, and free-form properties to be used as configuration
   |       variables for plugins in the POM.
   |
   |--&gt;
  &lt;profiles&gt;
    &lt;!-- profile
     | Specifies a set of introductions to the build process, to be activated using one or more of the
     | mechanisms described above. For inheritance purposes, and to activate profiles via &lt;activatedProfiles/&gt;
     | or the command line, profiles have to have an ID that is unique.
     |
     | An encouraged best practice for profile identification is to use a consistent naming convention
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
     | to accomplish, particularly when you only have a list of profile id's for debug.
     |
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
    &lt;profile&gt;
      &lt;id&gt;jdk-1.4&lt;/id&gt;

      &lt;activation&gt;
        &lt;jdk&gt;1.4&lt;/jdk&gt;
      &lt;/activation&gt;

      &lt;repositories&gt;
        &lt;repository&gt;
          &lt;id&gt;jdk14&lt;/id&gt;
          &lt;name&gt;Repository for JDK 1.4 builds&lt;/name&gt;
          &lt;url&gt;http://www.myhost.com/maven/jdk14&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
          &lt;snapshotPolicy&gt;always&lt;/snapshotPolicy&gt;
        &lt;/repository&gt;
      &lt;/repositories&gt;
    &lt;/profile&gt;
    --&gt;

    &lt;!--
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
     | might hypothetically look like:
     |
     | ...
     | &lt;plugin&gt;
     |   &lt;groupId&gt;org.myco.myplugins&lt;/groupId&gt;
     |   &lt;artifactId&gt;myplugin&lt;/artifactId&gt;
     |   
     |   &lt;configuration&gt;
     |     &lt;tomcatLocation&gt;${tomcatPath}&lt;/tomcatLocation&gt;
     |   &lt;/configuration&gt;
     | &lt;/plugin&gt;
     | ...
     |
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
     |       anything, you could just leave off the &lt;value/&gt; inside the activation-property.
     |
    &lt;profile&gt;
      &lt;id&gt;env-dev&lt;/id&gt;

      &lt;activation&gt;
        &lt;property&gt;
          &lt;name&gt;target-env&lt;/name&gt;
          &lt;value&gt;dev&lt;/value&gt;
        &lt;/property&gt;
      &lt;/activation&gt;

      &lt;properties&gt;
        &lt;tomcatPath&gt;/path/to/tomcat/instance&lt;/tomcatPath&gt;
      &lt;/properties&gt;
    &lt;/profile&gt;
    --&gt;
     &lt;!-- Default profile containing Atlassian servers --&gt;
     &lt;profile&gt;
       &lt;id&gt;defaultProfile&lt;/id&gt;
       &lt;activation&gt;
         &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
       &lt;/activation&gt;
 
       &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;

  &lt;!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  &lt;activeProfiles&gt;
    &lt;activeProfile&gt;alwaysActiveProfile&lt;/activeProfile&gt;
    &lt;activeProfile&gt;anotherAlwaysActiveProfile&lt;/activeProfile&gt;
  &lt;/activeProfiles&gt;
  --&gt;
&lt;/settings&gt;

If your proxy configuration is fine then everything should work - but it looks like maven cannot connect to the repository server. What I can suggest is

- Double check that this is the settings.xml that maven uses (try to specify path with -s option to be sure that it doesn't pick other sttings.xml file)

- run maven package with -X and check if maven says that he's using your proxy. ([DEBUG] Using Proxy: localhost)

I'm not using proxy here. Project builds fine with mvn downloaded manually and with the one from atlassian SDK too.

Tried both. With -s setting, the same error appears and if i check DEBUG Using Proxy, my proxy name appears. Think i gonna check that now from home, maybe its gonna work ;-)

Working pretty well. Thanks for your support!

Best regards!

Lukas

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,338 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot