Uploading artifacts using Gradle to JFrog Artifactory - gradle

After building the Gradle project there is a .jar file is created in build\libs and I want to use it as a JFrog Artifactory and trying to upload to libs-release-local, it looks like this
https://company.jfrog.io/artifactory/libs-release-local/com/abc/xyz/blog-service/v1/
here I can see three files blog-service-v1.jar, blog-service-v1.module, blog-service-v1.pom.
I can manually upload the .jar file and overwrite it from my local to jfrog artifact using
jfrog rt u blog-service-v1.jar
libs-release-local/com/abc/xyz/blog-service/v1/
But where would I get the other two files?
Is it created automatically in jfrog artifact or I have to manually upload it, If I have to manually upload it then where would I get these files?
Thanks

After some changes in build.gradle (click here for more) gradle uploads it to artifactory. All you need to do is run this(gradle artifactoryPublish) from your command line.

Related

Maven pom to zip config files from GitHub and jars from artifactory

Requirement:
Need to push config files and jars from artifactory to UCD for deployment.
Config files are present in GitHub repostiory.
Jars (not needed for build but needed to start application in UCD) are present in artifactory.
What would be the general process to follow, in order to copy config files from github and download/copy jars from artifactory and package everything in a zip file to push to UCD?
You might consider:
the maven download plugin to get the files you need from an URL (like a GitHub repository or an Artifactory one)
the maven assembly plugin to build your archive
configuring on UCD side the source of your Nexus package to deploy, although there is a urbancode plugin maven-ibmucd which could be handy (not tested)

Uploading files from srver to artifactory

I have a local server with some files and each time i run automation these files get updated, i would like to copy these file to a repository in artifactory. The files i have is a zip file
I found ways like CI jenkins integration and a maven artifactory plugin, but i would want something in batch script which i could call in my code.
i'm looking for something like scp <"server_file_path"> <"Location_in the _artifactory"> . I cannot be using the artifactory windows client in my machine. so i need to upload to the artifactory web view path.
You can simply :
use the REST Api
Upload manually
This thread seems to be related :
How to upload an artifact to Artifactory / consume it in a build system (Gradle Maven Ant) where the artifact does not have an extension

Using gradle and the jfrog artifactory plugin how can I upload a generic artifact to a generic repository

I have a special build script that outputs an Alpine APK that I need to upload to a generic Artifactory repository. How do I mark the apk output as an artifact that needs to be picked up and published?
If you're using CloudRepo repository, you could just POST with a curl. You might be able to do this with Artifactory.

Maven deploy plugin keep the file name when uploading

I am using maven deploy plugin to upload a file inside bamboo deployment stage. I am uploading the file without pom file. When I upload the file to Nexus, the file name is changing completely. Its appending with project name, version number and build number. I want to keep the filename as it is. Any one know how to do this?
mvn deploy:deploy-file
-Dfile=${bamboo.artifacts.path.artifactFile}
-Dpackaging=cba
-url=https://nexus.internal.organisation.com/content/repositories/snapshots/
-DrepositoryId=snapshots
-DgroupId=com.organisation.art
-DartifactId=myproject
-Dversion=0.0.1-SNAPSHOT
A maven managed repository, such as that provided by Nexus et al, is set up in a way that is intended for deployed products to be returned to a maven build process that has them declared as dependencies.
It is not intended to be a generic file server.
If you have Nexus 3.0 or newer then you have access to so called "raw" repositories that you can set up any way you like.
However you would not use mvn deploy:deploy-file to add files to it. Instead you would follow the instructions in Uploading Files to Hosted Raw Repositories.

How to deploy a zip contains text files to remote repository from maven project

Is there any way to deploy a zip file which contains few text files to the remote repository from a maven project.
I tried to use maven-deploy plugin with goal as deploy-file, but the zip does not contain any pom.xml file.
Can anyone please share the way to upload a zip to a remote repository. Thanks in advance.

Resources