Nexus Repository OSS

3.27.0.03 | Updated: 11 Sep 2020

Downloads:

9,130

Downloads of v 3.27.0.03:

239

Maintainer(s):

Software Author(s):

  • Sonatype

Nexus Repository OSS 3.27.0.03

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

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

>

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

>

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

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade nexus-repository -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade nexus-repository -y --source="'STEP 3 URL'"
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure nexus-repository installed
  win_chocolatey:
    name: nexus-repository
    state: present
    version: 3.27.0.03
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'nexus-repository' do
  action    :install
  version  '3.27.0.03'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: nexus-repository,
    Version: 3.27.0.03,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller nexus-repository
{
   Name     = 'nexus-repository'
   Ensure   = 'Present'
   Version  = '3.27.0.03'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'nexus-repository':
  provider => 'chocolatey',
  ensure   => '3.27.0.03',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install nexus-repository version="3.27.0.03" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

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

This package was approved as a trusted package on 11 Sep 2020.

Description

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.


tools\chocolateyinstall.ps1

$packageid = "nexus-repository" 
$version = '3.27.0-03'
$url = "https://download.sonatype.com/nexus/3/nexus-$version-win64.zip"
$checksum = 'c2e5e27d23eaf7ffb9cd7e61093c75c7465c1536'
$checksumtype = 'SHA1'
$silentargs = "-q -console -dir `"$installfolder`""
$validExitCodes = @(0)

$packageName= 'nexus-repository'
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$OSBits = Get-ProcessorBits

. $toolsDir/supportingfunctions.ps1


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"
$ExtractFolder = "$env:temp\NexusExtract"
$TargetDataFolder = "$env:programdata\sonatype-work"
$NexusConfigFile = "$TargetDataFolder\nexus3\etc\nexus.properties"
$servicename = 'nexus'
$NexusPort = '8081'
$WarningCycles = 3
$WarningSeconds = 120

$pp = Get-PackageParameters
  
if ($pp.Port) {
  $NexusPort = $pp.Port
  Write-Host "/Port was used, Nexus will listen on port $NexusPort."
}

If ($pp.WarningCycles) {
  $WarningCycles = $pp.WarningCycles
}

If ($pp.WarningSeconds) {
  $WarningCycles = $pp.WarningSeconds
}


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."
  Ensure-ProcessesAndServicesAreStopped nexus -WarningCycles $WarningCycles -WarningSeconds $WarningSeconds -ForceDown
}

If (Test-Path "$ExtractFolder") {Remove-Item "$ExtractFolder" -Recurse -Force}

Install-ChocolateyZipPackage -PackageName $packageName -unziplocation "$ExtractFolder" -url $url -checksum $checksum -checksumtype $checksumtype -url64 $url -checksum64 $checksum -checksumtype64 $checksumtype

#$VerbosePreference = Continue
Write-Host "Copying files to '$TargetFolder' with overwrite"
Copy-Item "$ExtractFolder\$nexusversionedfolder" "$TargetFolder" -Force -Recurse
#$VerbosePreference = SilentlyContinue

If (!(Test-Path "$TargetDataFolder"))
{
  Move-Item "$extractfolder\sonatype-work" "$TargetDataFolder"
}
else 
{
  Write-Warning "`"$TargetDataFolder`" 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

#Update Port
If ($NexusPort -ne '8081')
{
  $service = Start-Service $servicename -PassThru
  $Service.WaitForStatus('Running', '00:02:00')
  Start-Sleep 120
  If (Test-Path "$NexusConfigFile")
  {
    Write-Host "Configuring Nexus to listen on port $NexusPort."
    (Get-Content "$NexusConfigFile") -replace "^#\s*application-port=.*$", "application-port=$NexusPort" | Set-Content "$NexusConfigFile"
    Stop-Service $servicename
  }
  else 
  {
    Write-Warning "Cannot find `"$NexusConfigFile`", skipping configuring Nexus to listen on port $NexusPort."
  }
}

$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
}


$generatedadminpasswordfile = "$TargetDataFolder\nexus3\admin.password"
If (Test-Path $generatedadminpasswordfile) {
  $passwddata = Get-Content $generatedadminpasswordfile
}


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 "*  For new installs, you must login as admin to complete some setup steps"
Write-Warning "*  You can manage the repository by typing 'start http://localhost:$NexusPort'"
Write-Warning "*"
Write-Warning "*  The default user is 'admin'"
Write-Warning "*  ADMIN PASSWORD:"
Write-Warning "*    NEW INSTALLS: The password generated for your instance is recorded"
Write-Warning "*       in '$generatedadminpasswordfile'"
Write-Warning "*    UPGRADES/REINSTALLS: If you upgraded (or uninstalled and reinstalled) without cleaning"
Write-Warning "*      up $TargetDataFolder - the password will be the same as it was before and the password file"
Write-Warning "*      will not exist."
Write-Warning "*    RESET PASSWORD WITH INSTALL: Uninstall Nexus and remove the directory '$TargetDataFolder'"
Write-Warning "*      and then reinstall.  This time a password file will be generated."
Write-Warning "*"
Write-Warning "*  Nexus availability is controlled via the service `"$servicename`""
Write-Warning "*  Use the following command to open port $NexusPort 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=$NexusPort"
Write-Warning "*******************************************************************************************"
tools\chocolateyuninstall.ps1

$validExitCodes = @(0)

$packageName= 'nexus-repository'
$servicename = 'nexus'
$installfolder = "$env:programdata\Nexus"
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$validExitCodes = @(0)
$WarningCycles = 3
$WarningSeconds = 120

. $toolsDir/supportingfunctions.ps1

If (Test-Path "$installfolder\bin\nexus.exe")
{
  Ensure-ProcessesAndServicesAreStopped nexus -WarningCycles $WarningCycles -WarningSeconds $WarningSeconds -ForceDown
  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..."
}
tools\supportingfunctions.ps1

Function Test-IfVarOrObjPropIsSetAndNotFalse {
  <#
  .SYNOPSIS
    Tests if a Variable or Object Property BOTH exists and is not $null and is not $False.
  .DESCRIPTION
    Allows a test for variables that can be commented, removed or set to $null to disable their functionality.
    Returns: $False if a Variable or Object Property either does not exist or is $null.
    IMPORTANT: The "$" character should NOT be included when calling this function.
    IMPORTANT: The function assumes an object property instead of a variable if the name given to it contains a "." character.
    IMPORTANT: If a non-existence object checked, $False is returned - becareful that your code does 
               not assume only the absence of the property.
  .COMPONENT
     pshTemplate
  .ROLE
     Core
  .PARAMETER Name
    Variable name with no "$".
  .EXAMPLE
    Test-IfVarOrObjPropIsSetAndNotFalse MyVariable
    Checks if the variable "MyVariable" exists and is not $null or $false.
    IMPORTANT: The "$" character should NOT be included when calling this function.
  .EXAMPLE
    Test-IfVarOrObjPropIsSetAndNotFalse MyObject.MyProperty
    Checks if the object property "MyObject.MyProperty" exists and is not $null or $false.
    IMPORTANT: The "$" character should NOT be included when calling this function.
    IMPORTANT: The function assumes an object property instead of a variable if the name given to it contains a "." character.
  .NOTES
    Test Verification: 
    SHOULD RETURN FALSE FOR [a] Non-existence, [b] Set to 0 (zero), [c] Set to $null, [d] Set to $False, [e] Set to ""
    FOR THESE DATA TYPES:
     Variable, Array, HashTable, Object.Property
  #> 
  [CmdletBinding()]
  param (
    [parameter(Mandatory=$True,Position=0)][string]$Name
  )
  $VariableIsNotNullNotFalseNotZero = $False
  
  if ($name.Contains(".")) {
    If (test-path ('variable:'+$name.remove($name.indexof(".")))) {
      $VariableIsNotNullNotFalseNotZero = [bool](Invoke-Expression "`$$name") 
    }
  } Else {
    If (test-path ('variable:'+$name)) {
      $VariableIsNotNullNotFalseNotZero = [bool](Get-Variable -Name $name -value) 
    }
  }
  
  return $VariableIsNotNullNotFalseNotZero
  }
Function Test-IfProcRunning ($ProcNames) {
  <#
  .SYNOPSIS
    Determines if one or more instances of any process on the list is running.
  .DESCRIPTION
    Determines if one or more instances of any process on the list is running.
    Returns $True if processes are running, $False if not.
  .PARAMETER ProcName
   Can be a string array or comma delimited string.  Can contain .exe extensions or follow PowerShell
   syntax and exclude extensions.
  .EXAMPLE
    Test-IfProcRunning @("notepad.exe","calc.exe")
  .EXAMPLE
    Test-IfProcRunning @("notepad","calc")
  .EXAMPLE
    Test-IfProcRunning "notepad.exe,calc.exe"
  .NOTES
    Author: Darwin Sanoy
    Modified: 4/4/2013
    Depends On: Write-Host()
  #> 
  # Convert string to array
  if ($ProcNames -is [System.String]) { 
  #Convert String to Array
  $ProcessNames = ($ProcNames.Split(','))
  } elseif ($ProcNames -is [System.Array]) {
  $ProcessNames = $ProcNames
  }
  
  #strip spaces and .exe if present
  for($i = 0; $i -lt $ProcessNames.count) {
  
  $ProcessNames[$i] = $ProcessNames[$i].replace(".exe","").trim()
  $i++
  }
  
  #ignore errors in case there are no instances of any given name
  $ErrorActionPreference = "SilentlyContinue"
  
  $ProcessInstances = @(get-process -ProcessName $ProcessNames).count
  
  Write-Host "Processes Running: $ProcessInstances total instances of processes with any of these names: $ProcessNames"
  
  if ($ProcessInstances -gt 0) {
  return $True
  } else {
  return $False
  }
  
} # End Function Test-IfProcRunning

Function Ensure-StopProcess ($ProcessNameList) {
<#
.SYNOPSIS
  Checks if one or more instance of named tasks are executing on this PC and terminates them.  Use Ensure-ProcessesAndServicesAreStopped instead.
.DESCRIPTION
  Closes all instances of all tasks in the list.
.COMPONENT
    pshTemplate
.ROLE
    Core-INTERNAL
.PARAMETER ProcName
  Can be a string array or comma delimited string.  Can contain .exe extensions or follow PowerShell
  syntax and exclude extensions.
.EXAMPLE
  Ensure-StopProcess @("notepad.exe","calc.exe")
.EXAMPLE
  Ensure-StopProcess @("notepad","calc")
.EXAMPLE
  Ensure-StopProcess "notepad.exe,calc.exe"
#> 

# Convert string to array
if ($ProcessNameList -is [System.String]) { 
#Convert String to Array
$ProcessNames = ($ProcessNameList.Split(','))
} elseif ($ProcessNameList -is [System.Array]) {
$ProcessNames = $ProcessNameList
}

#strip spaces and .exe if present
for($i = 0; $i -lt $ProcessNames.count; $i++) {
  $ProcessNames[$i] = $ProcessNames[$i].replace(".exe","").trim()
}

#ignore errors in case there are no instances of any given name
$ErrorActionPreference = "SilentlyContinue"

$ProcessItems = get-process -Name $ProcessNames -ea SilentlyContinue
$ProcessInstances = @($ProcessItems).Count

Write-Host "Attempting to close: $ProcessInstances total instances of processes with any of these names: $ProcessNames"

DebugMessage "Number of processes to terminate: $ProcessInstances"
if ($ProcessInstances) {
  DebugMessage "Attempting kill processes..."
  $ProcessItems | Stop-Process -Force
  start-sleep -seconds 2
}

if (@((get-process -Name $ProcessNames -ea SilentlyContinue)).count -gt 0) { 
  $EnsureStopProcess = -1
} else {
  $EnsureStopProcess = $ProcessInstances 
}
$ErrorActionPreference = "Stop"
Write-Host "Returning: $EnsureStopProcess (<#> = instances closed, 0 = no instances to close, -1 = did not close all instances)" 
return $EnsureStopProcess
} # End Function Ensure-StopProcess

Function Ensure-ProcessesAndServicesAreStopped {
<#
.SYNOPSIS
  Checks if a list of apps are running and presents user with message if they are.
  Safe to call even if none of the processes you give it are running.
.DESCRIPTION
  Returns true if the processes and services in the list are no longer running (no matter why they are not running)
  Services can be display name or registry name.
  Prompting does not apply to services, but the -Force parameter does.
  This function does comprehensive logging of the possible reasons for returning true.
  (e.g "No processes running", "User Successfully ended processes", "Processes were terminated forcefully"
  Important: If -Silent switch was used on script execution, msgboxtimed is silenced and therefore
  there is no delay at all on the FinalAction you requested.
  If you have a very stubborn service *that is a standalone EXE*, you can include it as both a service name and a process.
  It will [a] attempt to be stopped as a service, [b] Attempted to be forced down as a service, [c] have it's process terminated.
.PARAMETER ProcessAndServiceList
  List of processes and services to check.
  Processes with or without ".exe" extensions.
  Services can be display name or registry name.
  Generally services should *NOT* be killed via their EXE name, but use their service name for a proper shutdown.
  Can be set to a one of these global variables: $APS_OfficeAppsListCore or $APS_OfficeAppsListExhaustive
.PARAMETER ForceDown
  Will force processes down if the user is not able to end them.
  Will force services down if they do not come down on their own.
  Default: $False
.PARAMETER WarningCycles
  How many warning cycles to the user?
  Warning cycles are not displayed for services as users do not know how to end them.
  Default = 5.  
  Set to 0 for no warnings (silent operation).
.PARAMETER WarningSeconds
  How many seconds does each warning display?
  Default = 120.
.PARAMETER OverrideFriendlyAppNameList
  Normally the friendly name list of applications to ask the user to shutdown is taken from msgdisplay.xml.
  If this optional parameter is used to specify an array of strings, these will be displayed instead of the msgdisplay.xml list.
  This also ends up overrriding the language localization in msgdisplay.xml, as you must use the "CUSTOM" type rather than the "CLOSEAPP" message ID.
.EXAMPLE
  Ensure-ProcessesAndServicesAreStopped @("notepad.exe","calc.exe","Microsoft Office Service") -ForceDown
  Checks for Office core apps and notepad and calculator.
  Stops Microsoft Office Service (Office 365) by its display name "Microsoft Office Service"
  Warns 5 times and kills processes if user does not.
.EXAMPLE
  Ensure-ProcessesAndServicesAreStopped @("notepad.exe","calc.exe","OfficeSvc") -ForceDown -WarningCycles 8 
  TOffice core apps and notepad and calculator.
  Stops Microsoft Office Service (Office 365) by its registry name "OfficeSvc"
  Warns 8 times and kills processes if user does not.
.EXAMPLE
  Ensure-ProcessesAndServicesAreStopped "SuperCriticalProcessThatMustShutdowNormally.exe" -WarningCycles 10 -WarningSeconds 600
  Checks for "SuperCriticalProcessThatMustShutdowNormally.exe"
  Warns 5 times with a dialog that displays for 10 minutes each time) and returns false if process is not ended by user.
  IMPORTANT: Does NOT force processes down.
.EXAMPLE
  Ensure-ProcessesAndServicesAreStopped "ProcessUserCannotEnd.exe" -ForceDown -WarningCycles 0
  Terminates "ProcessUserCannotEnd.exe" without any warnings since user cannot end the process anyway.
.EXAMPLE
  Ensure-ProcessesAndServicesAreStopped @("IntegratedOffice.exe","Microsoft Office Service") -ForceDown
  The example shows the same service listed as a service name and an EXE name.
  The function will [a] attempt to be stopped it as a service, [b] atempt to force it down as a service, [c] terminate it's process.
.EXAMPLE
  Ensure-ProcessesAndServicesAreStopped @("abc.exe","xyz.exe") -ForceDown -OverrideFriendlyAppNameList @("Alphabet Software", "All Done Software")
  The example shows a custom msgdisplay.exe dialog with that asks that the software be shutdown - but lists the software in the -OverrideFriendlyAppNameList 
  rather than the list in msgdisplay.xml.
#> 
[CmdletBinding()]
param (
  [parameter(Mandatory=$True,Position=0)][string[]]$ProcessAndServiceList,
  [parameter(Mandatory=$False,Position=1)][switch]$ForceDown,
  [parameter(Mandatory=$False,Position=2)][int]$WarningCycles = 5,
  [parameter(Mandatory=$False,Position=3)][int]$WarningSeconds = 120,
  [parameter(Mandatory=$False,Position=4)][int]$SecondsToWaitForAllServices = 20,
  [parameter(Mandatory=$False,Position=5)][string[]]$OverrideFriendlyAppNameList
) 
#Request shutdown of Apps list
$ServicesReturnValue = $ProcsReturnValue = $False
$MyFunctionName = $myinvocation.MyCommand

  #Process any services in the list
  $ServicesInList = Get-Service $ProcessAndServiceList -ErrorAction SilentlyContinue
  If ($ServicesInList.Count) {
    #If there are any services in the list, stop them
    $InitialRunningServices = @($Servicesinlist | % {get-service $_.Displayname | where-object {$_.Status -eq "Running"}})
    If ($InitialRunningServices.Count -gt 0){
      Write-Host "$MyFunctionName : Found $($ServicesInList.count) services in list, of which $($InitialRunningServices.Count) are running.  Attempting to stop the following services:"
      $InitialRunningServices | Select -ExpandProperty DisplayName | Write-Host
      Stop-Service $InitialRunningServices -ErrorAction SilentlyContinue
      Start-Sleep -seconds $SecondsToWaitForAllServices
      $NonStoppingServices = @($InitialRunningServices | % {get-service $_.Displayname | where-object {$_.Status -eq "Running"}})
      If (($NonStoppingServices.count -gt 0) -and $ForceDown) {
        #If they didn't come down nicely, force them.
        Write-Host "$MyFunctionName : Some Services did not end voluntarily, forcing down the following services:"
        $NonStoppingServices | Select -ExpandProperty DisplayName | Write-Host
        $NonStoppingServices | Stop-Service -Force -ErrorAction SilentlyContinue
        Start-Sleep -seconds $SecondsToWaitForAllServices
        $NonStoppingServices = @($InitialRunningServices | % {get-service $_.Displayname | where-object {$_.Status -eq "Running"}})
      }
      If ($NonStoppingServices.count -gt 0) {
        Write-Host "$MyFunctionName : The following services did not stop after forcing:"
        $NonStoppingServices | Select -ExpandProperty DisplayName | Write-Host
        $ServicesReturnValue = $False
      } Else {
        Write-Host "$MyFunctionName : Stopped all $($ServicesInList.Count) services in list.  List: $ProcessAndServiceList"
        $ServicesReturnValue = $True
      }
    } else {
      Write-Host "$MyFunctionName : None of the $($ServicesInList.Count) in the list are running.  List: $ProcessAndServiceList"
      $ServicesReturnValue = $True
    }
  } else {
    Write-Host "$MyFunctionName : There are no services in this list: $ProcessAndServiceList"
    $ServicesReturnValue = $True
}

  if ($ProcessAndServiceList) {
  Write-Host "$MyFunctionName : Checking if any of these are running: $ProcessAndServiceList"
  
  if (Test-IfProcRunning $ProcessAndServiceList) {

    $j = 1
    while ((Test-IfProcRunning $ProcessAndServiceList) -and ($j -le $WarningCycles)) 
      {
      If (Test-IfVarOrObjPropIsSetAndNotFalse OverrideFriendlyAppNameList)  
        {
        #Use override friendly name list
        $TempMsgText = "[nl] Please close any applications in the below list:[nl]"
        ForEach ($FriendlyName in $OverrideFriendlyAppNameList)
          {
          $TempMsgText += "[nl]$FriendlyName"
          }
        Write-Host "Waiting $WarningSeconds seconds for the following to exit: $TempMsgText"
        Start-Sleep -Seconds $WarningSeconds
        }
      Else
        {
        Write-Host "Waiting for $WarningSeconds seconds"
        Start-Sleep -Seconds $WarningSeconds
        }
        if (-not (Test-IfProcRunning $ProcessAndServiceList)) {
          Write-Host "$MyFunctionName : User SUCCESSFULLY ended all processes in list: $ProcessAndServiceList"
          #Go back with true right now.
          $ProcsReturnValue = $True
        }
        $j++
      }
  } else {
    Write-Host "$MyFunctionName : No instances running of any processes in list: $ProcessAndServiceList"
    #Go back with true right now.
    $ProcsReturnValue = $True
  }
  if ((Test-IfProcRunning $ProcessAndServiceList) -and $ForceDown) 
    {
    Write-Host "$MyFunctionName : User did not end one or more process and -ForceDown was used, terminating processlist: $ProcessAndServiceList"
    $NumberClosed = Ensure-StopProcess($ProcessAndServiceList)
    if ($NumberClosed -eq -1) {
      $ProcsReturnValue = $False
    } else {
      Write-Host "$MyFunctionName : $NumberClosed Processes were forcefully terminated."
      #Go back with true right now.
      $ProcsReturnValue = $True
    }
    }
  }

  If ($ServicesReturnValue -and $ProcsReturnValue) {
    return $True
  } Else {
    return $False
  }
}
      

Log in or click on link to see number of positives.

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.

Version Downloads Last Updated Status
Nexus Repository OSS 3.25.1.02 274 Thursday, July 30, 2020 Approved
Nexus Repository OSS 3.22.1.02 531 Monday, April 20, 2020 Approved
Nexus Repository OSS 3.22.0.02 115 Saturday, April 11, 2020 Approved
Nexus Repository OSS 3.21.2.03 140 Friday, March 27, 2020 Approved
Nexus Repository OSS 3.21.1.01 228 Saturday, March 14, 2020 Approved
Nexus Repository OSS 3.19.1.20191118 543 Tuesday, November 19, 2019 Approved
Nexus Repository OSS 3.19.1.01 192 Sunday, October 13, 2019 Approved
Nexus Repository OSS 3.18.1.01 216 Saturday, August 24, 2019 Approved
Nexus Repository OSS 3.15.2.01 597 Thursday, March 14, 2019 Approved

https://help.sonatype.com/repomanager3/release-notes/2020-release-notes
https://help.sonatype.com/repomanager3/download/download-archives---repository-manager-3
Packaging
3.27.0.03
- new code to attempt to shutdown nexus, but eventually kill it after 3 attempts seperated by 2 minutes each.
- new parameter /WarningIntervals (see below for description)
- new parameter /WarningSeconds (see below for description)
3.19.1.20191118
- messaging at end of install has been adjusted to accurately reflect new admin password behavior
3.18.1.01
- uses open JRE via dependency on adoptopenjdkjre
3.9.0.20180301
- Supports "Port" parameter for changing nexus repository listening port
3.6.0.02
- improved service startup checking
- cleaner uninstall
ATTENTION BREAKING 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.

This package supports the following parameters:

-params '"/Port:81"' (default: 8081)
Specify what port Nexus should listen on.

-params '"/WarningIntervals:5"' (default: 3)
Number of times to check if nexus service has shutdown before forcing it down.

-params '"/WarningSeconds:60"' (default: 120)
Number of seconds to wait for shutdown in each interval.

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