On Dec 26, 2008, at 4:11 PM, Maarten Storm wrote:

Hello,
The reason why I would like to add dependencies programmaticaly is the
following: In my open source project I have 3 subprojects that do not
share the same parent pom. I'm working on a new packaging strategy
called dpom. This Dependency Pom is just like a normal pom but it
synchronized project links in the site.xml of the 3 subprojects. This
allows me to make a overall site for projects that do not share the
same parent pom.

I'm working now at a company that has the same problem that I have
within my open source project. They have about 15 huge projects (over
20 man years per project) and the would like to monitor the
dependencies over all these project without interfering them (share
the same parent). The idea behind this is that ew can make a list in
the configuration for all the parent projects and generating an
overlal website. The dependency report will give all the transitive
dependencies of all the projects so the can monitor that. I am working
a a specialized dependency tree that will make a cross references
where the dependencies are used.

So the steps I would like to program are:

1: Read the every pom in the list of the configuration form a repository.
2: Analyze every pom for dependencies.
3: Add these new found dependencies to the dpom project ( and remember
where it's origine (dpom report)).

I hope this helps. The DPOM packaging is not used for normal maven
this like jar/ear/war etc., it is only meant for site generation.
I hope you can help me with step 2 en 3.


If all you want to do is create a report then I would create a plugin to capture the dependencies and run it against each project. Some variation of the dependency plugin that just saves the data in some format would probably do. Then have a second goal in that plugin that generates the report from all the data that was captured.

I'm not sure what good it would do to add dependencies as you are suggesting. In doing so, if any of the projects use different versions of the same artifacts you are going to try to inject both into the your dpom project which is not going to result in anything that makes you very happy.

If you really want to synchronize dependencies then use the import scope as Brian has already suggested. It was created exactly for that purpose.

Ralph


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

Reply via email to