Upload the external jars to nexus using gradle

hi i am working on grails project and using gradle for building the application. My project depends on mysql.jar and few other external jars.

Can you please let me know, how to upload these jars to nexus using GRadle.

Thanks Smurf

See the corresponding chapters in the Gradle User Guide.

Hi Peter,

I am able to upload a project to the nexus repo using uploadArchives. But, i am not able to upload the dependencies and their dependencies[transitive dependencies] of a project to the nexus repo. Can you let me know. Thanks

I’m not quite sure what you are trying to achieve. Gradle isn’t typically used to upload external Jars.

PS: Please spend some more time phrasing your questions, explaining what you tried, showing your code, etc.

Consider am having a project ‘sample’ and in the build.gradle it has the following code

dependencies {
 compile "org.grails:grails-bootstrap:2.2.2"
   }
    uploadArchives {
 repositories.mavenDeployer {
   repository(url: "http://localhost:8085/nexus/content/repositories/test") {
 uniqueVersion = false
   authentication(userName: "admin", password: "admin123")
  }
  }
}

It uploads only the test.jar to nexus. and not the dependencies[org.grails:grails-bootstrap:2.2.2] defined in the dependency section. can you please let me know how to do it.

Uploading an archive won’t upload its external dependencies. If you want to do this with Gradle, you’ll have to write your own plugin.