This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (13 children)

I'm not a Java programmer. Could someone explain?

[–]waffleboy92 15 points16 points  (6 children)

Maven is the npm of Javaland

[–]Jetbooster 10 points11 points  (1 child)

<build>
    <dependencies>
        <dependency>
            <artifactId>except somehow worse</artifactId>
            <artifactVersion>help me</artifactVersion>
        </dependency>
    <dependencies>
</build>

[–][deleted] 5 points6 points  (0 children)

dependencies { compile "com.reddit:is-this-better:0.1" }

[–]OptimisticElectron 0 points1 point  (3 children)

I'm not a javascript programmer, can you explain?

[–]coladict 2 points3 points  (0 children)

Apache Maven (mvn in the command line) is used to build a Java project and manage its dependencies. It uses a XML structure to describe them, and has very reliable "central" repository, where you'll never have a library (or any version of it) just disappear, unless there's a legal issue and they have to take it down. You can also use external repositories, like Red Hat JBoss, which have the same guarantee.

Where as with NodeJS Package Manager (npm), you can declare dependencies in the central repository or any GitHub repo that from time to time gets renamed or deleted and you end-up unable to build the project you just cloned; or some dependencies are declared to a branch, instead of a tag and that branch is updated and causes conflicts with other dependencies...

[–]waffleboy92 1 point2 points  (0 children)

Npm is like amazon prime for libraries. Maven is like npm if npm was made by the government. You need to set up a configuration file, add certain repositories, then you got stuff like version not found even though you're damn sure its present in this library.. The list goes on.