Slackbot
02/11/2022, 4:52 AMVampire
02/11/2022, 7:42 AMGilles Robert
02/11/2022, 9:23 AMgrossws
02/11/2022, 9:33 AMincludeBuild for both library and its included builds?Gilles Robert
02/11/2022, 9:58 AMGilles Robert
02/11/2022, 10:11 AMVampire
02/11/2022, 10:46 AMGilles Robert
02/11/2022, 11:08 AMGilles Robert
02/11/2022, 1:25 PMVampire
02/11/2022, 2:26 PMsubproject-api is used as subproject of subproject and as subbuild of main-project.
Instead include the subproject build from main-project and remove the settings script from subproject-api.
Alternatively also use includeBuild from subproject to subproject-api.
The subproject build defines mavenLocal() as plugin repository, the subproject-api build does not.
So when you include subproject-api from subproject the plugin is available, but when you include it as subbuild from main-project, the plugin repository definition is missing as you don't have it in the settings script of subproject-api.
You could of course also define the plugin repository in the subproject-api build and indeed if you decide to go the route to also includeBuild subproject-api from subproject, you even have to add it.
But please don't just do that, as it is just not the same if you one time use it as subproject and one time as subbuild.Gilles Robert
02/12/2022, 9:42 AMVampire
02/12/2022, 11:51 AMThis dependency model is indeed a design flaw that we should get rid of.
What do you mean? As described, the major flaw is that you use
subproject-api as subproject in one project and as separate subbuild in the other. There is nothing that should be able to force you to deal with it instead of fixing it. As described, use it consistently, either as subproject or as subbuild.
I’m a bit confused on the best way to fix this…
There is no "best" way, there are just alternatives and what is the best depends on your situation and what you want. But I guess my first suggesting could make sense, that's why I made it first and just provided you with an alternative. What is unclear with
Instead include thebuild fromsubprojectand remove the settings script frommain-project.subproject-api
?
Would you mind pushing your best proposal on a branch when you have time?
Not at a computer right now and "best" is a matter of opinion. But I think you should be able to change one method call argument and delete one file. :-)