You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by Jerome Lacoste <je...@coffeebreaks.org> on 2004/06/11 05:56:41 UTC

Maven2 use cases: Easy project setup: extension to dependencies

Hi,

Proposing an extension to an existing use case: "Easy project setup".

I may be wrong, but maven1 has the following limitation: project
dependencies are artifacts, and there's no automatic way to link it to
artifacts sources.

I want to be able to setup the development environment for the project,
and also be able to work with the sources of the other projects. I see
at least 2 uses cases for that:


- setup of full development environment. When you try to work on maven,
there are sometimes so many dependencies that the issue may be in one of
the dependencies. Having a way to download all or at least selected
sources might be interesting

a use case might be

maven2 dependency:source -Ddependency=<groupdId.artifcatId>

This would result in the retrieval of the specified dependency in the
${maven.projects.sourcesdir} location.

[A better goal name should be found.]


- setup of full source distribution, either automatically retrieving the
sources, or by just packaging the sources that can be found on a
repository. This is perhaps required by Open Source
projects/distributions. 

Or maybe this second point should be enforced by saying that a
repository should also contain the sources when an artifact is Open
Source. Regarding that point, there are other things where maven could
help to check and report the licensing of the underlying dependencies.
That's another thing I would like to discuss. Probably in another
thread.


In terms of implementation, one can add fields to the dependency node. 
E.g. 
<dependency>
  [...]
  <source>
    <scm>...</scm>
    <project>http://.....</project>
    <jar></jar>  <!-- could assume a ${artifact}-src-${version}.jar file
in the same repository-->
  </source>
</dependency>


Please discuss this and let's see if we should add that to the wiki's
use cases.

Jerome