Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] How to avoid fallback to literal "-SNAPSHOT" version when resolving SNAPSHOTS?

Hi,

I am currently in the process of testing Eclipse Code Recommenders
ModelRepository and how it interacts with Aether. This raises an
interesting problem, BTW: How to test that Aether acts according to your
expectations, i.e., that you have configured everything correctly and it
behaves the way you want it to. (Our current approach can be seen in
Gerrit [1].)

While writing the tests I can across the following bit of behavior which
I would like to change, if possible:

A "Code Recommenders compatible" model repository is supposed to have
checksums for all (metadata) artifacts (hence we use
CHECKSUM_POLICY_FAIL) and contain only time-stamped SNAPSHOTs. When ask
to resolve a model of jre:jre:1.0.0-SNAPSHOT:call:zip, Aether will
therefore fetch a maven-metadata.xml first to see what timestamp
"SNAPSHOT" stands for. Now, if the checksum of maven-metadata.xml is
wrong, Aether falls back to trying to resolve the artifact with a
literal version of "1.0.0-SNAPSHOT". But this can never succeed for a
*model* repository.

Is there some easy way to change this behavior without having to replace
the entire DefaultVersionResolver of Maven (which seems to implement
this behavior)? If possible, we would like to avoid HTTP requests which
we know will fail.

Best wishes,

Andreas

[1]
<https://git.eclipse.org/r/#/c/26537/2/tests/org.eclipse.recommenders.models.tests/src/org/eclipse/recommenders/models/ModelRepositoryTest.java>

-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top