Filtering Java files? Sounds like a recipe for disaster to me... What are you trying to do that can't be done by reading properties from an external resource file? The only thing I can think of is JDK specific code, but most people solve this by abstracting it to separate classes and conditionally including it in the project.
Cheers, Brett -- Brett Porter Developer, Content & Distribution f2 network ~ everything essential -----Original Message----- From: Michal Maczka [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 July 2003 6:59 AM To: Maven Users List Subject: RE: Hoto use filters before compilation in Maven > -----Original Message----- > From: Jo�l Wijngaarde [Us Media] [mailto:[EMAIL PROTECTED] > Sent: Monday, July 21, 2003 1:27 PM > To: 'Maven Users List' > Subject: Hoto use filters before compilation in Maven > > > Hi, > > I'm building a web application for a client. During testing we deploy > the application on a staging server. There are some slight differences > between the configuration of the staging server and the live > environment. Mainly the 'web.xml' and the 'log4j.xml' files, but also > some slight differences in the .java files. > > In ant we can use the filter tag to perform some changes. We first > copy the class files to a new folder using a filter rule and then > compile the filtered classes. > > Is there a 'standard' way of doing something similar in maven. Or does > it require creating 'pre-goals' in a 'maven.xml' file? How I could use > filtering inside a maven project? > > I will try to add the answers received here in the maven wiki at: > http://wiki.codehaus.org/maven/CreatingWebApplications > > Currently in Maven you can do filtering of "resources". see: http://maven.apache.org/reference/project-descriptor.html#resources You cannot do this with Java classes (unless you do will create pre-goals). Michal --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
