Maven - exec-maven-plugin - 逗号分隔的属性
Maven - exec-maven-plugin - Comma separated attributes
我使用 exec-maven-plugin
插件将我的 war 文件部署到 GlassFish。
Maven 构建失败,因为它在每个 <attribute>
.
之前放置了逗号
以下是 exec-maven-plugin
的参数:
<configuration>
<executable>${my.gf.asadmin}</executable>
<arguments>
<argument>-u ${my.gf.username}</argument>
<argument>-W ${my.gf.password}</argument>
<argument>-H ${my.gf.host}</argument>
<argument>-p ${my.gf.port}</argument>
<argument>deploy</argument>
<argument>${my.file.url}</argument>
</arguments>
</configuration>
这是日志的相关部分:
[DEBUG] Toolchains are ignored, 'executable' parameter is set to /usr/local/programs/glassfish4/glassfish/bin/asadmin
[DEBUG] Executing command line: [/usr/local/programs/glassfish4/glassfish/bin/asadmin, -u admin], -W, -H localhost, -p 4848, deploy, /home/akoel/Projects/java/TMP-TEST/hu.akoel.ear/target/maventest-0.0.2.war]
Non-boolean option: u, not allowed in argument: -u admin]
您可以在所有属性前看到逗号。
有什么办法可以将逗号更改为 space 甚至什么都不更改吗?
我不确定我在 Ubuntu.
上工作是否重要
您应该使用 commandLineArgs
标签并向其添加参数:
<commandlineArgs>
-u ${my.gf.username} -W ${my.gf.password} -H ${my.gf.host} -p ${my.gf.port} deploy ${my.file.url}
</commandlineArgs>
我使用 exec-maven-plugin
插件将我的 war 文件部署到 GlassFish。
Maven 构建失败,因为它在每个 <attribute>
.
以下是 exec-maven-plugin
的参数:
<configuration>
<executable>${my.gf.asadmin}</executable>
<arguments>
<argument>-u ${my.gf.username}</argument>
<argument>-W ${my.gf.password}</argument>
<argument>-H ${my.gf.host}</argument>
<argument>-p ${my.gf.port}</argument>
<argument>deploy</argument>
<argument>${my.file.url}</argument>
</arguments>
</configuration>
这是日志的相关部分:
[DEBUG] Toolchains are ignored, 'executable' parameter is set to /usr/local/programs/glassfish4/glassfish/bin/asadmin
[DEBUG] Executing command line: [/usr/local/programs/glassfish4/glassfish/bin/asadmin, -u admin], -W, -H localhost, -p 4848, deploy, /home/akoel/Projects/java/TMP-TEST/hu.akoel.ear/target/maventest-0.0.2.war]
Non-boolean option: u, not allowed in argument: -u admin]
您可以在所有属性前看到逗号。 有什么办法可以将逗号更改为 space 甚至什么都不更改吗? 我不确定我在 Ubuntu.
上工作是否重要您应该使用 commandLineArgs
标签并向其添加参数:
<commandlineArgs>
-u ${my.gf.username} -W ${my.gf.password} -H ${my.gf.host} -p ${my.gf.port} deploy ${my.file.url}
</commandlineArgs>