maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curtis Rueden <ctrue...@wisc.edu>
Subject Re: how to exclude log4j.properties when mvn assembly:single?
Date Fri, 04 Apr 2014 18:27:54 GMT
Hi Li,

> seems very complicated

Well, assembly makes the simple easy, and the difficult possible. That is,
if all you want is to lump some JARs together, you can use the
preconfigured assembly descriptor. But as soon as you want to do something
custom, you have to create a custom descriptor. It takes a little while to
wrap your head around (I hated the assembly plugin at first) but once you
get into it, it is pretty powerful.

> where shoud I put this file?

You can put the file wherever you want. You configure its location in the
POM.

Here is a project with several assembly examples:
https://github.com/imagej/imagej/tree/imagej-2.0.0-beta-7.8/app

Regards,
Curtis


On Thu, Apr 3, 2014 at 9:15 PM, Li Li <fancyerii@gmail.com> wrote:

> seems very complicated, where shoud I put this file?
>
> On Fri, Apr 4, 2014 at 10:08 AM, Curtis Rueden <ctrueden@wisc.edu> wrote:
> > Hi Li,
> >
> >> the log4j.properties is included in my application.
> >> how to exclude it?
> >
> > Did you try with a custom assembly descriptor, and put the file in an
> > <exclude> inside a <fileSet>?
> >
> > https://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
> >
> > Regards,
> > Curtis
> >
> >
> > On Thu, Apr 3, 2014 at 4:24 AM, Li Li <fancyerii@gmail.com> wrote:
> >
> >> I want to jar my program with all the dependencies. I have a
> >> dependency of hadoop. the log4j.properties is included in my
> >> application.
> >> how to exclude it?
> >> I have tried this but no luck
> >>
> >> <artifactId>maven-assembly-plugin</artifactId>
> >>    <configuration>
> >>      <excludes>
> >>      <exclude>**/log4j.properties</exclude>
> >>      </excludes>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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