TheBoegl / gradle-launch4j

A gradle-plugin to create windows executables with launch4j
Apache License 2.0
306 stars 43 forks source link

plugin is incompatible with settings repositories #176

Open jbb01 opened 2 weeks ago

jbb01 commented 2 weeks ago

When declaring repositories in the dependencyResolutionManagement block in the settings file and setting the repositoryMode to RepositoriesMode.FAIL_ON_PROJECT_REPOS the build will fail with an exception.

An exception occurred applying plugin request [id: 'edu.sc.seis.launch4j', version: '3.0.6']
> Failed to apply plugin 'edu.sc.seis.launch4j'.
   > Build was configured to prefer settings repositories over project repositories but repository 'MavenRepo' was added by plugin 'edu.sc.seis.launch4j'

This seems to be caused by the plugin configuring maven central as the default repository when no project repositories are configured, see https://github.com/TheBoegl/gradle-launch4j/blob/745c0cd9dc710f3b125417077f485967c5caf806/src/main/groovy/edu/sc/seis/launch4j/Launch4jPlugin.groovy#L81-L84

TheBoegl commented 1 week ago

Let's see if we find a solution to this. @jbb01 feel free to create a PR!