Eclipse v4.7.1a:ant build 损坏:启动配置<build.file>引用不存在的项目<容器项目> [英] Eclipse v4.7.1a: ant build broken: Launch configuration <build.file> references non-existing project <container project>

查看:35
本文介绍了Eclipse v4.7.1a:ant build 损坏:启动配置<build.file>引用不存在的项目<容器项目>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎从 eclipse v4.7.1a(全新安装)开始,就不可能再执行任何 ant 构建.每次失败并显示以下消息:

It seems that since eclipse v4.7.1a (fresh install), it is no more possible to execute any ant build. Each time it fails with the following message:

Launch configuration <name of build file> references non-existing project <name of the containing project>

我们已经使用许多不同的配置(eclipse-jee、eclipse-rcp ...)对其进行了测试,每次都使用全新的 eclipse v4.7.1a 安装.
经过进一步调查,仅当 build.xml 文件不在java"类型的项目下时才会发生这种情况,我们所有的工作区(30+...)都是这种情况.
v4.7.0
一切正常在.log文件中我们可以看到:

We have tested it with many different configuration (eclipse-jee, eclipse-rcp ...), each time with a fresh eclipse v4.7.1a install.
After further investigation, this occurs only if the build.xml file in not under a "java" kind of project, which is the case for all of our workspaces (30+...).
Everything worked well with v4.7.0
In the .logfile we can see:

java.net.SocketException: Socket operation on nonsocket: configureBlocking
  at java.net.DualStackPlainSocketImpl.configureBlocking(Native Method)
  at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
  at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
  at java.net.PlainSocketImpl.accept(Unknown Source)
  at java.net.ServerSocket.implAccept(Unknown Source)
  at java.net.ServerSocket.accept(Unknown Source)
  at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:89)

!ENTRY org.eclipse.jdt.launching 4 107 2017-10-22 21:19:26.676
!MESSAGE Launch configuration org.titou10.jtb.build build.xml references non-existing project org.titou10.jtb.build.

[更新]
如果 build.xml 文件在 Java 项目中.一切都像以前一样正常
如果 build.xml 文件位于常规项目或 EAR 项目(我们的案例)中,则它不起作用...
似乎有一种方法可以使其在这些情况下起作用:

[UPDATE]
If the build.xml file is inside a Java project. Everyhting works fine as before
If the build.xml file is in a regular project or a EAR project (our case) it does not work...
It seems there is a way to make it work in those cases:

  1. 右键单击 build.xml
  2. Run As->Ant Build...-> 选择JRE"标签,
  3. 选中在与工作区相同的 JRE 中运行"...
  1. right click on build.xml
  2. Run As->Ant Build...-> Select the "JRE" tab,
  3. check "Run in the same JRE as the workspace "...

它像以前一样工作......

and it works as before...

这显然是对以前版本的回归......

It is clearly a regression from previous version...

推荐答案

是的,你说得对,这是一个 Eclipse 错误:

Yes, you're right, it's an Eclipse bug:

Eclipse 错误 522581 - 无法从通用项目

该错误是在 Oxygen.0 (4.7.0) 中引入的,可能是由内置 Ant 框架的更新引起的.此错误的修复计划于 2017 年 12 月 20 日在 Oxygen.2 (4.7.2) 上进行.

The bug was introduced in Oxygen.0 (4.7.0), probably by an update of the built-in Ant framework. A fix for this bug is scheduled for Oxygen.2 (4.7.2), December 20, 2017.

正如您在问题中所描述的那样,在与工作区相同的 JRE 中运行可以作为一种解决方法.

As already described by yourself in the question, Run in the same JRE as the workspace can be used as a workaround.

这篇关于Eclipse v4.7.1a:ant build 损坏:启动配置&lt;build.file&gt;引用不存在的项目&lt;容器项目&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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