Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IAM (Eclipse Integration for Apache Maven) » Dependency management with Nexus references(Managing Maven dependencies during searching and refactoring)
Dependency management with Nexus references [message #656067] Thu, 24 February 2011 01:15 Go to next message
keni  is currently offline keni Friend
Messages: 2
Registered: February 2011
Junior Member
Hi, I am having some issues with dependency management between multiple Maven modules and a Nexus repository. I have found that searching for references in Eclipse only looks in the modules that are currently open. This means that refactoring will not work unless I open all affected modules.

Is there any way to tell Eclipse to search for references within a Nexus repository (that is if the module isn't already open in Eclipse)?

Alternatively (and more favorably), is there a way to have Eclipse search through all of the unopened modules? Also, if there is a refactor being made could it open the Maven module up and do the change?

Thanks
Re: Dependency management with Nexus references [message #656456 is a reply to message #656067] Fri, 25 February 2011 17:55 Go to previous messageGo to next message
Carlos Sanchez is currently offline Carlos SanchezFriend
Messages: 114
Registered: July 2009
Senior Member
Search for references is more a Eclipse feature than IAM.
By definition it looks for references in the opened projects and ignores
the closed ones.

You can search in the classpath because it's part of the opened project,
and the sources in the local maven repo are attached to the jars in the
classpath.

Even if there were such capability, searching in the whole repository
would take a lot of time.


On 2/24/11 2:16 AM, keni wrote:
> Hi, I am having some issues with dependency management between multiple
> Maven modules and a Nexus repository. I have found that searching for
> references in Eclipse only looks in the modules that are currently open.
> This means that refactoring will not work unless I open all affected
> modules.
>
> Is there any way to tell Eclipse to search for references within a Nexus
> repository (that is if the module isn't already open in Eclipse)?
>
> Alternatively (and more favorably), is there a way to have Eclipse
> search through all of the unopened modules? Also, if there is a refactor
> being made could it open the Maven module up and do the change?
>
> Thanks
>
Re: Dependency management with Nexus references [message #656656 is a reply to message #656067] Mon, 28 February 2011 00:07 Go to previous messageGo to next message
keni  is currently offline keni Friend
Messages: 2
Registered: February 2011
Junior Member
Would you be able to expand on "sources in the local maven repo are attached to the jars in the classpath"?

I can see how the 3rd party dependencies are added to the Eclipse classpath using the MAVEN2_CLASSPATH_CONTAINER, but this does not appear to be adding in the jars for my dependent modules.

Also, how would Maven handle a refactor operation if the modules that depend on a class are not opening in the workspace? Would you simply do the change and than wait for the build result??
Re: Dependency management with Nexus references [message #656916 is a reply to message #656656] Mon, 28 February 2011 23:47 Go to previous message
Carlos Sanchez is currently offline Carlos SanchezFriend
Messages: 97
Registered: July 2009
Member
On 2/27/11 4:07 PM, keni wrote:
> Would you be able to expand on "sources in the local maven repo are
> attached to the jars in the classpath"?

if "download sources" is checked in the Maven Preferences under Eclipse,
or you right click on a project -> Maven 2 -> Fetch source jars the
sources are downloaded from the Maven repo (if available) and attached
to the jars in the classpath
You can see it in Project preferences - Java Build Path - Libraries -
Maven Classpath Container

> I can see how the 3rd party dependencies are added to the Eclipse
> classpath using the MAVEN2_CLASSPATH_CONTAINER, but this does not appear
> to be adding in the jars for my dependent modules.

Dependent modules opened in the workspace are added as project dependencies.

Dependent modules not opened in the workspace are added as jar
dependencies in the Maven Classpath Container

> Also, how would Maven handle a refactor operation if the modules that
> depend on a class are not opening in the workspace? Would you simply do
> the change and than wait for the build result??

It's not Maven who does the refactoring, it's Eclipse. Eclipse won't
touch any project that is not opened, so any dependency or anything that
depends on the project you refactor won't be changed
Previous Topic:What command in Eclipse will compile Java test classes but would not run them)
Next Topic:classifier dependency not working?
Goto Forum:
  


Current Time: Tue Apr 16 19:57:51 GMT 2024

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

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

Back to the top