dorukkangal
dorukkangal

Reputation: 41

Maven Invalid content was found starting with element 'packaging'

I am using an eclipse maven project with apache wicket. When I add wicket-examples dependency with tag to pom xml, I get an error :

cvc-complex-type.2.4.a: Invalid content was found starting with element 'packaging'. One of '{"http://maven.apache.org/POM/ 4.0.0":type, "http://maven.apache.org/POM/4.0.0":classifier, "http://maven.apache.org/POM/4.0.0":scope, "http://maven.apache.org/ POM/4.0.0":systemPath, "http://maven.apache.org/POM/4.0.0":exclusions, "http://maven.apache.org/POM/4.0.0":optional}' is expected.

POM.XML :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

<dependencies>
    <!-- WICKET DEPENDENCIES -->
    <dependency>
        <groupId>org.apache.wicket</groupId>
        <artifactId>wicket-examples</artifactId>
        <version>1.5.5</version>
        <packaging>war</packaging>
    </dependency>

...

Can you help me please?

Upvotes: 2

Views: 10650

Answers (1)

code_fish
code_fish

Reputation: 3428

Instead of 'packaging' use 'type'

    <dependency>
        <groupId>org.apache.wicket</groupId>
        <artifactId>wicket-examples</artifactId>
        <version>1.5.5</version>
        <type>war</type>
    </dependency>

Upvotes: 1

Related Questions