THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Mercury provides an implementation-neutral way to access GAV-based repositories, including AV repositories, like OSGi. OSGi access is not implemented yet. By access I mean reading artifacts and metadata from repositories and writing artifacts to repositories, metadata is updated by writes.
Table of Contents | ||
---|---|---|
|
...
- vr.readVersions( Collection<ArtifactBasicMetadata> query ) this is the only call that interprets queries. All others treat supplied versions as exact, not as queries.
- this one takes a collection of queries in the form of ArtifactBasicMetadata and returns a collection of good old ArtifactBasicMetadata ojects. The input object can have a query in the version field
- version query is now accepted as:
- 1.2.3 - means any version, higher or equal to 1.2.3, variations:
- 1.2.3-SNAPSHOT - find latest snapshot of this version
- 1.2.3-LATEST - find latest snapshot or release of this version
- 1.2.3-RELEASE - find latest release of this version
- range in the form of
- [1.2.3,) this is equal to simple 1.2.3 query
- (1.2.3,) same as previous, but 1.2.3 version is excluded from results
- all other obvious variations of /( V1, V2/)
- 1.2.3 - means any version, higher or equal to 1.2.3, variations:
- vr.readArtifacts(Collection<ArtifactBasicMetadata> query) - retrieve full-blown Artifact for each query element. Artifacts are charged with pomBytes() and a reference to a local file
- vr.readDependencies( Collection<ArtifactBasicMetadata> query ) - returns a List<ArtifactBasicMetadata> of dependencies for each element of the query.In other words - it returns an instance of ArtifactMetadata for each ArtifactBasicMetadata from query. This call is mostly for dependency tree builder. And of cause - for you, if you find a creative way to utilize it vr.readArtifacts(Collection<ArtifactBasicMetadata> query) - retrieve full-blown Artifact for each query element. Artifacts are charged with pomBytes() and a reference to a local file
Build Details
To write client code that can read and write repositories, declare the following dependencies:
Code Block |
---|
<dependency> <groupId>org.apache.maven.mercury</groupId> <artifactId>mercury-repo-local-m2</artifactId> <version>${mercury.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.maven.mercury</groupId> <artifactId>mercury-repo-remote-m2</artifactId> <version>${mercury.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.maven.mercury</groupId> <artifactId>mercury-repo-virtual</artifactId> <version>${mercury.version}</version> </dependency> |
...