Skip to content

Problem for imports with version number as property #3

@stoerr

Description

@stoerr

In our setting we have in a pom a property defined

<properties>
    <sling-starter-dependencies-artifactId>sling-starter-dependencies-11</sling-starter-dependencies-artifactId>
<properties>

and that property is used to import a pom

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.composum.meta.sling.dependencies</groupId>
            <artifactId>${sling-starter-dependencies-artifactId}</artifactId>
            <version>${sling-starter-dependencies-version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
</dependencyManagement>

This triggers a bug in the plugin:

[ERROR] Failed to execute goal com.github.exampledriven:hierarchy-maven-plugin:1.4:tree (default-cli) on project 
composum-launcher-docker-composumlauncher: Execution default-cli of goal com.github.exampledriven:hierarchy-maven-plugin:1.4:tree failed: org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Could not find artifact 
com.composum.meta.sling.dependencies:${sling-starter-dependencies-artifactId}:pom:1.3 in archiva-internal (https://build.ist-software.com/nexus/repository/maven-public/) for project com.composum.meta.sling.dependencies:${sling-starter-dependencies-artifactId}:pom:1.3 -> [Help 1]

Other than that, your plugin nicely closes some gaps the mvn dependency:display-ancestors has. Thank you for that!

BTW: you might include into your documentation that it's always possible to call the plugin as
mvn com.github.exampledriven:hierarchy-maven-plugin:tree
since a mvn hierarchy:tree doesn't work since maven normally doesn't consider your groupId.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions