Publishing plugins based on xnat-template-plugin

4 views
Skip to first unread message

Kimberly Meechan

unread,
9:09 AM (4 hours ago) 9:09 AM
to xnat_discussion
Hi all, 

I'm working on a plugin based on the xnat-template-plugin , and had a question about publishing with 'maven-publish'. 

The 'build.gradle' of the template plugin has separate sections for 'jar' and 'xnatPluginJar', with the comments above each section emphasising that 'xnatPluginJar' is the usual one to use. Therefore, when building locally we use './gradlew clean xnatPluginJar`. When publishing with a 'maven-publish' section in build.gradle e.g.

publishing {
  publications {
      gpr(MavenPublication) {
          from components.java
      }
  }
  …
}

only the 'jar' part seems to be run and not 'xnatPluginJar', leading to some small differences e.g. in the final jar name. I'm curious - how do people usually publish plugins based on the template? Ideally, our local build would match the published version exactly - is there a simple way to specify it should use xnatPluginJar? Or can we merge the jar/xnatPluginJar sections in the build.gradle?

Thanks!
Reply all
Reply to author
Forward
0 new messages