Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Maven Integration (M2E) » Newbie question: Steps for simple Maven setup
Newbie question: Steps for simple Maven setup [message #550329] Thu, 29 July 2010 19:09 Go to next message
Peter Missing name is currently offline Peter Missing name
Messages: 31
Registered: July 2010
Member
Folks,

I am new to Maven world.

I have installed m2eclipse plugin in Eclipse Helios and now am going through the pdf documentation from Sonatype. However, the approach taken in the documentation makes it more of a reference guide instead of a quick-start guide.

In order to learn Maven and its integration with Eclipse, here is simple setup that I would like to try:

1. Create a brand new workspace.
2. Create two simple Java projects - Project1 and Project2.
3. Project1 must produce a jar file that must be consumed by Project2.
4. Project2 must also produce a jar file. Project2 has the entry point for our test application. Simple console output. No Web. No GUI.

For now, we can assume that both Project1 and Project2 have just one class each - Test1 and Test2.

I am confused even with the initial steps in Eclipse. Do I first create a Java project or do I first create a Maven project using one of the archetypes (out of 100s of them that I don't understand) that would automatically end up creating the Eclipse Java project? How do I tie Project1 to Project2? It is not a "project dependency" but a "jar file dependency."

I would appreciate your help if someone can give a step-by-step summary for my simple setup.

Thank you in advance for your help.

Regards,
Peter



Re: Newbie question: Steps for simple Maven setup [message #550552 is a reply to message #550329] Fri, 30 July 2010 14:52 Go to previous message
Peter Missing name is currently offline Peter Missing name
Messages: 31
Registered: July 2010
Member
ok. I made some progress. It appears you have a choice:

1. Create Maven project. This will automatically generate an Eclipse project.

OR

2. Create an Eclipse project as usual. Later, you are run "Maven POM file" wizard to generate POM file.

Now, I am still stuck on how to define interdependency such that Project1 is built first and the output jar file gets generated. Project2 is built next that uses Project1.jar as a referenced library.

Can someone please tell me how to achieve this?

Thank you in advance for your help.

Regards,
Peter
Previous Topic:bin versus target directories
Next Topic:Goals selection dialog empty
Goto Forum:
  


Current Time: Wed Apr 16 20:53:42 EDT 2014

Powered by FUDForum. Page generated in 0.06406 seconds