you can configure maven-compiler-plugin to exclude your unwanted packages or
files to be compiled in the first place.  But you will not be able to
prevent javac  to compile those files
if they are
referenced by other packages within the source tree.  To prevent that, you
will need to use
antrun plugin ( or write your own custom plugin), bind it to compile phase,
and remove unwanted
classes in ${project.build.directory}/classes

If possible, just move those pacakges/files to another source tree to be
come another project.

-D


On 12/22/05, Gisbert Amm <[EMAIL PROTECTED]> wrote:
>
> maven.jar.excludes for Maven 1
> (http://maven.apache.org/maven-1.x/reference/plugins/jar/properties.html)
>
> For Maven 2 I don't know (yet).
>
> -Gisbert
>
> Alexander Hars wrote:
> > Hi,
> >
> > I am trying to exclude some packages of my source tree from the
> > automatically generated jar file. Is that possible?
> >
> > For example, if I have the following source tree
> >
> > +- src/                    |
> >   +- main/
> >      +- java/
> >         +- com/
> >            +- mycompany/
> >               +- package1/
> >               |   +- ...               |
> >               +- package2/
> >               |   +- ...               |
> >               +- package3/
> >               |   +- ...               |
> >
> >
> > Is there a way to exclude all files from package3 or a specific file
> > from package3 in my jar file?
> > Thanks,
> >
> > -Alexander
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --
> Gisbert Amm
> Softwareentwickler Infrastruktur
>
> WEB.DE GmbH
> Amalienbadstraße 41 · D-76227 Karlsruhe
> Tel. +49-721-94329-8530 · Fax +49-721-94329-22
> [EMAIL PROTECTED] · http://www.web.de/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to