本文介绍了build-impl.xml:1031: 模块尚未部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发 Java Web 应用程序,我在 Netbeans 7.3 上使用 SmartGwt,突然间我遇到了这个问题.我尝试清理 build-impl.xml 然后重新启动 IDE,我应该说我对此知之甚少.有人可以告诉我为什么会出现错误以及我该如何解决吗?

I have been working on a Java web application and i am using SmartGwt on Netbeans 7.3 and out of a sudden I encountered this problem. I tried cleaning the build-impl.xml then restarting the IDE and I should say I have fairly low knowledge on this. Can someone please tell me why it is giving an error and how I can fix that?

错误信息说:

nbproject/build-impl.xml:1031: The module has not been deployed. See the server log for details.
BUILD FAILED (total time: 4 seconds)

注意:我使用的是Tomcat 7.0.34

推荐答案

可能这么晚了,但响应对其他人有用,所以:有时,当您没有指定服务器或 servlet 容器时在创建项目时,NetBeans 无法创建 context.xml 文件.

may its so late but the response useful for others so :Sometimes, when you don't specify a server or servlet container at thecreation of the project, NetBeans fails to create a context.xml file.

  1. 在 Web Pages 下的项目中,创建一个名为 META-INF 的文件夹.
  1. In your project under Web Pages, create a folder called META-INF.

通过在网页上单击鼠标右键来执行此操作,然后选择:

Do this by right mouse button clicking on Web pages, and select:

新建->其他->其他->文件夹

将文件夹命名为 META-INF.大小写很重要,即使在 Windows 上也是如此.

Name the folder META-INF. Case is important, even on Windows.

  1. META-INF 文件夹中创建一个名为 context.xml 的文件.
  1. Create a file called context.xml in the META-INF folder.

通过鼠标右键单击新的 META-INF 文件夹来执行此操作,然后选择:

Do this by right mouse button clicking on the new META-INF folder, andselect:

新建->其他->XML->XML 文档

命名上下文(NetBeans 添加了 .xml)选择格式良好的文档按完成

Name it context (NetBeans adds the .xml)Select Well-formed DocumentPress Finish

  1. 编辑新文档(context.xml),并添加以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/app-name"/>

将 app-name 替换为您的应用程序名称.

Replace app-name with the name of your application.

现在您的就地部署应该可以工作了.如果没有,请确保每个人都可以阅读文件.

Now your in-place deployment should work. If not, make sure that thefile can be read by everyone.

context.xml 文件特定于 Tomcat.有关更多信息该文件,请参阅 tomcat.apache.org 上的 Tomcat 文档.

The context.xml file is specific to Tomcat. For more information aboutthat file, see the Tomcat documentation at tomcat.apache.org.

这篇关于build-impl.xml:1031: 模块尚未部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 13:01