I only have one file in the resource directory called
db-config.properties.  Its content is as follows:

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}

Thanks again for the help,

Dennis.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 6:34 PM
To: Maven Users List
Cc: users@maven.apache.org
Subject: Re: [M2]How to use filtering with build profiles?


Dear Dennis,
   What files in your resource directory? Can u give us a resource file?







thanks.
Tel: (020)36315358-328 Fax: (020)36315170


 

                      "Dennis Ho"

                      <[EMAIL PROTECTED]        To:
<users@maven.apache.org>

                      om>                      cc:

                                               Subject:  [M2]How to use
filtering with build profiles?                                 
                      22/11/2005 10:18

                      Please respond to

                      "Maven Users

                      List"

 

 





Hi,

             I am trying to use filtering to filter different properties
file
based on whether the profile is for myself, or dev, per say.   An
abstract of my pom looks like the following:

<project>
:
:
<build>
                         <resources>
                                     <resource>

<directory>src/main/resources</directory>

<filtering>true</filtering>
                                     </resource>
                         </resources>
                         <filters>
                                     <filter>${my.filter.value}</filter>
                         </filters>
             </build>
<profiles>
                         <profile>
                                     <id>env-dho</id>
                                     <activation>
                                                 <property>

<name>env</name>

<value>dho</value>
                                                 </property>
                                     </activation>

                                     <properties>

<my.filter.value>src/main/filters/env-dho/filter.properties</my.filter.v
alue>

<db.username>test</db.username>
                                     </properties>
                         </profile>
                         <profile>
                                     <id>env-dev</id>
                                     <activation>

<activeByDefault>true</activeByDefault>
                                     </activation>

                                     <properties>

<my.filter.value>src/main/filters/env-dev/filter.properties</my.filter.v
alue>
                                     </properties>
                         </profile>
             </profiles>
</project>

             But after running mvn -Denv=dho process-resources, the
file's
properties didn't get filtered.  The file just got copied over.  What
have I done wrong?

The file in the resources directory looks like, which after running
process-resources remains unchanged:

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=host
db.name=dbname
db.username=user
db.password=password
db.port=1433

Thanks,

Dennis Ho
Senior Java Developer
PaymentOne
. : Office - 408.362.4237
. : www.paymentone.com     . : [EMAIL PROTECTED]
. : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . : .
. : Connecting Digital Merchants and Network Operators
. : Named One of Forbes "Top Ten to Watch in 2005"


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


Hactl..........Moving forward with you.

Best Air Cargo Terminal - Asia 2005
Air Cargo Terminal of the Year 2002, 2003 & 2004

Web: http://www.hactl.com

DISCLAIMER :-
The information contained in this message, including any attachment, is
confidential and may also be privileged. The information is intended
only
for the person or entity to which it is addressed. Any review,
re-transmission, copying, storage, distribution or other use or
disclosure
of this information by persons or entities other than the intended
recipient is prohibited. If you are not the intended recipient, please
contact the sender immediately by return email and delete this message
from
your system. Thank you.




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
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