Does it still make sense to use Maven when dependent jars are checked in with source code?

前端 未结 3 936
失恋的感觉
失恋的感觉 2021-01-23 15:37

We check all of our source code\'s dependent third-party JARs into source control along with our source code. When needed, we manually download updates to third party JARs and r

3条回答
  •  隐瞒了意图╮
    2021-01-23 16:12

    "JARs dont change much", I hear this all the time.....

    Storing jars in the SCM is simple in the beginning of the project. Over time the number of jars gets larger and larger.... Wait 2 or 3 years and nobody remembers where the jars came from, what their licensing terms were and most commonly what versions are being used (important to know when analysing security vulnerabilities).....

    The best article I've read recently making the case for a repository manager is:

    • http://www.sonatype.com/people/2012/07/wait-you-dont-have-a-repository-manager/

    A little irreverant, but does make a valid point about the kind of technical inertia one encounters all the time.

    Switching a project team from ANT to Maven can be scary.... Maven works quite differently, so I find it is best deployed with greenfield or adventurous project teams. For the old-school ANT users, I recommend using the Apache ivy plugin. Ivy allows such teams to outsource the management of their dependencies but keep the build technology they're comfortable with.

    Ultimately the biggest benefit of using Maven are not dependency management. It's the standized build process. I've seen several failed attempts to create a "standard" ANT build process. Problem every build engineer has his opinion on what the standard should be.... Maven's approach of forcing users to write build plugins may appear restrictive in the beginning, but just like the iPhone eventually developers discover "there's a Maven plugin for that" :-)

提交回复
热议问题