twm
V2EX  ›  Java

maven打包问题,如何打包配置文件?

  •  
  •   twm · Aug 30, 2012 · 5050 views
    This topic created in 5006 days ago, the information mentioned may be changed or developed.
    src/main/java
    --xx.java
    src/main/resources
    --log4j.properties

    pom.xml
    <resources>
    <resource>
    <directory>src/main/resources</directory>
    <includes>
    <include>**/*.properties</include>
    </includes>
    </resource>
    </resources>

    已经配置了包含.properties文件,并且打的包里面也有了,但执行java -jar xx.jar时貌似没用到这个配置文件。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2893 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 12:09 · PVG 20:09 · LAX 05:09 · JFK 08:09
    ♥ Do have faith in what you're doing.