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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Phil DavidsonCommented:
I tend to think you need to have more specific instructions.  Testing the code with Maven is a vague direction.
0
CEHJCommented:
http://mvnrepository.com/artifact/junit/junit

is possibly what they are getting at
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.