I want a mixed artifact upload

I have a webapp and want to split into artifcats.

As an Example I want to make a JAR with all classes and upload it to my nexus. I also have a zip containing templates which I want to upload to nexus too. And as last I want to put my javascript files in an zip and upload them.

My first try is this:

uploadArchives {
 uploadDescriptor = false
    repositories {
  add project.repositories.coreRepo
 }
}
    artifacts {
 webresources createTemplateArchiv
}

The result is that my jar and my zip is upload. That is ok.

But the repository now does not know which dependencies my classes have, because I had to set uploadDescritor=false to be able to upload both files.

Has any one some hints for me?

Thanks a lot.

uploadArchives is an upload task for ‘archives’ configuration. It’s an example of ‘task rules’ - a gradle concept for dynamic tasks. You read about it more in the user guide.

I see that you have ‘webresources’ configuration, so there is also a uploadWebresources task you can configure separately.

I realize my answer might not be verbose but it should point you to the right direction.

HTH!