Since there's been no answers to this question, I'll assume the answer is
"No, it's not possible to use settings.xml to have application-specific
properties."
Matt
mraible wrote:
>
> I have a number of properties for database settings in my root pom.xml:
>
> <!-- Database settings -->
>
> <dbunit.dataTypeFactoryName>org.dbunit.dataset.datatype.DefaultDataTypeFactory</dbunit.dataTypeFactoryName>
> <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
>
> <hibernate.dialect>org.hibernate.dialect.MySQLInnoDBDialect</hibernate.dialect>
> <jdbc.groupId>mysql</jdbc.groupId>
> <jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
> <jdbc.version>5.0.3</jdbc.version>
> <jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName>
>
> <jdbc.url><![CDATA[jdbc:mysql://localhost/tutorial?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8]]></jdbc.url>
> <jdbc.username>root</jdbc.username>
> <jdbc.password></jdbc.password>
>
> This works great when I have a single project. However, I've started to
> develop two applications with this setup, and I need to locally override
> the jdbc.url for one of my projects. Is it possible to do this on an
> application-specific basis w/o affecting both applications. AFAIK,
> settings.xml doesn't have anything fancy like (does it?):
>
> <activation>
> <property>
> <name>${pom.artifactId}</name>
> <value>projecttoactivatefor</value>
> </property>
> </activation>
>
> With Ant, I was able to accomplish this using:
>
> <!-- Load user overrides -->
> <property file="${user.home}/.${ant.project.name}-build.properties"/>
> <property file="${user.home}/.build.properties"/>
> <property file="build.properties"/>
>
> Thanks,
>
> Matt
>
--
View this message in context:
http://www.nabble.com/Is-it-possible-to-have-application-specific-properties-in-settings.xml--tf3363611s177.html#a9441555
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]