Open hellnn opened 2 years ago
It is not clear. Can you be more specific?
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
You can use mvnExecutable
to use different maven. Is this enough?
Yes, I can try, but I think, will be convenient if plugin will use -Dmaven.home variable when it is specified
@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?
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
Add support IntelliJ IDEA using settings maven from its settings, for example using param -Dmaven.home