Файлы, указанные в теге include в build.xml, не добавляются в jar - PullRequest
0 голосов
/ 18 июня 2019

Я хочу включить файл config.properties и все файлы json, присутствующие в папке ресурсов в моем банке.Но ни один из файлов не добавляется в банку.Если я использую только один тег include, эти файлы добавляются в банку.Пожалуйста, помогите мне добавить все файлы jsonm и config.properties в jar.

<!-- Export configuration files to build directory -->
  <copy todir="${output.dir}/configuration">
    <fileset dir="configuration">
      <include name="**/config.properties"/>
      <include name="**/*.json"/>
    </fileset>
  </copy>

  <!-- Put exported configuration files on classpath -->
  <fileset id="extra.jar.files" dir="${output.dir}/configuration">
    <filename name="**/config.properties"/>
    <filename name="**/*.json" />
  </fileset>

1 Ответ

0 голосов
/ 22 июня 2019

Попробуйте:

<copy todir="${output.dir}/configuration">
    <fileset dir="configuration" includes="*/.json"/>
    <fileset dir="configuration" includes="**/config.properties"/> 
</copy>

Ссылка ссылка

...