Re: How to exclude a package from compile
I think this solution could be helpful: http://maven.apache.org/plugins/maven-compiler-plugin/howto.html -- View this message in context: http://old.nabble.com/How-to-exclude-a-package-from-compile-tp21476236p26738402.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
SOLVED: How to exclude a package from compile
Thanks Justin, your answer was just what I needed! Actually - you have to configure the war plugin, but it uses the same syntax as the jar plugin. I now got: maven-war-plugin 2.1-alpha-2 false true true ${project.version} ${build.number} Thanks also for the hint of how to exclude classes - I wasn't even sure if I had to configure the compiler, jar or war plugin. With your hint, it now works! Thanks! Peter
RE: How to exclude a package from compile
Excluding the pom file can be done with this configuration of the jar plugin: false As for your java package question, I would suggest building this one package as a separate project and included it (and it's dependencies) into your development war through a profile. If you can't do this for some reason, then you would need to use the excludes configuration element of the compiler plugin. I think you tried this, but used the wrong syntax. AFAIK, paths for excludes are relative from the source root. Justin From: Peter Horlock [mailto:peter.horl...@googlemail.com] Sent: Sat 1/17/2009 5:30 AM To: Maven Users List Subject: Re: How to exclude a package from compile > I've got a java package (along with the jar dependencies it uses) that I do > not want to be added to the war file we send to our client. Also, I do not > want the pom.xml to be part of the war file. Actually, to be more precise, the best would be if all classes in the package would not even be compiled at all - this way I could also exclude the jar dependency this package uses. And of course, I also need a way to exclude the pom from the war file. Thanks in advance, Peter
Re: How to exclude a package from compile
what about the maven-war-plugins ? LieGrue, strub --- Dan Tran schrieb am Sa, 17.1.2009: > Von: Dan Tran > Betreff: Re: How to exclude a package from compile > An: "Maven Users List" > Datum: Samstag, 17. Januar 2009, 11:31 > Use truezip-maven-plugin to remove the unwanted contents > from the war > file at package phase > > -D > > On Sat, Jan 17, 2009 at 2:24 AM, Peter Horlock > wrote: > > 2009/1/16 Peter Horlock > > > > >> 009/1/15 Wayne Fay > >> > I've got a java package (along with the > jar dependencies it uses) that I > >> do > >> > not want to be added to the war file we send > to our client. Also, I do > >> not > >> > want the pom.xml to be part of the war file. > >> > > > > Does no one have a solution for this? I would be > really grateful if someone > > could give me a hint on this one... > > > > Thanks in advance, > > > > Peter - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to exclude a package from compile
Use truezip-maven-plugin to remove the unwanted contents from the war file at package phase -D On Sat, Jan 17, 2009 at 2:24 AM, Peter Horlock wrote: > 2009/1/16 Peter Horlock > >> 009/1/15 Wayne Fay >> > I've got a java package (along with the jar dependencies it uses) that I >> do >> > not want to be added to the war file we send to our client. Also, I do >> not >> > want the pom.xml to be part of the war file. >> > > Does no one have a solution for this? I would be really grateful if someone > could give me a hint on this one... > > Thanks in advance, > > Peter > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to exclude a package from compile
> I've got a java package (along with the jar dependencies it uses) that I do > not want to be added to the war file we send to our client. Also, I do not > want the pom.xml to be part of the war file. Actually, to be more precise, the best would be if all classes in the package would not even be compiled at all - this way I could also exclude the jar dependency this package uses. And of course, I also need a way to exclude the pom from the war file. Thanks in advance, Peter
Re: How to exclude a package from compile
2009/1/16 Peter Horlock > 009/1/15 Wayne Fay > > I've got a java package (along with the jar dependencies it uses) that I > do > > not want to be added to the war file we send to our client. Also, I do > not > > want the pom.xml to be part of the war file. > Does no one have a solution for this? I would be really grateful if someone could give me a hint on this one... Thanks in advance, Peter
Re: How to exclude a package from compile
009/1/15 Wayne Fay > I've got a java package (along with the jar dependencies it uses) that I do > not want to be added to the war file we send to our client. Also, I do not > want the pom.xml to be part of the war file. I would move the code in that java package and its dependencies out of the war to its own module, so you can manage its use more effectively. Wayne You mean I should move the code from the project to it's own project? For several reason (e.g. political) I can't do that. I need a way to filter the classes from the war file. Thanks, Peter
Re: How to exclude a package from compile
> I've got a java package (along with the jar dependencies it uses) that I do > not want to be added to the war file we send to our client. Also, I do not > want the pom.xml to be part of the war file. I would move the code in that java package and its dependencies out of the war to its own module, so you can manage its use more effectively. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to exclude a package from compile
Hi, I've got a java package (along with the jar dependencies it uses) that I do not want to be added to the war file we send to our client. Also, I do not want the pom.xml to be part of the war file. (This is the default, the devevelopment war file is build by using a profile). I tried this: ${basedir}/src/main/java/com/package1/package2/package3/** *.* ${basedir}/** pom.xml However, this doesn't work! :-( I also tried this: maven-compiler-plugin 2.0.2 ${javaVersion} ${javaVersion} ${basedir}/src/main/java/com/package1/package2/package3/** **/pom.xml However, this neither worked! :-( Last but not least - when I get this to work - I have a dependency that is only used by the package I want to remove anyway - so I can simply remove this dependency too, or how?? Thanks in advance! Peter