如何创建符号链接maven-antrun-plugin

时间:2018-03-21 12:12:05

标签: maven ant maven-antrun-plugin

我有一个问题。

我必须使用antrun创建符号链接到文件夹' / opt / apache-servicemix / etc'中的某些.properties文件。像这样:

Ex:ln -s /etc/opt/ESG/file.properties file.properties.cfg

[lsav@asimov etc]$ pwd
/opt/apache-servicemix/etc
[lsav@asimov etc]$ ls -l
lrwxrwxrwx 1 lsav calapp    51 Mar 13 13:51 esb-
actorspecificvalidation.properties.cfg -> /etc/opt/ESG/esb-
actorspecificvalidation.properties
lrwxrwxrwx 1 lsav calapp    43 Mar 13 13:51 esb-
anysystemrouter.properties.cfg -> /etc/opt/ESG/esb-
anysystemrouter.properties
lrwxrwxrwx 1 lsav calapp    33 Mar 13 13:51 esb-batch.properties.cfg -> 
/etc/opt/ESG/esb-batch.properties

这就是我所拥有的:

<apply executable="ln" dir="/opt/apache-servicemix/etc">
     <arg value="-sf"/>
     <srcfile/>
     <fileset dir="/etc/opt/ESG">
         <include name="*.properties"/>
    </fileset>
    <mergemapper to="*.properties.cfg"/>
</apply>

这可行但是创建符号名称与文件名相同的符号链接。我想成为: file.properties.cfg

如何在符号链接中添加.cfg扩展名?我尝试使用mergemapper但是没有工作(我不知道mergemapper是否是我在这种情况下所需要的)

感谢您的帮助。

0 个答案:

没有答案
相关问题