edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
713 stars 110 forks source link

cannot have duplicate artifact names #147

Open sirolf2009 opened 5 years ago

sirolf2009 commented 5 years ago

I'm using fxlauncher in a project of mine and I kept getting ClassNotFound errors. It took me a while to realize, but it turns out I have 2 dependencies where the artifactID are both called 'util'

        <dependency>
            <groupId>nl.np.util</groupId>
            <artifactId>util</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>com.sirolf2009</groupId>
            <artifactId>util</artifactId>
            <version>0.0.4-SNAPSHOT</version>
        </dependency>

This is fine during development, but as soon as you launch it with fxlauncher, it will download both artifacts as util.jar to the same folder, so only one util.jar will remain, which is causing my ClassNotFound's.

I guess prefixing the group ID would fix it, but maybe it would be a nicer solution to have an maven repo folder layout?

edvin commented 5 years ago

We could have two options - one for maven style layout and one for prepending the package name for example, or simly giving a specific name to each dependency. I don't have time to work on this myself for now, but feel free to submit a PR.

sirolf2009 commented 5 years ago

will do, I'm a little busy, so it might take a week or so.