Skip to content

Instantly share code, notes, and snippets.

@dvdsmpsn
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvdsmpsn/946bf894649f86bfec99 to your computer and use it in GitHub Desktop.
Save dvdsmpsn/946bf894649f86bfec99 to your computer and use it in GitHub Desktop.
Problems installing installing Atlassian SDK 5.0.0

Install & check Maven version

Davids-MacBook-Pro:5.5.1 david$ atlas-update
...
...

Davids-MacBook-Pro:5.5.1 david$ atlas-version

ATLAS Version:    5.0.0
ATLAS Home:       /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec
ATLAS Scripts:    /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/bin
ATLAS Maven Home: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven
--------
Executing: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven/bin/mvn --version -gs /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven/conf/settings.xml
Colorizing console...
Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)
Java version: 1.6.0_65
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.9.3" arch: "x86_64" Family: "mac"

...old maven version

Try to update:

Davids-MacBook-Pro:5.5.1 david$ atlas-update
Executing: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven/bin/mvn com.atlassian.maven.plugins:maven-amps-plugin:5.0.0:update -gs /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven/conf/settings.xml
Colorizing console...
FATAL ERROR: Unable to read settings.xml
For more information, run with the -e flag
Davids-MacBook-Pro:5.5.1 david$ brew tap
atlassian/tap
homebrew/versions

Won't upgrade.

Uninstalling

Davids-MacBook-Pro:5.5.1 david$ brew uninstall atlassian/tap/atlassian-plugin-sdk
Uninstalling /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10...

Reinstalling

Davids-MacBook-Pro:5.5.1 david$ brew install atlassian/tap/atlassian-plugin-sdk
==> Downloading https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/amps/atlassian-plugin-sdk/4.2.10/atlassian-plugin-sdk-4.2.10.tar.gz
##########       

                                                         13.9%^C

Crap, it's installing an old version

Untap & reinstall...

Davids-MacBook-Pro:5.5.1 david$ brew untap atlassian/tap
Untapped 1 formula


Davids-MacBook-Pro:5.5.1 david$ brew tap atlassian/tap
Cloning into '/opt/boxen/homebrew/Library/Taps/atlassian-tap'...
remote: Reusing existing pack: 91, done.
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 94 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (94/94), done.
Tapped 1 formula


Davids-MacBook-Pro:5.5.1 david$ brew install atlassian/tap/atlassian-plugin-sdk
==> Downloading http://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/amps/atlassian-plugin-sdk/5.0.0/atlassian-plugin-sdk-5.0.0.tar.gz
######################################################################## 100.0%
==> Caveats
*** Please note we have dropped support for Maven 2.x and Maven 3.0.x ***
Release notes can be found at https://developer.atlassian.com/display/DOCS/AMPS+SDK+5.0.0+Release+Notes

Thanks for installing the Atlassian Plugin SDK. For more information,
visit https://developer.atlassian.com.

To create a plugin skeleton using atlas-create-APPLICATION-plugin, e.g.:
  atlas-create-jira-plugin or atlas-create-confluence-plugin

To run your plugin's host application with the plugin skeleton installed:
  atlas-run
==> Summary
🍺  /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0: 1401 files, 60M, built in 20 seconds

Looking better

Checking for maven version...

Davids-MacBook-Pro:5.5.1 david$ atlas-version

ATLAS Version:    5.0.0
ATLAS Home:       /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0/libexec
ATLAS Scripts:    /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0/libexec/bin
ATLAS Maven Home: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0/libexec/apache-maven
--------
Executing: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0/libexec/apache-maven/bin/mvn --version -gs /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0/libexec/apache-maven/conf/settings.xml
Colorizing console...
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T17:37:52+00:00)
Maven home: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/5.0.0/libexec/apache-maven
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.3", arch: "x86_64", family: "mac"

Yay!

@marcosscriven
Copy link

Hi David

Thanks for posting your solution. I've not been able to replicate on my machine (OS X Mavericks) upgrading from v 4.2.20 - so I'm wondering if in fact this was more a brew tap issue.

I say that because in this case it didn't look like it was just the Maven version that was old - it says:

  Executing: /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven/bin/mvn --version -gs /opt/boxen/homebrew/Cellar/atlassian-plugin-sdk/4.2.10/libexec/apache-maven/conf/settings.xml

Rather than 5.0.0 - and that fact brew refused to update to the new one until you completely removed the tap formula

@marcosscriven
Copy link

I looked into this further. Basically atlas-update just directly downloads from Atlassian's server. It won't use brew to update.

If anyone else reads this, and are in the same situation of having used atlas-update on a brew tap install, you just need to do these steps:

  1. brew update (this is the bit that was missed above)
  2. brew upgrade

By doing 'brew update', brew would become aware of version 5.0.0 (as in the normal brew update mechanism), and then brew upgrade would download a completely fresh version, avoiding the Maven conflict in the 4.2.20 version

Edit - Just noticed your original version you were upgrading from is 4.2.10, which is 11 versions behind. I'm thus guessing you've been using atlas-update all this time, and never updating brew?
Basically, atlas-update is fundamentally incompatible with brew, so I'll look into fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment