In my Gradle Java project I have a binary .jar file I would like to publish it to the nexus repository during the build process. Let’s say my project structure is this:
I think I will do this:
- modify the build.gradle file to
A) define the jar to be published in this case it is c:\MyProject\ClassesToBePublishedJar.jar,
B) define the URL for the nexus repository location
C) define the name and password to access this nexus repository
- rerun gradle clean build, during this process the jar I wanted to publish should be placed in the nexus.
Please let me know if this process is correct and if yes, can you give me the script. If not, can you point me out the correct path to achieve my goal.