OpenLiberty / ci.ant

Ant tasks for managing Liberty profile server instances #devops
Apache License 2.0
8 stars 36 forks source link

question: Invoking 'server status' command #79

Closed glaoup closed 5 years ago

glaoup commented 6 years ago

Running the following ant task on my liberty installation returns the following ouptut:

Ant properties:

<property name="wlp_install_dir" value="D:/EnvtDev/liberty_8558"/>
<property name="serverName" value="defaultServer"/>
<property name="wlp_output" value="D:/EnvtDev/liberty_8558/usr/servers/"/>
<property name="wlp_usr" value=""/>

Ant task:

<wlp:server id="WinSights" installDir="${wlp_install_dir}" 
           userDir="${wlp_usr}" outputDir="${wlp_output}" serverName="${serverName}" 
        operation="status"/>

Output:

[wlp:server] CWWKM2001I: server.config.dir is D:\EnvtDev\git\winsights\doc\servers\defaultServer. [wlp:server] CWWKM2001I: server.output.dir is D:\EnvtDev\liberty_8558\usr\servers\defaultServer. [wlp:server] CWWKM2001I: Invoke command is ["D:\EnvtDev\liberty_8558\bin\server.bat", status, defaultServer]. [wlp:server] CWWKE0005E: The runtime environment could not be launched. [wlp:server] CWWKE0031E: Specified server defaultServer does not exist; use the --create option to create a new server. serverPath: D:\EnvtDev\git\winsights\doc\servers\defaultServer BUILD SUCCESSFUL Total time: 914 milliseconds

I guess the task fails because server.config.dir is not properly set. How should this variable be set up.

There is not much examples in the doc.

mattbsox commented 6 years ago

The server.config.dir property gets derived from the usrDir property set in the Ant task. You can try setting the value of wlp_usr in your properties to D:/EnvtDev/liberty_8558/usr/ rather than leaving it empty.

cherylking commented 5 years ago

Closing due to inactivity. If this issue remains, feel free to reopen.