We want workspace users to have a little friction as possible to adopt new features of workspace like Target platform.
Right now it is too confusing to force people to manage both BundleURL versions and target platform versions to enable these features. SO here is the new proposal.
Workspace plugin should always enable target platform features.
That means that ever invocation of a workspace plugin build task, the BOMs will have to be imported. Now where will the workspace plugin get the BOMS? It should use the following steps.
1) look if liferayHome is defined and available, if so, look in that directory and look for a folder that contains the BOMs that are tied to all the versions in that liferayHome
2) if there is no suitable liferayHome, then look at the liferay.workspace.target.platform.version property to point to BOM versions and look them up from defined repositories
3) if there is no liferayHome and there is no target.platform.version set, then we look at the bundleURL and determine the correct BOM versions to import from defined repositories
4) fail the build, printing the reason why (not able to determine target platform)