Maven JBoss插件从1.3.1更新到1.3.2导致部署失败

发布于 2024-08-03 19:44:05 字数 2360 浏览 3 评论 0原文

偶然我将 Maven JBoss 插件更新到版本 1.3.2。此后,部署无提示地失败,没有尝试连接 JBoss。最终我们发现版本变化并恢复到旧版本。

这是当前的配置:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jboss-maven-plugin</artifactId>
            <version>1.3.1</version>
            <configuration>
                <serverName>default</serverName>
                <hostName>localhost</hostName>
                <port>8080</port>
                <deployUrlPath>
                    /jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=redeploy&amp;argType=java.net.URL&amp;arg0=
                </deployUrlPath>
                <undeployUrlPath>
                    /jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=undeploy&amp;argType=java.net.URL&amp;arg0=
                </undeployUrlPath>
                <fileName>
                    ${project.build.directory}/${project.build.finalName}.${project.packaging}
                </fileName>
            </configuration>
        </plugin>

...并且...

        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jboss-maven-plugin</artifactId>
                    <configuration>
                        <fileName>${basedir}/target/${application.name}.ear</fileName>
                        <server>jBoss</server>
                    </configuration>
                    <executions>
                        <execution>
                            <id>deploy</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>deploy</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>

我浏览了插件的更改列表,但没有发现任何配置更改。有什么建议吗?

By accident I updated Maven JBoss plugin to version 1.3.2. After that the deployment failed silently, no attempt to connect JBoss was made. Eventually we found out the version change and reverted back to old version.

Here is the current config:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jboss-maven-plugin</artifactId>
            <version>1.3.1</version>
            <configuration>
                <serverName>default</serverName>
                <hostName>localhost</hostName>
                <port>8080</port>
                <deployUrlPath>
                    /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=
                </deployUrlPath>
                <undeployUrlPath>
                    /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=undeploy&argType=java.net.URL&arg0=
                </undeployUrlPath>
                <fileName>
                    ${project.build.directory}/${project.build.finalName}.${project.packaging}
                </fileName>
            </configuration>
        </plugin>

... and...

        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jboss-maven-plugin</artifactId>
                    <configuration>
                        <fileName>${basedir}/target/${application.name}.ear</fileName>
                        <server>jBoss</server>
                    </configuration>
                    <executions>
                        <execution>
                            <id>deploy</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>deploy</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>

I went through the change list of the plugin but I did not spot any configuration changes. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

想你的星星会说话 2024-08-10 19:44:05

使用 -X 选项运行 mvn jboss:deploy 显示 Maven 2.x JBoss 插件版本 1.3.2 无法读取 fileName 不再:

[DEBUG] Configuring mojo 'org.codehaus.mojo:jboss-maven-plugin:1.3.2:deploy' -->
[DEBUG]   (f) deployUrlPath = /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=
[DEBUG]   (f) fileNameEncoding = UTF-8
[DEBUG]   (f) hostName = localhost
[DEBUG]   (f) port = 8080
[DEBUG] -- end configuration --

从版本 1.3.2 开始,Maven 2.x JBoss 插件能够部署文件列表,因此您需要像这样配置它:

<fileNames>
  <fileName>
  ${project.build.directory}/${project.build.finalName}.${project.packaging}
  </fileName>
</fileNames>

这次,部署成功,如图所示通过 mvn jboss:deploy -X 的新输出:

[DEBUG] Configuring mojo 'org.codehaus.mojo:jboss-maven-plugin:1.3.2:deploy' -->
[DEBUG]   (f) deployUrlPath = /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=
[DEBUG]   (f) fileNameEncoding = UTF-8
[DEBUG]   (f) fileNames = [/home/pascal/Projects/q1366663/target/q1366663.war]
[DEBUG]   (f) hostName = localhost
[DEBUG]   (f) port = 8080
[DEBUG] -- end configuration --
[INFO] [jboss:deploy {execution: default-cli}]
[INFO] Deploying %2Fhome%2Fpascal%2FProjects%2Fq1366663%2Ftarget%2Fq1366663.war to JBoss.
[DEBUG] url = http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=%2Fhome%2Fpascal%2FProjects%2Fq1366663%2Ftarget%2Fq1366663.war

此更改是由于 MJBOSS-11(已在更改集中修复 4282) 没有任何“修复版本”,因此不会出现在发行说明中(这很糟糕)。

Running mvn jboss:deploy with the -X option shows that the version 1.3.2 of the Maven 2.x JBoss plugin doesn't read the fileName anymore:

[DEBUG] Configuring mojo 'org.codehaus.mojo:jboss-maven-plugin:1.3.2:deploy' -->
[DEBUG]   (f) deployUrlPath = /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=
[DEBUG]   (f) fileNameEncoding = UTF-8
[DEBUG]   (f) hostName = localhost
[DEBUG]   (f) port = 8080
[DEBUG] -- end configuration --

Since version 1.3.2, the Maven 2.x JBoss Plugin is able to deploy a List of files so you need to configure it like this:

<fileNames>
  <fileName>
  ${project.build.directory}/${project.build.finalName}.${project.packaging}
  </fileName>
</fileNames>

And this time, the deployment succeeds as shown by the new output of mvn jboss:deploy -X:

[DEBUG] Configuring mojo 'org.codehaus.mojo:jboss-maven-plugin:1.3.2:deploy' -->
[DEBUG]   (f) deployUrlPath = /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=
[DEBUG]   (f) fileNameEncoding = UTF-8
[DEBUG]   (f) fileNames = [/home/pascal/Projects/q1366663/target/q1366663.war]
[DEBUG]   (f) hostName = localhost
[DEBUG]   (f) port = 8080
[DEBUG] -- end configuration --
[INFO] [jboss:deploy {execution: default-cli}]
[INFO] Deploying %2Fhome%2Fpascal%2FProjects%2Fq1366663%2Ftarget%2Fq1366663.war to JBoss.
[DEBUG] url = http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=%2Fhome%2Fpascal%2FProjects%2Fq1366663%2Ftarget%2Fq1366663.war

This change is due to MJBOSS-11 (fixed in the change set 4282) which doesn't have any "Fix Version/s" and thus doesn't appear in the release notes (which is bad).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文