Reputation: 718
Is should be possible to upload an artifact (WAR file) to Nexus 3 repository without using Maven?
Upvotes: 3
Views: 4874
Reputation: 1973
EDIT:
You have two options, first if the repository format is raw you can upload any type of file using Direct Deploy as mentioned in their docs:
Direct Deploy
You can do an HTTP PUT of a file into /repository/your-repo-id/path-to-file
Using curl you can do this with:curl -v -u admin:admin123 --upload-file pom.xml http://localhost:8081/repository/maven-releases/org/foo/1.0/foo-1.0.pom
The second option is in case that the repository format is maven2 and then you can upload your war file with mvn deploy:deploy-file
command , for example :
mvn deploy:deploy-file -DgroupId=com.somecompany -DartifactId=project -Dversion=1.0.0 -DgeneratePom=true -Dpackaging=war -DrepositoryId=nexus -Durl=your-repo-url -Dfile=example.war
Upvotes: 5
Reputation: 1638
When you say “without Maven”, but you really mean “without using mvn
at all” or just mean “without using Maven to build the WAR”?
If the latter, then I would suggest to use mvn deploy:deploy-file
. This can deploy arbitrary files under a given GAV to any remote repository, including your Nexus 3.
Upvotes: 0
Reputation: 3381
In the documentation for Nexus Repository Manager 2.9, it says:
To upload artifacts to a repository, select a hosted repository in the Repositories panel and then click on the Artifact Upload tab.
Upvotes: -1