Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » Add maven dependency?
Add maven dependency? [message #22501] Wed, 04 March 2009 08:56 Go to next message
Eclipse UserFriend
Originally posted by: sadsdfd.asds.com

I have made a maven parent project and two child maven modules. I would like
to add a dependency to the maven parent that the children should enherit.

I right click the maven parent project and choose Properties -> Java Build
Path -> Libraries.

I then press the the Add External JARs... and choose the .jar file. But the
dependency is not located under the Maven Dependencies but instead it gets
added as "Referenced Libraries".

How do I add a new Maven Dependency without doing it manually in the pom.xml
file?
Re: Add maven dependency? [message #22545 is a reply to message #22501] Wed, 04 March 2009 12:20 Go to previous messageGo to next message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
You should use popup menu "Maven / Add Dependency" on your project or
pom.xml. Also, pom editor provides a structured form-based UI for
editing of all sections of the pom.xml

regards,
Eugene


JS wrote:
> I have made a maven parent project and two child maven modules. I
> would like to add a dependency to the maven parent that the children
> should enherit.
>
> I right click the maven parent project and choose Properties -> Java
> Build Path -> Libraries.
>
> I then press the the Add External JARs... and choose the .jar file.
> But the dependency is not located under the Maven Dependencies but
> instead it gets added as "Referenced Libraries".
>
> How do I add a new Maven Dependency without doing it manually in the
> pom.xml file?
Re: Add maven dependency? [message #23224 is a reply to message #22545] Mon, 23 March 2009 13:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sadsdfd.asds.com

I have tried that but it still gets located under "Referenced Libraries" and
not under the "Maven Dependencies" section.


"Eugene Kuleshov" <eu@md.pp.ru> wrote in message
news:golrlt$9ef$1@build.eclipse.org...
>
> You should use popup menu "Maven / Add Dependency" on your project or
> pom.xml. Also, pom editor provides a structured form-based UI for editing
> of all sections of the pom.xml
>
> regards,
> Eugene
>
>
> JS wrote:
>> I have made a maven parent project and two child maven modules. I would
>> like to add a dependency to the maven parent that the children should
>> enherit.
>>
>> I right click the maven parent project and choose Properties -> Java
>> Build Path -> Libraries.
>>
>> I then press the the Add External JARs... and choose the .jar file. But
>> the dependency is not located under the Maven Dependencies but instead it
>> gets added as "Referenced Libraries".
>>
>> How do I add a new Maven Dependency without doing it manually in the
>> pom.xml file?
Re: Add maven dependency? [message #23345 is a reply to message #23224] Mon, 23 March 2009 15:09 Go to previous message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

Just to clarify, you need to add required dependencies to
<dependencies/> section of pom.xml file of the parent project. The
easiest way to do this is by using m2e GUI as Eugene has suggested, but
you should see/make changes in plain text (or xml) editor as well. Also
note that Maven dependencies are identified using
groupId/artifactId/version "coordinates", so you should see something
like this in pom.xml file.

<dependency>
<groupId>org.apache.maven.mercury</groupId>
<artifactId>mercury-plexus</artifactId>
<version>1.0-alpha-6-SNAPSHOT</version>
</dependency>

You should not modify project java build path directly.

--
Regards,
Igor

JS wrote:
> I have tried that but it still gets located under "Referenced Libraries"
> and not under the "Maven Dependencies" section.
>
>
> "Eugene Kuleshov" <eu@md.pp.ru> wrote in message
> news:golrlt$9ef$1@build.eclipse.org...
>>
>> You should use popup menu "Maven / Add Dependency" on your project or
>> pom.xml. Also, pom editor provides a structured form-based UI for
>> editing of all sections of the pom.xml
>>
>> regards,
>> Eugene
>>
>>
>> JS wrote:
>>> I have made a maven parent project and two child maven modules. I
>>> would like to add a dependency to the maven parent that the children
>>> should enherit.
>>>
>>> I right click the maven parent project and choose Properties -> Java
>>> Build Path -> Libraries.
>>>
>>> I then press the the Add External JARs... and choose the .jar file.
>>> But the dependency is not located under the Maven Dependencies but
>>> instead it gets added as "Referenced Libraries".
>>>
>>> How do I add a new Maven Dependency without doing it manually in the
>>> pom.xml file?
>
Previous Topic:Import multi-module project from Bazaar SCM
Next Topic:BIRT dependencies form maven?
Goto Forum:
  


Current Time: Thu Apr 25 15:20:12 GMT 2024

Powered by FUDForum. Page generated in 0.03095 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top