Java 如何修复设置xml中无法识别的标记?
我有setting.xmlJava 如何修复设置xml中无法识别的标记?,java,xml,maven,settings,Java,Xml,Maven,Settings,我有setting.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>Nexus.Codehaus Snapshots</id>
<name>Nexus Mirror of Codehaus Snapshots</name>
<url>http://build/nexus/content/repositories/codehaus-snapshots</url>
<mirrorOf>Codehaus Snapshots</mirrorOf>
</mirror>
<mirror>
<id>Nexus</id>
<name>Nexus Public Mirror</name>
<url>http://nexus.other.com/content/groups/public</url>
<mirrorOf>Nexus</mirrorOf>
</mirror>
</mirrors>
<server>
<id>TomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
<profiles>
<profile>
<id>quickBuild</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
<pmd.skip>true</pmd.skip>
<checkstyle.skip>true</checkstyle.skip>
<findbugs.skip>true</findbugs.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<debug>true</debug>
<debuglevel>lines,vars,source</debuglevel>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>some</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<id>some2</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<executions>
<execution>
<id>some3</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>some4</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<id>some5</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>repository-profile</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Nexus.Codehaus快照
Codehaus快照的Nexus镜像
http://build/nexus/content/repositories/codehaus-snapshots
科德豪斯快照
关系
Nexus公共镜像
http://nexus.other.com/content/groups/public
关系
TomcatServer
管理
密码
快速构建
假的
真的
真的
真的
真的
org.apache.maven.plugins
maven编译器插件
${java.version}
${java.version}
真的
行、变量、源
org.apache.maven.plugins
maven javadoc插件
一些
没有一个
org.codehaus.mojo
findbugs maven插件
大约2
没有一个
org.apache.maven.plugins
maven pmd插件
大约3
没有一个
org.apache.maven.plugins
maven checkstyle插件
大约4
没有一个
org.codehaus.mojo
jaxws-maven插件
大约5
没有一个
存储库配置文件
假的
maven2-repository.dev.java.net
Maven的Java.net存储库
http://download.java.net/maven/2/
违约
在maven构建开始时,我有一条消息:
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'server' (position: START_TAG seen ...</mirrors>\r\n\t\r\n\t<server>... @31:10) @ D:\directory\.m2\settings.xml, line 31, column 10
[WARNING]
[警告]
[警告]构建有效设置时遇到一些问题
[警告]无法识别的标记:“服务器”(位置:已看到开始标记…\r\n\t\r\n\t…@31:10)@D:\directory\.m2\settings.xml,第31行,第10列
[警告]
我不明白为什么?据我所知,服务器标记和镜像是有效的(我认为是这样,因为插件和依赖项解析是有效的)。如何解决此问题?标签必须包含在
标签中
<servers>
<server>
<id>TomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
</servers>
TomcatServer
管理
密码
看