A few weeks of struggling with Maven on my end, and we have an
ability to test 3.0 using the old "-Dcayenne.test.connection=" setup.
The only catch - such property would also activate a profile that
enables the right JDBC driver. So only a preset combination of
profile names can be used (but of course each one of them can be
locally mapped to the database that you care about via ~/.cayenne/
connection.properties).
I added mysql, oracle, postgresql and derby profiles (and of course
the default embedded HSQLDB) to the <profiles> section of the root
POM. Feel free to add more (I'd say we may need at least one per
Cayenne adapter). The trick when adding a profile is to find the
Maven coordinates of the right driver. Commercial drivers not
available from public Maven repos will have to be installed manually,
but we can still assign some dummy maven name to them (like I did for
Oracle).
Example:
cd cayenne/
mvn -Dcayenne.test.connection=mysql clean install
Andrus
On Dec 13, 2006, at 10:21 PM, Tore Halset wrote:
> Hello.
>
> I am strugeling with maven.
>
> cd core/cayenne-jdk1.4
> mvn -Dcayenne.test.connection=mysetup
> ....
> Dec 13, 2006 9:20:34 PM org.apache.cayenne.unit.CayenneResources
> setupTestDir
> INFO: No property 'cayenne.test.dir' set. Using default directory:
> 'target/testr
> un'
> Dec 13, 2006 9:20:34 PM org.apache.cayenne.unit.CayenneResources
> loadResources
> INFO: No connection key property set 'cayenne.test.connection',
> using default: i
> nternal_embedded_datasource
> ....
>
> So how should I specify my own connection properties?
>
> - Tore.
>
This archive was generated by hypermail 2.0.0 : Fri Jan 05 2007 - 08:24:32 EST