Hi Brett,

        I actually commented out all my profiles and it still didn't
work.  

The following are the debug log, do I have an old version of plugin?

[DEBUG]   commons-io:commons-io:jar:1.0 (selected for runtime)
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-resources-plugin:2.0-beta-1:resources'
-->
[DEBUG]   (f) filterPropertiesFile =
C:\eclipseWorkspace\workspace\ivs-reports\filter.properties
[DEBUG]   (f) outputDirectory =
C:\eclipseWorkspace\workspace\ivs-reports\target\classes
[DEBUG]   (f) project = [EMAIL PROTECTED]
[DEBUG]   (f) resources = [EMAIL PROTECTED]
[DEBUG] -- end configuration --
[INFO] [resources:resources]
[INFO]
------------------------------------------------------------------------
-
---
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
-
---
[INFO] Total time: 1 second
[INFO] Finished at: Tue Nov 22 16:26:05 PST 2005
[INFO] Final Memory: 2M/5M
[INFO]
------------------------------------------------------------------------
-
---

Thanks,

Dennis.

-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 22, 2005 4:21 PM
To: Maven Users List
Subject: Re: [M2]How to use filtering with build profiles?

I think there is a confusing aspect that we may not have resolved and
did intend to fix: resources are not inherited. Given that, I think
that the profile may not be inheriting the resources.

I'd have to look back if we fixed it already, but does it work if you
include the whole section ithe profile, or does it work if there is no
profile at all?

- Brett

On 11/23/05, Dennis Ho <[EMAIL PROTECTED]> wrote:
> Thanks Greg,
>
>         I tried your solution but I am still having problems, the
> properties file just got copied over without any filtering.
>
>         I then changed my pom to:
> :
> <resources>
>   <resource>
>     <directory>src/main/resources</directory>
>     <filtering>true</filtering>
>   </resource>
> </resources>
> <filters>
>   <filter>src/main/filters/env-dho/filter.properties</filter>
> </filters>
> :
>
>         But the filtering still doesn't happen when I simply execute
> "mvn -e process-resources".  The db-config.properties file just gets
> copied over without any filtering.
>
>         My db-config.properties looks like:
>
> db.drivername=${db.drivername}
> db.urlscheme=${db.urlscheme}
> db.hostname=${db.hostname}
> db.name=${db.name}
> db.username=${db.username}
> db.password=${db.password}
> db.port=${db.port}
>
>         And my filter.properties looks like:
> db.drivername=com.inet.tds.TdsDriver
> db.urlscheme=jdbc:inetdae7:
> db.hostname=TESTDB01
> db.name=DBNAME
> db.username=user
> db.password=passwd
> db.port=1433
>
>         Did I specify the filter names wrong?
>
> Thanks,
>
> Dennis.
>
>
> -----Original Message-----
> From: Greg Case [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 22, 2005 11:28 AM
> To: Maven Users List
> Subject: Re: [M2]How to use filtering with build profiles?
>
> Dennis,
>
> I think what you want to do is move the <filters> definition into each
> profile itself, rather than referencing a property in the
"non-profiled"
> build. At least that's how I am doing it, and it works fine. Not sure
if
> it
> is best-practice or not... So your pom would like like this:
>
> <project>
> <build>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
> </build>
> <profiles>
> <profile>
> <id>env-dho</id>
> <activation>
> <property>
> <name>env</name>
> <value>dho</value>
> </property>
> </activation>
> <build>
> <filters>
> <filter>src/main/filters/env-dho/filter.properties</filter>
> </filters>
> </build>
> </profile>
> <profile>
> <id>env-dev</id>
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> <build>
> <filters>
> <filter>src/main/filters/env-dev/filter.properties</filter>
> </filters>
> </build>
> </profile>
> </profile
>
> Hope that helps,
>
> Greg Case
>
> ---------------------------------------------------------------------
> 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]

Reply via email to