Closed LevonBecker closed 8 years ago
also, sure would be nice to be able to give full version and you default to the Apache URL download and skip the ark checksum if don't care if sha256sum matches for a dev box to have maven blah. Or even better what I've done is a simple http call with some regex to figure out the latest stable version and make that the default. (latest stable)
This isn't right, just give you an idea. I don't have time right now to really make it work.
# Fetch Latest Version
require 'net/http'
html = Net::HTTP.get_response(URI(node['maven']['base_url'])).body
latest_revision = html.scan(/maven-(\d\.\d\.\d)\.noarch\.tar.gz/).flatten.uniq.max
raise 'ERROR: Failed to fetch latest Maven Revision' if latest_revision.nil?
Then if the devops dude enters a specific version/url or whatnot you ditch the above and use what they specified. etc.
@LevonBecker This should be resolved with how the version attribute is handled in the latest version. Give it a try and feel free to open this back up if it's still an issue.
Not a huge issue, more of a hey so you know. /usr/local/maven-3.1.1 directory created for maven-3.3.3 mvn -v shows it is indeed 3.3.3
CentOS 6.6 Chef_Zero Test-Kitchen Vagrant