You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by jv...@apache.org on 2006/11/05 03:43:14 UTC
svn commit: r471342 -
/maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Author: jvanzyl
Date: Sat Nov 4 18:43:13 2006
New Revision: 471342
URL: http://svn.apache.org/viewvc?view=rev&rev=471342
Log:
MRM-219 Convert a POM even if the checksum for the POM is incorrect
Modified:
maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Modified: maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java?view=diff&rev=471342&r1=471341&r2=471342
==============================================================================
--- maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java (original)
+++ maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java Sat Nov 4 18:43:13 2006
@@ -273,6 +273,7 @@
String snapshotKey = null;
String versionKey = null;
String versionsKey = null;
+
if ( repositoryMetadata.storedInGroupDirectory() )
{
groupIdKey = "failure.incorrect.groupMetadata.groupId";
@@ -407,8 +408,10 @@
if ( testChecksums( artifact, file, reporter ) )
{
checksumsValid = true;
- contents = FileUtils.fileRead( file );
}
+
+ // Even if the checksums for the POM are invalid we should still convert the POM
+ contents = FileUtils.fileRead( file );
}
catch ( IOException e )
{
Re: svn commit: r471342 - /maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Posted by Jason van Zyl <ja...@maven.org>.
On 6 Nov 06, at 8:18 AM 6 Nov 06, Brett Porter wrote:
> On 06/11/2006, at 12:49 PM, Jason van Zyl wrote:
>
>>
>> On 6 Nov 06, at 5:57 AM 6 Nov 06, Brett Porter wrote:
>>
>>> I'm not convinced about this. This is basically ignoring
>>> checksums in the source repository - shouldn't we be forcing them
>>> to correct them? I'd like to do the same thing on sync.
>>>
>>
>> It's logged and we can point people at the report to correct them.
>> Otherwise the whole conversion stops dead and not. I'll take not
>> stopping dead and providing a warning. What we should do with the
>> warning should be improved so that people who are syncing know
>> what to correct.
>
> Yeah, stopping dead is bad - so does this report and not sync them,
> or does it report and autocorrect them? I'm leaning towards the
> first - report the problem, sync everything else, but skip the ones
> with bad source checksums.
http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-converter/
src/main/java/org/apache/maven/archiva/converter/
DefaultRepositoryConverter.java?
diff_format=h&r1=471341&r2=471342&pathrev=471342
Right now, if the checksum is incorrect it warns but still converts
the POM. But I agree it should probably reject it and make the source
fix it. Auto-correcting stuff will become a maintenance problem for
us. If it doesn't cut muster then we should just throw it back where
it came from.
For now I just kept it from dying and convert anything we can get our
hands on.
Jason.
>
> - Brett
>
Re: svn commit: r471342 - /maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Posted by Brett Porter <br...@apache.org>.
On 06/11/2006, at 3:13 PM, Scott Ryan wrote:
> I think the best solution would be to produce a report when the
> checksums
> fail and allow the user to easily correct the problem in the Archiva
> repository.
That's the intent. The report is already there, the mechanism to fix
from within Archiva is not yet (but not far off, I did some of the
leg work already).
There's no doubt that the central repository needs to have impeccable
checksums - what we are trying to avoid is the situation where the
bad ones arrive in the first place.
- Brett
RE: svn commit: r471342 - /maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Posted by Scott Ryan <sr...@gmail.com>.
The problem is that all the maven repositories out there have bad checksums
on so many items it makes it impossible to use Archiva. Even half of the
basic plugins we use such as clean and deploy are regularly corrupted. It
seems hard to believe this is the case so I wonder if the checksum
validation is somehow flawed. If there is no way to correct the problem
then it makes is very difficult to justify using archiva as a proxy over
other solutions and I believe the Archiva offering can become very powerful.
The challenge is that most users of the offering don't clearly understand
the checksum issue and certainly can't correct the issue unless they are the
committers. They will just merely see the offering not working and pass it
on for other solutions. There is no clear indication on why the proxy is
failing. It would be nice to think that the checksum issue could be cleaned
up in the short term but I don't see that happening with much frequency.
Something that downloads today may fail to download tomorrow and that has
been very frustrating to us.
I think the best solution would be to produce a report when the checksums
fail and allow the user to easily correct the problem in the Archiva
repository. Downloading corrupted files into the repository seems to defeat
the purpose but also not allowing some easy correction makes the proxy
useless. It would also be nice if the original problem could be corrected
but it seems to be a hard one to track down. Many of the artifacts that I
upload seem to be fine and then over time the Archiva systems stops
downloading them with the checksum error. It would be nice to see if all
the repositories could run a nightly checksum validation and warn people
when their checksums become bad so they can be aware they need to correct
them.
Scott Ryan
Chief Technology Officer
Soaring Eagle L.L.C.
scott@theryansplace.com
www.soaringeagleco.com
(303) 263-3044
-----Original Message-----
From: Brett Porter [mailto:brett@apache.org]
Sent: Sunday, November 05, 2006 7:48 PM
To: archiva-dev@maven.apache.org
Subject: Re: svn commit: r471342 -
/maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/ar
chiva/converter/DefaultRepositoryConverter.java
On 06/11/2006, at 12:49 PM, Jason van Zyl wrote:
>
> On 6 Nov 06, at 5:57 AM 6 Nov 06, Brett Porter wrote:
>
>> I'm not convinced about this. This is basically ignoring checksums
>> in the source repository - shouldn't we be forcing them to correct
>> them? I'd like to do the same thing on sync.
>>
>
> It's logged and we can point people at the report to correct them.
> Otherwise the whole conversion stops dead and not. I'll take not
> stopping dead and providing a warning. What we should do with the
> warning should be improved so that people who are syncing know what
> to correct.
Yeah, stopping dead is bad - so does this report and not sync them,
or does it report and autocorrect them? I'm leaning towards the first
- report the problem, sync everything else, but skip the ones with
bad source checksums.
- Brett
Re: svn commit: r471342 - /maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Posted by Brett Porter <br...@apache.org>.
On 06/11/2006, at 12:49 PM, Jason van Zyl wrote:
>
> On 6 Nov 06, at 5:57 AM 6 Nov 06, Brett Porter wrote:
>
>> I'm not convinced about this. This is basically ignoring checksums
>> in the source repository - shouldn't we be forcing them to correct
>> them? I'd like to do the same thing on sync.
>>
>
> It's logged and we can point people at the report to correct them.
> Otherwise the whole conversion stops dead and not. I'll take not
> stopping dead and providing a warning. What we should do with the
> warning should be improved so that people who are syncing know what
> to correct.
Yeah, stopping dead is bad - so does this report and not sync them,
or does it report and autocorrect them? I'm leaning towards the first
- report the problem, sync everything else, but skip the ones with
bad source checksums.
- Brett
Re: svn commit: r471342 - /maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Posted by Jason van Zyl <ja...@maven.org>.
On 6 Nov 06, at 5:57 AM 6 Nov 06, Brett Porter wrote:
> I'm not convinced about this. This is basically ignoring checksums
> in the source repository - shouldn't we be forcing them to correct
> them? I'd like to do the same thing on sync.
>
It's logged and we can point people at the report to correct them.
Otherwise the whole conversion stops dead and not. I'll take not
stopping dead and providing a warning. What we should do with the
warning should be improved so that people who are syncing know what
to correct.
Jason.
> - Brett
>
> On 05/11/2006, at 1:43 PM, jvanzyl@apache.org wrote:
>
>> Author: jvanzyl
>> Date: Sat Nov 4 18:43:13 2006
>> New Revision: 471342
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=471342
>> Log:
>> MRM-219 Convert a POM even if the checksum for the POM is incorrect
>>
>> Modified:
>> maven/archiva/trunk/archiva-converter/src/main/java/org/apache/
>> maven/archiva/converter/DefaultRepositoryConverter.java
>>
>> Modified: maven/archiva/trunk/archiva-converter/src/main/java/org/
>> apache/maven/archiva/converter/DefaultRepositoryConverter.java
>> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-
>> converter/src/main/java/org/apache/maven/archiva/converter/
>> DefaultRepositoryConverter.java?
>> view=diff&rev=471342&r1=471341&r2=471342
>> =====================================================================
>> =========
>> --- maven/archiva/trunk/archiva-converter/src/main/java/org/apache/
>> maven/archiva/converter/DefaultRepositoryConverter.java (original)
>> +++ maven/archiva/trunk/archiva-converter/src/main/java/org/apache/
>> maven/archiva/converter/DefaultRepositoryConverter.java Sat Nov 4
>> 18:43:13 2006
>> @@ -273,6 +273,7 @@
>> String snapshotKey = null;
>> String versionKey = null;
>> String versionsKey = null;
>> +
>> if ( repositoryMetadata.storedInGroupDirectory() )
>> {
>> groupIdKey = "failure.incorrect.groupMetadata.groupId";
>> @@ -407,8 +408,10 @@
>> if ( testChecksums( artifact, file, reporter ) )
>> {
>> checksumsValid = true;
>> - contents = FileUtils.fileRead( file );
>> }
>> +
>> + // Even if the checksums for the POM are invalid
>> we should still convert the POM
>> + contents = FileUtils.fileRead( file );
>> }
>> catch ( IOException e )
>> {
>>
>
Re: svn commit: r471342 - /maven/archiva/trunk/archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
Posted by Brett Porter <br...@apache.org>.
I'm not convinced about this. This is basically ignoring checksums in
the source repository - shouldn't we be forcing them to correct them?
I'd like to do the same thing on sync.
- Brett
On 05/11/2006, at 1:43 PM, jvanzyl@apache.org wrote:
> Author: jvanzyl
> Date: Sat Nov 4 18:43:13 2006
> New Revision: 471342
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=471342
> Log:
> MRM-219 Convert a POM even if the checksum for the POM is incorrect
>
> Modified:
> maven/archiva/trunk/archiva-converter/src/main/java/org/apache/
> maven/archiva/converter/DefaultRepositoryConverter.java
>
> Modified: maven/archiva/trunk/archiva-converter/src/main/java/org/
> apache/maven/archiva/converter/DefaultRepositoryConverter.java
> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-
> converter/src/main/java/org/apache/maven/archiva/converter/
> DefaultRepositoryConverter.java?
> view=diff&rev=471342&r1=471341&r2=471342
> ======================================================================
> ========
> --- maven/archiva/trunk/archiva-converter/src/main/java/org/apache/
> maven/archiva/converter/DefaultRepositoryConverter.java (original)
> +++ maven/archiva/trunk/archiva-converter/src/main/java/org/apache/
> maven/archiva/converter/DefaultRepositoryConverter.java Sat Nov 4
> 18:43:13 2006
> @@ -273,6 +273,7 @@
> String snapshotKey = null;
> String versionKey = null;
> String versionsKey = null;
> +
> if ( repositoryMetadata.storedInGroupDirectory() )
> {
> groupIdKey = "failure.incorrect.groupMetadata.groupId";
> @@ -407,8 +408,10 @@
> if ( testChecksums( artifact, file, reporter ) )
> {
> checksumsValid = true;
> - contents = FileUtils.fileRead( file );
> }
> +
> + // Even if the checksums for the POM are invalid
> we should still convert the POM
> + contents = FileUtils.fileRead( file );
> }
> catch ( IOException e )
> {
>