Create a POM that you use as a parent to both. If you build this POM, the 
eclipse=plugin for Maven will automatically add project B as a dependency in 
A. And it will add it as Eclipse project-dependencies, not as 
JAR-dependencies.

Small example:

<project>
        <groupId>some.thing</groupId>
        <artifactId>eclipse-master-pom</artifactId>
        <version>unversioned</version>
        <modules>
                <module>../project-a</module>
                <module>../project-b</module>
        </modules>
</project>



On Thursday 08 November 2007 16:44, lightbulb432 wrote:
> Is it possible to specify, as a dependency, another Java project within
> Eclipse? If I have project A that depends on project B and both are
> Maven-managed projects, my current options are as follows:
> - package and install project B everytime it changes, then run mvn
> eclipse:eclipse of project A to point to the latest version of project B -
> the problem being that this is inefficient
> - within Eclipse, simply add project B as a dependency of project A - the
> problem being that I must do this everytime I update any dependency of
> project A must re-run eclipse:eclipse, which overwrites the .classpath file
>
> Is there a way of adding, in the dependency element, a reference to another
> Eclipse project so that running eclipse:eclipse points to the Eclipse
> workspace version of another project?
>
> Thanks.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to