Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install modules into the maven repository using Netbeans embedded Maven?

I have the Maven plugin for NetBeans and it successfully set up a local repository for me. Now I need to add a 3rd party library (specifically Oracle JDBC driver) to my repository. The build fails with instructions on how to install a third party module but it doesn't look like I can run that command with the NetBeans Maven plugin. Is this possible, or do I need to just get the external version of Maven?

like image 641
Jonathan Adelson Avatar asked Nov 26 '08 15:11

Jonathan Adelson


People also ask

What is Maven repository in NetBeans?

The NetBeans repository contains most of the public artifacts necessary for you to build your project. You can use the Maven Repository Browser to view the contents of your local and remote repositories. You can expand the Local Repository node to see the artifacts that are present locally.

What Maven command will install the package in local repository?

In Maven, you can use “ mvn install ” to package your project and deploy to local repository automatically, so that other developers can use it.


2 Answers

What you could do (at least in NetBeans 6.5) is following:

  • add dependency to the library in your pom
  • go to Projects->your project->Libraries (you should see the library with exclamation mark)
  • right click on the library, choose 'Manually install artifact'
  • select the jar from local drive, 'Install locally' and you are done!
like image 99
Gennady Shumakher Avatar answered Oct 01 '22 18:10

Gennady Shumakher


I ended up downloading Maven here: http://maven.apache.org/download.html and using the standalone Maven binaries to install the jar into my Maven repository. If anyone has any thoughts on the question, I am still interested in knowing the answer.

like image 44
Jonathan Adelson Avatar answered Oct 01 '22 19:10

Jonathan Adelson