Thank you. It's working perfectly now. Now, how would I go about trying to improve the documentation? I thought that it should either have a note explicitly mentioning that the resources section does not go in a plugin block, or the first pom.xml should have the ellipses removes, and it should be listed as a complete example.
On Jun 10, 2012, at 4:26 AM, Jason van Zyl wrote: > Ah, I see. Yes, if you've looked at other plugin configuration examples the > ellipses in this example might be construed as a plugin block as well. > > The full literal block to filter is like this: > > <project> > <!-- All your other POM configuration --> > <build> > <resources> > <resource> > <directory>src/main/resources</directory> > <filtering>true</filtering> > </resource> > </resources> > </build> > </project> > > On Jun 9, 2012, at 11:02 PM, Patrick wrote: > >> Sorry, but I must be missing something. I'd already read through that many >> times, and that's how I got this. I thought I showed you how I was >> configuring it in the POM itself. I would assume the confusion is caused by >> all those "..." sections which REALLY make the example unclear. >> >> On Jun 9, 2012, at 6:53 PM, Jason van Zyl wrote: >> >>> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html >>> >>> Note that filtering resources is one of the special plugins that is >>> configured in the POM itself. >>> >>> On Jun 9, 2012, at 9:11 PM, Patrick wrote: >>> >>>> I can't get the Maven resources plugin to filter. Any advice? I've >>>> looked through the documentation, but I can't find any complete examples. >>>> Below it what I've managed to piece together, but it doesn't work. >>>> >>>> ./pom.xml: >>>> <project xmlns="http://maven.apache.org/POM/4.0.0" >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >>>> http://maven.apache.org/xsd/maven-4.0.0.xsd"> >>>> <modelVersion>4.0.0</modelVersion> >>>> >>>> <name>seeingi-lib</name> >>>> <groupId>org.seeingi</groupId> >>>> <artifactId>seeingi-lib</artifactId> >>>> <version>1.0-SNAPSHOT</version> >>>> <packaging>jar</packaging> >>>> >>>> <build> >>>> <plugins> >>>> <plugin> >>>> <groupId>org.apache.maven.plugins</groupId> >>>> <artifactId>maven-resources-plugin</artifactId> >>>> <version>2.5</version> >>>> <configuration> >>>> <resources> >>>> <resource> >>>> <directory>src/main/resources</directory> >>>> <filtering>true</filtering> >>>> </resource> >>>> </resources> >>>> </configuration> >>>> </plugin> >>>> </plugins> >>>> </build> >>>> >>>> </project> >>>> >>>> >>>> ./src/main/resources/hello.txt: >>>> Hello @name@ >>>> Hello ${name} >>>> >>>> >>>> Expected at ./target/classes/hello.txt: >>>> Hello seeingi-lib >>>> Hello seeingi-lib >>>> >>>> >>>> Actual at ./target/classes/hello.txt: >>>> Hello @name@ >>>> Hello ${name} >>>> >>>> >>>> Notes: >>>> I've tested this on MacOS and windows. Windows I used Netbeans, and on >>>> MacOS I used "mvn install". (MacPorts version Apache Maven 3.0.3 >>>> (r1075438; 2011-02-28 09:31:09-0800) >>>> >>>> >>>> Does anyone what I'm doing wrong, or a working and complete example? >>> >>> Thanks, >>> >>> Jason >>> >>> ---------------------------------------------------------- >>> Jason van Zyl >>> Founder & CTO, Sonatype >>> Founder, Apache Maven >>> http://twitter.com/jvanzyl >>> --------------------------------------------------------- >>> >>> In short, man creates for himself a new religion of a rational >>> and technical order to justify his work and to be justified in it. >>> >>> -- Jacques Ellul, The Technological Society >>> >>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder & CTO, Sonatype > Founder, Apache Maven > http://twitter.com/jvanzyl > --------------------------------------------------------- > > What matters is not ideas, but the people who have them. Good people can fix > bad ideas, but good ideas can't save bad people. > > -- Paul Graham > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
