Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Websphere liberty Liberty配置文件分解目录_Websphere Liberty - Fatal编程技术网

Websphere liberty Liberty配置文件分解目录

Websphere liberty Liberty配置文件分解目录,websphere-liberty,Websphere Liberty,因此,我正在尝试配置Maven Liberty插件,使其以分解格式指向我的war应用程序 我可以为.war文件执行此操作,但由于必须在名为../somewarfile.war/的目录中分解我的项目,这是一个问题,因为我的生成也在该文件夹中打包。我不能在同一个Maven目标文件夹中同时拥有.war文件和.war目录 有没有一种方法可以使用分解存档而不必将我的文件夹命名为somewarfile.war您可以使用自定义server.xml配置Liberty Maven插件。该server.xml可以有

因此,我正在尝试配置Maven Liberty插件,使其以分解格式指向我的war应用程序

我可以为.war文件执行此操作,但由于必须在名为../somewarfile.war/的目录中分解我的项目,这是一个问题,因为我的生成也在该文件夹中打包。我不能在同一个Maven目标文件夹中同时拥有.war文件和.war目录


有没有一种方法可以使用分解存档而不必将我的文件夹命名为somewarfile.war

您可以使用自定义server.xml配置Liberty Maven插件。该server.xml可以有一个webApplication元素,该元素指向分解的war文件的目录

例如,使用以下命令在src/main/wlp目录下创建自定义server.xml:

...
<webApplication location="./target/myApp/" name="myApp"/>
...
。。。
...
当然,location属性需要指向正确的位置

Liberty Maven插件配置为:

<configuration>
    ...
    <configFile>src/main/wlp/server.xml</configFile>
    ...
</configuration>

...
src/main/wlp/server.xml
...