The Repository - Import external files task will take content from a directory on the server and import it into the desired repository in Nexus Repository Manager. This will allow you to get external content into a repository from any source, even Nexus Repository Manager 2.
Available in Nexus Repository Manager Pro only
Create a new Repository - Import external files task and you will be presented with the configuration options listed below:
A number of these fields are common to all tasks, so won't go into details here, but the import specific fields are as follows:
Target repository - The repository to import content into. This list will only be popluated with Hosted repositories of the supported Formats (see format list below).
Source directory - The directory to import content from. NOTE: files in this directory should be in a directory structure that supports the desired format (see format list below).
The source directory must be writable by the user running Nexus Repository Manager 3. The import history is stored in the source directory to enable incremental imports.
The task can be configured to run manually, or on a schedule fitting your needs. And when the task runs, it generates a
.nexus directory inside of the source directory, that contains some metadata we use for future imports, so that content won't be imported multiple times if the task is run more than once. This will allow you to keep placing content into this directory, and the next time the import task runs, only the newer content will be imported.
When importing from Nexus Repository Manager 2 repositories, the task will also pull the date/time related attributes so the data will be maintained in the new repository, these are the created date, last updated date and the last downloaded date.
As the import is processing, every single file that is imported will be logged to the task log (a new task log is created each time a task runs), along with any errors that may have occurred. If an error occurs with any particular file, we will simply log that fact, then continue on importing the rest of the content.
Hidden files and directories (having names that start with a period) will not be imported.
Currently content can be imported into repositories of any format listed below. Some formats require that content be structured in a certain manner, as spoken to in the following table:
|Raw||3.23.0||No specific layout required, content will simply be imported exactly as laid out in the source directory|
Files need to be laid out in the usual maven GAV structure, /(groupId)/(artifactId)/(version)/(artifactId-version.extension)
maven-metadata files at each level (G, A or V) will also be imported.
|npm||3.25.0||No specific layout required, will simply import all tgz packages contained in the source directory|
|NuGet||3.25.0||No specific layout required, will simply import all nuget packages contained in the source directory|
(Note the : in the following path, this is simply an ascii encoded colon ':' as windows file systems do not support this character in the filename)
|PyPI||3.26.0||No specific layout required, will simply import all archives contained in the source directory (along with any .asc signature files alongside them)|
|RubyGems||3.26.0||No specific layout required, will simply import all gem files contained in the source directory|
No specific layout required, will simply import all of the rpm (or drpm) files, as well as any comps.xml files in the source directory