Comments (61)
+1
from pgjdbc.
π
from pgjdbc.
Volunteers who want to step up and help out with managing Maven releases and/or adding Maven Ant Tasks support to the PgJDBC would would be extremely welcome, as currently time is quite limited. Please get in touch on the psql-jdbc mailing list if you're interested.
from pgjdbc.
Hi,
I can try creating a Maven build configuration for PgJDBC, either by executing the existing ant build from Maven and creating the artifacts out of it (should be fairly simple) or by providing a complete alternative build (more complex because you are doing some ant-magic for creating Driver.java, but should also be doable).
I'll create a fork and give you access when I am ready :)
from pgjdbc.
I don't know if Dave Cramer (who does most of the PgJDBC work) will be thrilled with major build changes; it's come up before and I don't think anyone's been especially excited. The build isn't anything Maven can't do with profiles, properties and source wildcards, but I suspect integration of Maven Ant Tasks would be the preferred approach if possible. See http://maven.apache.org/ant-tasks/index.html
I really don't want to be doing day to day builds differently to release builds for Maven; you can imagine how that could go wrong. So we really need automation to generate a pom and push the existing build output to Maven (like Maven Ant Tasks does) or to get project agreement to use Maven for builds. Of the two I suspect your chances are much better for getting acceptance of Maven Ant Tasks.
from pgjdbc.
This is already being done. I am 99% there It did not require major build
changes. It required more of my limited time.
Dave Cramer
On Mon, Mar 11, 2013 at 5:25 AM, Craig Ringer [email protected]:
I don't know if Dave Cramer (who does most of the PgJDBC work) will be
thrilled with major build changes; it's come up before and I don't think
anyone's been especially excited. The build isn't anything Maven can't do
with profiles, properties and source wildcards, but I suspect integration
of Maven Ant Tasks would be the preferred approach if possible. See
http://maven.apache.org/ant-tasks/index.htmlβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-14703404
.
from pgjdbc.
+1
from pgjdbc.
@davecramer If I can help out at all, let me know.
from pgjdbc.
Ok, I have put it on nexus as a staging do you know how to push it to the
maven repos?
Dave Cramer
On Fri, Mar 22, 2013 at 5:44 PM, Stephen Nelson [email protected]:
@davecramer https://github.com/davecramer If I can help out at all, let
me know.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15323018
.
from pgjdbc.
See this guide:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
from pgjdbc.
Ok,
I can see it here
https://oss.sonatype.org/content/repositories/snapshots/org/postgresql/postgresql/
When I login to nexus I do not see it in my staging repositories ??
Dave Cramer
On Fri, Mar 22, 2013 at 7:50 PM, Francis De Brabandere <
[email protected]> wrote:
See this guide:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15327010
.
from pgjdbc.
You deployed a snapshot instead of a release
from pgjdbc.
Hi @davecramer, as mentioned by @francisdb you need to remove -SNAPSHOT from the build.properties file, then call the stage target for each version you want to push.
from pgjdbc.
Thanks guys, just need oss.sonatype.org to work and I think I may have it.
@stephen, looks like the way it is setup right now it will put things
in /org/postgresql/postgresql/9.2/postgresql-9.2.jar
if I set
maven.group.id=org.postgresql
maven.artifact.id=postgresql
maven.artifact.version=9.2
I think I'd prefer it to go to
org/postgresql/jdbc/9.2/postgresql-jdbc4-1002
Dave Cramer
On Sun, Mar 24, 2013 at 8:08 AM, Stephen Nelson [email protected]:
As mentioned by @francisdb https://github.com/francisdb you need to
remove -SNAPSHOT from the build.properties file, then call the stage target
for each version you want to push.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15355583
.
from pgjdbc.
Hi Dave,
Maven repos have a standard structure which is:
/$groupId/$artifactId/$version/$artifactId-$version.$extension
So the best you could get is:
org/postgresql/jdbc/postgresql-jdbc4/9.2-1002/postgresql-jdbc4-9.2-1002.jar
By setting group id: org.postgresql.jdbc, artifact id: postgresql-jdbc4 and version: 9.2-1002
As I understand by reading the build files, building for a different JDBC version will pull in different code, so it makes sense to have each JDBC version as a separate artifact. Then the version flag is the server version plus the driver version. When people use the driver in their maven builds they will just need to up the version tag to get the later versions, which is the typical use case for a maven developer.
The only issue I can see is that you registered on the OSS Sonatype site with the group id as org.postgresql. I'm not sure if it will let you publish using org.postgresql.jdbc so you might need to register that group id too. But give it a shot first.
from pgjdbc.
maven also supports classifiers which should be used to indicate jdk versions:
http://maven.apache.org/pom.html
classifier:
The classifier allows to distinguish artifacts that were built from the same POM but differ in their content. It is some optional and arbitrary string that - if present - is appended to the artifact name just after the version number.
As a motivation for this element, consider for example a project that offers an artifact targeting JRE 1.5 but at the same time also an artifact that still supports JRE 1.4. The first artifact could be equipped with the classifier jdk15 and the second one with jdk14 such that clients can choose which one to use.
Another common use case for classifiers is the need to attach secondary artifacts to the project's main artifact. If you browse the Maven central repository, you will notice that the classifiers sources and javadoc are used to deploy the project source code and API docs along with the packaged class files.
http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html
from pgjdbc.
OK, got to the part about closing the repository. Now I am getting an error
telling me I need a main in javadoc jar and sources jar ??
Dave
Dave Cramer
On Sun, Mar 24, 2013 at 12:02 PM, Francis De Brabandere <
[email protected]> wrote:
maven also supports classifiers which should be used to indicate jdk
versions:http://maven.apache.org/pom.html
classifier:
The classifier allows to distinguish artifacts that were built from the
same POM but differ in their content. It is some optional and arbitrary
string that - if present - is appended to the artifact name just after the
version number.
As a motivation for this element, consider for example a project that
offers an artifact targeting JRE 1.5 but at the same time also an artifact
that still supports JRE 1.4. The first artifact could be equipped with the
classifier jdk15 and the second one with jdk14 such that clients can choose
which one to use.Another common use case for classifiers is the need to attach secondary
artifacts to the project's main artifact. If you browse the Maven central
repository, you will notice that the classifiers sources and javadoc are
used to deploy the project source code and API docs along with the packaged
class files.http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15361312
.
from pgjdbc.
Do you have some more details about that exception and could you point to the staging repo?
from pgjdbc.
Staging ruleset evaluation on repository 'org.postgresql-388 (u:davecramer,
a:64.7.143.116)' has failed.
Staging Javadoc Validation
-*Missing:* no main jar artifact found in folder
'/org/postgresql/postgresql/9.2-1002'
Staging Sources Validation
-*Missing:* no main jar artifact found in folder
'/org/postgresql/postgresql/9.2-1002'
Dave Cramer
On Wed, Mar 27, 2013 at 4:25 PM, Francis De Brabandere <
[email protected]> wrote:
Do you have some more details about that exception and could you point to
the staging repo?β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15550810
.
from pgjdbc.
Do you have the xxx-javadoc.jar and xxx-sources.jar next to the binary jar file in place? The repo should look similar to http://search.maven.org/#artifactdetails%7Corg.apache.empire-db%7Cempire-db%7C2.4.1%7Cjar but the xxx-tests-jar is optional
Unfortunately I can't browse https://oss.sonatype.org/service/local/repositories/org.postgresql-388/ so it's impossible to check what is wrong...
from pgjdbc.
@davecramer I may be looking in the wrong place but all I can see is the snapshot builds. Are you calling the stage target? as that should package up the javadoc and source jars along with the binary and deploy them to Nexus staging repo.
I could have used better naming to be honest, the deploy target will deploy a staging jar only, the stage target will deploy all three.
https://oss.sonatype.org/content/groups/staging/org/postgresql/postgresql/
https://oss.sonatype.org/content/groups/public/org/postgresql/postgresql/
https://github.com/lordnelson/pgjdbc/blob/build_script_maven/build.xml
from pgjdbc.
Yes, I do, the error suggests to me that it requires a main class in the
manifest ?
Dave
Dave Cramer
On Wed, Mar 27, 2013 at 4:43 PM, Francis De Brabandere <
[email protected]> wrote:
Do you have the xxx-javadoc.jar and xxx-sources.jar next to the binary jar
file in place? The repo should look similar to
http://search.maven.org/#artifactdetails%7Corg.apache.empire-db%7Cempire-db%7C2.4.1%7Cjarbut the xxx-tests-jar is optionalUnfortunately I can't browse
https://oss.sonatype.org/service/local/repositories/org.postgresql-388/so it's impossible to check what is wrong...β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15551926
.
from pgjdbc.
Stephen,
It actually puts them into a different staging repository, and yes I am
calling the stage target
Dave Cramer
On Wed, Mar 27, 2013 at 4:59 PM, Stephen Nelson [email protected]:
@davecramer https://github.com/davecramer I may be looking in the wrong
place but all I can see is the snapshot builds. Are you calling the stage
target? as that should package up the javadoc and source jars along with
the binary and deploy them to Nexus staging repo.https://oss.sonatype.org/content/groups/staging/org/postgresql/postgresql/
https://oss.sonatype.org/content/groups/public/org/postgresql/postgresql/β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15552789
.
from pgjdbc.
Ah ok. Yeah re-reading it, it does seem to be asking for that. There's no compiled class in the sources or javadoc jars so there can't be a main class. I'll check on the Sonatype site to see what this validation is asking for.
from pgjdbc.
I don't think it's looking for a main class, It just wants sources and javadoc jars
from pgjdbc.
I have source and javadoc jars beside the main jar .
How does it tell what jars are sources and javadoc. Is it in the manifest
somewhere ?
Dave Cramer
On Wed, Mar 27, 2013 at 5:13 PM, Francis De Brabandere <
[email protected]> wrote:
I don't think it's looking for a main class, It just wants sources and
javadoc jarsβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15553499
.
from pgjdbc.
Suppose it's just trying jarname - .jar + -javadoc.jar
from pgjdbc.
I think it's the convention of -sources and -javadoc in the filename. Maybe add a comment to the ticket in OSS jira to see if they can help.
from pgjdbc.
could be because they don't exactly match as I am using classifiers
So the javadoc jar does not have the classifier name in it.
I've sent in a ticket at sonatype
Dave Cramer
On Wed, Mar 27, 2013 at 5:39 PM, Stephen Nelson [email protected]:
I think it's the convention of -sources and -javadoc in the filename.
Maybe add a comment to the ticket in OSS jira to see if they can help.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15554840
.
from pgjdbc.
That might be it. If all jars have a classifier there's no "main" jar as it
were. So maybe some default build needs to be set as the main jar e.g.
java7 jdbc4. The other versions are then accessible via a classifier.
.
from pgjdbc.
I don't know anything about the upload process, but I think that both the javadoc and sources jars should be built with a classifier as well. If you have executable code with a classifier the javadoc and source should match exactly with the built code. If you were just compiling with a different JDK you wouldn't need that because only the bytecode would be different, but the way we have ant do file substitution, we actually have different source code being compiled which can also have different javadoc.
from pgjdbc.
Yes, I thought about that as well, I've got a ticket into them. I'll see
what they say.
Dave Cramer
On Wed, Mar 27, 2013 at 7:33 PM, Kris Jurka [email protected]:
I don't know anything about the upload process, but I think that both the
javadoc and sources jars should be built with a classifier as well. If you
have executable code with a classifier the javadoc and source should match
exactly with the built code. If you were just compiling with a different
JDK you wouldn't need that because only the bytecode would be different,
but the way we have ant do file substitution, we actually have different
source code being compiled which can also have different javadoc.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15559815
.
from pgjdbc.
It might be better to not use classifiers for the different versions of the
jar in that case. As the sources and javadoc are not universal.
from pgjdbc.
Apparently not, but we do need them as we put out different jars for
different JDBC versions.
Dave Cramer
On Thu, Mar 28, 2013 at 2:46 AM, Stephen Nelson [email protected]:
It might be better to not use classifiers for the different versions of the
jar in that case. As the sources and javadoc are not universal.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15571064
.
from pgjdbc.
Here's a link on how to accomplish this
Is it possible to do with the ant plugin ?
Dave
Dave Cramer
On Thu, Mar 28, 2013 at 6:25 AM, Dave Cramer [email protected] wrote:
Apparently not, but we do need them as we put out different jars for
different JDBC versions.Dave Cramer
On Thu, Mar 28, 2013 at 2:46 AM, Stephen Nelson [email protected]:
It might be better to not use classifiers for the different versions of
the
jar in that case. As the sources and javadoc are not universal.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15571064
.
from pgjdbc.
I think it's mainly about uploading the correct files with the correct naming and metadata. How you build your jar / src / javadoc does not matter that much
from pgjdbc.
the ant script should create everything.
Dave Cramer
On Thu, Mar 28, 2013 at 3:20 PM, Francis De Brabandere <
[email protected]> wrote:
I think it's mainly about uploading the correct files with the correct
naming and metadata. How you build your jar / src / javadoc does not matter
that muchβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15608871
.
from pgjdbc.
Yes, it turns out this is the problem. Solving it is not straight forward,
since classifiers cannot be applied to source, javadoc packages.
Dave Cramer
On Thu, Mar 28, 2013 at 3:21 PM, Dave Cramer [email protected] wrote:
the ant script should create everything.
Dave Cramer
On Thu, Mar 28, 2013 at 3:20 PM, Francis De Brabandere <
[email protected]> wrote:I think it's mainly about uploading the correct files with the correct
naming and metadata. How you build your jar / src / javadoc does not matter
that muchβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15608871
.
from pgjdbc.
As the source code, javadoc and the generated artifact are different based on the JDK that is being targeted, I would say they are separate artifacts and therefore should be deployed in that way in Maven Central. I don't think classifiers should be used in this case.
from pgjdbc.
Stephen,
This means we will have to deploy each manually for each JDK,no ?
Dave Cramer
On Mon, Apr 1, 2013 at 9:33 AM, Stephen Nelson [email protected]:
As the source code, javadoc and the generated artifact are different based
on the JDK that is being targeted, I would say they are separate artifacts
and therefore should be deployed in that way in Maven Central. I don't
think classifiers should be used in this case.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15715389
.
from pgjdbc.
Hi Dave,
How does it work currently? I'm guessing it's built manually for each JDBC version. With a CI server the manual parts can be automated too.
from pgjdbc.
Currently all you have to do is change the jdk version and it builds things
appropriately.
I was hoping for the same kind of automation
Dave Cramer
On Wed, Apr 3, 2013 at 5:33 PM, Stephen Nelson [email protected]:
Hi Dave,
How does it work currently? I'm guessing it's built manually for each JDBC
version. With a CI server the manual parts can be automated too.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-15866750
.
from pgjdbc.
Hi Dave, I can probably make it work in a similar way. The build script derives the JDBC version it's building for so I don't need to hardcode it in the properties file. Give me a day or two and I'll update my branch.
from pgjdbc.
Please take a look at #54. I created a new branch with my changes that will build depending on the supported JDBC version and template the pom.xml accordingly.
from pgjdbc.
I've took the liberty and uploaded 9.2 1002 JDBC4 bundle with driver jar, sources and javadoc on Sonatype OSS repo. It is available at staging repository https://oss.sonatype.org/content/repositories/central_bundles-124 and hopefully will soon (day or two) end up on Maven Central.
from pgjdbc.
Stevo,
I'm not sure if you saw mine. I have already pushed this to maven central
Dave
Dave Cramer
On Tue, Apr 16, 2013 at 6:54 PM, Stevo SlaviΔ [email protected]:
I've took the liberty and uploaded 9.2 1002 JDBC4 bundle with driver jar,
sources and javadoc on Sonatype OSS repo. It is available at staging
repository
https://oss.sonatype.org/content/repositories/central_bundles-124 and
hopefully will soon (day or two) end up on Maven Central.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-16477013
.
from pgjdbc.
@davecramer haven't noticed it because Maven coordinates for pgjdbc Maven artifacts have changed compared to previous releases. Change is for the better. I've dropped staging repo.
from pgjdbc.
I am trying to use the 9.2-1002 jdbc driver from http://repo1.maven.org/maven2/org/postgresql/postgresql/9.2-1002-jdbc4 with jdk 1.6. However the JDBC driver was compiled using jdk 1.7, I am getting below error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/postgresql/Driver : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
Is this going to be changed in future?
from pgjdbc.
Yes, this should be fixed.
Dave Cramer
On Sun, May 5, 2013 at 1:02 AM, tendant [email protected] wrote:
I am trying to use the 9.2-1002 jdbc driver from
http://repo1.maven.org/maven2/org/postgresql/postgresql/9.2-1002-jdbc4with jdk 1.6. However the JDBC driver was compiled using jdk 1.7, I am
getting below error:Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/postgresql/Driver : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)Is this going to be changed in future?
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-17446465
.
from pgjdbc.
Please fix it.
from pgjdbc.
Note: Maven Central does not allow updates - any change needs to be released as new/different version.
from pgjdbc.
+1
from pgjdbc.
Yes, in the process now of figuring out what goes into the new 9.2 release.
There are a few backpatches
Dave Cramer
On Fri, May 10, 2013 at 1:11 PM, quorak [email protected] wrote:
+1
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-17732447
.
from pgjdbc.
Any word on getting the 1.6 compatible version of this up to maven central?
from pgjdbc.
I will try to get this done in the next few days
Dave
Dave Cramer
On Mon, May 20, 2013 at 5:16 PM, Jarred Ward [email protected]:
Any word on getting the 1.6 compatible version of this up to maven central?
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-18174705
.
from pgjdbc.
Is there any way you guys can see the staging repository orgpostgresql-285
on oss.sonatype.org to verify this before I push it ?
Dave Cramer
On Mon, May 20, 2013 at 5:49 PM, Dave Cramer [email protected] wrote:
I will try to get this done in the next few days
Dave
Dave Cramer
On Mon, May 20, 2013 at 5:16 PM, Jarred Ward [email protected]:
Any word on getting the 1.6 compatible version of this up to maven
central?β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-18174705
.
from pgjdbc.
Hi Dave,
I don't know how to access the repository orgpostgresql-285. However if you can provide the Repository URL, group id, artifact id and version number. I can give a try.
Thanks,
Lei
from pgjdbc.
I've released
/org/postgresql/postgresql/9.2-1003-jdbc4/postgresql-9.2-1003-jdbc4 on maven
Dave Cramer
On Mon, May 27, 2013 at 6:46 PM, tendant [email protected] wrote:
Hi Dave,
I don't know how to access the repository orgpostgresql-285. However if
you can provide the Repository URL, group id, artifact id and version
number. I can give a try.Thanks,
Leiβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-18517246
.
from pgjdbc.
Thanks Dave.
The new version (9.2-1003-jdbc4) from maven central works fine with JDK 1.6.
from pgjdbc.
Just tested 9.2-1003-jdbc4 and works like a charm, will next releases be available in maven by default?
from pgjdbc.
I will release to maven, but not by "default". Maven is just another option.
Dave Cramer
On Tue, May 28, 2013 at 3:24 AM, Francis De Brabandere <
[email protected]> wrote:
Just tested 9.2-1003-jdbc4 and works like a charm, will next releases be
available in maven by default?β
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-18534918
.
from pgjdbc.
Related Issues (20)
- Using Flink Datastream API to read and write PostgreSQL
- "ERROR: SET TRANSACTION ISOLATION LEVEL must not be called in a subtransaction" with autosave HOT 2
- SSLSocket duplex close failed (again) HOT 5
- Trying to update table using PreparadStatement, But parameters are generated inside a Parentheses HOT 1
- INSERT Java Boolean Type into a database BIT type will result in an incompatible type error. HOT 5
- Authentication SSL Mechanism HOT 20
- Query interceptors HOT 4
- Authentication failed SSL error HOT 1
- Memory Consumption, binary transfer bug HOT 5
- "Unexpected packet type during copy" when network is pool HOT 2
- Connect Java with PostgreSQL (16.3) using SSPI authentication HOT 3
- Inconsistent SQL execution with "unsupported format code" error in PostgreSQL HOT 8
- Request for new release 42.7.4 HOT 1
- SSL connection is not established HOT 22
- BlobInputStream#mark/reset caches position within a large object, however it should buffer the data instead HOT 3
- JDBC Driver Ignoring Fetch Size: Full SELECT Result Loaded into RAM, Causing Heap Overflow HOT 1
- EOFException on PreparedStatement#toString with unset bytea parameter since 42.7.4 HOT 16
- Add autoCommit setting to the JDBC driver properties and/or URL
- Feature Request - Provision to plugin a custom host chooser in the pgjdbc driver HOT 6
- CTE query: java.lang.OutOfMemoryError: Java heap space, java.lang.OutOfMemoryError: GC overhead limit exceeded HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgjdbc.