Nathan Reese
Nathan Reese

Reputation: 2734

How do you upload artifacts in nexus via the file system

I am running nexus 2.9.1.02 to host artifacts for maven builds. I would like to load artifacts via the file system. I do not want to use the web UI. Instead, just putting the folders with required pom and jar files in the sonatype-work/nexus/storage folder.

After loading the files into the file system, the artifacts show up in the "browse storage" tab. However, they do not show up in the "browse index" tab and Maven can not download them.

Is it possible to load artifacts via the file system only? How do you sync the file system to the repo database/indexing?

Thanks,

Nathan

Upvotes: 1

Views: 4913

Answers (2)

rseddon
rseddon

Reputation: 5338

Yes, you can place artifacts directly into local storage. See here for tasks you will need to run after doing this:

https://support.sonatype.com/entries/38605563-Can-I-directly-update-artifacts-in-Nexus-local-storage-on-disk-

Upvotes: 2

Daniel Kaplan
Daniel Kaplan

Reputation: 67514

There's a way to do this that should be repository agnostic. Use the mvn deploy:deploy-file plugin. Here's an example:

mvn deploy:deploy-file
-DrepositoryId=repoId
-Durl=repoUrl
-Dfile=pathToFile
-DgroupId=groupId
-DartifactId=artifactId
-Dversion=versionNumber 
-DgeneratePom=true

Upvotes: 3

Related Questions