1

I am using Netbeans for my Java projects. And i am working with the maven plugin. I havent installed maven locally. How to import local jar into the maven repository, without installing maven locally!

Update: I found this asked question: How to add local jar files in maven project? But it assumes that maven is installed locally.

Community
  • 1
  • 1
Mira Mira
  • 1,385
  • 3
  • 11
  • 18
  • You assumed correctly, why don't you simply install maven? – Nicolas Filotto Aug 05 '16 at 13:41
  • what's the end use case? you don't need jars installed locally if maven is not installed locally anyway – A_Di-Matteo Aug 05 '16 at 13:42
  • OP might not have admin permission to install software on their computer. If that is the case, you can still get maven [here](https://maven.apache.org/download.cgi). Download the binary zip and extract. – Sameer Puri Aug 05 '16 at 13:47
  • I hoped there is some way to do this just with the plugin. – Mira Mira Aug 05 '16 at 13:56
  • but the plugin is most probably using an embedded maven installation anyway, so you are falling on the initial case anyway – A_Di-Matteo Aug 05 '16 at 13:58
  • Use dependency tag in pom.xml to describe jar file and push jar file into respective folder (artifacts and version described in pom.xml) inside .m2 directory. .m2 will be in your Users/home directory. – ankidaemon Aug 05 '16 at 14:08
  • 1
    try the solution suggested in [this](http://stackoverflow.com/a/38339518/5606016) answer then, you can run the `pom.xml` file via Netbeans then (again, it will use maven anyway, embedded or installed). Still think you question is a duplicate. – A_Di-Matteo Aug 05 '16 at 14:11
  • Thank u very much to pointing me to that answer! It works for me! I havent to install maven locally! – Mira Mira Aug 05 '16 at 15:34

0 Answers0