I have a project that compiles to a single .jar file that I want published to a Maven repo (Nexus). How do I do this?
This is the jar produced from building my application, not a 3rd party jar (that one would want to publish if it did not exist in a public repo anywhere).
I have read this document and it makes no sense.
http://www.gradle.org/docs/current/userguide/publishing_maven.html
First of all, why do I need this section?
publications {mavenJava(MavenPublication) {
from components.java
} }
In each subsequent section of the above referenced document I do not know if the example is required code or optional; a working example would do wonders.
I know Maven really well but the Gradle syntex or sample code is not telling me a whole lot or I do not understand what is going on even when I have a document in front of me.
In the referenced Gradle sample, it shows:
group = ‘org.gradle.sample’ version = ‘1.0.0’
but in another document, I found this snippet:
jar {baseName = ‘MyProj’
version = ‘1.0.0’ }
Which one do I use? each separately on it’s on line, or nested within a jar { } enclosure…
What is the difference between “version” on its own line and within the "jal
I seem to be going in circles, when I google the subject I keep getting referred to
mavenDeployer()but the latest version of Gradle complains about that.
I am just looking for the minimum code to deploy the application I am building to a remote repo (where I have credentials to upload a .jar)