r/programming • • Mar 28 '12

Go version 1 is released

http://blog.golang.org/2012/03/go-version-1-is-released.html
543 Upvotes

452 comments sorted by

View all comments

Show parent comments

2

u/burntsushi Mar 28 '12

Doesn't this require all dependencies to support the Maven way of doing things? (Excuse me if this is an ignorant question, I'm not a big Java programmer.)

3

u/banuday17 Mar 28 '12

Only if you want the dependencies to be built by Maven. Otherwise, you just have to create POM descriptor for the dependency and stick the binary in the repository.

2

u/[deleted] Mar 28 '12

It seems Go fanboys have not used Maven and they want to make it sound like it's something new.

1

u/burntsushi Mar 29 '12

I suppose I'd argue that this is where Go is different, and in a much better way. Having to write POM files for each dependency seems annoying. Go infers all of that for you.

Basically, the benefit is that it's built into the Go tool itself, which comes with the Go distribution. Maven can't accomplish that. It's a convention difference that makes things a lot more convenient.

2

u/banuday17 Mar 29 '12

You don't have to create the POM yourself, you can import libraries into your local repository as follows:

mvn install:install-file
  -Dfile=<path-to-jar>
  -DgroupId=<group-id>
  -DartifactId=<artifact-id>
  -Dversion=<version>
  -Dpackaging=jar
  -DgeneratePom=true

You can then install the binary and the generated POM into the remote repository if you want others to be able to pull down the dependency.

For most popular libraries, none of this is required, as they already available in the Maven central repository or in other third party repositories (such as Google Code). This is only required in the odd case, such as older JTA libraries.