On 17 Feb 07, at 1:35 PM 17 Feb 07, thuss2 wrote:
We're in the process of migrating from Maven 1 to Maven 2 so we'd
prefer to
leave the actual database connection in a database.properties file and
reference those values in the pom. However, as far as I can tell
you can
only hard code properties in the properties section of the POM, you
can't
tell it to read properties from a .properties file?!
No. The reasoning being we want the POM to be the single source of
information which is why we got rid of the pom.properties file and
trying to sync all the various files presented some difficulty so now
all we move around is the POM.
You can still have a plugin pull from a properties file if you like,
and you can specify profiles which define different properties for
different scenerios. As much as possible we've made it so that
external sources of information don't influence the POM. But we have
user settings and profiles.xml and warn strongly about their use in
making builds portable between users.
Jason.
Thanks,
Todd
--
http://gabrito.com
Wayne Fay wrote:
You can add properties directly into the pom.xml:
http://maven.apache.org/pom.html#Properties
I personally prefer to use profiles for this kind of thing, though.
Wayne
On 2/15/07, thuss2 <[EMAIL PROTECTED]> wrote:
We're in the process of migrating from Maven 1 to Maven 2.
Currently we
have
a database.properties file that contains all of our database
connection
information. Is there any easy to make those properties
accessible from
within pom.xml so that I can do:
<driver>${jdbc.driver_class}</driver>
I tried adding the property file in the filters section, however,
that
seems
to only make the properties accessible to specified resource
files within
the resource section. It does not seem to make the property
available for
use in pom.xml. Perhaps I'm missing something simple.
Thanks,
Todd
http://gabrito.com
--
View this message in context:
http://www.nabble.com/Making-properties-accessible-in-pom.xml-
tf3236898s177.html#a8996414
Sent from the Maven - Users mailing list archive at Nabble.com.
--------------------------------------------------------------------
-
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]
--
View this message in context: http://www.nabble.com/Making-
properties-accessible-in-pom.xml-tf3236898s177.html#a9022598
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]