njord:check-artifacts-availability

Full name:

eu.maveniverse.maven.plugins:njord:0.8.0:check-artifacts-availability

Description:

A mojo that checks availability for all artifacts on given remote repository. The mojo by default blocks/waits for configured time and polls remote repository at given intervals, but can be used for "one pass" checks as well.

By default, the mojo will use eu.maveniverse.maven.njord.shared.store.ArtifactStore as "artifacts source" and eu.maveniverse.maven.njord.shared.publisher.ArtifactStorePublisher.targetReleaseRepository() or eu.maveniverse.maven.njord.shared.publisher.ArtifactStorePublisher.targetSnapshotRepository() as source of remote repository, but user can configure list of artifacts and remote repository directly as well.

This Mojo is useful in complex workflows/scenarios, where something (fx a build) should happen after publishing done. While some services do provide status of (non-atomic) publishing, this mojo checks the "real thing": when it succeeds, the artifacts can be resolved 100% by builds from given remote repository. Hence, this mojo can work with all publishers available out there, and even with in-house MRMs solutions as well.

Attributes:

  • Executes as an aggregator goal.
  • The goal is thread-safe and supports parallel builds.

Required Parameters

Name Type Since Description
<drop> boolean - If using eu.maveniverse.maven.njord.shared.store.ArtifactStore as artifact source, whether source store should be dropped after successful operation.
Default: true
User Property: drop
<wait> boolean - Should the mojo block/wait for artifacts to become available, or should just perform one-pass of check.
Default: true
User Property: wait
<waitDelay> String - If mojo set to wait, the delay duration before the first check happens (as java.time.Duration string). The waitTimeout does not include this delay, so "worst case" total execution time of this mojo when set to wait is waitDelay + waitTimeout.
Default: PT10M
User Property: waitDelay
<waitSleep> String - If mojo set to wait, the sleep duration between checks (as java.time.Duration string).
Default: PT1M
User Property: waitSleep
<waitTimeout> String - If mojo set to wait, the total allowed wait duration (as java.time.Duration string).
Default: PT1H
User Property: waitTimeout

Optional Parameters

Name Type Since Description
<artifacts> String - The comma separated list of artifacts to check availability for. If this parameter is set, the mojo will use this list instead to go for eu.maveniverse.maven.njord.shared.store.ArtifactStore. The comma separated list should contain artifacts in form of <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>.

Parameter may point to an existing text file as well, which contains on each line an artifact string in format above. The file may contain empty lines and lines starting with # (comments) that are ignored.


User Property: artifacts
<publisher> String - The name of the publisher or service/server ID to publish to. If not given, Njord will try to figure it out: it will look in user properties, project properties (if available) and user Settings server configuration.

This "heuristic" will work only if there is current project. While invoking mojo is possible outside a project as well (validate and publish mojos does not require project), in such cases this parameter is mandatory, as there will be no contextual information to choose publisher from.


User Property: publisher
<remoteRepository> String - The string representing remote repository where to check availability from in form of usual id::url. If this parameter is set, the mojo will use this remote repository instead to go for eu.maveniverse.maven.njord.shared.publisher.ArtifactStorePublisher and get the URL from there.
User Property: remoteRepository
<skip> boolean - No description.
Default: false
User Property: skip
<store> String - The name of the store to publish. If not given, Njord will try to figure it out: will look for existing stores created from staging this project and will choose latest (newest) out of them if multiple found.

This "heuristic" will work only if there is current project. While invoking mojo is possible outside a project as well (validate and publish mojos does not require project), in such cases this parameter is mandatory, as there will be no contextual information to choose store from.


User Property: store

Parameter Details

<artifacts>

The comma separated list of artifacts to check availability for. If this parameter is set, the mojo will use this list instead to go for eu.maveniverse.maven.njord.shared.store.ArtifactStore. The comma separated list should contain artifacts in form of <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>.

Parameter may point to an existing text file as well, which contains on each line an artifact string in format above. The file may contain empty lines and lines starting with # (comments) that are ignored.

  • Type: java.lang.String
  • Required: No
  • User Property: artifacts

<drop>

If using eu.maveniverse.maven.njord.shared.store.ArtifactStore as artifact source, whether source store should be dropped after successful operation.
  • Type: boolean
  • Required: Yes
  • User Property: drop
  • Default: true

<publisher>

The name of the publisher or service/server ID to publish to. If not given, Njord will try to figure it out: it will look in user properties, project properties (if available) and user Settings server configuration.

This "heuristic" will work only if there is current project. While invoking mojo is possible outside a project as well (validate and publish mojos does not require project), in such cases this parameter is mandatory, as there will be no contextual information to choose publisher from.

  • Type: java.lang.String
  • Required: No
  • User Property: publisher

<remoteRepository>

The string representing remote repository where to check availability from in form of usual id::url. If this parameter is set, the mojo will use this remote repository instead to go for eu.maveniverse.maven.njord.shared.publisher.ArtifactStorePublisher and get the URL from there.
  • Type: java.lang.String
  • Required: No
  • User Property: remoteRepository

<skip>

No description.
  • Type: boolean
  • Required: No
  • User Property: skip
  • Default: false

<store>

The name of the store to publish. If not given, Njord will try to figure it out: will look for existing stores created from staging this project and will choose latest (newest) out of them if multiple found.

This "heuristic" will work only if there is current project. While invoking mojo is possible outside a project as well (validate and publish mojos does not require project), in such cases this parameter is mandatory, as there will be no contextual information to choose store from.

  • Type: java.lang.String
  • Required: No
  • User Property: store

<wait>

Should the mojo block/wait for artifacts to become available, or should just perform one-pass of check.
  • Type: boolean
  • Required: Yes
  • User Property: wait
  • Default: true

<waitDelay>

If mojo set to wait, the delay duration before the first check happens (as java.time.Duration string). The waitTimeout does not include this delay, so "worst case" total execution time of this mojo when set to wait is waitDelay + waitTimeout.
  • Type: java.lang.String
  • Required: Yes
  • User Property: waitDelay
  • Default: PT10M

<waitSleep>

If mojo set to wait, the sleep duration between checks (as java.time.Duration string).
  • Type: java.lang.String
  • Required: Yes
  • User Property: waitSleep
  • Default: PT1M

<waitTimeout>

If mojo set to wait, the total allowed wait duration (as java.time.Duration string).
  • Type: java.lang.String
  • Required: Yes
  • User Property: waitTimeout
  • Default: PT1H