devops:nexus
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
devops:nexus [2023/11/01 07:15] – removed - external edit (Unknown date) 127.0.0.1 | devops:nexus [2023/11/01 07:15] (current) – ↷ Page moved from camunda:devops:nexus to devops:nexus skipidar | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Nexus ===== | ||
+ | Nexus is a repository which is able to manage artifacts (jar files) for java, so that it can resolve its dependencies. | ||
+ | |||
+ | === Deploy to Nexus === | ||
+ | |||
+ | The user have to be authorized: | ||
+ | == Paßwortdatei anlegen == | ||
+ | XML-Datei C: | ||
+ | |||
+ | < | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Diese Datei nimmt das Master-Paßwort auf, das im nächsten Schritt erzeugt wird. | ||
+ | |||
+ | == Passwörter anlegen== | ||
+ | Eigenes Master-Paßwort wählen | ||
+ | mvn --encrypt-master-password your_master_password | ||
+ | Erzeugtes verschlüsseltes Master-Paßwort in settings-security einfügen. Die {} sind Teil des Paßworts. | ||
+ | Benutzerpaßwort (IVU-Domänenpaßwort) ebenfalls verschlüsseln | ||
+ | mvn --encrypt-password your_password | ||
+ | Abschnitt < | ||
+ | Es existieren darin zwei Tags < | ||
+ | Username darin auf den IVU-Login-Benutzer setzen | ||
+ | Password auf das gerade verschlüsselte IVU-Login-Paßwort setzen | ||
+ | |||
+ | < | ||
+ | mvn deploy: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | mvn deploy: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== Artifacts ==== | ||
+ | The artifacts available for deployment can be found here: | ||
+ | |||
+ | |android|http:// | ||
+ | |||
+ | |||
+ | |||
+ | ==== Install Nexus plugins ==== | ||
+ | Here are the details: https:// | ||
+ | |||
+ | The structure of the nexus plugins looks as following: | ||
+ | < | ||
+ | | ||
+ | dependencies | ||
+ | META-INF | ||
+ | nexus-name-plugin-version.jar | ||
+ | </ | ||
+ | |||
+ | To install plugins you have to unpack into the plugins into the folder **[SONATYPE-WORK-FOLDER]/ | ||
+ | |||
+ | Example of **SONATYPE-WORK-FOLDER** | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== P2 Update Sites ==== | ||
+ | P2 Update Sites may be hosted on Nexus, by installing the maven Unzip Plugin: [[ http:// | ||
+ | |||
+ | |org.eclipse.tycho.nexus 0.14.0 | [[http:// | ||
+ | |org.sonatype.nexus 1-3 | [[http:// | ||
+ | |||
+ | * deploy the update site to Nexus in a zip file | ||
+ | * Maven may unzip the file on the fly and provide a URL | ||
+ | |||
+ | The details about installation and configuration of the Nexus Unzip Plugin are here: | ||
+ | https:// | ||
+ | |||
+ | |||
+ | ==== Cleaning All Snapshot Daily, but 1 ==== | ||
+ | http:// | ||
+ | |||
+ | |||
+ | |||
+ | ==== Latest artefact from maven-repository ==== | ||
+ | Details here: https:// | ||
+ | |||
+ | < | ||
+ | wget " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | r = the id of the repository or group to search (Required) | ||
+ | g = the groupId of the file (Required) | ||
+ | a = the artifactId of the file (Required) | ||
+ | v = the version of the file, this may be " | ||
+ | c = the classifier of the file (Optional) | ||
+ | e = the type or extension of the file (Optional) | ||
+ | p = packaging (Nexus will resolve known packaging types to the correct extension). (Optional) | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== using curl==== | ||
+ | |||
+ | Workin on a **raw** repository " | ||
+ | |||
+ | < | ||
+ | # upload | ||
+ | curl.exe --fail -u admin: | ||
+ | |||
+ | # delete via curl on Nexus | ||
+ | # DELETING FOLDERS DONT WORK IN NEXUS3 | ||
+ | curl -v --user admin: | ||
+ | curl -v --user admin: | ||
+ | curl -v --user admin: | ||
+ | curl -v --user admin: | ||
+ | |||
+ | </ | ||
+ | |||
+ | Workin on a **maven-type** repository | ||
+ | |||
+ | < | ||
+ | curl -v -F " | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Upload using maven ==== | ||
+ | |||
+ | To repos | ||
+ | * artifacts-snapshots | ||
+ | * artifacts-releases | ||
+ | |||
+ | < | ||
+ | mvn deploy: | ||
+ | |||
+ | |||
+ | mvn deploy: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Powershell script to import filesructure into the Nexus==== | ||
+ | < | ||
+ | function GetFiles($path = $pwd, [string[]]$exclude) | ||
+ | { | ||
+ | foreach ($item in Get-ChildItem $path) | ||
+ | { | ||
+ | if ($exclude | Where {$item -like $_}) { continue } | ||
+ | |||
+ | if (Test-Path $item.FullName -PathType Container) | ||
+ | { | ||
+ | $item | ||
+ | GetFiles $item.FullName $exclude | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | if ($item.extension -eq " | ||
+ | { | ||
+ | $assoc = New-Object psobject -Property @{ | ||
+ | Pom = " | ||
+ | Jar = " | ||
+ | } | ||
+ | Write-Host " | ||
+ | & " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # $env: | ||
+ | # $env:Path += "; | ||
+ | |||
+ | GetFiles(" | ||
+ | |||
+ | |||
+ | </ |