Issue on uploading multi module projects


(smurfs.doll) #1

Hi

i am working on a multi module grails project. It is using gradle for build.

Consider my main project as [Main] and subprojects [A], [B].

In the [main] projects build.gradle, i have added the below code:

subprojects{
 uploadArchives {
  repositories.mavenDeployer {
   repository(url: "http://localhost:8081/nexus/content/repositories/test/") {
    uniqueVersion = false
    authentication(userName: "admin", password: "admin123")
   }
  }
 }
 }

It works for bot projects [A] and [B].

In real time, i would want only A to be uploaded and not B based on the version of the project. If te projects version ends wit ‘-SNAPSHOT’ then upload, or else ignore.Can you plese let me know, how to ignore ffor ffew projects?

Can anyone plese help me on tis.


(Michael Brand) #2

If you want subproject-specific behavior, you’ll probably need to configure them separately. Sounds like you can add an “onlyIf” clause on the upload task to get the behavior you’re looking for.