maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Edelson <justinedel...@gmail.com>
Subject Re: Error using <dependencyManagement> element in <profile>
Date Mon, 14 Dec 2009 15:10:05 GMT
It needs to be
<dependencyManagement>
*  <dependencies>*
    <dependency>
         <groupId>org.datanucleus</groupId>
         <artifactId>datanucleus-core</artifactId>
         <version>2.0.0-m4</version>
    ...more...
    </dependency>
 * </dependencies>*
</dependencyManagement>

See
http://maven.apache.org/ref/2.2.1/maven-model/maven.html#class_dependencyManagement

<http://maven.apache.org/ref/2.2.1/maven-model/maven.html#class_dependencyManagement>
Justin

On Mon, Dec 14, 2009 at 10:03 AM, Matthew Adams <matthew@matthewadams.me>wrote:

> Hi all,
>
> I'm trying to support different JPA implementations in my build.
>
> According to
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html,
> I can specify the <dependencyManagement> element in a build profile.
> However, when I do, I get a POM parse error with the following error
> reason:
>
> Reason: Parse error reading POM. Reason: Unrecognised tag:
> 'dependency' (position: START_TAG seen
> ...<dependencyManagement>\r\n\t\t\t\t<dependency>... @329:17)  for
> project
>
> Here's the relevant portion from my root pom:
>
>            <profiles>
>                <profile>
>                        <id>datanucleus</id>
>                        <activation>
>                                <activeByDefault>true</activeByDefault>
>                        </activation>
>                        <properties>
>                                <jpa.impl>datanucleus</jpa.impl>
>                        </properties>
>                        <dependencyManagement>
>                                <dependency>
>                                        <groupId>org.datanucleus</groupId>
>
>  <artifactId>datanucleus-core</artifactId>
>                                        <version>2.0.0-m4</version>
>                                </dependency>
>                                ...
>                        </dependencyManagement>
>                </profile>
>                ...
>
> What am I doing wrong?
>
> Thanks in advance,
> Matthew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message