gpt4 book ai didi

java - m2eclipse 如何通过 maven-glassfish-plugin 创建新域?

转载 作者:行者123 更新时间:2023-12-02 03:58:00 27 4
gpt4 key购买 nike

版本是 glassfish v3

我想尝试 maven-glassfish-plugin,但我不知道如何创建新域。

最佳答案

您可以使用create-domain命令。在命令行上传递参数或按照交互式步骤操作:

$ asadmin create-domain

但是Maven GlassFish Plugin (一旦正确配置)还可以创建具有以下目标的域:

glassfish:create-domain Create a new Glassfish domain. (Creating an existing domain will cause it to be deleted and recreated.)

这是一个配置示例(受到 Fairly Complete Configuration Example 的启发):

<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.2-SNAPSHOT</version>
<configuration>
<glassfishDirectory>${glassfish.home}</glassfishDirectory>
<user>${domain.username}</user>
<adminPassword>${domain.password}</adminPassword>
<!-- <passwordFile>path/to/asadmin/passfile</passwordFile> -->
<autoCreate>true</autoCreate>
<debug>true</debug>
<echo>true</echo>
<skip>${test.int.skip}</skip>
<domain>
<name>${project.artifactId}</name>
<httpPort>8080</httpPort>
<adminPort>4848</adminPort>
</domain>
<components>
<component>
<name>${project.artifactId}</name>
<artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
</component>
</components>
</configuration>
</plugin>

关于java - m2eclipse 如何通过 maven-glassfish-plugin 创建新域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3078697/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com