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

Since v5.3.1 compile time dependencies include all maven-bundle-plugin dependencies #70

Closed
federicotg opened this issue May 27, 2022 · 5 comments · Fixed by #71
Closed

Comments

@federicotg
Copy link

federicotg commented May 27, 2022

Describe the bug
In pom.xml maven-bundle-plugin must not be a project dependecy, just a plugin.

To Reproduce
Steps to reproduce the behavior:

  1. Add JColor 5.3.1 to your project
  2. Watch dozens of maven dependencies be added to your app classpath.

Screenshots
v5.3.0 classpath
Captura de pantalla de 2022-05-27 14-57-51

v5.3.1 classpath

Captura de pantalla de 2022-05-27 14-58-51

@dialex

@federicotg
Copy link
Author

Hi @dialex , as it stands the only workaround is adding an exclusion

    <dependency>
        <groupId>com.diogonunes</groupId>
        <artifactId>JColor</artifactId>
        <version>5.4.1</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

@federicotg federicotg changed the title Since v5.3.1 compile time dependencies include all maven-bundle-plugin depednecies Since v5.3.1 compile time dependencies include all maven-bundle-plugin dependecies May 27, 2022
@federicotg federicotg changed the title Since v5.3.1 compile time dependencies include all maven-bundle-plugin dependecies Since v5.3.1 compile time dependencies include all maven-bundle-plugin dependencies May 27, 2022
@dialex
Copy link
Owner

dialex commented May 29, 2022

Oh no, thanks for letting me know! That was introduced by #61

@robertcsakany the dependency you added is causing this issue.
Do you know if there's a way to tell Maven that is a "build" or "dev" only dependency, like the <scope>test</scope>? The goal is that people you use JColor don't have to download maven-bundle-plugin and its dependencies?

After reading that link, feels like scope test is the way to go, as this is not needed during runtime.

@dialex
Copy link
Owner

dialex commented May 29, 2022

I released the fix in v5.5.0, can you please confirm that it works (ie. the other dependencies are gone)?

@federicotg
Copy link
Author

federicotg commented May 30, 2022

I released the fix in v5.5.0, can you please confirm that it works (ie. the other dependencies are gone)?

v5.5.0 only runs in java 18+

maven.compiler.target should be 1.8.

@dialex

 bad class file: /home/user/.m2/repository/com/diogonunes/JColor/5.5.0/JColor-5.5.0.jar(/com/diogonunes/jcolor/Ansi.class)
    class file has wrong version 62.0, should be 55.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

dialex added a commit that referenced this issue May 30, 2022
@dialex
Copy link
Owner

dialex commented May 30, 2022

Ups, I assumed it would still be compatible with Java 8. Pushed a fix on v5.5.1.

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.

2 participants