项目构建错误:不可解析的POM:预期START_TAG或END_TAG不是TEXT(位置:TEXT看到...... \ ufeff \ r \ n <d ... @ 28:7)=“”

时间:2017-10-01 13:26:03

标签: maven apache-spark scala-ide

=“”

我是spark-scala的新手,我正在尝试在scala IDE中编写spark应用程序,所以我创建了一个maven项目并尝试编辑pom.xml文件,我将依赖项添加到pom.xml,我收到错误

Project build error: Non-parseable POM : expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</dependency>\ufeff\r\n    <d... @28:7)

出现在依赖项之一的错误。

请帮助,通过我无法解决的旧答案。

<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.orientit.spark.training</groupId>
<artifactId>firstpgm</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>firstpgm</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.4</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

1 个答案:

答案 0 :(得分:1)

该错误表示您的XML格式不正确,因此无法由XML解析器解析。您必须仔细检查XML以打开和关闭标记。由于某种原因,您的结束标记后跟UTF-16字节顺序标记。

    <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.orientit.spark.training</groupId>
<artifactId>firstpgm</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>firstpgm</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.4</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>