In my Maven assembly, I would like to be able to define default values โโ(for example, to connect to the database) in pom.xml, but I would like the user to be able to override them without having to change them directly pom.xml.
As an example, in the Ant assembly, you can define the default properties in foo.properties, but Ant will look for overrides for each of them in foo.$USERNAME.properties. The latter, as a rule, is not checked for initial control, which eliminates the problem when developers accidentally fix their default property overrides. Does Maven have a similar object?
To make the problem more specific, suppose I have the following definition in pom.xml
<properties>
<db.url>jdbc:jtds:sqlserver://10.10.10.10:1433/somedb</db.url>
<db.driver>net.sourceforge.jtds.jdbc.Driver</db.driver>
<db.username>default_user</db.username>
<db.password>secret</db.password>
</properties>
Can a user override these properties without directly editing pom.xml?
source
share