Commit ba0666b3 authored by John Allers's avatar John Allers
Browse files

Updated the Maven package to 3.0.5. Added an uninstall script.

parent fe2e1123
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<metadata> <metadata>
<id>maven</id> <id>maven</id>
<title>Maven</title> <title>Maven</title>
<version>3.0.4</version> <version>3.0.5</version>
<authors>The Apache Maven team</authors> <authors>The Apache Maven team</authors>
<owners>Elliando Dias</owners> <owners>Elliando Dias</owners>
<summary>Apache Maven is a software project management and comprehension tool. Based on the concept of a project object <summary>Apache Maven is a software project management and comprehension tool. Based on the concept of a project object
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<description>Apache Maven is a software project management and comprehension tool</description> <description>Apache Maven is a software project management and comprehension tool</description>
<projectUrl>http://maven.apache.org/</projectUrl> <projectUrl>http://maven.apache.org/</projectUrl>
<tags>maven java development</tags> <tags>maven java development</tags>
<copyright> 2002-2012 The Apache Software Foundation</copyright> <copyright> 2002-2013 The Apache Software Foundation</copyright>
<licenseUrl>http://maven.apache.org/license.html</licenseUrl> <licenseUrl>http://maven.apache.org/license.html</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance> <requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>http://upload.wikimedia.org/wikipedia/commons/f/f5/Maven_logo.gif</iconUrl> <iconUrl>http://upload.wikimedia.org/wikipedia/commons/f/f5/Maven_logo.gif</iconUrl>
......
...@@ -7,14 +7,14 @@ function CreateFolder ([string]$Path) { ...@@ -7,14 +7,14 @@ function CreateFolder ([string]$Path) {
$binRoot = join-path $env:systemdrive 'bin' $binRoot = join-path $env:systemdrive 'bin'
### Using an environment variable to to define the bin root until we implement YAML configuration ### ### Using an environment variable to define the bin root until we implement YAML configuration ###
if($env:chocolatey_bin_root -ne $null){ if($env:chocolatey_bin_root -ne $null){
$binRoot = join-path $env:systemdrive $env:chocolatey_bin_root $binRoot = join-path $env:systemdrive $env:chocolatey_bin_root
} }
CreateFolder($binRoot) CreateFolder($binRoot)
$version = '3.0.4' $version = '3.0.5'
$name = "apache-maven-$version" $name = "apache-maven-$version"
$m2_home = Join-Path $binRoot $name $m2_home = Join-Path $binRoot $name
$m2_bin = Join-Path $m2_home 'bin' $m2_bin = Join-Path $m2_home 'bin'
...@@ -24,6 +24,7 @@ $m2_repo = Join-Path $env:USERPROFILE '.m2' ...@@ -24,6 +24,7 @@ $m2_repo = Join-Path $env:USERPROFILE '.m2'
#$url = "http://ftp.unicamp.br/pub/apache/maven/binaries/$name-bin.zip" #$url = "http://ftp.unicamp.br/pub/apache/maven/binaries/$name-bin.zip"
$url = "http://www.bizdirusa.com/mirrors/apache/maven/maven-3/$version/binaries/$name-bin.zip" $url = "http://www.bizdirusa.com/mirrors/apache/maven/maven-3/$version/binaries/$name-bin.zip"
[Environment]::SetEnvironmentVariable('M2_HOME', $m2_home, "User") [Environment]::SetEnvironmentVariable('M2_HOME', $m2_home, "User")
[Environment]::SetEnvironmentVariable('MAVEN_OPTS', '-Xms256m', "User") [Environment]::SetEnvironmentVariable('MAVEN_OPTS', '-Xms256m', "User")
[Environment]::SetEnvironmentVariable('M2', $m2_bin, "User") [Environment]::SetEnvironmentVariable('M2', $m2_bin, "User")
......
$binRoot = join-path $env:systemdrive 'bin'
### Using an environment variable to to define the bin root until we implement YAML configuration ###
if($env:chocolatey_bin_root -ne $null){
$binRoot = join-path $env:systemdrive $env:chocolatey_bin_root
}
$version = '3.0.5'
$name = "apache-maven-$version"
$m2_home = Join-Path $binRoot $name
$m2_bin = Join-Path $m2_home 'bin'
$m2_repo = Join-Path $env:USERPROFILE '.m2'
[Environment]::SetEnvironmentVariable('M2_HOME', $null, "User")
[Environment]::SetEnvironmentVariable('MAVEN_OPTS', $null, "User")
[Environment]::SetEnvironmentVariable('M2', $null, "User")
[Environment]::SetEnvironmentVariable('M2_REPO', $null, "User")
"Please manually remove Maven ($m2_home) from the PATH environment variable."
# Remove Maven from the path environment variable
#if ($null -ne $env:path)
#{
# $p = $env:path.Split(";") |? {$_.toLower() -ne $m2_bin}
# $newPath = [String]::Join(";")
# [Environment]::SetEnvironmentVariable('PATH', $newPath, "User")
#}
Remove-Item $m2_home -Recurse -Force
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment