OpenLiberty / open-liberty-tools

Open Liberty Tools are lightweight tools for developing, assembling, and deploying apps to Open Liberty.
http://openliberty.io
Eclipse Public License 1.0
52 stars 40 forks source link

Cannot create server and runtime using Gradle plugin v3 #419

Open Azquelt opened 3 years ago

Azquelt commented 3 years ago

When creating or importing a project which uses the Liberty Gradle plugin version 3.x, no prompt appears to create a runtime and server for the project.

The problem occurs because the gradle plugin no longer specifies a default location for the server.xml, it just defines a default folder containing config files. This results in the build/liberty-plugin-config.xml not having a liberty-plugin-config/servers/server/configFile element which the Open Liberty Tools are looking for.

This can be worked around by manually specifying the location of the server.xml in the build.gradle file like this:

liberty {
    server {
        serverXmlFile = file('src/main/liberty/config/server.xml')
    }
}
dbarfield commented 1 year ago

Section above goes at the top level