Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignored usage of properties in child POMs #367

Closed
heruan opened this issue Sep 11, 2019 · 3 comments · Fixed by #759
Closed

Ignored usage of properties in child POMs #367

heruan opened this issue Sep 11, 2019 · 3 comments · Fixed by #759
Milestone

Comments

@heruan
Copy link

heruan commented Sep 11, 2019

I have all version properties defined in the parent POM, then I have several child POMs defining dependency and plugin management.

When running display-property-updates on the parent POM, I would expect the plugin to resolve the property usage on its children; instead, it returns:

This project does not have any properties associated with versions.

Example POMs:

<project>
    <groupId>my.group</groupId>
    <artifactId>my-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <properties>
        <version.foo>1.0.0</version.foo>
    </properties>
</project>
<project>
    <parent>
        <groupId>my.group</groupId>
        <artifactId>my-parent</artifactId>
        <version>1.0.0</version>
    </parent>
    <artifactId>my-artifact</artifactId>
    <packaging>pom</packaging>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>foo.group</groupId>
                <artifactId>foo-artifact</artifactId>
                <version>${version.foo}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

Output of plugin execution:

~/my-parent$ mvn versions:display-property-updates
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] my-parent                                                          [pom]
[INFO] my-artifact                                                        [pom]
[INFO]
[INFO] -------------------------< my.group:my-parent >-------------------------
[INFO] Building my-parent 1.0.0                                           [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.7:display-property-updates (default-cli) @ my-parent ---
[INFO]
[INFO] This project does not have any properties associated with versions.
[INFO]
[INFO]
[INFO] -----------------------< my.group:my-artifact >-------------------------
[INFO] Building my-artifact 1.0.0                                         [2/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.7:display-property-updates (default-cli) @ my-artifact ---
[INFO]
[INFO] This project does not have any properties associated with versions.
[INFO]
[INFO] my-parent .......................................... SUCCESS [  0.484 s]
[INFO] my-artifact ........................................ SUCCESS [  0.007 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.491 s
[INFO] Finished at: 2019-09-11T10:46:53+02:00
[INFO] ------------------------------------------------------------------------
@heruan heruan changed the title Ignored properties defined in parent Ignored usage of properties in child POMs Sep 11, 2019
@heruan
Copy link
Author

heruan commented Sep 24, 2019

@khmarbaise @olamy Any feedback on this?

@heruan
Copy link
Author

heruan commented Oct 21, 2019

Even quick feedback would be greatly appreciated, just to understand if this is an actual bug, if it's already known and fixed in master, if there's a workaround. Thanks!

@delanym
Copy link

delanym commented Jul 5, 2021

@heruan why did you choose this way of organising your project? Have you stuck with it? I ask because i have the same problem, and I thought i'd just remove the properties

@github-actions github-actions bot added the Stale label Jul 6, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 15, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 15, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 15, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 15, 2022
@slawekjaranowski slawekjaranowski linked a pull request Oct 15, 2022 that will close this issue
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 16, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 16, 2022
@slawekjaranowski slawekjaranowski added this to the 2.13.0 milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants