Следующая зависимость является частью моего файла pom.xml, и при выборе соответствующего профиля базы данных в моем profiles.xml эти значения подставляются правильноСледующее определение работало на Maven 2.2.1 и перестало работать после миграции на Maven 3.0.2.Как решить эту проблему?
<dependency>
<groupId>${db.groupId}</groupId>
<artifactId>${db.artifactId}</artifactId>
<version>${db.driver.version}</version>
<scope>test</scope>
</dependency>
<profile>
<id>h2</id>
<properties>
<db.groupId>${db.h2.groupId}</db.groupId>
<db.artifactId>${db.h2.artifactId}</db.artifactId>
<db.type>h2</db.type> <db.driver.version>${db.h2.driver.version</db.driver.version>
<db.driver>${db.h2.driver}</db.driver>
</properties>
</profile>
ОШИБКА
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plex
us.core, parent: null]
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encou
ntered while processing the POMs:
[WARNING] The expression ${pom.url} is deprecated. Please use ${project.url
} instead. @
[ERROR] 'dependencyManagement.dependencies.dependency.artifactId' for ${db.
groupId}:${db.artifactId}:jar with value '${db.artifactId}' does not match
a valid id pattern. @ line 2488, column 29
[ERROR] 'dependencyManagement.dependencies.dependency.groupId' for ${db.gro
upId}:${db.artifactId}:jar with value '${db.groupId}' does not match a vali
d id pattern. @ line 2487, column 26
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProj
ectBuilder.java:325)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:
632)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(Default
Maven.java:581)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
Impl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
AccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launche
r.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCo
de(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.
java:352)