I have successfully used the quickstart archetype and proceeded to build and
run
HelloWorld. As most know, it uses junit and i wish to use TestNG. I believed
that it meant that
I would simply add the needed dependency as explained here:
http://maven.apache.org/plugins/maven-surefire-plugin/exampl[..]
To keep it simple, I am calling mvn from the console.
I used the Intellij Editor only to modify the pom file. The editor tells me
that the org.testng, testing and test in my testng dependency are not found.
What am I missing? I thought that I was free to modify the pom file and add
files as i want and then I could just build again.
My assumption is that I may add as many dependencies as I like to my list.
So if I like to have two test files to exemplify how things are done in
junit and testng
all that should be needed is to add a new test file with the appropriate
import statements.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Yes, that is correct.
Good. IDEs are fine once you are an advanced user but not appropriate
(IMO) for beginners because they hide too many details and end up
confusing the user.
Honestly, why do you care what the IntelliJ editor says? Does Maven
work OK from the console? If so, ignore IntelliJ.
Keep in mind what Brian told you already:
What this means is when you make changes to your IDEA project, it
won't (at least with any feature I am familiar with) rewrite your POM
for you. You must hand-code the POM, then IDEA will notice that
you've changed it and ask if you want to re-import.
I am guessing that you made changes but did not re-import yet.
Wayne