Export to GitHub

google-gin - issue #45

Maven repository distribution


Posted on Jun 12, 2009 by Grumpy Cat

Please distribute this great library in a maven repository.

See also: http://groups.google.com/group/google-gin/browse_thread/thread/211fa264a1b42b3a/470f2b4c9b533ea2?lnk=gst&q=maven#470f2b4c9b533ea2

Comment #1

Posted on Jul 30, 2009 by Grumpy Bear

(No comment was entered for this change.)

Comment #2

Posted on Aug 19, 2009 by Happy Hippo

I'm going to provide a server with a nightly build of Google-Gin.

I can add a maven repository to it, but I need instructions, as I don't know much about Maven.

Comment #3

Posted on Aug 21, 2009 by Happy Hippo

The nightly build is up:

http://www.0x3333.com.br/builds/google-gin/

Maven soon.

Comment #4

Posted on Aug 22, 2009 by Massive Horse

using http://code.google.com/p/teraform-mvn/

svn export http://google-gin.googlecode.com/svn/trunk/ google-gin-read-only

mkdir google-gin mv google-gin-read-only google-gin/gin cd google-gin/ CLEAN=1 DEBUG=1 ~/terraform_mvn.sh gin rm -fr gin/

review the attached sample for a fit. I'm just learning gwt/gin and not really fully mavenized with a gwt project test bed yet, but this script should hit darn close with non-astonishing java projects.

Attachments

Comment #5

Posted on Sep 10, 2009 by Swift Rhino

This would be very useful to have, currently Gin is the only Maven dependency I have which is not in the public maven repo.

Comment #6

Posted on Sep 10, 2009 by Happy Hippo

Sorry guys, I'm without time to learn Maven right now, If someone could provide a maven repository in a tar.gz fashion I can update it and provide in my webserver.

Comment #7

Posted on Sep 10, 2009 by Grumpy Monkey

Helo, IMHO the simplest solution could be to mavenize the project (still work with ant).

As a poc I attach: * a pom file to build the gin jar (class + java) * the "repository fragment" generated from the trunk.

HIH

#mvn clean deploy.

Attachments

Comment #8

Posted on Nov 5, 2009 by Helpful Cat

Hello, any progress in this issue? would be greate to have GIN as Maven dependency. I see there is a PoC, so it should be no problem to move mavenize it.

TM

Comment #9

Posted on Nov 6, 2009 by Happy Hippo

Hi!

My server is available, but I need 100% instructions how to create the repository.

Regards

Comment #10

Posted on Nov 6, 2009 by Grumpy Monkey

Hi, those files below must be adapted with valid url/login/pwd... 1) add/adapt an distributionManagement section in the pom.xml (see first attachment). 2) create/modify/adapt $HOME/.m2/settings.xml (see second attachment) the mvn clean deploy -Dmaven.test.skip=true should be ok PS: I don't have the time right now to investigate the error that test case are running. Best Regards.

Attachments

Comment #11

Posted on Jan 7, 2010 by Happy Cat

I would suggest a simpler path: don't move to a Maven build, just add a pom.xml which properly declares the dependencies ( gwt/guice ) . That's a small xml file which won't do anyone any harm :-)

Once that is done, a manual upload request can be submitted ( http://maven.apache.org/guides/mini/guide-central-repository-upload.html ).

If I get a nod of approval from one of the developers, I can create the POM myself and attach it here.

Comment #12

Posted on Jan 7, 2010 by Happy Camel

Sounds great to me. Thanks!

Comment #13

Posted on Jan 7, 2010 by Happy Cat

Here's my initial pom file. It should be good enough for central, and I've tested it with a sample maven GWT project, with versions 1.5.3, 1.6.4, 1.7.0 and 2.0.0 .

Some notes:

  • I declare a dependency on GWT 1.5.3, since 1.5 is the oldest supported version. That will simply be the default GWT version, and not fixed, since the user will most likely add GWT before Gin, and the GWT declared version will be picked
  • I've added developer/connection SCM entries under tags/1.0.0 , since this is expected to be uploaded for version 1.0.0

Testing:

  • Download the attached pom file;
  • Download gin-1.0.zip and extract gin-1.0.jar
  • Run mvn install:install-file -Dfile=gin-1.0.jar -DpomFile=pom.xml
  • Include the following dependency in your POM file:

    <dependency>
        <groupId>com.google.gwt.inject</groupId>
        <artifactId>gin</artifactId>
        <version>1.0.0</version>
    </dependency>
    

You should be good to go now. Feedback is welcome, since I've only tested on a sample project.

As for getting into Maven central, it may require a few iterations on the POM - can't say for sure since this would be my first submission.

Attachments

Comment #14

Posted on Jan 8, 2010 by Massive Monkey

Just a little comment for robert. The lib folder (http://code.google.com/p/google-gin/source/browse/trunk/lib) in the svn repo contains the dependencies needed for Gin. There is another library (aside from guice) namely aopalliance.jar that is not mentioned in the pom You submitted. I'm no expert (maybe it was used at one point and it isn't used anymore) but I think it should be included in the pom.

Comment #15

Posted on Jan 8, 2010 by Happy Cat

@dilbert.elbonia: aopalliance.jar is a transitive dependency of guice 2.0 ( I double checked ) so we should be good here.

Comment #16

Posted on Jan 8, 2010 by Massive Monkey

@robert: Thanks for the explanation. I forgot that the great thing about maven is that you do not have to worry too much about transitive dependencies.

Comment #17

Posted on Jan 8, 2010 by Happy Cat

Also the scm connection is wrong, it should be in maven format. I'll update that as well.

Comment #18

Posted on Jan 8, 2010 by Happy Cat

Minor updates:

  • Proper scm declaration;
  • removed a redundant type=jar declaration.
Attachments

Comment #19

Posted on Jan 15, 2010 by Happy Cat

Bundle to be submitted to central.

Attachments

Comment #20

Posted on Jan 15, 2010 by Happy Cat

Submitted at MAVENUPLOAD-2717: Please upload gin 1.0.0. http://jira.codehaus.org/browse/MAVENUPLOAD-2717

Comment #21

Posted on Feb 4, 2010 by Happy Cat

Gin is now on central.

http://repo1.maven.org/maven2/com/googlecode/gwt/inject/gin/1.0/

Comment #22

Posted on Feb 4, 2010 by Quick Dog

Thank You Robert!

Comment #23

Posted on Feb 4, 2010 by Happy Bear

Well done!

Comment #24

Posted on Mar 10, 2010 by Quick Ox

Nice one

Comment #25

Posted on Mar 11, 2010 by Grumpy Bear

Thanks for getting this done!

Before I mark this issue as successfully completed, I'd like to add a link/hint somewhere on the page and knowing nothing about Maven: Can you tell me how that should look? Do I just point developers to http://repo1.maven.org/maven2/com/googlecode/gwt/inject/gin/1.0/?

Comment #26

Posted on Mar 12, 2010 by Quick Ox

com.googlecode.gwtinject gin 1.0

This is, how you use it.

Comment #27

Posted on Mar 12, 2010 by Happy Cat

The dependency posted above is (almost) correct. The groupId is com.googlecode.gwt.inject , so the xml fragment should be

    <dependency>
        <groupId>com.googlecode.gwt.inject</groupId>
        <artifactId>gin</artifactId>
        <version>1.0</version>
    </dependency>

There is no other setup necessary since the jars and all its dependencies are available on Maven central.

Comment #28

Posted on Mar 12, 2010 by Grumpy Bear

Thanks all for your help!

Comment #29

Posted on Feb 22, 2011 by Helpful Giraffe

What about 1.5 version?

Comment #30

Posted on Feb 22, 2011 by Happy Cat

I'll set some time aside this week. Stay tuned for a call for testing on the gin mailing list.

Comment #31

Posted on Mar 5, 2011 by Grumpy Rabbit

Note for readers: re mvn dependency, the 1.0 version is available in two locations: http://repo2.maven.org/maven2/com/google/gwt/inject/gin/1.0/ http://repo2.maven.org/maven2/com/googlecode/gwt/inject/gin/1.0/ ... thus, two different groupId values, which is quite confusing.

Thanks for pushing the 1.5.0 version: http://repo2.maven.org/maven2/com/google/gwt/inject/gin/1.5.0/

Thus the com.google.gwt.inject is valid.

Comment #32

Posted on Mar 14, 2011 by Helpful Camel

The GIN homepage links to comment #27. Can we get some offical @google.com ruling on which groupID to use?

Comment #33

Posted on Mar 14, 2011 by Happy Cat

The version uploaded by Google is at http://repo2.maven.org/maven2/com/google/gwt/inject/gin/1.5.0/

Comment #34

Posted on Dec 5, 2011 by Quick Lion

I'm Using Roo 1.1.5

Open pom.xml file from your roo projects and than replace :

    <dependency>
        <groupId>com.googlecode.gwt.inject</groupId>
        <artifactId>gin</artifactId>
        <version>1.5</version>
        <classifier/>
    </dependency>

to

    <dependency>
        <groupId>com.google.gwt.inject</groupId>
        <artifactId>gin</artifactId>
        <version>1.5.0</version>
        <classifier/>
    </dependency>

it's works fine for me

Comment #35

Posted on Sep 27, 2012 by Grumpy Bear

The newest version is 2.0.0. You'll want to depend on Gin like this:

com.google.gwt.inject gin 2.0.0

Comment #36

Posted on Jun 4, 2013 by Happy Bear

Can we bump up the version? Now when injection order is fixed it would be nice to have at least sth like 2.0.1. That would save a lot of hassle

Status: Done

Labels:
Type-Task Priority-Low