I was trying to configure Maven to launch WebSphere Liberty Profile from Eclipse. Anyhow I find it working on Linux but doesn't work on Windows. Below is the setup on pom.xml
. (Please note only relevant code will be post here)
<pluginRepositories>
<pluginRepository>
<id>WASdev</id>
<name>WASdev Repository</name>
<url>http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
...
...
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.ibm.websphere.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverHome>D:\tool\wlp</serverHome>
<serverName>LP1</serverName>
</configuration>
<executions>
<execution>
<id>start-server</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<serverHome>D:\tool\wlp</serverHome>
<serverName>LP1</serverName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
I have my Liberty Profile install at D:\tool\wlp
and have a server created named LP1
. When I launch the server with this goal: liberty:start-server
, I will hit this error:
[ERROR] Failed to execute goal com.ibm.websphere.wlp.maven.plugins:liberty-maven-plugin:1.0:start-server (default-cli) on project SpringSecurity4: CWWKM2002E: Failed to invoke [D:\tool\wlp\bin\server.bat, start, LP1, --clean]. RC= 22 but expected=0.
I wasn't sure what 22 means? Forget about that mystery number, only IBM guy may decode that number. When I try this on cmd
> mvn start LP1
, I have this output:
The filename, directory name, or volume label syntax is incorrect. Starting server LP1. Server LP1 start failed. Check server logs for details.
The content of the log was shown below, but still I'm not able to decode the message behind the scene. Hope you guys could help.
arg0=LP1 arg1=--status:start exit=22
Command: "C:\Documents and Settings\kok.hoe.loh\Tool\jdk1.6.0_30\jre\bin\java"
-XX:MaxPermSize=256m "-javaagent:D:\tool\wlp\bin\tools\ws-javaagent.jar" -jar "D:\tool\wlp\bin\tools\ws-server.jar" --batch-file start LP1 --clean
Java home: C:\Documents and Settings\kok.hoe.loh\Tool\jdk1.6.0_30\jre
Install root: D:/tool/wlp/
System libraries: D:/tool/wlp/lib/
User root: D:/tool/wlp/usr/
Server config: D:/tool/wlp/usr/servers/LP1/
Server output: D:/tool/wlp/usr/servers/LP1/