Maven simple example

Hi - I was recently asked to write a java program by a company, i have no problem with that but at the end i read a line saying that they want my code should have test cases and maven project file to run so that they can simply build the code and run the test cases.

Now i wrote the java code part but i dont know anything about maven, so i downloaded a simple example from the below link to learn my self (example can be downloaded at step 5 in the below link)
http://examples.javacodegeeks.com/enterprise-java/maven/create-java-project-with-maven-example/

so i understood whats going on with maven, but i have couple of question.
1) how can I build and run the test case on the example.

I am using windows and I do have eclipse.

Thanks,
shragiAsked:
Who is Participating?
 
CEHJCommented:
http://mvnrepository.com/artifact/junit/junit

is possibly what they are getting at
0
 
Phil DavidsonCommented:
I tend to think you need to have more specific instructions.  Testing the code with Maven is a vague direction.
0
 
shragiAuthor Commented:
well the programs are simple ones like find the odd numbers from 1 to 500, etc...
so in eclipse how can I run the project and see the results....

can i do it like regualr java programs... or should i use something
0
 
CEHJCommented:
well the programs are simple ones like find the odd numbers from 1 to 500, etc...

So - it would seem they are expecting the use of a testing framework, so you need to use one (as in check that the numbers returned are the RIGHT ones) and have it activatable from Maven
0
 
CEHJCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.