mraible wrote:
>
> I would try it and see how it works.
>
I tried it, placing the jdbc MySql properties into their own
<profile/> element and placing an <activation/> element in my
chosen default profile (Derby):
<profile>
<id>derby</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
...
</properties>
</profile>
When running Maven, that resulted in the error:
Validation Messages:
[0] 'dependencies.dependency.artifactId' with value
'${jdbc.artifactId}' does not match a valid id pattern.
[1] 'dependencies.dependency.groupId' with value '${jdbc.groupId}' does
not match a valid id pattern.
Reason: Failed to validate POM for project com.getpepper.testapp:testapp at
/home/paul/src/testapp/pom.xml
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM for
project com.getpepper.testapp:testapp at /home/paul/src/testapp/pom.xml
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:376)
...
I also tried replacing the original MySql properties with the properties
from the Derby <profile>, but got the following error when running
Maven:
$ mvn jetty:run-war
...
ERROR [main] SchemaExport.execute(202) | schema export unsuccessful
java.sql.SQLTransientConnectionException: java.net.ConnectException : Error
connecting to server localhost on port 1527 with message Connection refused.
at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown
Source)
...
[INFO] One or more required plugin parameters are invalid/missing for
'dbunit:operation'
[0] Inside the definition for plugin 'dbunit-maven-plugin' specify the
following:
<configuration>
...
<type>VALUE</type>
</configuration>
-OR-
on the command line, specify: '-Ddbunit.operation.type=VALUE'
...
I'm new to Maven, so it's off to read the sonatype book... Suggestions on
how to resolve these problems would be welcome, though!
Paul.
--
View this message in context:
http://www.nabble.com/Database-profiles-tp19397846s2369p19401340.html
Sent from the AppFuse - User mailing list archive at Nabble.com.