Upload all jars from subprojects to repository


From my super project, I want to get all the generated artifacts (jars in my case) from all subprojects and upload those to a repository. Assuming I have defined the repository, is there anything built-in that does this or do I have to manually fetch everything and upload it?

Search for “publish” in the User’s Guide.

Unfortunately that doesn’t answer my question (it may not be clear). What I’m looking for is a way to obtain the artifacts from the sub-projects such that I can publish them from the parent project (i.e. they would end up in a different repository for example). I already publish all artifacts separately from subprojects but I want to do something different in the parent project (i.e. put them on another repository).

This is possible, but won’t be trivial. You’ll have to gather the artifacts from the subprojects as artifacts in the parent. That is, you’ll have to redefine them using the artifacts {} DSL.