user1137387
user1137387

Reputation: 2043

Maven Script for include files in in jars

How do i include config folder in jar file. let say i have one services project services/src/config/adp/flt/get.flt there is one flt file in config folder. So i want to include that folder in services.jar using maven script I have tried different solution copy-resources but it is copying that folder on target folder not in services.jar

Upvotes: 1

Views: 3166

Answers (1)

matsev
matsev

Reputation: 33749

Try the Maven Resource Plugin:

<project>
  ...
  <build>
    ...
    <resources>
      <resource>
         <directory> [your folder here] </directory>
      </resource>
    </resources>
    ...
  </build>
  ...
</project>

Alternatively, you could move your files to a sub directory of Maven's default resource folder, src/main/resources. In that way, they get included automatically.

Upvotes: 5

Related Questions