将war文件导入eclipse并构建路径问题
将 .war 文件导入 eclipse 时,我遇到一些奇怪的问题。
问题是,构建文件夹不包含任何必要的类文件夹。因此,当我尝试设置构建路径时,Eclipse 报告“添加到构建路径时出错。原因:无法将输出文件夹 'projectName/build/class' 嵌套在 'projectName/build' 内。据我了解,'build' 文件夹是收集了哪些类(作为构建版本)?
我尝试忽略构建路径并将 .war 文件导出到 tomcat 服务器,但不知何故 servlet 文件不断显示我在 eclipse 中更改的旧代码所以,我想没有正确的构建。文件夹中,导出的 .war 将不包含修改后的 servlect 代码。(如果这听起来不清楚,我很抱歉)
我可以做什么来解决这个问题我已经尝试创建一个全新的工作区并重新启动了 eclipse 几次,但没有成功?解决不了问题。
I am facing some weird problem when importing .war file into eclipse.
The problem is, the build folder does not contain any necessary class folder. So when I try to set the build path, eclipse reports "Error while adding to build path. Reason: cannot nest output folder 'projectName/build/class' inside 'projectName/build'. From what I understand, 'build' folder is what classes get collected(as build version) right?
I tried to ignore build path and just export .war file into tomcat server, but somehow servlet file keeps showing old code, which I changed in eclipse. So, I am thinking without proper build folder, exported .war will not contain modified servlect code.( I am sorry if this doesn't sound clear)
What can I do to fix this problem? I already tried to create a whole new workspace and restarted eclipse several times and it didn't solve the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了。将构建文件夹解释为我在问题中描述的内容是错误的。构建文件夹不能嵌套。
I figured it out. It was mistake to interpret build folder as what I described in the question. Build folder cannot be nested.