Per Abich wrote:
Hello,
I am trying to retrieve a list of dependencies for all the artifacts
that I have included in my project.
The goal is, to get all those files, copy them into a specific location
and then zip them together to obtain "single-file-install" which is
deployable without any further dependencies.
I have tried to simply get the *.pom - files and get their dependencies,
but so far, I have failed to do this.
The way I have gone, was like the following:
<j:forEach var="lib" items="${pom.artifacts}">
<ant:copy todir="${distDir}/lib" file="${lib.path}" />
</j:forEach>
the above works, but only allows me to copy the DIRECT dependencies
which I have specified in the project.xml.
But how do I get to copy all the dependencies of my dependencies into my
${distDir}/lib folder?
Does anyone have a solution for this?
Best Regards
Per Abich
Catenic AG
Per,
I solved the problem of identifying all required dependent jars when
coding projects that made use of Hibernate by creating a hierarchy of
project.xml files and using the <extend> tag to connect them. I stored
the parent POMs in my ${maven.repo.local} and referenced the direct
parent POM in the project's POM. I used a base POM for the jakarta
commons and other standard jars, and then I added a POM that contained
the direct dependencies needed by Hibernate.
That will allow you to build a complete list of the dependencies and
increase reusability.
To bundle everything together in 1 artifact you might want to look at
the Maven uberjar plugin. It was designed to build a jarfile that
contains dependent jarfiles.
http://maven.apache.org/reference/plugins/uberjar/index.html
Hope that this helps
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]