Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Maven Build Errors when running atlas-create-jira-plugin

I'm trying to create a HelloWorld plugin project as described here:

https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/

When I run

atlas-create-jira-plugin

I get the following:

[ERROR] Failed to execute goal com.atlassian.maven.plugins:jira-maven-plugin:8.0.2:create (default-cli) on project standalone-pom: Execution default-cli of goal com.atlassian.maven.plugins:jira-maven-plugin:8.0.2:create failed: 
Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.0.2 or one of its dependencies could not be resolved: Failed to collect dependencies at com.atlassian.maven.plugins:jira-maven-plugin:jar:8.0.2 ->
com.atlassian.maven.archetypes:jira-plugin-archetype:jar:8.0.2 -> org.twdata.maven:mojo-executor:jar:2.3.0 -> org.apache.maven:maven-core:jar:3.5.4 -> org.apache.maven:maven-model:jar:3.5.4 ->
org.apache.commons:commons-lang3:jar:3.8.1: Failed to read artifact descriptor for org.apache.commons:commons-lang3:jar:3.8.1: Could not transfer artifact org.apache.commons:commons-lang3:pom:3.8.1 from/to atlassian-public (https://maven.atlassian.com/repository/public):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target -> [Help 1] 

 How do I proceed?

4 answers

Did you figure this out? I'm running into the same issue

Is the problem resolved? I am facing the same issue.

Ah I figured it out but it's been a bit so I'm not sure I remember what I did specifically. What do you get when you enter atlas-version?

Hi Karl

I get below for atlas-version

ATLAS Version: 8.0.16
ATLAS Home: /opt/atlassian-plugin-sdk-8.0.16
ATLAS Scripts: /opt/atlassian-plugin-sdk-8.0.16/bin
ATLAS Maven Home: /opt/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4
AMPS Version: 8.0.2
--------
Executing: /opt/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4/bin/mvn --version -gs /opt/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4/conf/settings.xml
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T00:03:14+05:30)
Maven home: /opt/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4
Java version: 13.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-13.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.1.3.el7.x86_64", arch: "amd64", family: "unix"

I'm fairly new to this as well so I'll help the best I can but I'm not sure specifically what the problem is... it looks like your SDK & AMPS versions are up to date. You could try 'brew update' and then 'brew upgrade atlassian/tap/atlassian-plugin-sdk' just to make sure. Also once you've created an empty directory and navigated into that make sure you're running 'atlas-create-jira-plugin' and not 'atlas-create-jira-plugin-module'

If you're still having problems can you post the whole error that you're recieving?

Wait! Actually I think I know what the problem is. Change your JDK to version 8. If you don't have it downloaded already you can get it here [https://adoptopenjdk.net] (or directly from Oracle but AdoptOpenJDK HotSpot is probably better if you don't know the differences between licenses). I'm fairly positive the Atlassian SDK is incompatible with JDK13 and maybe JDK11 as well.

 

After you download JDK 8, paste these lines (below) into your ~/.zshrc file if you're using ZSH, OR into your ~/.bash_profile if you're using BASH, etc. (make sure the path is what I have below, it should tell you in the last step of the JDK installation after downloading- if it's not the same, copy the path that it gives you)

 

export JAVA_HOME=$JAVA_HOME/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

Then find where your PATH is and paste '$JAVA_HOME/bin' after '$PATH', ie

export PATH="$PATH:$JAVA_HOME/bin"

 

Save & close, then source whichever file you put those into (for example 'source ~/.zshrc')

You can make sure everything is correct by opening a new window in your CLI and typing 'javac -version'; you should get output similar to 'javac 1.8.0_232'

or 'echo $JAVA_HOME' and get the output '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home'

 

If all of that is correct you should have no problem creating a Jira plugin. Hope this helps! Here's the link with all of that info if you need:

[https://developer.atlassian.com/server/framework/atlassian-sdk/install-the-atlassian-sdk-on-a-linux-or-mac-system/]

Hi Karl

Tried with lower version of java, but did not help.

#java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)

#javac -version
javac 1.8.0_232

#echo $JAVA_HOME
/usr/lib/jvm/jdk8u232-b09

#echo $PATH
/opt/atlassian-plugin-sdk/bin:/opt/atlassian-plugin-sdk/apache-maven/bin/:/usr/lib/jvm/jdk8u232-b09/bin:/usr/local/src/node-v10.14.2-linux-x64/bin:/usr/local/src/apache-maven/bin:/usr/bin:/usr/local/git/bin:/usr/lib64/qt-3.3/bin

Thanks

Akshatha

did you able to solve the problem?

i have the same issue

//balaji

Attempted to use the latest SDK (8.0.16) and came up with the same issue. After spending half the day debugging (and fighting) maven trying to find a resolution, giving up for the day.

Tried other version and here is the result:

  • 8.0.16 - fail
  • 8.0.7 - fail, same error
  • 8.0.6 - fail, same error
  • 6.3.12 - SUCCESS ! :)
  • 6.3.10 - current SDK that is still working.

 

So, maybe use the 6.3.12 version.
I got my copy here: https://marketplace.atlassian.com/apps/1210993/atlassian-plugin-sdk-tgz/version-history


The info about the error you are receiving is:
Could not transfer artifact org.apache.commons:commons-lang3:pom:3.8.1
from/to atlassian-public (https://maven.atlassian.com/repository/public):
And why is:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target -> [Help 1]

Solution seems:
Update your jvm JRE_HOME\lib\security\cacerts
Check for more info about that:
https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html

What helped me to get forward with "missing dependencies" in 8.0.16 was to
replace my
~/.m2/settings.xml
with provided
atlassian-plugin-sdk-8.0.16\apache-maven-3.5.4\conf\settings.xml

but keeping my custom settings like proxies, google
Hope this helps.

I ran into the same issue that was initially posted. What is unclear to me about updating my Java cacerts is which site does one specify for importing? Is it "apache.org" or some other site? I tried "apache.org" but still got the error.

- go to https://maven.atlassian.com/repository/public
- Export the certificate under details menu
- Save this as public.crt.
- run the below to import the crt into the cacert via keytool

keytool -import -alias atlasdk -keystore $JAVA_HOME/lib/security/cacerts -file <your public.crt filepath>

- Verify openssl works too:
openssl s_client -connect maven.atlassian.com:443 -servername maven.atlassian.com:443

However i still can't get this to work and are still getting this

(https://maven.atlassian.com/repository/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you