Method 1 - Using Maven Deploy
Step 1: Modify the pom.xml with the following elements and replace "35.154.91.240:8081" with your active artifactory server.

<distributionManagement> <repository> <id>central</id> <name>ip-172-31-3-145.ap-south-1.compute.internal-releases</name> <url>http://35.154.91.240:8081/artifactory/libs-release-local</url> </repository> <snapshotRepository> <id>snapshots</id> <name>ip-172-31-3-145.ap-south-1.compute.internal-snapshots</name> <url>http://35.154.91.240:8081/artifactory/libs-snapshot-local</url> </snapshotRepository> </distributionManagement>

Step 2: Modify setting.xml and add following inside <servers> elements

<server> <username>admin</username> <password>admin123</password> <id>central</id> </server>

Notes:
Make sure "id" should be same in both file such as "central".
Make sure the userid and password should be correct and has permission to upload the artifact in artifactory.

Step 3: Run the maven deploy commands.

> mvn deploy

Method 2: Deploying a Single Artifact
To deploy a single artifact, simply fill in the fields in the Deploy dialog and click "Deploy".
Cinque Terre Cinque Terre

Method 3: Deploying According to Layout
The Deploy dialog displays the repository package type and layout configured. To deploy your package according to the configured layout, check Deploy According to Layout.
Artifactory displays entry fields corresponding to the layout tokens for you to fill in.

Cinque Terre

Method 4: Deploying Multiple Files
To deploy multiple files together, simple set the deploy Type to Multi, fill in the rest of the fields in the dialog and click "Deploy".

Cinque Terre

 

Reference
Deploying Artifacts
https://www.jfrog.com/confluence/display/RTF/Deploying+Artifacts

Artifactory REST API
https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API

Publish JAR Artifact using Gradle to Artifactory
https://dzone.com/articles/publish-jar-artifact-using
http://buransky.com/scala/publish-jar-artifact-using-gradle-to-artifactory/
https://www.jfrog.com/confluence/display/RTF/Working+with+Gradle
https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin
http://stackoverflow.com/questions/22352475/upload-artifact-to-artifactory-using-gradle