You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Joakim Erdfelt <jo...@erdfelt.net> on 2006/03/27 23:41:19 UTC

MRM and Bytecode Hash.

I would like to see a new hash technique be added to the index.

Here's the scenario.

You have an anonymous ant.jar, and want to find out what it is.
Using the traditional hashing technique, the entire file is hashed and a
unique hash identification string is calculated.

A problem occurs when the jar file being interrogated against the MRM index
has had its contents recompressed without any real change to the bytecode.

I propose adding another key to the lucene document for an Artifact called "Bytecode Hash".

I've mocked up a simple demonstration of this hash technique in a small maven 
project located at http://joakim.erdfelt.com/truehash.tar.gz

I am willing to implement a patch for this.

- Joakim


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: MRM and Bytecode Hash.

Posted by Brett Porter <br...@apache.org>.
+1, with comments :)

Is this just bytecode (ie, classfiles), or is it a hash of the contents
of all files? The latter sounds good for arbitrary zip files (and other
archives when supported).

Cheers,
Brett

Joakim Erdfelt wrote:
> I would like to see a new hash technique be added to the index.
> 
> Here's the scenario.
> 
> You have an anonymous ant.jar, and want to find out what it is.
> Using the traditional hashing technique, the entire file is hashed and a
> unique hash identification string is calculated.
> 
> A problem occurs when the jar file being interrogated against the MRM index
> has had its contents recompressed without any real change to the bytecode.
> 
> I propose adding another key to the lucene document for an Artifact
> called "Bytecode Hash".
> 
> I've mocked up a simple demonstration of this hash technique in a small
> maven project located at http://joakim.erdfelt.com/truehash.tar.gz
> 
> I am willing to implement a patch for this.
> 
> - Joakim
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org