Open kathrynkodama opened 2 years ago
Workaround for LMP 3.6 dev mode to disable feature generation manually, run
mvn liberty:dev -DgenerateFeatures=false
if users remove the unknown feature, will the generation be resumed automatically or users can press a command to resume?
The message CWMIG12125E: Unknown restfulWS-3.0 feature found.
is not quite right. The restfulWS-3.0 is a known feature for OL and user but not the scanner.
@gkwan-ibm
if users remove the unknown feature, will the generation be resumed automatically or users can press a command to resume?
Users can use the g
hotkey to turn feature generation back on.
The message CWMIG12125E: Unknown restfulWS-3.0 feature found. is not quite right. The restfulWS-3.0 is a known feature for OL and user but not the scanner.
We will ask for a new exception from the binary scanner for this scenario and then we will provide our own user facing error message.
Not failing should be the default behaviour for forward compatibility or future proofing. A message can certainly be logged.
Related to this issue, I have recently upgraded to 3.6 and was greeted with the following message:
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.6:dev (default-cli) on project backend: Failed to generate a working set of features. Error scanning the application for Liberty features: java.lang.RuntimeException: CWMIG12125E: Unknown microProfile-5.0 feature found. To disable the automatic generation of features, start dev mode with -DgenerateFeatures=false.
I have the following list of features in server.xml
:
<featureManager>
<feature>jakartaee-9.1</feature>
<feature>microProfile-5.0</feature>
</featureManager>
Where microProfile-5.0
should be a valid, well-known feature: https://openliberty.io/docs/latest/reference/feature/microProfile-5.0.html.
@inad9300 Thank you for your feedback! Supporting microprofile-5.0
for feature generation in the Liberty Maven Plugin is one of our high priority issues that the team is currently working on: https://github.com/OpenLiberty/ci.maven/issues/1450
In the meantime, a workaround is to continue using the previous 3.5.2
release of the Liberty Maven Plugin, or if working with the 3.6
release, disable feature generation by starting dev mode with mvn liberty:dev -DgenerateFeatures=false
.
When running
liberty:dev
if a specified feature is unknown by the binary scanner, we should disable feature generation and continue on.We do something similar if we cannot find the binary scanner jar, see https://github.com/OpenLiberty/ci.maven/blob/9466c8755dc0996e8bd2d4a92dc875276e20d142/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java#L388-L391
We should also ask for a new exception from the binary scanner in this scenario. Something like
FeatureUnknownException
.We should also add an integration test to cover this scenario.