OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 592 forks source link

Versionless feature impact on Liberty maven and gradle plugins #26703

Open cbridgha opened 1 year ago

cbridgha commented 1 year ago

Version-less features being proposed in Epic https://github.com/OpenLiberty/open-liberty/issues/25704 describe defining features by their function only without specifying a version.

The Liberty plugins have similar feature install "goals" as the featureUtility.

Similar to installFeature, which lists features to be installed, or installServerFeatures, which uses the features listed in the server.xml.

installServerFeatures will be the only "supported command for versionless.

installFeature <versionless feature> is not supported, and should fail stating installing versionless features is not supported.

installFeature "goal" is documented here

Maven goals are backed by "Mojo" classes that provide the logic, and call into feature install api's.

The InstallFeatureMojo and InstallServerMojo are where most of this logic appears.

cherylking commented 2 months ago

installServerFeatures will be the only "supported command for versionless.

installFeature is not supported, and should fail stating installing versionless features is not supported.

I think this is a problem since the plugins support both. When we get the list of features to install, we combine whatever is in the server.xml and what is configured in the pom.xml I believe and pass the whole list to the Liberty InstallMap.

@jjiwooLim is the expert on this though and how it works in the plugins.

jjiwooLim commented 2 months ago

Plugins actually only supports installServerFeatures because as per design, it only targets one server at a time. This is the PR that changed it. There's a short period where we supported both installServerFeatures and installFeature (liberty 21.0.0.7+ and plugins before this PR released) but I don't think that was intended.