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.
Lucee Function Reference
maveninfo()
Example
maveninfo(string groupId,string artifactId,string version,[array scopes,[boolean includeOptional,[boolean validateURL]]]):query
Category
maven,classloading,dependencies,jars
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
| Name | Type | Required | Default Value | Description |
|---|---|---|---|---|
| groupId | string | Yes | The Maven group identifier that specifies the namespace for the artifact. | |
| artifactId | string | Yes | The Maven artifact identifier that specifies the name of the artifact. | |
| version | string | Yes | The specific version of the Maven artifact to query. | |
| scopes | array | No |
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 exluding test. |
|
| includeOptional | boolean | No | true | If true, includes optional dependencies in the results. If false, excludes dependencies marked as optional from the query results. |
| validateURL | boolean | No | false |
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. |