I'm not sure what happened, but the POM for my project no longer works. Its complaining about the dependency element. Is it that the dependency no longer exists? What does this error mean? To be clear I haven't change the POM, it just does not work now.
The exact error message is cvc-complex-type.2.3: Element 'dependency' cannot have character (children), because this type's content type is element-only.
<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.medfusion</groupId> <artifactId>Estatements-core</artifactId> <version>14.6.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Estatements-core</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.6</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.group.id.Launcher1</mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.3.2</version> </plugin> </plugins> </build> <repositories> <repository> <id>nexus-qhg-dev</id> <name>Medfusion repo</name> <url>http://maven.qhg.local/nexus/content/groups/qhg-dev</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.intuit.health</groupId> <version>14.6.0-SNAPSHOT</version> <artifactId>notification-reference</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.intuit.health</groupId> <version>ihg-depot-trunk-SNAPSHOT</version> <artifactId>attachment-reference</artifactId> </dependency> <dependency> <groupId>com.intuit.health</groupId> <version>ihg-depot-trunk-SNAPSHOT</version> <artifactId>eCommunication-core</artifactId> </dependency> </dependencies> </project>
As mentioned in the comment by Powerlord, this error is due to incorrect parsing of the XML file, because there are strange and hidden characters in between a/some <dependency>...</dependency>
tag(s). Those characters could come from a copy paste from the Web.
To solve the issue, remove all spaces and newline characters between <dependency>...</dependency>
tags definitions and put them back into your editor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With