What's the best way to share JARs across multiple projects?

后端 未结 7 1816
眼角桃花
眼角桃花 2020-12-23 22:14

When you have multiple projects that all use the same set of JAR libraries, it\'s tedious to include the same JARs over and over again with each project. If I\'m working on

7条回答
  •  轮回少年
    2020-12-23 22:38

    One approach is to put all your jar files in one location on your machine, in your eclipse ide, define an environment variable, say LIB_LOCATION that points to that directory and have your projects use the jars relative to that variable. This way, you get the ease of use, no multiple jars, portable across machines, as long as you have the variable defined correctly. I have been trying maven for a group of decent size projects and it seems I have to fight at least as much as I used to. Bugs and wired behaviors in the plug ins, m2eclipse and q4eclipse.

提交回复
热议问题