Maven:发现以元素 'organisation' 开头的无效内容
Maven : Invalid content was found starting with element 'organisation'
我从 GitHub 下载了一个 java 项目,我正在尝试编译它。
我在 pom.xml 文件中有一个错误,我在互联网上搜索了一个解决方案,似乎有人遇到了同样的问题,但有其他问题。
错误是
cvc-complex-type.2.4.a: Invalid content was found starting with element 'organisation'.
One of '{"http://maven.apache.org/POM/4.0.0":parent,
"http://maven.apache.org/POM/4.0.0":name,
"http://maven.apache.org/POM/4.0.0":description,
"http://maven.apache.org/POM/4.0.0":prerequisites,
"http://maven.apache.org/POM/4.0.0":issueManagement,
"http://maven.apache.org/POM/4.0.0":ciManagement,
"http://maven.apache.org/POM/4.0.0":inceptionYear,
"http://maven.apache.org/POM/4.0.0":mailingLists,
"http://maven.apache.org/POM/4.0.0":developers,
"http://maven.apache.org/POM/4.0.0":contributors,
"http://maven.apache.org/POM/4.0.0":licenses,
"http://maven.apache.org/POM/4.0.0":scm,
"http://maven.apache.org/POM/4.0.0":organization,
"http://maven.apache.org/POM/4.0.0":build,
"http://maven.apache.org/POM/4.0.0":profiles,
"http://maven.apache.org/POM/4.0.0":modules,
"http://maven.apache.org/POM/4.0.0":repositories,
"http://maven.apache.org/POM/4.0.0":pluginRepositories,
"http://maven.apache.org/POM/4.0.0":dependencies,
"http://maven.apache.org/POM/4.0.0":reports,
"http://maven.apache.org/POM/4.0.0":reporting,
"http://maven.apache.org/POM/4.0.0":dependencyManagement,
"http://maven.apache.org/POM/4.0.0":distributionManagement,
"http://maven.apache.org/POM/4.0.0":properties}'
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nz.ac.waikato.modeljunit</groupId>
<artifactId>modeljunit-projects</artifactId>
<version>2.6-SNAPSHOT</version>
<packaging>pom</packaging>
<url>http://modeljunit.sourceforge.net</url>
<organisation>
<name>ModelJUnit Projects</name>
<url>http://modeljunit.sourceforge.net</url>
</organisation>
<issueManagement>
<url>http://sourceforge.net/p/modeljunit/bugs/?source=navbar</url>
</issueManagement>
<licenses>
<license>
<name>GPL Version 3.0</name>
<url>http://www.gnu.org/copyleft/gpl.txt</url>
</license>
</licenses>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<scm>
<connection>scm:svn:http://svn.code.sf.net/p/modeljunit/code/trunk
</connection>
<developerConnection>scm:svn:svn+ssh://svn.code.sf.net/p/modeljunit/code/trunk
</developerConnection>
<url>http://svn.code.sf.net/p/modeljunit/code/trunk</url>
</scm>
<developers>
<developer>
<id>marku</id>
<name>Mark Utting</name>
<email>marku@cs.waikato.ac.nz</email>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>modeljunit</module>
<module>paramedit</module>
</modules>
</project>
打字错误,您应该使用 organization
(不是 organisation)标签:
<organization>
<name>ModelJUnit Projects</name>
<url>http://modeljunit.sourceforge.net</url>
</organization>
我从 GitHub 下载了一个 java 项目,我正在尝试编译它。
我在 pom.xml 文件中有一个错误,我在互联网上搜索了一个解决方案,似乎有人遇到了同样的问题,但有其他问题。
错误是
cvc-complex-type.2.4.a: Invalid content was found starting with element 'organisation'.
One of '{"http://maven.apache.org/POM/4.0.0":parent,
"http://maven.apache.org/POM/4.0.0":name,
"http://maven.apache.org/POM/4.0.0":description,
"http://maven.apache.org/POM/4.0.0":prerequisites,
"http://maven.apache.org/POM/4.0.0":issueManagement,
"http://maven.apache.org/POM/4.0.0":ciManagement,
"http://maven.apache.org/POM/4.0.0":inceptionYear,
"http://maven.apache.org/POM/4.0.0":mailingLists,
"http://maven.apache.org/POM/4.0.0":developers,
"http://maven.apache.org/POM/4.0.0":contributors,
"http://maven.apache.org/POM/4.0.0":licenses,
"http://maven.apache.org/POM/4.0.0":scm,
"http://maven.apache.org/POM/4.0.0":organization,
"http://maven.apache.org/POM/4.0.0":build,
"http://maven.apache.org/POM/4.0.0":profiles,
"http://maven.apache.org/POM/4.0.0":modules,
"http://maven.apache.org/POM/4.0.0":repositories,
"http://maven.apache.org/POM/4.0.0":pluginRepositories,
"http://maven.apache.org/POM/4.0.0":dependencies,
"http://maven.apache.org/POM/4.0.0":reports,
"http://maven.apache.org/POM/4.0.0":reporting,
"http://maven.apache.org/POM/4.0.0":dependencyManagement,
"http://maven.apache.org/POM/4.0.0":distributionManagement,
"http://maven.apache.org/POM/4.0.0":properties}'
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nz.ac.waikato.modeljunit</groupId>
<artifactId>modeljunit-projects</artifactId>
<version>2.6-SNAPSHOT</version>
<packaging>pom</packaging>
<url>http://modeljunit.sourceforge.net</url>
<organisation>
<name>ModelJUnit Projects</name>
<url>http://modeljunit.sourceforge.net</url>
</organisation>
<issueManagement>
<url>http://sourceforge.net/p/modeljunit/bugs/?source=navbar</url>
</issueManagement>
<licenses>
<license>
<name>GPL Version 3.0</name>
<url>http://www.gnu.org/copyleft/gpl.txt</url>
</license>
</licenses>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<scm>
<connection>scm:svn:http://svn.code.sf.net/p/modeljunit/code/trunk
</connection>
<developerConnection>scm:svn:svn+ssh://svn.code.sf.net/p/modeljunit/code/trunk
</developerConnection>
<url>http://svn.code.sf.net/p/modeljunit/code/trunk</url>
</scm>
<developers>
<developer>
<id>marku</id>
<name>Mark Utting</name>
<email>marku@cs.waikato.ac.nz</email>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>modeljunit</module>
<module>paramedit</module>
</modules>
</project>
打字错误,您应该使用 organization
(不是 organisation)标签:
<organization>
<name>ModelJUnit Projects</name>
<url>http://modeljunit.sourceforge.net</url>
</organization>