NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ricalc
Joined: 05 Feb 2010 Posts: 3
|
Posted: Fri Feb 05, 2010 5:44 pm Post subject: How to add a .jar to a maven project in netbeans? |
|
|
How to add a .jar to a maven project in netbeans 6.8?
I cannot find any way to do it.
I want to add this lib:
google-api-translate-java-0.82.jar
thanks in advance |
|
| Back to top |
|
 |
russpet
Joined: 13 Jan 2010 Posts: 19
|
|
| Back to top |
|
 |
Dafe Simonek Posted via mailing list.
|
Posted: Mon Feb 08, 2010 3:21 pm Post subject: How to add a .jar to a maven project in netbeans? |
|
|
Well there is a way from NB gui I believe, try this:
1) In Maven project open "Add dependency" dialog
2) Make up some groupId, artifactId and version and fill them, OK.
3) Dependency will be added to the pom.xml and will appear under
"Libraries" node of maven project
4) Right-click Lib node and "manually install artifact", fill the path
to the jar
Jar should be installed to local Maven repo with coordinates entered in
step 2)
Dafe
russpet wrote:
|
|
| Back to top |
|
 |
jdictionary
Joined: 02 Mar 2012 Posts: 1 Location: Atlanta
|
Posted: Fri Mar 02, 2012 5:04 pm Post subject: Re: How to add a .jar to a maven project in netbeans? |
|
|
Thanks Dafe, exactly what I was looking for. Works great. Just to add to your instructions, to get to the "Add dependency" dialog, right-click on the "Dependencies" folder in the Projects view. It is the first option (I am using Netbeans 7.1.1). Also, note that when you execute these steps, Netbeans will issue the following mvn command behind the scenes:
mvn -DartifactId={artifact id} -DgroupId={group id} -Dversion={version} -Dpackaging=jar -Dfile={path to jar} -DgeneratePom=false install:install- file
| Dafe Simonek wrote: |
1) In Maven project open "Add dependency" dialog
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|