Using maven with eclipse

2009-01-15 Thread Farrukh Najmi


Hello,

I am experienced with maven but new to Eclipse IDE. I have used maven 
with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about 
it was how Netbeans was completely driven by the pom configuration and 
how natural and familiar everything was for a maven user.


I would like to try Eclipse IDE with my existing multi-module project. 
What is the best approack for doing this? Which plugin should I use? 
Please share any links and pointers. Thanks.


--
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Using maven with eclipse

2009-01-15 Thread Martin Höller
On Thursday 15 January 2009 Farrukh Najmi wrote:
> I am experienced with maven but new to Eclipse IDE. I have used maven
> with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about
> it was how Netbeans was completely driven by the pom configuration and
> how natural and familiar everything was for a maven user.
>
> I would like to try Eclipse IDE with my existing multi-module project.
> What is the best approack for doing this? Which plugin should I use?
> Please share any links and pointers. Thanks.

See [0] for a comparison of the available plugins.

The maven-eclipse-plugin just creates eclipse configuration files for your 
projects, no further intergration. This is simple, quite robust but doesn't 
provide as much comfort as the other two options.

I didn't use m2eclipse or q4e recently but they follow a completely 
different approach. They are plugins for eclipse and try to adapt your IDE 
and add new features to it.

If you search the list archive you should find some more information. This 
question is asked every now and then.

hth,
- martin

[0] http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration


signature.asc
Description: This is a digitally signed message part.


RE: Using maven with eclipse

2009-01-15 Thread Adam Leggett
Try this if you want an Eclipse plug-in to manage the integration:
http://m2eclipse.sonatype.org/ [1]

Try this if you want a Maven plug-in instead:
http://maven.apache.org/plugins/maven-eclipse-plugin/ [2]

I tend to lean to [2], but then I'm happier just using command line
mojos to get some of the additional value add that's in [1] (and it does
have some pretty slick features, which you'll see if you try it). For
example, I'd do something like  mvn dependency:tree > deps.log  etc.
Just feels like an instinctively lighter approach which I prefer.

Adam

-Original Message-
From: Farrukh Najmi [mailto:farr...@wellfleetsoftware.com] 
Sent: 15 January 2009 14:30
To: users@maven.apache.org
Subject: Using maven with eclipse


Hello,

I am experienced with maven but new to Eclipse IDE. I have used maven 
with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about 
it was how Netbeans was completely driven by the pom configuration and 
how natural and familiar everything was for a maven user.

I would like to try Eclipse IDE with my existing multi-module project. 
What is the best approack for doing this? Which plugin should I use? 
Please share any links and pointers. Thanks.

-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Using maven with eclipse

2009-01-15 Thread Eugene Kuleshov


Adam Leggett wrote:
> 
> I tend to lean to [2], but then I'm happier just using command line
> mojos to get some of the additional value add that's in [1] (and it does
> have some pretty slick features, which you'll see if you try it). For
> example, I'd do something like  mvn dependency:tree > deps.log  etc.
> Just feels like an instinctively lighter approach which I prefer.
> 

  The m2eclipse provides a nice an interactive UI for that command. You can
see how it look like at
http://docs.codehaus.org/display/M2ECLIPSE/Maven+POM+editor#MavenPOMeditor-DependencyHierarchyviewer

  The upcoming m2eclipse 0.9.7 release should be very exiting. The following
wiki page provides and overview of the new and noteworthy features
http://docs.codehaus.org/display/M2ECLIPSE/New+and+Noteworthy#NewandNoteworthy-latest

  regards,
  Eugene


-- 
View this message in context: 
http://www.nabble.com/Using-maven-with-eclipse-tp21478705p21480290.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Using maven with eclipse

2009-01-15 Thread Carlos Sanchez
there's also Eclipse IAM (formerly Q4E) http://code.google.com/p/q4e/

re: dependency tree, I use all the time Q4E dependency analysis

http://code.google.com/p/q4e/wiki/DependencyAnalysis


On Thu, Jan 15, 2009 at 3:43 PM, Adam Leggett  wrote:
> Try this if you want an Eclipse plug-in to manage the integration:
> http://m2eclipse.sonatype.org/ [1]
>
> Try this if you want a Maven plug-in instead:
> http://maven.apache.org/plugins/maven-eclipse-plugin/ [2]
>
> I tend to lean to [2], but then I'm happier just using command line
> mojos to get some of the additional value add that's in [1] (and it does
> have some pretty slick features, which you'll see if you try it). For
> example, I'd do something like  mvn dependency:tree > deps.log  etc.
> Just feels like an instinctively lighter approach which I prefer.
>
> Adam
>
> -Original Message-
> From: Farrukh Najmi [mailto:farr...@wellfleetsoftware.com]
> Sent: 15 January 2009 14:30
> To: users@maven.apache.org
> Subject: Using maven with eclipse
>
>
> Hello,
>
> I am experienced with maven but new to Eclipse IDE. I have used maven
> with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about
> it was how Netbeans was completely driven by the pom configuration and
> how natural and familiar everything was for a maven user.
>
> I would like to try Eclipse IDE with my existing multi-module project.
> What is the best approack for doing this? Which plugin should I use?
> Please share any links and pointers. Thanks.
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Using maven with eclipse

2009-01-16 Thread Deron Eriksson

Hi Farrukh,

If you're interested in development that involves the maven-eclipse-plugin,
I created a series of tutorials (80+) a few months ago that cover Java
development using Eclipse and Maven. The main approach using this technique
is to execute maven commands on projects via Eclipse external tool
configurations (so that you can click on a project and run a maven goal on
that project). In this approach, Eclipse/Maven integration is very minimal
(you basically let maven be maven most of the time). Topics include Eclipse
user libraries, web applications, and a multi-module project. The tutorials
are located at:

http://www.avajava.com/tutorials/categories/maven
http://www.avajava.com/tutorials/categories/maven 

If you're interested in tightly integrated features rather than the bare
bones approach, the m2eclipse plugin is great. The ability to search for
classes and automatically add a dependency to your project in Eclipse is a
really fantastic feature.


Deron Eriksson


-- 
View this message in context: 
http://www.nabble.com/Using-maven-with-eclipse-tp21478705p21498725.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Using Maven with Eclipse well: mvn eclipse:eclipse and nested projects

2007-07-04 Thread Alan Kent
I have a multi-module project and I am trying to get the "right" set up 
to use Maven with Eclipse.  I have a question below on mvn 
eclipse:eclipse, but some background first.


I used to use m2eclipse with Eclipse 3.1 but as the projects have grown, 
m2eclipse has shown to have problems.  For example in a multi-module 
project, each module might want different versions of a jar file in the 
path (say in different WAR files).  m2eclipse seems to load all the 
different source directories up into one mega-project, and come up with 
a single list of all dependencies flattened across projects.  When 
m2eclipse worked, I sometimes got different versions of artifacts in the 
dependency list.  Frequently it just refused to work, not finding all 
the dependencies correctly - which is probably a bug.  However 
regardless of any possible bugs, the basic premise seems wrong - each 
module should have its own dependencies worked out as they may *want* 
different versions of jar files.


mvn eclipse:eclipse therefore looks a better way to go.  I can check out 
a SVN tree, run mvn eclipse:eclipse, then load up all the modules as 
separate projects with only the jar file dependencies for that module 
included.  This works much more reliably - no problems so far.


However, because it creates a project per module, I cannot use the 
global Eclipse SVN support for tagging, branching, switching etc.  I 
cannot do this from the top of the tree.  I have to go back to the 
command line.


I just downloaded Eclipse Europa (3.3) and it (as well as 3.2 I believe) 
supports nested projects.  That is, it appears I can have a .project 
file in the root directory plus one in each module directory.  (I am 
having a little trouble with Subclipse and Subversive, but I think they 
will be resolved so I am going to assume they work.)  This looks almost 
ideal, which leads me to finally to my question...


Q: Is there any way to make "mvn eclipse:elipse" generate a .project 
file for the root directory as well as each module?  That way I can 
check out the whole project tree from the root and have a project per 
pom file.  Eclipse can now handle nested projects, so it will load them 
all up (it used to refuse to load up child directory projects under a 
parent directory project).  I saw a hack somewhere of changing the root 
pom file to temporarily use "jar" packaging, then put it back to "pom" 
packaging - but this is pretty ugly.  Now that Eclipse supports nested 
projects, is there any reason not to do this?  It would give me the 
ability to do all the svn commands from inside Eclipse from the root 
package (I don't need or want to compile any Java code from the root 
package - I just want to be able to explore the tree, do 'sync with 
repository', commits, svn switches etc) plus each module would get its 
own correct dependency list as occurs now.  I would do all compiles in 
the module directories.


Is this possible now?  (I don't think so.)  Can it be added?  Would it 
allow what I am trying to do?


Thanks!
Alan Kent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using Maven with Eclipse well: mvn eclipse:eclipse and nested projects

2007-07-04 Thread Greg Thompson

Alan Kent wrote:
Q: Is there any way to make "mvn eclipse:elipse" generate a .project 
file for the root directory as well as each module?  That way I can 
check out the whole project tree from the root and have a project per 
pom file.


Not that I know of, but this works for me:

1. Check out the parent module into your workspace.

2. "mvn eclipse:eclipse" to create the various .project and .classpath
   files in the sub-modules.

3. Switch to the Java perspective in Eclipse.

4. Select the parent module and hit F5 to refresh (just for grins).

5. Choose "File->Import...", "Existing Projects into Workspace", and
   browse in your workspace into your parent module.

6. Select one of the sub-modules, make sure "Copy projects into
   workspace" is /not/ checked, and hit "Finish".

7. Lather, rinse, and repeat steps 5 and 6 with the other submodules.

In this way, you can do all of your SCM in Eclipse via the parent 
module, yet play with the submodules as proper Java projects.


As far as I know, this is the "recommended" way to develop a 
multi-module project with Eclipse.  Someone please correct me if I'm wrong.

--
-Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FW: Using Maven with Eclipse well: mvn eclipse:eclipse and nested projects

2007-07-04 Thread Bryan Loofbourrow
An interesting message on the Maven User's list, especially for those
(Daryoush!) who have expressed frustration about the inability to
mass-perforce-enable all those Eclipse projects that you get when using
mvn eclipse:eclipse. I'm not sure I understand completely where he's
coming from, but basically it seems like a way to maintain an RRmodules
Eclipse project, for the purpose of SCM, and also a bunch of
subprojects, for mvn eclipse:eclipse. I'm not positive that this mixture
of things will cause Perforce to always check things out automatically
if the RRmodules project is Perforce-enabled and the others are not, but
it seems worth a try, because it seems to be working for this guy, and I
doubt he'd be so enthusiastic if that part didn't work. The downside,
which I have discovered myself by accident, is that with this setup you
can no longer mass-import Eclipse projects at the RRmodules level, but
instead have to do your importing iteratively, one level down. Not a big
deal for ongoing updates, but somewhat of a pain the very first time.

Happy 4th! Especially to Balazs, who's actually working today,
presumably because his East European upbringing didn't instill an
irresistable compulsion to grill something outdoors on this special day.


-- Bryan

-Original Message-
From: Greg Thompson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 04, 2007 5:53 AM
To: Maven Users List
Subject: Re: Using Maven with Eclipse well: mvn eclipse:eclipse and
nested projects

Alan Kent wrote:
> Q: Is there any way to make "mvn eclipse:elipse" generate a .project 
> file for the root directory as well as each module?  That way I can 
> check out the whole project tree from the root and have a project per 
> pom file.

Not that I know of, but this works for me:

1. Check out the parent module into your workspace.

2. "mvn eclipse:eclipse" to create the various .project and .classpath
files in the sub-modules.

3. Switch to the Java perspective in Eclipse.

4. Select the parent module and hit F5 to refresh (just for grins).

5. Choose "File->Import...", "Existing Projects into Workspace", and
browse in your workspace into your parent module.

6. Select one of the sub-modules, make sure "Copy projects into
workspace" is /not/ checked, and hit "Finish".

7. Lather, rinse, and repeat steps 5 and 6 with the other submodules.

In this way, you can do all of your SCM in Eclipse via the parent 
module, yet play with the submodules as proper Java projects.

As far as I know, this is the "recommended" way to develop a 
multi-module project with Eclipse.  Someone please correct me if I'm
wrong.
-- 
-Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using Maven with Eclipse well: mvn eclipse:eclipse and nested projects

2007-07-04 Thread Bryan Loofbourrow
Sorry. Not intended for the list. Apologies.

-Original Message-
From: Bryan Loofbourrow [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 04, 2007 2:43 PM
To: *Qpass - Content Catalog Discussion
Cc: Maven Users List
Subject: FW: Using Maven with Eclipse well: mvn eclipse:eclipse and nested
projects

An interesting message on the Maven User's list, especially for those
(Daryoush!) who have expressed frustration about the inability to
mass-perforce-enable all those Eclipse projects that you get when using
mvn eclipse:eclipse. I'm not sure I understand completely where he's
coming from, but basically it seems like a way to maintain an RRmodules
Eclipse project, for the purpose of SCM, and also a bunch of
subprojects, for mvn eclipse:eclipse. I'm not positive that this mixture
of things will cause Perforce to always check things out automatically
if the RRmodules project is Perforce-enabled and the others are not, but
it seems worth a try, because it seems to be working for this guy, and I
doubt he'd be so enthusiastic if that part didn't work. The downside,
which I have discovered myself by accident, is that with this setup you
can no longer mass-import Eclipse projects at the RRmodules level, but
instead have to do your importing iteratively, one level down. Not a big
deal for ongoing updates, but somewhat of a pain the very first time.

Happy 4th! Especially to Balazs, who's actually working today,
presumably because his East European upbringing didn't instill an
irresistable compulsion to grill something outdoors on this special day.


-- Bryan

-Original Message-
From: Greg Thompson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 04, 2007 5:53 AM
To: Maven Users List
Subject: Re: Using Maven with Eclipse well: mvn eclipse:eclipse and
nested projects

Alan Kent wrote:
> Q: Is there any way to make "mvn eclipse:elipse" generate a .project 
> file for the root directory as well as each module?  That way I can 
> check out the whole project tree from the root and have a project per 
> pom file.

Not that I know of, but this works for me:

1. Check out the parent module into your workspace.

2. "mvn eclipse:eclipse" to create the various .project and .classpath
files in the sub-modules.

3. Switch to the Java perspective in Eclipse.

4. Select the parent module and hit F5 to refresh (just for grins).

5. Choose "File->Import...", "Existing Projects into Workspace", and
browse in your workspace into your parent module.

6. Select one of the sub-modules, make sure "Copy projects into
workspace" is /not/ checked, and hit "Finish".

7. Lather, rinse, and repeat steps 5 and 6 with the other submodules.

In this way, you can do all of your SCM in Eclipse via the parent 
module, yet play with the submodules as proper Java projects.

As far as I know, this is the "recommended" way to develop a 
multi-module project with Eclipse.  Someone please correct me if I'm
wrong.
-- 
-Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]