Jason van Zyl wrote:

On 7-Jul-08, at 10:19 AM, Ralph Goers wrote:



Jason van Zyl wrote:

On 7-Jul-08, at 3:29 AM, Ralph Goers wrote:

Maybe this won't strike you as strange but it did me. I ran a mvn install on a project using 2.0.9. In the course of that maven-project-2.0, maven-project-2.0.6, maven-2.0.7, and maven-project-2.0.9 were downloaded, installed into the local repo and then used in the build. As you would expect this is due to the use of the various plugins used during the build. Knowing what I know about maven I understand why this us. But the question remains, doesn't this just seem wrong? Shouldn't maven 2.0.9 only use maven 2.0.9 jars?

Yes, it's wrong. It's become the metadata is not processed first and then the artifacts selected. It's done incrementally along the way which is wrong and inefficient. This is the whole crux of what Oleg is working on with the new artifact resolution code. Metadata analysis first, artifact retrieval second. What you are seeing will not happen with the code.

How does Oleg's code fix this? The problem doesn't have to do with how metadata is processed and then artifacts selected.

That's exactly what the problem is.
To clarify: the new resolver only cares about metadata, not actual binary. Current artifact, even as late as 3.0-SN, dictates that even when you try to get artifact metadata, you get all the goods in the local repo, and then get the metadata. I am trying the other way around - get metadata only, resolve conflicts, and then download actual artifacts that are required.

Oleg

The problem is that nowhere are the plugins told that maven 2.0.9 jars should be used instead of whatever they specified.

That is exactly a metadata analysis problem. Look at everything that might be used and make a selection. Not download everything and then decide.

Instead, it appears there is some "special" code that checks for maven jars and as a last step ignores artifacts that are already part of the distribution. In other words, the metadata to correctly resolve this isn't even present.

It's all part of looking at the metadata. All the stuff gets downloaded and then there is an artifact filter which blocks all artifacts that are in the distribution. If the metadata was pulled in first. Then it could be compared with what is in the distribution, along with any other calculations, and then what is actually required to satisfy the session whether that be artifacts, plugins, or other resources are retrieved.



Ralph

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

A man enjoys his work when he understands the whole and when he
is responsible for the quality of the whole

 -- Christopher Alexander, A Pattern Language


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to