0
votes

I've downloaded a java project from GitHub and I am trying to compile it.

I have an error in pom.xml file, I've searched on the internet for a solution seems there was who had the same problem but with other elements.

The error is

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.

The pom.xml file is

<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>[email protected]</email>
    </developer>
  </developers>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <modules>
    <module>modeljunit</module>
    <module>paramedit</module>
  </modules>
  </project>
1

1 Answers

0
votes

A typo, you should use organization (NOT organisation) tag:

<organization>
  <name>ModelJUnit Projects</name>
  <url>http://modeljunit.sourceforge.net</url>
</organization>