Am Freitag, 5. Februar 2010 09:50:04 schrieb Søren Krogh Neigaard: > Im getting grey hairs :) > > I tried with this in my pom.xml: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.5</version> > <configuration> > <systemPropertyVariables> > <db.driver>oracle.jdbc.OracleDriver</db.driver> > <db.url>${database.url}</db.url> > <db.username>${database.username}</db.username> > <db.password>${database.password}</db.password> > </systemPropertyVariables> > </configuration> > </plugin>
That's almost exactly how I do it. The differences are: - I'm still using surefire 2.4.2 - Due to the older version I use the (now) deprecated method of defining system properties in surefire (<systemProperties> instead of <systemPropertyVariables>) How and where are you trying to access the properties? In some JUnit test which is executed by the maven surefire plugin via System.getProperty("db.url")? That definitely works for me. However, Stephen's comments about locking you to maven this way sounds reasonable. His approach is probably the better one. But I don't know yet how these properties could be used in pom.xml for plugin configuration. Do they get imported by maven somehow? hth, - martin
signature.asc
Description: This is a digitally signed message part.