- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我的 local
中添加简单属性简介。
<profile>
<id>local</id>
<properties>
<property>
<name>localurl</name> // line 111, column 27 is "l"
<value>http://localhost:8080</value>
</property>
</properties>
</profile>
当我清理项目时,出现以下错误。
TEXT must be immediately followed by END_TAG and not START_TAG
(position: START_TAG seen ...<property>\n <name>...
@111:27) @ line 111, column 27
我在上面提到了行号profile
片段。我不知道为什么会发生这种情况。我正在使用maven 3.3.3
和Java 1.8
.
我搜索了几篇文章和 this stackoverflow 中的问题,但没有多大帮助。
知道为什么会出现此错误吗?
编辑如果我评论 <property>
部分,这个错误不会出现。
这是我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>org.springframework</groupId>
<artifactId>gs-messaging-stomp-websocket</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
</dependency>
<dependency>
<groupId>org.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>1.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.projectreactor</groupId>
<artifactId>reactor-tcp</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.projectreactor</groupId>
<artifactId>reactor-net</artifactId>
<version>1.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.9.0</version>
</dependency>
<!-- Spring caching framework inside this -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.1.6.RELEASE</version>
</dependency>
<!-- Support for Ehcache and others -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.6</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>local</id>
<properties>
<property>
<name>localurl</name>
<value>http://localhost:8080</value>
</property>
</properties>
</profile>
</profiles>
</project>
这是我运行 mvn clean -e
时得到的堆栈跟踪
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /Users/karthik/IdeaProjects/Messages/pom.xml: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<property>\n <name>... @111:27) @ line 111, column 27
@
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /Users/karthik/IdeaProjects/Messages/pom.xml: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<property>\n <name>... @111:27) @ line 111, column 27
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] The project (/Users/karthik/IdeaProjects/Messages/pom.xml) has 1 error
[ERROR] Non-parseable POM /Users/karthik/IdeaProjects/Messages/pom.xml: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<property>\n <name>... @111:27) @ line 111, column 27 -> [Help 2]
org.apache.maven.model.io.ModelParseException: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<property>\n <name>... @111:27)
at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:130)
at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:94)
at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:81)
at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:529)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:269)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:469)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:401)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<property>\n <name>... @111:27)
at org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:1101)
at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseProfile(MavenXpp3ReaderEx.java:3511)
at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseModel(MavenXpp3ReaderEx.java:2532)
at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4350)
at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:560)
at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:121)
... 25 more
最佳答案
如果我这样做
<properties>
<localurl>http://localhost:8080</localurl>
</properties>
或
<profiles>
<profile>
<id>local</id>
<properties>
<localurl>http://localhost:8080</localurl>
</properties>
</profile>
</profiles>
这些工作正常。
关于java - TEXT 后面必须紧跟着 END_TAG,而不是 START_TAG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31652353/
我在使用 web 服务的 android 中遇到这个错误。 当我运行 android webservice 并运行 android 项目时会发生这种情况 那么这里有什么问题呢? 请问有人知道吗? 谢谢
我正在尝试在我的 local 中添加简单属性简介。 local localurl // line 111, column 27 is "
刚接触 IntelliJ IDE 并尝试导入 Eclipse 项目源文件。这是基本的 Spring Boot 入门代码,但要构建。错误如下: E:\JAVA_FULLSTACK\l2_source\c
我正在使用 Eclipse Indigo 从头开始设置 spring mvc web 应用程序 + hibernate jpa + maven。在进行 Maven 构建时,我遇到了这个错误。 [E
我这辈子都弄不明白。似乎根本不是一个难题。 POM: 错误行中的红色下划线。 最佳答案 所以我将它放入 eclipse 中,它看起来不错 4.0.0 CENSORED Ne
我是一名优秀的程序员,十分优秀!