内容/ MacOS在4.5.2中不存在

时间:2016-05-31 06:57:27

标签: java eclipse

我正在尝试将我的项目从eclipse 3.8.2升级到eclipse 4.5.2。在使用pde build构建我的项目时,我收到以下错误。 \ Contents \ MacOS不存在。

这部分在早期版本中运行良好。

我已将java SDK,delta pack更新为4.5.2

详细说明:

C:\p4root\common\build_templates\eclipse_pde\build.xml:144: The following error occurred while executing this line:
[exec] C:\eclipse4.5.2\plugins\org.eclipse.pde.build_3.9.100.v20150521-1524\scripts\productBuild\productBuild.xml:45: The following error occurred while executing this line:
[exec] C:\eclipse4.5.2\plugins\org.eclipse.pde.build_3.9.100.v20150521-1524\scripts\build.xml:129: The following error occurred while executing this line:
[exec] C:\p4root\myproject\dev\build\myproject\configuration\customTargets.xml:29: The following error occurred while executing this line:
[exec] C:\eclipse4.5.2\plugins\org.eclipse.pde.build_3.9.100.v20150521-1524\scripts\productBuild\allElements.xml:20: The following error occurred while executing this line:
[exec] C:\eclipse4.5.2\plugins\org.eclipse.pde.build_3.9.100.v20150521-1524\scripts\genericTargets.xml:195: The following error occurred while executing this line:
[exec] C:\p4root\myproject\dev\build\myproject\base\package.org.eclipse.pde.build.container.feature.all.xml:27: The following error occurred while executing this line:
[exec] C:\p4root\myproject\dev\build\myproject\base\package.org.eclipse.pde.build.container.feature.all.xml:15: The following error occurred while executing this line:
[exec] C:\eclipse4.5.2\plugins\org.eclipse.pde.build_3.9.100.v20150521-1524\scripts\productBuild\allElements.xml:35: The following error occurred while executing this line:
[exec] C:\p4root\talon\dev\build\myproject\base\package.org.eclipse.pde.build.container.feature.macosx.cocoa.x86_64.xml:92: The following error occurred while executing this line:
[exec] C:\p4root\myproject\dev\build\myproject\base\package.org.eclipse.pde.build.container.feature.macosx.cocoa.x86_64.xml:1555: C:\p4root\myproject\dev\build\myproject\base\tmp\eclipse\Contents\MacOS does not exist.

任何帮助都会受到欢迎

提前致谢

2 个答案:

答案 0 :(得分:3)

Eclipse 4.5打包为Mac OS X应用程序。虽然名称显示为eclipse,但实际目录名称为eclipse.app。因此,您需要将路径更改为eclipse.app/Contents/MacOS

答案 1 :(得分:0)

我终于想出了一个解决方法。我向pre.archive添加了cusstomAssembly.xml回调,将文件移动到右侧文件夹:

<target name="pre.archive">
    <condition property="is.macosx">
        <equals arg1="${config}" arg2="macosx.cocoa.x86_64"/>
    </condition>

    <!-- Do only for OS X -->
    <antcall target="move.macosx.files" />
</target>

<target name="move.macosx.files" if="is.macosx">
    <copy todir="${eclipse.base}/${launcherName}.app/Contents/MacOS" verbose="true">
        <fileset dir="${eclipse.base}/../MacOS" />
    </copy>
    <copy todir="${eclipse.base}/${launcherName}.app/Contents/Resources" verbose="true">
        <fileset dir="${eclipse.base}/../Resources" />
    </copy>
    <move file="${eclipse.base}/${launcherName}.ini" todir="${eclipse.base}/${launcherName}.app/Contents/MacOS" verbose="true" />
    <replace file="${eclipse.base}/${launcherName}.app/Contents/MacOS/${launcherName}.ini" token="tmp" value="../.."/>
</target>

第二种解决方法是使用Eclipse 4.4 Luna而不是4.5+。有关这方面的更多信息,请访问:https://bugs.eclipse.org/bugs/show_bug.cgi?id=468131