title: Maven: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugin'
body: <p>I'm not that good with Maven pom.xml configuration.</p>
  
  <p>I'm trying to configure an Eclipse Project to work with Java and Kotlin together, for a Corda (Blockchain) Bootcamp example, but I'm facing the error message below:</p>
  
  <pre><code>cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugin'. 
  One of '{
      "http://maven.apache.org/POM/4.0.0":parent, 
      "http://maven.apache.org/POM/4.0.0":packaging, 
      "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":url, 
      "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":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
  }' is expected.
  </code></pre>
  
  <p>Here goes the entire pom.xml content</p>
  
  <pre><code>&lt;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"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;r3&lt;/groupId&gt;
      &lt;artifactId&gt;CordaAppBootCamp&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;kotlin.version&gt;1.2.51&lt;/kotlin.version&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.1&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;${java.version}&lt;/source&gt;
                          &lt;target&gt;${java.version}&lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.jetbrains.kotlin&lt;/groupId&gt;
                      &lt;artifactId&gt;kotlin-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${kotlin.version}&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;default-compile&lt;/id&gt;
                              &lt;phase&gt;none&lt;/phase&gt;
                          &lt;/execution&gt;
                          &lt;execution&gt;
                              &lt;id&gt;default-testCompile&lt;/id&gt;
                              &lt;phase&gt;none&lt;/phase&gt;
                          &lt;/execution&gt;
                          &lt;execution&gt;
                              &lt;id&gt;java-compile&lt;/id&gt;
                              &lt;phase&gt;compile&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;compile&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                          &lt;execution&gt;
                              &lt;id&gt;java-test-compile&lt;/id&gt;
                              &lt;phase&gt;test-compile&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;testCompile&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jetbrains.kotlin&lt;/groupId&gt;
              &lt;artifactId&gt;kotlin-stdlib-jdk8&lt;/artifactId&gt;
              &lt;version&gt;${kotlin.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>I did it this way based in this Baeldung post:</p>
  
  <pre><code>https://www.baeldung.com/kotlin-maven-java-project
  </code></pre>
  
  <p>It had even more problem messages. 
  Some of them I solved by using the <code>&lt;pluginManagement&gt;</code> tag</p>