aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
488 stars 180 forks source link

Add usage support in IntelliJ IDEA #307

Open hellnn opened 2 years ago

hellnn commented 2 years ago

Add support IntelliJ IDEA using settings maven from its settings, for example using param -Dmaven.home

aleksandr-m commented 2 years ago

It is not clear. Can you be more specific?

hellnn commented 2 years ago

In most cases, when launching maven tasks, the built-in maven for IDEA is used, so it would be convenient to use the plugin through it

aleksandr-m commented 2 years ago

You can use mvnExecutable to use different maven. Is this enough?

hellnn commented 2 years ago

Yes, I can try, but I think, will be convenient if plugin will use -Dmaven.home variable when it is specified

aleksandr-m commented 2 years ago

@hellnn So this is only about using different maven executable for internal maven commands? Take a look at how plugin handles maven wrapper - here. Is that what you want to handle for IDEA somehow?

hellnn commented 2 years ago

Yes, IDEA sets -Dmaven.home varable at executing internal maven goals

For example:

"C:\Program Files\Java\jdk-11.0.6\bin\java.exe" -Dmaven.multiModuleProjectDirectory=... "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\lib\idea_rt.jar=56192:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2021.2.1 clean