XML : Adding Maven Dependencies to XML with Intellij IDEA

I'm currently watching a tutorial on adding a Maven dependency to a pom.xml file and it does not appear to be working as it should. I downloaded the external jar file to the library and in the video his xml code is automatically updated with the dependency. Since mine was not automatically updated I tried to generate a dependency. My artifact did not show up in the artifact list. So, I tried to manually enter in the following code:

  <dependency>      <groupId>joda-time</groupId>      <artifactId>joda-time</artifactId>      <version>2.9.1</version>  </dependency>    

This created red squiggly lines under the dependency tags with an error message of, "Invalid content was found starting with element 'dependency'".

If someone could walk me through step by step how I can get this to work I would it appreciate it very much.

No comments:

Post a Comment