maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Casey <>
Subject Re: new repository conversion and cleanup tool in sandbox: repoclean
Date Fri, 18 Mar 2005 22:14:02 GMT
Hash: SHA1

hi Carlos,

I had completely forgotten about verifying the validity of a checksum!
I'll add this now, as it's pretty easy to do.

I'm also going to be adding support for the new repository layout, laid
out in:

Currently, I have the model source for v3 and v4 checked into the source
tree for the repoclean tool, mostly because I was going to have a
problem with specifying both <version>3.0</version> and
<version>4.0</version> for maven-model (or whatever the actual artifact
versions are) in the dependencies list.

While it is technically possible, provided their packaging structures
continue to be compatible, m2 will scream at having what it sees as two
conflicting artifact-versions in a single project. Not optimal, but
there you go.

I don't have any dependencies on wagon or artifact, since I'm dealing
with things on mostly a file level, and all self-contained within a
single repository. For the only higher-level processing I need to do, I
use the model-reader and -writer included in the above discussion. As
for MD5 generation/verification, this is actually quite simple, so I've
reused some code I had in another project to quickly generate/write MD5
files...I'll extend this for verification purposes.

The only packages I'm really dependent upon are plexus-container-default
and plexus-utils, the former for starting and managing dependencies
within the application, and the latter basically for IOUtil and StringUtils.

I have a few JDK 1.4+ regular expressions that I'm using to parse info
from the POM path (groupId, artifactId, version, etc.), so I'll probably
just reuse some of this code when it comes time to adjust
'groupPart1.groupPart2.groupPart3' to 'groupPart1/groupPart2/groupPart3'

If you have suggestions on any of this, or whatever else, please don't
hesitate to reply.

- -j

Carlos Sanchez wrote:
> Hi John,
> I'll try to explain a bit what I've done with the repo tools.
> I've added some logic to repository-tools to get all the artifacts
> from a file based repository. I needed to make this because wagon
> doesn't provide a way to get all the artifacts to iterate over them.
> It was just a quick hack.
> Now I'm able to know if each artifact have a checksum throught
> maven-artifact. To ease the use of the tool I've created a repository
> mojo (which I'll move to the sandbox because it's a better place) that
> prints all files in the local repo which don't have checksum file.
> The last thing I tried is checking that the checksum corresponds the
> file. I was trying to reuse the checksum observer from wagon, so my
> idea was downloading the artifacts from the local repo to a temp dir
> using wagon.
> Another problem with the repository tools component is that I needed
> to remove two files in order to get it compiled, because the Pomv3tov4
> class tries to access maven model in a package v300 that doesn't
> exists.
> I'll try to elaborate on this and write some doc but in the meantime
> feel free to ask any question.
> Regards
> Carlos
Version: GnuPG v1.2.6 (GNU/Linux)


View raw message