You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Mark H. Wilkinson" <mh...@kremvax.net> on 2003/04/15 12:54:28 UTC

RE: POM (WAS cvs commit: maven/src/plugins-build/eclipse/xdocs changes.xml)

On Thu, 2003-04-10 at 10:14, michal.maczka wrote:
> > -----Original Message-----
> > From: Emmanuel Venisse [mailto:evenisse@ifrance.com]
> > Sent: Tuesday, April 08, 2003 4:28 PM
> > To: Maven Developers List
> > Subject: Rep:POM (WAS cvs commit: maven/src/plugins-build/eclipse/xdocs
> > changes.xml)
> >
> >
> > eclipse.dependency can be used if you have some dependency in your
> > sub-projects. eclipse.dependency is used only for eclipse project. If
> > you use an external api, you don't declare property for it.
> >
> 
> Got it: So it is actually for cross-project linking.
> Is there a chance to use it Maven's core POM?

I'm the one who came up with this modification to the eclipse plug-in,
and I was a bit surprised when it got checked into CVS - I was hoping
for some discussion about the best way to mark these kinds of dependency
first :-)

As Emmanuel explains, the aim of eclipse.dependency is to indicate that
two projects are sitting on the same machine and that the dependency
between them should be resolved by depending directly on the
target/classes directory in the project, rather than the project jar
file most recently installed in the maven repository. It was my reaction
to realising that maven currently tries to model dependencies between
jar files (sort of presuming a loose coupling between projects), while
eclipse makes it more natural to specify dependencies between projects
and works with the projects' source trees directly.

There are definitely better ways to implement this (i.e. ones that are
not Eclipse-specific). The main requirement is some way to indicate to
maven that a given dependency actually relates to another project
located somewhere on the same machine. One possibility would be to
register this information in the repository. For example:

        $ unzip common.zip
        $ cd common
        $ maven project:install # arbitrary name
        $ maven java:compile
        $ ls $MAVEN_HOME/repository/common
        location  poms
        $ cd ..
        $ unzip main.zip
        $ cd main
        $ maven java:compile

The project:install goal registers the location of a copy of a project's
source tree with the repository. Plugins could then use the fact that a
dependency has a location in the repository to deduce that it should
generate a dependency for the IDE, rather than using dependencies on jar
files.

I guess you could also use this information to automatically build
dependent projects without needing to explicitly list them to the
reactor, which might be nice.

All this builds on the assumption that a project and a dependency can be
made equivalent, which might also be a source of discussion!

-Mark.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org