Eclipse buildpath automatically taking all JARs of a internal directory

后端 未结 10 1795
醉梦人生
醉梦人生 2020-12-15 05:34

How do I configure my project buildpath to have a set of .jar files located in the same directory automatically included in the buildpath ? Meaning that adding a new .jar fi

10条回答
  •  别那么骄傲
    2020-12-15 06:09

    I'm using workaround which I developed after reading similar question. I'm posting it here, because that question has a little bit different scope and it might not be obvious how to use suggestions written there.

    1. Create new dynamic web project (default settings is ok so it is fast)
    2. Delete directory "lib" under WebContent/WEB-INF/
    3. Recreate that directory, but create it as link to the directory in your main project where your jars are located
    4. Check Web App Libraries option on Order and Export tab in Java Build Path settings of your project
    5. Add this newly created project as a dependency to your main project

    It's irritating to do this for every lib directory in your project but it's better than adding jars manually every time you do svn update (from your luckier colleagues using Idea). It's a shame that Eclipse don't have this feature.

提交回复
热议问题