Doug Hughes wrote:

> I have some questions about how dependencies are handled within Maven.  I
> understand that when you add a dependency that Maven looks at the central
> repository, finds the correct files and downloads them.  I'm wondering if
> this can only be done for JAR/WAR files?

No, any artifact from your build can be deployed into a maven
repository. The maven-rpm-plugin for example creates an RPM file as an
artifact, and the maven deploy step will deploy the RPM into a
repository, it doesn't have to be a jar or a war (or an ear, or whatever).

> My question then is, is it possible to somehow define a dependency which is
> a collection of files?

Yes, group the files together into some kind of archive (zip is good, or
jar seeing we are in the java universe), and then deploy that.

> Also, if I did somehow define that dependency, is
> there a way to make sure that the dependency is coppied to a specific
> directory within he webapp?

Yes.

The maven-dependency-plugin can be asked to unpack directories and put
them in certain places during your build.

Alternatively, for more general purpose stuff, the maven-assembly-plugin
can be used to produce an "assembly" of multiple things combined into a
single tree.

Regards,
Graham
--

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to