-1

I using maven and I want to make an excutable jar. I put some config files in resources then I want just change in config file without rebuild jar file. Are there any help?

  • main
    • java
      • Main.java
    • resources
      • prop.properties
      • config.xml
phoenix
  • 11
  • 1
  • no, i means build jar one time when i can change property or config in resource many time without rebuild jar again. – phoenix Jan 06 '17 at 04:34
  • So you want maven to reuse the existing jar and only overwrite jar entires changed? Unfortunately you will have to write a maven plugin by yourself because no one ever wanted to do that before. Usually creating a new jar every build isn't consuming much resource and doesn't worth the efford of creating the maven plugin. – glee8e Jan 06 '17 at 04:41
  • Thanks all, I found the solution from http://stackoverflow.com/a/8052376/6800040 it's correct what I want. – phoenix Jan 06 '17 at 06:49

1 Answers1

0

add resources tag in your pom.xml like this

<build>
  <resources>
      <resource>
          <directory>${profiles.res}</directory>