在jboss as7上部署战争 [英] deploying war on jboss as7

查看:151
本文介绍了在jboss as7上部署战争的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用maven插件在jboss as7上部署war文件,但似乎无法正常工作.在我的pom.xml中,我有以下内容:

I'm trying to deploy a war file on jboss as7 using the maven plugin but it doesn't seem to be working. In my pom.xml I have the following:

        <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.7.Final</version>
        </plugin>

并且我正在使用带有以下参数的Eclipse中的外部工具来运行它:

and I'm running it using the external tools in Eclipse with these arguments:

eclipse:eclipse clean install jboss-as:deploy

maven构建的控制台输出未显示任何错误,并表示一切均已正确部署,但是当我在战争中尝试访问页面时,出现404错误.日志中也没有错误.

The console output from the maven build shows no errors and says everything was deployed correctly however when I try to access a page in the war I get a 404 error. There are no errors in the logs either.

我注意到standalone/deployments文件夹是空的,所以我将war文件复制到了这里,可以毫无问题地访问页面.

I noticed that the standalone/deployments folder is empty so I copied the war file into here and I can access the pages with no problems.

所以问题是为什么我的应用程序部署不正确,或者为什么我不能访问它?

So the question is why is my application not deployed correctly, or if it is why can I not access it?

任何帮助将不胜感激.

谢谢

推荐答案

我发现了问题.我使用的是URL <project_name>/<page>,而不是<war_name>/<page>.因此,由于maven将版本号附加到项目名称中,因此该URL上没有任何内容.愚蠢的错误花了很长时间才弄清楚!

I found the problem. I was using the URL <project_name>/<page> rather than <war_name>/<page>. So because maven was appending the version number to the project name there was nothing at that URL. Silly mistake that took far too long to figure out!

这篇关于在jboss as7上部署战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆