You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tony Steele <to...@bbc.co.uk> on 2005/09/23 12:01:31 UTC

[m2] Filtering problems in Beta

When I upgraded to the beta version, the filtering of resources
specified in my pom stopped working. 
I found this on jira http://jira.codehaus.org/browse/MNG-788  which
indicated that there had been improvements to resource filtering.

My filtering uses profiles and is set up as follows:

	<build>
		<plugins>
			<plugin>
	
<groupId>org.apache.maven.plugins</groupId>
	
<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<filtering>true</filtering>
	
<filterPropertiesFile>${resource.filter.file}</filterPropertiesFile>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
		  <id>live</id>
		  <properties>
	
<resource.filter.file>${basedir}/conf/${project.artifactId}-live.propert
ies</resource.filter.file>
		  </properties>
		</profile>
		<profile>
		  <id>pcdev</id>
		  <properties>
	
<resource.filter.file>${basedir}/conf/${project.artifactId}-pcdev.proper
ties</resource.filter.file>
		  </properties>
		</profile>
		<profile>
		  <id>uat</id>
		  <properties>
	
<resource.filter.file>${basedir}/conf/${project.artifactId}-uat.properti
es</resource.filter.file>
		  </properties>
		</profile>
	</profiles>

I have tried removing the profiles, and specified the
filterPropertiesFile directly, but is still does not work.

Any idea what changes could have stopped the above working.
Tony Steele


http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

Re: [m2] Filtering problems in Beta

Posted by Andrius Karpavicius <An...@sintagma.lt>.
Hi,

Add <filtering>true</filtering> parameter in resources descriptor

  <build>
    <resources>
      <resource>
        <targetPath>../filtered-webapp-resources</targetPath>
        <filtering>true</filtering>
        <directory>${basedir}/src/main/webapp</directory>
      </resource>

    </resources>

Andrius




"Tony Steele" <to...@bbc.co.uk> 
2005.09.23 13:01
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
<us...@maven.apache.org>
cc

Subject
[m2] Filtering problems in Beta






When I upgraded to the beta version, the filtering of resources
specified in my pom stopped working. 
I found this on jira http://jira.codehaus.org/browse/MNG-788  which
indicated that there had been improvements to resource filtering.

My filtering uses profiles and is set up as follows:

                 <build>
                                 <plugins>
                                                 <plugin>
 
<groupId>org.apache.maven.plugins</groupId>
 
<artifactId>maven-resources-plugin</artifactId>
 <configuration>
  <filtering>true</filtering>
 
<filterPropertiesFile>${resource.filter.file}</filterPropertiesFile>
 </configuration>
                                                 </plugin>
                                 </plugins>
                 </build>

                 <profiles>
                                 <profile>
                                   <id>live</id>
                                   <properties>
 
<resource.filter.file>${basedir}/conf/${project.artifactId}-live.propert
ies</resource.filter.file>
                                   </properties>
                                 </profile>
                                 <profile>
                                   <id>pcdev</id>
                                   <properties>
 
<resource.filter.file>${basedir}/conf/${project.artifactId}-pcdev.proper
ties</resource.filter.file>
                                   </properties>
                                 </profile>
                                 <profile>
                                   <id>uat</id>
                                   <properties>
 
<resource.filter.file>${basedir}/conf/${project.artifactId}-uat.properti
es</resource.filter.file>
                                   </properties>
                                 </profile>
                 </profiles>

I have tried removing the profiles, and specified the
filterPropertiesFile directly, but is still does not work.

Any idea what changes could have stopped the above working.
Tony Steele


http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org