maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Combining dependency with related/required build step
Date Fri, 10 Aug 2018 14:46:55 GMT
On Fri, Aug 10, 2018 at 11:56 AM DariusGmail <dariuscooper@gmail.com> wrote:

> We have a JAR that is a dependency for many WARs.  In turn, this JAR has
> dependencies on some DB2 JARs.
>
> Any POM using this JAR also needs to copy some DB2-related files to a
> place under the target directory. We do this by using
> maven-resources-plugin
>
> Is there a way to have that build step done "automatically" whenever the
> JAR dependency is declared?
>

No, it's not.

The best way to handle this is to always read resources from the classpath.
So then you just need to contain these DB2-related files in a jar and add
that jar to the classpath (i.e. add a dependency).

/Anders


>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message