使用 maven-antrun-plugin 从类路径读取文件

问题描述

我的目标是在 maven-antrun-plugin 内的类路径中引用来自其他库的资源文件,并将其用作替换标记中的 replacefilterFile

...
<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.8</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <configuration>
                <target>
                    <replace dir="${path-in-my-current-project}" includes="*.xml"
                             replacefilterfile="${reference-to-resource-file-in-classpath}">
                    </replace>
                </target>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
    </executions>
</plugin>
...

有没有一种简单的方法可以从另一个库中引用文件?或者在这种情况下我的方法可能完全错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...