Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Publish artifacts to Maven central

67 views
Skip to first unread message

Stephen Nelson

unread,
Oct 25, 2012, 6:29:34 AM10/25/12
to
Hi,

I would like to help get the jdbc driver jars uploaded to Maven central automatically. I have found a set of Maven Ant tasks that will do the job (http://maven.apache.org/ant-tasks/index.html) and shouldn't disrupt the current Ant script much - except for an additional third party jar containing the tasks, and the changes to create the required jars.

Would it be useful to the project for me to work on this?

Many thanks,
--
Stephen Nelson


Dave Cramer

unread,
Oct 25, 2012, 6:49:56 AM10/25/12
to
Yes, please do.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
--
Sent via pgsql-jdbc mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Craig Ringer

unread,
Oct 26, 2012, 2:54:01 AM10/26/12
to
It really would. I've had it on my to-do for ages, but I haven't done
much with Ant and I was concerned about getting the build right for the
different versions.

--
Craig Ringer

Stephen Nelson

unread,
Oct 30, 2012, 11:53:37 AM10/30/12
to
On Fri, Oct 26, 2012 at 7:54 AM, Craig Ringer <rin...@ringerc.id.au> wrote:
> It really would. I've had it on my to-do for ages, but I haven't done
> much with Ant and I was concerned about getting the build right for the
> different versions.
>

Yeah, I finding that to be the slightly more involved part. To get
accepted to Maven Central I think you need to supply a jar with
javadoc and one with the sources. Looking at the current build there's
different source code included depending on the JDBC version you're
building for.

The question I have is should this current build script handle the
building of both versions, or will the script itself be called twice -
once for each JDBC version? It could be done either way I think, but I
guess this will need to hook into the other automated build discussion
happening on another thread so that things work together.

> --
> Craig Ringer
>
>

--
Stephen Nelson

Dave Cramer

unread,
Oct 30, 2012, 12:03:46 PM10/30/12
to
Stephen,

If the build script is within ant I think you need to call it twice
with JAVA_HOME pointed at different JVM's

This is probably the simplest as it is easily extended for JAVA 8, and beyond.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Shijun Kong

unread,
Nov 1, 2012, 3:23:54 PM11/1/12
to
I am afraid you have to run once for each version. One way is to add one
maven pom file for the project and one profile for each version. The real
work can be delegated to existing ant job via maven ant plugin.

__________________________

Shijun Kong
This email message and any attachments may contain legally privileged or confidential information intended solely for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution or copying of this message or its attachments is strictly prohibited. If you have received this message in error, please notify us immediately by telephone, fax or email and delete the message and all attachments to the message. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Investor Analytics LLC.

Tom Dunstan

unread,
Feb 7, 2013, 11:46:57 PM2/7/13
to
Did this go anywhere? I don't see anything in the build.xml indicating
that any work has been committed (at least on the master branch).
Maybe it's sitting in a fork somewhere?

I am also happy to help in getting releases pushed to maven central.
If there isn't any existing build script work to get them pushed up,
I'll knock something up...

Cheers

Tom

Stephen Nelson

unread,
Feb 8, 2013, 5:00:28 AM2/8/13
to
On Fri, Feb 8, 2013 at 4:46 AM, Tom Dunstan <pg...@tomd.cc> wrote:
Did this go anywhere? I don't see anything in the build.xml indicating
that any work has been committed (at least on the master branch).
Maybe it's sitting in a fork somewhere?

I am also happy to help in getting releases pushed to maven central.
If there isn't any existing build script work to get them pushed up,
I'll knock something up...

Cheers

Tom

Hi Tom

I pushed it to my Github fork of pgjdbc: https://github.com/lordnelson/pgjdbc on the build_script_maven branch.

I'm a bit of a newcomer to Git so hope I've done it correctly? I still need to sort out the gpg signing part so it can be pushed to Maven central automatically, and need some ideas about how to build for each JDBC version.

Stephen

Dave Cramer

unread,
Feb 8, 2013, 6:09:42 AM2/8/13
to
Stephen,

I can take care of building each version. You need a machine with all 3 versions of java on it. I have one. If we can get to the point that it will push one I can probably do the rest.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Dave Cramer

unread,
Feb 8, 2013, 9:39:04 AM2/8/13
to
Stephen,

Can you create a pull request on github. There is a pull request button on your github repo. then send it to me

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Stephen Nelson

unread,
Feb 8, 2013, 11:35:52 AM2/8/13
to
On Fri, Feb 8, 2013 at 2:39 PM, Dave Cramer <p...@fastcrypt.com> wrote:
Stephen,

Can you create a pull request on github. There is a pull request button on your github repo. then send it to me

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

Hi Dave,

I've created the pull request. I couldn't quite figure out how to squash the commits into one....


Many thanks

Stephen 

Dave Cramer

unread,
Feb 8, 2013, 11:40:52 AM2/8/13
to
Thanks, this is good

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Tom Dunstan

unread,
Apr 4, 2013, 7:07:41 AM4/4/13
to
On 9 February 2013 03:10, Dave Cramer <p...@fastcrypt.com> wrote:
Thanks, this is good
 
Any progress? The latest jdbc drivers are pretty much the only dependencies that I can't pull from maven central these days. I'd love to help, but without the rights to do the push to sonatype I'm not sure what I can do.

Cheers

Tom

Dave Cramer

unread,
Apr 4, 2013, 8:12:22 AM4/4/13
to
Tom,

Yes, I had been struggling with naming conventions.

I would have liked it to go into org/postgreql/jdbc/postgresql-JDBC4-1002.jar

However it appears maven forces 

org/postgresql/postgresql/postgresql-JDBC4-1002.jar

I can probably publish the former today.

Dave

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Stephen Nelson

unread,
Apr 4, 2013, 11:22:24 AM4/4/13
to


On 4 Apr 2013 13:12, "Dave Cramer" <p...@fastcrypt.com> wrote:
>
> Tom,
>
> Yes, I had been struggling with naming conventions.
>
> I would have liked it to go into org/postgreql/jdbc/postgresql-JDBC4-1002.jar
>
> However it appears maven forces 
>
> org/postgresql/postgresql/postgresql-JDBC4-1002.jar
>
> I can probably publish the former today.
>
> Dave
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
>

From a Maven developers point of view they're not worried about the directory structure as they just specify group id, artifact id and version in the pom.xml. So you just need to come up with reasonable parameters for each of those.

Tom Dunstan

unread,
Apr 4, 2013, 6:35:26 PM4/4/13
to
On 5 April 2013 01:52, Stephen Nelson <ste...@eccostudio.com> wrote:

On 4 Apr 2013 13:12, "Dave Cramer" <p...@fastcrypt.com> wrote:
>
> However it appears maven forces 
>
> org/postgresql/postgresql/postgresql-JDBC4-1002.jar
>

From a Maven developers point of view they're not worried about the directory structure as they just specify group id, artifact id and version in the pom.xml. So you just need to come up with reasonable parameters for each of those.

The existing artefacts in maven central have a group id of "postgresql",  an artefact id of "postgresql" and a version format of "9.1-901-1.jdbc4". See e.g. http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22postgresql%22%20AND%20a%3A%22postgresql%22

Is there a particular reason to change the all of that at this point? I know I personally would probably have made the group "org.postgresql" and the artefact id "jdbc-driver" and maybe specified the jdbc version as a classifier (although some build systems are a bit funny about classifiers). But people have been using the existing group and artefact id, so I don't see much point changing it now.

Cheers

Tom

Dave Cramer

unread,
Apr 5, 2013, 3:03:20 PM4/5/13
to
I've published 9.2 1002 JDBC4 to sonatype he groupid is org.postgresql and the artefact id is postgresql.

I assume this will make it to maven central eventually 

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Tom Dunstan

unread,
Apr 8, 2013, 10:25:52 AM4/8/13
to
Hi Dave

I was going to submit a patch for the website to add the maven group id etc to the download page, but it looks like the pgjdbc/www repo on github is out of date.. what's the preferred mechanism for patches to the website?

Cheers

Tom

Dave Cramer

unread,
Apr 8, 2013, 11:37:06 AM4/8/13
to
Tom,

It should be up to date. What are you seeing that suggests otherwise ?

Dave

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


Tom Dunstan

unread,
Apr 8, 2013, 6:58:04 PM4/8/13
to
On 9 April 2013 01:07, Dave Cramer <p...@fastcrypt.com> wrote:
It should be up to date. What are you seeing that suggests otherwise ?

 
Hi Dave

Sorry, should have been more explicit.

The download file seems to still refer to 9.1-902 as the current version, see https://github.com/pgjdbc/www/blob/master/src/documentation/content/xdocs/download.xml

Cheers

Tom 

Dave Cramer

unread,
Apr 9, 2013, 7:54:25 AM4/9/13
to
Mostly because I have had difficulty building the site, so I edited the site directly. This is still the reference repo

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


0 new messages