MavenInfo()

Retrieves information about a Maven artifact and its dependencies.

This function allows you to query details about a specific Maven artifact by providing its coordinates (groupId, artifactId, and optionally version).

It returns a query containing information about the artifact itself and all of its dependencies based on the specified scope.

The returned query includes columns for:

  • groupId: The group identifier of the artifact
  • artifactId: The artifact identifier
  • version: The version of the artifact
  • scope: The scope of the dependency (compile, provided, runtime, test, system)
  • optional: Whether the dependency is optional
  • checksum: Checksum information
  • url: URL where the artifact can be found
  • path: Local file path to the artifact

This function is useful for debugging classloading issues, understanding dependency trees, or gathering information about the libraries your application depends on.

Introduced: 7.0.0.136

MavenInfo( groupId=string, artifactId=string, version=string, scopes=array, includeOptional=boolean, validateURL=boolean );

Returns: Query

Argument Description Default
groupId
string, required

The Maven group identifier that specifies the namespace for the artifact.

artifactId
string, required

The Maven artifact identifier that specifies the name of the artifact.

version
string, required

The specific version of the Maven artifact to query.

scopes
array, optional

The dependency scopes to consider when retrieving dependencies. this is an array containing all scopes you wanna include in the resulting query.

Valid values are:

  • compile
  • provided
  • runtime
  • test
  • system

Default are all scopes excluding test.

includeOptional
boolean, optional

If true, includes optional dependencies in the results. If false, excludes dependencies marked as optional from the query results.

true

validateURL
boolean, optional

A Maven artifact can be provided from different repositories, not all repositories provide all artifacts. if set to false, Lucee simply picks the most likely repository. If set to true, Lucee checks all possibilities, what can take a while, so only set to true, if really neded.

Alias: validate

false

Examples

There are currently no examples for this function 17,566ms WARN No examples for function maveninfo

See also