On 10/04/2011 7:46 PM, Barrie Treloar wrote:
On Sat, Apr 9, 2011 at 7:54 PM, Jörg Schaible<[email protected]>  wrote:
Ludwig Magnusson wrote:

Hello!

I know that the maven-eclipse-plugin somehow can figure out that a
dependency actually exists as a project in workspace and therefore add
that project to the build path instead of trying to download a jar-file
from a remote repository.

My question is:

Is this possible for any dependency or just multi-module-projects?



In my case, the project is NOT multi-module.
Only multi-module. However, it is easy to use a dummy project (name it
dummy.pom) just for this purpose:
This should work for *any* dependency, that is already in your eclipse
workspace.
I do this already.

We have one "common" area for projects and another project specific one.
The project specific modules are not multi-module builds of the common ones.

maven-eclipse-plugin will happily use any of the common projects as
eclipse project references (instead of m2 repo references) if they
already exist in the eclipse workspace.

The plugin does this by traversing all projects in the workspaces and
checking the pom.xml files to see if they match the GAV for the
dependency.
This approach only works for 1 person projects since you will not see the latest versions from other people. As your number of projects grows and parts of your code becomes stable it makes Eclipse gradually slow down since you have to keep your "finished" projects open. During the build, Eclipse has to look into each POM to see if it matches the GAV.
If you use Eclipse heavily for multiple projects and uses, this can grow.

It has other issues that come into play if you go beyond a single person or you actually finish a version and want to support it while you work on the next version.

OTOH, it does work well and Eclipse and Maven have no trouble finding dependencies in the workspace if they are properly specified with the correct GAV.

Ron

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to