简体   繁体   English

eclipse中的Ant无法解析链接的文件夹

[英]Linked folder not resolved by Ant in eclipse

In my build.xml, below works fine :- 在我的build.xml中,以下工作正常:-

<path id="build.classpath">
        <fileset dir="lib [myUtils]" includes="*.jar" />
</path>

if lib [myUtils] is of folder type, but don't works, if it's of Linked Folder type. 如果lib [myUtils]文件夹类型,但如果它是“ 链接文件 夹”类型,则不起作用。


Also, I found this when googled :- 另外,我在Google搜索时发现了这个问题:-

https://bugs.eclipse.org/bugs/show_bug.cgi?id=265960 https://bugs.eclipse.org/bugs/show_bug.cgi?id=265960

https://bugs.eclipse.org/bugs/show_bug.cgi?id=43081 https://bugs.eclipse.org/bugs/show_bug.cgi?id=43081

https://bugs.eclipse.org/bugs/show_bug.cgi?id=265960 https://bugs.eclipse.org/bugs/show_bug.cgi?id=265960


Is there any trick to achieve this, without copying the dependencies in work folder?? 在不复制工作文件夹中的依赖项的情况下,有什么技巧可以实现这一目标?

I resolved this using copy task: 我使用复制任务解决了这个问题:

<copy todir="target/web/linked1">
    <fileset dir="../linkdProject/source1" />
</copy>
<copy todir="target/web/linked2">
    <fileset dir="../linkedProject/source2" />
</copy>
....
<war destfile="target/webApp.war">
    <fileset dir="WebContent" />
    <fileset dir="target/web" /> <!-- copy linked resources -->
    ...
</war>
<delete dir="target"/>

Note that ant should work outside of eclipse as well. 请注意,蚂蚁也应在日食之外工作。 So you can't reply in IDE abstractions. 因此,您无法在IDE抽象中进行回复。 You can use symbolic links (if your OS supports them). 您可以使用符号链接(如果您的操作系统支持它们)。

If not, you can use the FileSync plugin to synchronize eclipse project folders with external folders. 如果没有,您可以使用FileSync插件将Eclipse项目文件夹与外部文件夹同步。 Or you can simply use the <copy> ant task. 或者,您可以简单地使用<copy> ant任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM