If I understand you correctly, you're right, the dependency object returned from the top-level POM won't get you the dependencies of that project. This makes sense if you remember that dependencies could be third-party JARs or a source-built project. The hack given below merely re-uses the name of the dependency to find the appropriate project.xml for that project and load it (via Reactor) into a variable that you can use.

--Alex

Paul Libbrecht wrote:

The thing I am not clear about is wether nested dependencies are expected to be present in project dependencies. From the unavailability of project.xml files in the repository, I sort of understand that it is the case...

Thanks.

Paul


Alex Vollmer wrote:


The only way I've figured out how to do this is take that dependency name and cobble-together a path to that project's 'project.xml' and then invoke it with the reactor tag with no 'goals' attribute specified, but with the 'postProcessing' tag set to 'true'. Then you can access the POM object of that project. For example...

<maven:forEach var="dependency" items="${pom.dependencies}">
<!-- Deploy each build component -->
<maven:reactor
basedir="${basedir}/../../"
includes="${dependency.name}/project.xml"
postProcessing="true"
banner="Deploying "/>
<maven:forEach var="reactorProject" items="${reactorProjects}">
<!-- Deploy component -->
<copy file="${maven.repo.local}/${pom.groupId}/jars/${reactorProject.artifactId}-${reactorProject.currentVersion}.jar"


tofile="${local.deploy.dir}/lib/${reactorProject.artifactId}.jar"/>
</maven:forEach>
</maven:forEach>


By setting 'postProcessing' to 'true' a special list named 'reactorProjects' is made available via the reactor tag. Hope that helps.

--Alex

Paul Libbrecht wrote:

Hi,

I fear this may have been answered or asked about already...
The current dependency object I get from jelly seems to be an object that does not provide me access to its project.


What should I use for this ?

Do I mistake or the dist goals don't walk dependencies of dependencies ?

For this, the project.xml of the dependendencies should be included in the repository which does not seem to be the case...



---------------------------------------------------------------------
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