Обсуждение: Driver.java.in & Copyright Info
Is the file name Driver.java.in for the class org/postgres/Driver in the code correct? Also in the past has the copyright information in the source files been updated manually or via some script? danap.
Dana,
Yes, the file name is correct. It is used as a template and modified by ant into Driver.java
The copyright is updated manually.
On Fri, Jan 18, 2013 at 12:56 PM, dmp <danap@ttc-cmc.net> wrote:
Is the file name Driver.java.in for the class org/postgres/Driver in the
code correct?
Also in the past has the copyright information in the source files been
updated manually or via some script?
danap.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
I just reviewed build.xml and realized this. In reviewing the code yesterday with regard to the logger post I updated my local copy and my IDE is giving some misc errors and that was one of them. Thank you for the response. danap. Dave Cramer wrote: > Dana, > > Yes, the file name is correct. It is used as a template and modified by > ant into Driver.java > > The copyright is updated manually. > > > Dave Cramer > > dave.cramer(at)credativ(dot)ca > http://www.credativ.ca > > > On Fri, Jan 18, 2013 at 12:56 PM, dmp <danap@ttc-cmc.net > <mailto:danap@ttc-cmc.net>> wrote: > > Is the file name Driver.java.in <http://Driver.java.in> for the > class org/postgres/Driver in the > code correct? > > Also in the past has the copyright information in the source files been > updated manually or via some script? > > danap. > > > -- > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org > <mailto:pgsql-jdbc@postgresql.org>) > To make changes to your subscription: > http://www.postgresql.org/__mailpref/pgsql-jdbc > <http://www.postgresql.org/mailpref/pgsql-jdbc>
Dana,
If you build the driver and exclude Driver.java.in from being used your IDE should stop complaining.
Dave
On Fri, Jan 18, 2013 at 1:25 PM, dmp <danap@ttc-cmc.net> wrote:
I just reviewed build.xml and realized this. In reviewing the code yesterday
with regard to the logger post I updated my local copy and my IDE is giving
some misc errors and that was one of them.
Thank you for the response.
danap.
Dave Cramer wrote:Dana,<mailto:danap@ttc-cmc.net>> wrote:
Yes, the file name is correct. It is used as a template and modified by
ant into Driver.java
The copyright is updated manually.
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On Fri, Jan 18, 2013 at 12:56 PM, dmp <danap@ttc-cmc.net
Is the file name Driver.java.in <http://Driver.java.in> for the<mailto:pgsql-jdbc@postgresql.org>)
class org/postgres/Driver in the
code correct?
Also in the past has the copyright information in the source files been
updated manually or via some script?
danap.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.orghttp://www.postgresql.org/__mailpref/pgsql-jdbc
To make changes to your subscription:
<http://www.postgresql.org/mailpref/pgsql-jdbc>
Yep. Now I have a couple of things to do today, but can now dedicate a task to the project. I can pursue the Apache Forester website review, for automation or if you have a another higher priority task that I may be able to work on perhaps. I need to update all the copyright in my project source for the new year and have also been doing this manually. I could kill two birds, (So to speak. I'm not going to kill ANY birds people.), in creating code/script to do this for both of us. danap. Dave Cramer wrote: > Dana, > > If you build the driver and exclude Driver.java.in > <http://Driver.java.in> from being used your IDE should stop complaining. > > Dave > > Dave Cramer > > dave.cramer(at)credativ(dot)ca > http://www.credativ.ca
Dana,
The only pressing thing is to fix the bug with batch statements and binary protocol, but this is important as well.
Thanks so much,
On Fri, Jan 18, 2013 at 2:24 PM, dmp <danap@ttc-cmc.net> wrote:
Yep. Now I have a couple of things to do today, but can now dedicate a task to
the project. I can pursue the Apache Forester website review, for automation
or if you have a another higher priority task that I may be able to work on
perhaps.
I need to update all the copyright in my project source for the new year and
have also been doing this manually. I could kill two birds, (So to speak. I'm
not going to kill ANY birds people.), in creating code/script to do this for
both of us.
danap.
Dave Cramer wrote:Dana,If you build the driver and exclude Driver.java.in<http://Driver.java.in> from being used your IDE should stop complaining.
Dave, I have completed a copyright updater for the source and will make available tomorrow, after some additional testing. Then I will look into the bug mentioned below. Not sure I'm familiar enough with the code though to take on such a task. The Copyright updater is indicating that several files are not meeting the pattern search for the standard copyright header. I suppose I could afix one if not found, but not sure without looking at each failure if that would be appropriate. Right now the updater just bypasses the file and leaves as is. Source Directory: /home/danap/tempSQL/postgresql_test/org2 Found Java File: /home/danap/tempSQL/postgresql_test/org2/postgresql/PGConnection.java Processing: CopyIn.java Processing: CopyManager.java Processing: CopyOperation.java Processing: CopyOut.java Processing: PGCopyInputStream.java Processing: PGCopyOutputStream.java Processing: PGBigDecimal.java /home/danap/tempSQL/postgresql_test/org2/postgresql/core/types/PGBigDecimal.java : Failed to Find Pattern Processing: PGBoolean.java /home/danap/tempSQL/postgresql_test/org2/postgresql/core/types/PGBoolean.java : Failed to Find Pattern ~ ~ ~ Processing: PGResultSetMetaData.java Processing: PGStatement.java danap. > Dana, > > The only pressing thing is to fix the bug with batch statements and binary > protocol, but this is important as well. > > Thanks so much, > > Dave Cramer > > dave.cramer(at)credativ(dot)ca > http://www.credativ.ca
On Wed, 23 Jan 2013, dmp wrote: > I have completed a copyright updater for the source and will make available > tomorrow, after some additional testing. I have previously used src/tools/copyright.pl from the server's repository to make the copyright changes. So you might want to compare your results against its, but it appears that you have identified some files that aren't carrying the correct copyright markers which that tool will not detect. Kris Jurka
Dana,
Great stuff. Looking forward to it
Thanks,
On Wed, Jan 23, 2013 at 9:14 PM, dmp <danap@ttc-cmc.net> wrote:
Dave,
I have completed a copyright updater for the source and will make available
tomorrow, after some additional testing. Then I will look into the bug mentioned
below. Not sure I'm familiar enough with the code though to take on such a
task.
The Copyright updater is indicating that several files are not meeting the
pattern search for the standard copyright header. I suppose I could afix
one if not found, but not sure without looking at each failure if that would
be appropriate. Right now the updater just bypasses the file and leaves as
is.
Source Directory: /home/danap/tempSQL/postgresql_test/org2
Found Java File: /home/danap/tempSQL/postgresql_test/org2/postgresql/PGConnection.java
Processing: CopyIn.java
Processing: CopyManager.java
Processing: CopyOperation.java
Processing: CopyOut.java
Processing: PGCopyInputStream.java
Processing: PGCopyOutputStream.java
Processing: PGBigDecimal.java
/home/danap/tempSQL/postgresql_test/org2/postgresql/core/types/PGBigDecimal.java : Failed to Find Pattern
Processing: PGBoolean.java
/home/danap/tempSQL/postgresql_test/org2/postgresql/core/types/PGBoolean.java : Failed to Find Pattern
~
~
~
Processing: PGResultSetMetaData.java
Processing: PGStatement.java
danap.Dana,
The only pressing thing is to fix the bug with batch statements and binary
protocol, but this is important as well.
Thanks so much,
Kris, Thank you for that information. I will review that script. I initial thought I might use perl or python, but later decided to just use a Java application because this would allow it to be more easily generalized through a user interface. Upon further thought I have now decided to make the script be not only a line replacement, replaces pattern line in source, but also to allow the option of substituting a new header in the source. This can very easily be done because in almost all cases the header, license, copyright, etc. is before the package declaration, the first line of any Java class. So by using this option you can catch the classes that currently do not have correct copyright markers. I will make the code available today. danap. Kris Jurka wrote: > > > On Wed, 23 Jan 2013, dmp wrote: > >> I have completed a copyright updater for the source and will make available >> tomorrow, after some additional testing. > > I have previously used src/tools/copyright.pl from the server's repository > to make the copyright changes. So you might want to compare your results > against its, but it appears that you have identified some files that > aren't carrying the correct copyright markers which that tool will not > detect. > > Kris Jurka >
CopyrightUpdater Completed. Everything seems to work properly in both update copyright and replace header mode. In testing I found another deviate in the sources with two copyright lines. * Copyright (c) 2004-2011, PostgreSQL Global Development Group * Copyright (c) 2004, Open Cloud Limited. This in ProtocolConnectionImpl.java there may be more. In response I added a second argument for contains qualification in update mode. Now of course that will be no good for use with replace header. May have to use: 1. Do a standard update copyright, reviewing the messages to get a list of files identified by none pattern matches, incorrect header. 2. Isolate those none pattern matches run the updater again in replacment mode to add proper copyright header. In the future should be able to just use the update copyright mode or use the original script that Chris identified. As always since this code will modify files recommend using test directory and review the source attached. If anyone on this list wishes to have this code please email me. danap. dmp wrote: > I will make the code available today. > > danap. dmp wrote: > I will make the code available today. > > danap.
Ok, I have make the modification. I also forgot to run FindBugs on it so correct some minor errors and did some additional formatting in GUI. Also shorten the run scripts to updater.sh/bat. Available at: http://dandymadeproductions.com/temp/copyrightUpdater-1.3.src.tar.gz danap. Dave Cramer wrote: > Hi Dana > > Thanks for this. Yes, Oliver had put a copyright message in his source(s). > > One thing that would be useful is when you find the line, also put it in > the replacement text box as the start. Then I could just change the bit > that needs changing and leave the rest. However it is very usable just > the way it is. > > Thanks, > > Dave Cramer > > dave.cramer(at)credativ(dot)ca > http://www.credativ.ca
I messed up and did not get the corrected contents in the original tar when posting it for 1.3, but the the file should be good now at the link. http://dandymadeproductions.com/temp/copyrightUpdater-1.3.src.tar.gz danap. dmp wrote: > Ok, > > I have make the modification. I also forgot to run FindBugs on it so > correct some minor errors and did some additional formatting in GUI. > Also shorten the run scripts to updater.sh/bat. > > Available at: > > http://dandymadeproductions.com/temp/copyrightUpdater-1.3.src.tar.gz > > danap.