gaopinsong
V2EX  ›  Java

IDEA 打 Jar 包的时候,如何指定要包含进 Jar 包的内容?

  •  
  •   gaopinsong · May 1, 2015 · 5745 views
    This topic created in 4057 days ago, the information mentioned may be changed or developed.

    现在用 IDEA 打包时,会把单元测试的 java 文件也带进去。而且有些放在 src 下的 xml 或者其他资源、配置类的文件。也无法在配置 Artifact 的时候,指定排除它们。

    感觉 IDEA 在打包上,好弱啊。。。。

    6 replies    2015-05-02 15:52:10 +08:00
    caixiexin
        1
    caixiexin  
       May 1, 2015   ❤️ 1

    貌似点这个绿色加号可以选?
    zts1993
        2
    zts1993  
       May 1, 2015 via Android
    用maven不好?IDEA对maven支持还是不错的
    SoloCompany
        3
    SoloCompany  
       May 1, 2015 via Android
    打包也要集成环境来干也是醉了
    gaopinsong
        4
    gaopinsong  
    OP
       May 2, 2015
    @caixiexin 感谢。不过貌似这个不能过滤 Module Output。例如,src 下有资源类文件。IDEA 编译时,我没找到 “ 可以让资源文件不输出到 Output 中 ” 的选项。这样的话,我打成 Jar 包的时候。就会把资源文件带进 Jar 包。而现在的要求是不允许带进去。。。。
    gaopinsong
        5
    gaopinsong  
    OP
       May 2, 2015
    @SoloCompany 小弟是从 .net 转到 Java 的。不是很了解。公司里其他大部分人都是用 MyEclipse 的。打包也是用它。我觉得不如 IDEA 好用。所以。。。。请问要用什么打包呢。。
    gaopinsong
        6
    gaopinsong  
    OP
       May 2, 2015
    @zts1993 公司不用。。我也没办法额。。。o(︶︿︶)o 唉
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1262 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:43 · PVG 07:43 · LAX 16:43 · JFK 19:43
    ♥ Do have faith in what you're doing.