gradlewebsphere-libertyopen-libertymicroprofile

How to Resolve installFeature Errors with Various Gradle and Liberty 24?


I am developing a Java web application using Open Liberty and Gradle. Recently, I encountered an error when executing the installFeature task with Liberty, and I haven't been able to resolve it despite trying various versions of Gradle and Liberty. I would appreciate any help to fix this issue.

Error Message: Execution failed for task ':installFeature'.

net.wasdev.wlp.common.plugins.util.PluginExecutionException: com.ibm.ws.install.InstallException: CWWKF1203E: Unable to find the following features: microProfile-6.1. Please ensure the feature names are correct.

Environment:

Relevant part of build.gradle:


dependencies {
    libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-kernel', version: '24.0.0.1'
}

liberty {
    install {
        type = 'kernel'
    }
    server {
        name = libertyServerName
        configDirectory = new File(libertyConfigDir)
        bootstrapPropertiesFile = new File("${libertyConfigDir}/bootstrap.properties")
        apps = []
        stripVersion = true
        features {
            name = [
                'microProfile-6.1'
            ]
        }
    }
}

What approaches can I try to resolve the installFeature task issue where it cannot find the required features? If more information is needed, please let me know. Thank you!

  1. I have tried using various versions of the Liberty Gradle plugin in build.gradle.
  2. I have also tried using different versions of Open Liberty in the liberty configuration, but the same error persists.
  3. I considered a network issue but observed the same problem across different networks.
  4. I checked the official documentation to ensure the features listed in the error message are included in Open Liberty, and they seem to be supported.

Solution

  • I know you said you tried different versions of the Liberty Gradle plugin, but version 3.0 is over 4 years old. I recommend you try with the latest version available (3.8.3). There have been many changes in how the install-feature goal works as Liberty has evolved. So if you are using a very recent version of Open Liberty, which you are with 24.0.0.1, then you need a recent version of the Liberty Gradle plugin.

    Also, you will need to update your version of Gradle. The Liberty Gradle Plugin supports running with Gradle 7.6+ and Gradle 8.x as of release 3.7. Finally, please specify which version of Java you are using.