Notices: This section not yet converted to new layout. Download stats are rolling back out.

Nexus Repository OSS

3.7.1.02

Package test results are passing.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved as a trusted package on 12/29/2017.

Free open source version of popular Nexus Repository for binary artifacts including first class Nuget support.
Free OSS version supports advanced access control (groups, roles), LDAP and per-user api keys.
Nexus product does not have a built-in web gallery for components.

To install Nexus Repository OSS, run the following command from the command line or from PowerShell:

C:\> choco install nexus-repository

To upgrade Nexus Repository OSS, run the following command from the command line or from PowerShell:

C:\> choco upgrade nexus-repository

Files

Hide
  • tools\chocolateyinstall.ps1 Show
    $packageid = "nexus-repository"
    $version = '3.7.1-02'
    $url = "http://download.sonatype.com/nexus/3/nexus-$version-win64.zip"
    $checksum = 'F2A923F9BF0535AE471FC715495A18EED8541C24'
    $checksumtype = 'SHA1'
    $silentargs = "-q -console -dir `"$installfolder`""
    $validExitCodes = @(0)
    
    $packageName= 'nexus-repository'
    $toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    
    $OSBits = Get-ProcessorBits
    
    If (!(Get-ProcessorBits -eq 64))
    {
      Throw "Sonatype Nexus Repository 3.0 and greater only supports 64-bit Windows."
    }
    
    $nexusversionedfolder = "nexus-$version"
    $TargetFolder = "$env:programdata\nexus"
    $TargetDataFolder = "$env:programdata\sonatype-work"
    $ExtractFolder = "$env:temp\NexusExtract"
    $NexusWorkFolder = "$env:programdata\nexus\sonatype-work"
    $servicename = 'nexus'
    
    If (Test-Path "$env:ProgramFiles\nexus\bin")
    {
      Throw "Previous version of Nexus 3 installed by setup.exe is present, please uninstall before running this package."
    }
    
    If ([bool](Get-Service $servicename -ErrorAction SilentlyContinue))
    {
      Write-Warning "Nexus web app is already present, shutting it down so that we can upgrade it."
      Stop-Service $servicename -force
    }
    
    Install-ChocolateyZipPackage -PackageName $packageName -unziplocation "$ExtractFolder" -url $url -checksum $checksum -checksumtype $checksumtype -url64 $url -checksum64 $checksum -checksumtype64 $checksumtype
    
    Copy-Item "$ExtractFolder\$nexusversionedfolder" "$TargetFolder" -Force -Recurse
    
    If (!(Test-Path "$env:programdata\sonatype-work"))
    {
      Move-Item "$extractfolder\sonatype-work" "$env:programdata\sonatype-work"
    }
    else 
    {
      Write-Warning "`"$env:programdata\sonatype-work`" already exists, not overwriting, residual data from previous installs will not be reset."
    }
    
    Remove-Item "$ExtractFolder" -Force -Recurse
    
    Start-ChocolateyProcessAsAdmin -ExeToRun "$TargetFolder\bin\nexus.exe" -Statements "/install $servicename" -validExitCodes $validExitCodes
    
    #Install-ChocolateyEnvironmentVariable 'PLEXUS_NEXUS_WORK' "$NexusWorkFolder"
    
    $service = Start-Service $servicename -PassThru
    Write-Host "Waiting for Nexus service to be completely ready"
    $Service.WaitForStatus('Running', '00:02:00')
    
    If ($Service.Status -ine 'Running') 
    {
      Write-Warning "The Nexus Repository service ($servicename) did not start."
    }
    else 
    {
      #Even though windows reports service is ready - web url will not respond until Nexus is actually ready to serve content
      Start-Sleep 120
    }
    
    Write-Warning "`r`n"
    Write-Warning "*******************************************************************************************"
    Write-Warning "*"
    Write-Warning "*  You MAY receive the error 'localhost refused to connect.' until Nexus is fully started."
    Write-Warning "*"
    Write-Warning "*  You can manage the repository by visiting http://localhost:8081"
    Write-Warning "*  The default user is 'admin' with password 'admin123'"
    Write-Warning "*  Nexus availability is controlled via the service `"$servicename`""
    Write-Warning "*  Use the following command to open port 8081 for access from off this machine (one line):"
    Write-Warning "*   netsh advfirewall firewall add rule name=`"Nexus Repository`" dir=in action=allow "
    Write-Warning "*   protocol=TCP localport=8081"
    Write-Warning "*******************************************************************************************"
    
  • tools\chocolateyuninstall.ps1 Show
    $validExitCodes = @(0)
    
    $packageName= 'nexus-repository'
    $servicename = 'nexus'
    $installfolder = "$env:programdata\Nexus"
    $toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    $validExitCodes = @(0)
    
    If (Test-Path "$installfolder\bin\nexus.exe")
    {
      Stop-Service nexus -force
      Start-ChocolateyProcessAsAdmin -ExeToRun "$installfolder\bin\nexus.exe" -Statements "/uninstall $servicename" -validExitCodes $validExitCodes
      Remove-item  "$installfolder" -recurse -force
    }
    Else
    {
      Write-warning "It appears that the uninstall may have been run outside of chocolatey, skipping..."
    }
    

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Dependencies

Package Maintainer(s)

Software Author(s)

  • Sonatype

Copyright

Sonatype

Tags

Release Notes

https://help.sonatype.com/display/NXRM3/2017+Release+Notes
Packaging
3.7.1.02
- none
3.6.0.02
- improved service startup checking
- cleaner uninstall
ATTENTION BRAKING CHANGE FOR UPGRADES FROM VERSIONS BEFORE 3.3.2.02
Nexus no longer provided a setup.exe for installing Nexus Repository 3.x on Windows.
If you previously installed with a package that used the setup.exe, you must manually uninstall it first. (you can use chocolatey uninstall if installed by chocolatey)
Once you are on 3.3.2.02 or later, upgrades will work smoothly.

Version History

Version Downloads Last updated Status
Nexus Repository OSS 3.6.0.02 153 Thursday, November 2, 2017 approved
Nexus Repository OSS 3.5.2.01 147 Saturday, September 23, 2017 approved
Nexus Repository OSS 3.3.2.02 312 Tuesday, June 27, 2017 approved
Nexus Repository OSS 3.0.2.02 553 Saturday, September 24, 2016 approved
Nexus Repository OSS 3.0.1.01 134 Saturday, July 30, 2016 approved
Nexus Repository OSS 3.0.0.03 148 Friday, April 8, 2016 approved
Nexus Repository OSS 3.0.0-m7-1 137 Friday, February 26, 2016 exempted
Nexus Repository OSS 3.0.0-m7 153 Friday, February 26, 2016 exempted
Nexus Repository OSS 2.12.0.01 136 Friday, February 26, 2016 approved

Discussion for the Nexus Repository OSS Package

Ground rules:

  • This discussion is only about Nexus Repository OSS and the Nexus Repository OSS package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Nexus Repository OSS, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok