gpt4 book ai didi

java - 无法在 Eclipse 中创建 war 文件

转载 作者:行者123 更新时间:2023-11-29 05:01:25 27 4
gpt4 key购买 nike

org.eclipse.core.commands.ExecutionException: Error exportingC:/Users/Jasmine/Documents/neo-billing-plugins-qao-sdp-facade.war
at org.eclipse.jst.j2ee.internal.archive.operations.ComponentExportOperation.execute(ComponentExportOperation.java:150)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:385)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:410)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:360)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:247)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:219)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:207)
at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard$1CatchThrowableRunnableWithProgress.run(DataModelWizard.java:220)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.jst.jee.archive.ArchiveSaveFailureException: org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver$UnderlyingFileNotFoundException: Cannot find the file C:\Users\Jasmine\.m2\repository\com\mindergy\mg\2.5.3\mg-2.5.3.jar in the file system. Make sure the file exists and try the operation again
at org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver.saveArchive(FlatComponentArchiver.java:126)
at org.eclipse.jst.j2ee.internal.archive.operations.ComponentExportOperation.export(ComponentExportOperation.java:193)
at org.eclipse.jst.j2ee.internal.archive.operations.ComponentExportOperation.execute(ComponentExportOperation.java:136)
... 10 more
Caused by: org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver$UnderlyingFileNotFoundException: Cannot find the file C:\Users\Jasmine\.m2\repository\com\mindergy\mg\2.5.3\mg-2.5.3.jar in the file system. Make sure the file exists and try the operation again
at org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver.addZipEntry(FlatComponentArchiver.java:258)
at org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver.saveFlatResources(FlatComponentArchiver.java:158)
at org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver.saveFlatResources(FlatComponentArchiver.java:165)
at org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver.saveFlatResources(FlatComponentArchiver.java:165)
at org.eclipse.jst.j2ee.internal.archive.operations.FlatComponentArchiver.saveArchive(FlatComponentArchiver.java:115)
... 12 more

最佳答案

错误很明显:

Cannot find the file C:\Users\Jasmine.m2\repository\com\mindergy\mg\2.5.3\mg-2.5.3.jar in the file system

但是如果您已经在使用 Maven,我建议您也使用 Maven 创建 WAR 文件。它将下载并打包所有必需的依赖项。只需执行mvn package,您就可以在项目的输出文件夹中找到WAR文件(默认是(project folder)/target)。

关于java - 无法在 Eclipse 中创建 war 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31980861/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com