开发者

Is it ok to Install maven if I already have installed maven eclipse plugin?

开发者 https://www.devze.com 2023-03-30 03:55 出处:网络
I have maven eclipse plugin and I want to use a jar file in my project that is not supported in maven so I found out I have to do something like this :

I have maven eclipse plugin and I want to use a jar file in my project that is not supported in maven so I found out I have to do something like this :

mvn install:install-file -Dfile=c:\kaptcha-2.3.jar -DgroupId=com.google.code 
开发者_如何转开发-DartifactId=kaptcha -Dversion=2.3 -Dpackaging=jar

So I have to install maven to issue that command but won't that cause redundancy with maven plugin ?


You can install multiple different versions of maven, and configure m2eclipse to use a specific instance, see the setting under Window > Preferences > Maven > Installations.

Managing multiple different versions on the command line is controlled by the PATH environment variable, you would normally define an environment variable M2_HOME which specifies the home directory of the version that you are currently using, and then add $M2_HOME/bin or %M2_HOME%\bin to your path environment variable.


It is no problem if you have both maven and eclipse maven plugin installed. I only use eclipse maven plugin for its pom.xml file editor. I do all other operations about maven through the command line.

Besides, the plugin (m2eclipse) I used, sometimes give strange dependency errors although everything is fine. Because when I run a "mvn install" for the project, it is built successfully. So, I think using maven itself is more reliable.

0

精彩评论

暂无评论...
验证码 换一张
取 消