i'ld file it in jira, seems like enough people have tried to use it without success.
Jorg On 5/19/06, Mark Hobson <[EMAIL PROTECTED]> wrote:
Any update on this? I'm getting a similar problem with filtered webapp resources not expanding ${project.xxx} properties. Cheers, Mark On 17/05/06, Kris Nuttycombe <[EMAIL PROTECTED]> wrote: > Is there a reason why the common functionality can't be factored out of > the resources plugin so that there isn't code duplication between war > and resources? I hate to see copy-and-paste coding in a situation like this. > > Kris > > Jorg Heymans wrote: > > > This is something i couldn't get to work either. > > > > A brief look at the code reveils that it's doing exactly the same as the > > resources plugin to get the project properties, so i'm wondering if > > this is > > not working for normal resources as well. > > > > private Properties getBuildFilterProperties() > > throws MojoExecutionException > > { > > // System properties > > Properties filterProperties = new Properties( > > System.getProperties() ); > > > > // Project properties > > filterProperties.putAll( project.getProperties() ); > > > > for ( Iterator i = filters.iterator(); i.hasNext(); ) > > { > > String filtersfile = (String) i.next(); > > > > try > > { > > Properties properties = > > PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true ); > > > > filterProperties.putAll( properties ); > > } > > catch ( IOException e ) > > { > > throw new MojoExecutionException( "Error loading > > property file '" + filtersfile + "'", e ); > > } > > } > > return filterProperties; > > } > > > > > > > > On 5/16/06, Julian Wood <[EMAIL PROTECTED]> wrote: > > > >> > >> Yes that works. The only mod I had to make was adding a filter file. > >> > >> http://jira.codehaus.org/browse/MWAR-12 > >> > >> shows the filters in the configuration element of the maven-war- > >> plugin, which _doesn't_ work. Moving the filters element up to be a > >> child of the build element is the necessary fix. > >> > >> There would still appear to be a problem though - how can you get > >> access to, say, ${project.version}. It would seem you would need to > >> take a resource, filter it normally, then use the filtered resource > >> as the filter file for the war plugin. Or how can you access a > >> property set in a profile? These should all be available for > >> filtering, and we shouldn't need to specify a filter file, if we want > >> to be consistent with regular resource filtering. > >> > >> Should I file a JIRA issue, or are there more hidden gems that I'm > >> missing? > >> > >> Thanks, > >> > >> J > >> > >> > >> On 16-May-06, at 2:14 AM, Jorg Heymans wrote: > >> > >> > You need to make sure you add a filter. Below config works file for > >> > me. > >> > > >> > <build> > >> > <filters> > >> > <filter>your filter file here</filter> > >> > </filters> > >> > <plugins> > >> > <plugin> > >> > <groupId>org.apache.maven.plugins</groupId> > >> > <artifactId>maven-war-plugin</artifactId> > >> > ... > >> > </plugin> > >> > </plugins> > >> > </build> > >> > >> -- > >> Julian Wood <[EMAIL PROTECTED]> > >> > >> Software Engineer > >> Teaching & Learning Centre > >> University of Calgary > >> > >> http://tlc.ucalgary.ca > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]