Java 在 Eclipse 中更改默认动态 Web 模块版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18283818/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 00:02:41  来源:igfitidea点击:

Change default dynamic web module version in Eclipse

javaeclipsetomcattomcat7axis2

提问by Mariano L

I have a Dynamic Web Project in Eclipse. Using tomcat 7with AXIS2. In project facets, i have already configured AXIS2 with the Dynamic Web Module 2.2(because AXIS2 doesn't work with Web Module 3.0).

我在Eclipse 中有一个动态 Web 项目。将tomcat 7AXIS2 一起使用。在项目方面,我已经使用Dynamic Web Module 2.2配置了 AXIS2 (因为 AXIS2 不适用于Web Module 3.0)。

But when i try to use WebService wizard (New -> Web Service) Eclipse try to create the Web Service with the Web Module 3.0, ignoring the Facets configuration of the origin project. The problem is, axis2 does not work with Web Module 3.0, so this process fails.

但是当我尝试使用 WebService 向导(New -> Web Service)时,Eclipse 尝试使用 Web Module 3.0 创建 Web Service,忽略原始项目的 Facets 配置。问题是,axis2 不适用于 Web Module 3.0,因此此过程失败。

Is there any way to change the default version of the Web Module used by this wizard? Or maybe remove webModule 3.0 from the options?

有什么方法可以更改此向导使用的 Web 模块的默认版本吗?或者从选项中删除 webModule 3.0?

I Looked in the server configuration, axis2 configuration, and Web Serves and didn't found nothing about changing this.

我查看了服务器配置、axis2 配置和 Web 服务,但没有发现任何关于更改的内容。

Thanks! Excuse my english... I left here the entire error message:

谢谢!请原谅我的英语......我把整个错误信息都留在这里了:

Unable to add the follwing facets to project jbws: Axis2 Web Services Core, Dynamic Web Module, Axis2 Web Services Extensions.
    org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:363)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.run(FacetedProject.java:324)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:339)
    at org.eclipse.jst.ws.internal.consumption.ui.common.FacetOperationDelegate.run(FacetOperationDelegate.java:62)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Contains: Axis2 Web Services Core 1.1 requires Dynamic Web Module with version matching expression "2.2,2.3,2.4,2.5".

回答by Sotirios Delimanolis

If I understand you correctly, right-click your project, select Properties, select Project Facets. You will have all sorts of options, one of which is the Dynamic Web Moduleversion.

如果我理解正确,请右键单击您的项目,选择Properties,选择Project Facets。您将拥有各种选择,其中之一是Dynamic Web Module版本。

回答by iko

You can try to open your org.eclipse.wst.common.project.facet.core.prefs.xml file located in .settings folder and verify your dynamic web module version is set correctly.

您可以尝试打开位于 .settings 文件夹中的 org.eclipse.wst.common.project.facet.core.prefs.xml 文件,并验证您的动态 Web 模块版本设置是否正确。

Regards, Ivo

问候,伊沃