Skip to content

Update flatten-maven-plugin to generate a flatten reduced POM #3005

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

Merged

Conversation

lujiajing1126
Copy link
Contributor

@lujiajing1126 lujiajing1126 commented Mar 28, 2025

Since Arthas >=4.0.4, the generated POM cannot be resolved by Maven if it is imported in another project,

        <dependency>
            <groupId>com.taobao.arthas</groupId>
            <artifactId>arthas-core</artifactId>
            <version>4.0.4</version>
        </dependency>

The following error will be reported,

[ERROR] Failed to execute goal on project xxxxxxx: Could not resolve dependencies for project xxxxxxx: Failed to collect dependencies at com.taobao.arthas:arthas-core:jar:4.0.4: Failed to read artifact descriptor for com.taobao.arthas:arthas-core:jar:4.0.4: The following artifacts could not be resolved: com.taobao.arthas:arthas-all:pom:${revision} (absent): com.taobao.arthas:arthas-all:pom:${revision} was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyun has elapsed or updates are forced -> [Help 1]

This issue may be introduced in commit 797baf5, also see this discussion mojohaus/flatten-maven-plugin#100

Signed-off-by: Megrez Lu <lujiajing1126@gmail.com>
@lujiajing1126 lujiajing1126 changed the title Add flatten-maven-plugin in the package phase Add flatten-maven-plugin to the package phase Mar 28, 2025
Signed-off-by: Megrez Lu <lujiajing1126@gmail.com>
@lujiajing1126
Copy link
Contributor Author

lujiajing1126 commented Mar 28, 2025

After upgrading the plugin,

image

The generated reduced pom is correctly flattened.

@lujiajing1126 lujiajing1126 changed the title Add flatten-maven-plugin to the package phase Update flatten-maven-plugin to generate a flatten reduced POM Mar 28, 2025
@hengyunabc hengyunabc added this to the 4.0.6 milestone Mar 28, 2025
@hengyunabc hengyunabc merged commit 47f7eb2 into alibaba:master Mar 28, 2025
14 checks passed
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 this pull request may close these issues.

2 participants