How do I create the simplest Maven Project that can possibly work in Intellij? In Intellij, I created a pom file as a Maven Module:
<?xml version="1.0" encoding="UTF-8"?> <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>com.myCompany</groupId> <artifactId>myProject</artifactId> <version>1.0</version> </project> I then used file open project and an idea project was created. The Project file displays an .idea folder, the typical src folder two .iml files and my pom file. I wrote a typical Hello World under src/main/java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } } With View->WindowTools-> Maven Projects I can view all the goals that my pom created for me. The symbols String and System cannot be resolved by Idea. When I try to compile from the Maven Project Window, I am asked to define M2_HOME which I have done under system variables with the <some.dir>\apache-maven-3.0.4\bin. It repeats the same errors. All i want is to be able to use the goals I see in the Maven project window and to see the magic of Maven from Idea. Any advice greatly appreciated. -- View this message in context: http://maven.40175.n5.nabble.com/the-simplest-Maven-Project-that-can-possibly-work-in-Intellij-tp5483841p5483841.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
