Re: JDBC Maven Checksum

Поиск
Список
Период
Сортировка
От Adib Saikali
Тема Re: JDBC Maven Checksum
Дата
Msg-id 7C450971-C44B-4290-81B0-33469D578DFF@gmail.com
обсуждение исходный текст
Ответ на Re: JDBC Maven Checksum  (David Shepherd <daveshep666@hotmail.com>)
Список pgsql-jdbc
Jar files are zip files and zip files contain a timestamp in their header.  If you execute the the jar task on the same directory to output two jars then the generated jars will have identical content but different SHA1 because of the timestamps in the zip file headers will be different. 

 Check the build scripts to see if they invoke jar task twice once to generate the maven jar and once to generate the website jar.  If jar is invoked twice that explains they different SHA and the timestamps you have below.

I guess the fix would be to generate the jars only once in the build script. 


On Feb 22, 2014, at 1:39 PM, David Shepherd <daveshep666@hotmail.com> wrote:

Hi

Possibly answering my own question. Looking at the extracted jar contents the dates are different between the Maven and website versions. E.g.
jar1 - Feb 19 18:44 META-INF/
jar2 - Feb 19 19:49 META-INF/
It would explain the difference in checksum. Are the jars rebuilt before uploading to each site?

Thanks


From: daveshep666@hotmail.com
To: stephen@eccostudio.com; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] JDBC Maven Checksum
Date: Sat, 22 Feb 2014 18:15:37 +0000

Hi

Sorry but I am not seeing the same checksums, even with the latest build of driver. I noticed the filename is different for the jars depending on where it comes from, maybe that's the issue? Contents of the jar looks the same after extracting it and doing a directory diff with meld. Apologies if I am doing something stupid, I am new to Maven.

SAH1 From PostgreSQL website
dfa6c29a6c81094260cd903d40475e84c731cbd9  postgresql-9.3-1101.jdbc41.jar
66bb9af92e4b399cb4563a9efe51ea20433ec0a4  postgresql-9.3-1101.jdbc4.jar

SAH1  From Maven
f68c2783393afc9a642035964869417043d2c7dc  postgresql-9.3-1101-jdbc41.jar
9da59f12badea19b3b2884161f624bcf6750f985  postgresql-9.3-1101-jdbc4.jar


Date: Fri, 21 Feb 2014 20:37:00 +0000
Subject: Re: [JDBC] JDBC Maven Checksum
From: stephen@eccostudio.com
To: pgsql-jdbc@postgresql.org


> On Sun, Jan 26, 2014 at 4:22 PM, David Shepherd <daveshep666@hotmail.com>
> wrote:
>>
>> Hi
>>
>> Can someone please explain why there is a checksum difference between the
>> JDBC drivers on the PostgreSQL website and those in Maven? I am using Maven
>> for the first time so am unsure which file is correct or why there is a
>> difference.
>>
>> These are the sha1 hashes I am seeing:
>>
>> Maven
>> 7a09dd2b8c01babc07617973fd6f99c007e2b786  postgresql-9.3-1100-jdbc4.jar
>>
>> PostgreSQL website
>> fe6ed26ff71d75ebb99e2ec2123003e05ea16dc5  postgresql-9.3-1100.jdbc4.jar
>>
>> Thank you
>
>

Dave,

When you build the jar for the site which targets do you run?

The Maven upload part of the build script uses the same jar target
that I presume is used for building the website jar. I'll take a look
at it to see what's happening.


I just took a look into this and can't seem to find that jar on the postgresql jdbc website anymore. 

So I tried it with the latest 9.3-1101-jdbc41 jar and found them to be exactly the same. I also confirmed from the build script that it is using the same jar file for the website and uploading to Maven. There is a Java version string put into the MANIFEST.MF file but that should be constant across the jars.

If you have the older jar, what I did was extract both of them into separate directories and then perform a recursive diff.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pgjdbc-ng
Следующее
От: Guillaume Smet
Дата:
Сообщение: Re: pgjdbc-ng