Maven custom global settings file (-gs option)


I have a global settings file to share between developers.

I modified the maven.bat file on each developer's machine to add the -gs option to point to the global settings in a shared drive.

When running from the command line, maven picks up the global settings as expected.

I have since noticed that IntelliJ is not calling this maven.bat file at all but is instead building the java command by itself.

In the maven runner configuration in IntelliJ I can define JVM options but not actual maven options. (See this similar issue raised in Jenkins some time back

Is there any way I set the custom maven global settings option? Or tell IntelliJ to use the maven.bat file instead of buildind it's own command?



Comment actions Permalink

Yes, of course you can specify settings.xml path in IDEA. See attached screenshot.a.png

Comment actions Permalink

Thanks Sergey but that is not what I mean.

Those are user settings, I'm talking about global settings.

What I need is to pass the -gs option to maven.


Please sign in to leave a comment.