Re: Eclipse and Maven best practice

2007-09-18 Thread Pete
I use Eclipse and the External Tools configuration to run mvn from
within eclipse if needed.

I used to have Eclipse compiling to a different classes directory and
that worked fine for many projects, but recently I use  'mvn
jetty:run'  all the time so that when I save a java file in Eclipse it
gets compiled immediately by Eclipse and the change will be instantly
visible in Jetty. Working this way eclipse and mvn must compile to
same place, as jetty start up using the classpath that mvn is using.


On 17/09/2007, Jim Sellers [EMAIL PROTECTED] wrote:
 I'd take a look at what files are generated when you create a new project
 using SAP.  Are there other folders / files that are created?  (starting
 with a dot).

 Are there project natures / builders that are not being included (in the
 .project file)?

 It sounds like there is *something* missing that SAP is reading / looking
 at.

 Jim


 On 9/17/07, Wayne Fay [EMAIL PROTECTED] wrote:
 
  Since we're talking about Eclipse... As I said before, I'm using SAP
  NWDS (2.0.14) which is based on Eclipse v2.1. I'm using
  eclipse:eclipse to generate metadata and added the proper perspectives
  etc.
 
  When I create a new project (J2EE, EJB Module Project or Web Module
  Project) then it shows up in the J2EE Explorer and things are good.
 
  When I use mvn e:e and then import the project, it comes in as a
  standard Java project. I've tried editing metadata files manually
  but its still not coming up the way I was hoping. The EJB project
  shows up in J2EE Explorer but the beans don't show up since I'm not
  using the default ejbModule directory etc.
 
  Any ideas? I might try upgrading to the latest NWDS build which is
  based on Eclipse 3, apparently.
 
  Wayne
 
  On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote:
   There can be problems caused with a single build destination caused by
  the
   Eclipse incremental compiler that would sometimes require doing a clean
  in
   both maven and eclipse.
  
 
  -
  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: Eclipse and Maven best practice

2007-09-18 Thread Pete
I don't currently use any of the Maven Eclipse IDE integration plugins
and just use
Eclipse's external tools facility to run mvn for any selected folder
in Eclipse's 'Package Explorer' pane.

At least this way you know Maven is behaving as it does from the
command line, for new dependency I add to pom.xml and run
eclipse:eclipse, but this
can be done from inside Eclipse aswell.

e.g.

Set up a new External Tool as follows :

Name:  mvn clean install

Location:   ${env_var:M2_HOME}/bin/mvn.bat

Working Directory: ${resource_loc}

Arguments:  clean install

Then just select the folder or project in the Eclipse Java Tree
(folder must have a pom.xml in it) then select this external tool 'mvn
clean install' - once run once it will be on the drop down.

You can set up the common maven goals like this, then share the
External tools configuration by using the 'Common' tab and specifying
a folder that is under SCM.

Also can set up an 'General Project' in Eclipse that points to your
local repo folder, this allows you to search this area and open pom
files if necessary.

I would gladly swap to a Plugin but there always seems to be
unexpected side effects.

On 18/09/2007, Pete [EMAIL PROTECTED] wrote:
 I use Eclipse and the External Tools configuration to run mvn from
 within eclipse if needed.

 I used to have Eclipse compiling to a different classes directory and
 that worked fine for many projects, but recently I use  'mvn
 jetty:run'  all the time so that when I save a java file in Eclipse it
 gets compiled immediately by Eclipse and the change will be instantly
 visible in Jetty. Working this way eclipse and mvn must compile to
 same place, as jetty start up using the classpath that mvn is using.


 On 17/09/2007, Jim Sellers [EMAIL PROTECTED] wrote:
  I'd take a look at what files are generated when you create a new project
  using SAP.  Are there other folders / files that are created?  (starting
  with a dot).
 
  Are there project natures / builders that are not being included (in the
  .project file)?
 
  It sounds like there is *something* missing that SAP is reading / looking
  at.
 
  Jim
 
 
  On 9/17/07, Wayne Fay [EMAIL PROTECTED] wrote:
  
   Since we're talking about Eclipse... As I said before, I'm using SAP
   NWDS (2.0.14) which is based on Eclipse v2.1. I'm using
   eclipse:eclipse to generate metadata and added the proper perspectives
   etc.
  
   When I create a new project (J2EE, EJB Module Project or Web Module
   Project) then it shows up in the J2EE Explorer and things are good.
  
   When I use mvn e:e and then import the project, it comes in as a
   standard Java project. I've tried editing metadata files manually
   but its still not coming up the way I was hoping. The EJB project
   shows up in J2EE Explorer but the beans don't show up since I'm not
   using the default ejbModule directory etc.
  
   Any ideas? I might try upgrading to the latest NWDS build which is
   based on Eclipse 3, apparently.
  
   Wayne
  
   On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote:
There can be problems caused with a single build destination caused by
   the
Eclipse incremental compiler that would sometimes require doing a clean
   in
both maven and eclipse.
   
  
   -
   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: Eclipse and Maven best practice

2007-09-17 Thread Wayne Fay
Since we're talking about Eclipse... As I said before, I'm using SAP
NWDS (2.0.14) which is based on Eclipse v2.1. I'm using
eclipse:eclipse to generate metadata and added the proper perspectives
etc.

When I create a new project (J2EE, EJB Module Project or Web Module
Project) then it shows up in the J2EE Explorer and things are good.

When I use mvn e:e and then import the project, it comes in as a
standard Java project. I've tried editing metadata files manually
but its still not coming up the way I was hoping. The EJB project
shows up in J2EE Explorer but the beans don't show up since I'm not
using the default ejbModule directory etc.

Any ideas? I might try upgrading to the latest NWDS build which is
based on Eclipse 3, apparently.

Wayne

On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote:
 There can be problems caused with a single build destination caused by the
 Eclipse incremental compiler that would sometimes require doing a clean in
 both maven and eclipse.


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



Re: Eclipse and Maven best practice

2007-09-17 Thread Alexander Sack
Thierry is definitely right that you can run into inconsistencies between
the incremental Eclipse builds versus Maven builds. I've had to do
occasionally some Project-Cleans to get rid of the red.

Wayne I would DEFINITELY upgrade to an Eclipse 3.x product.  I think in
general you would be better off (provided the SAP bits are still
compatible).  Do you use any Eclipse based plugin such as m2eclipse or q4e
with NWDS?  If not and its possible, I would definitely encourage you to at
least try it.

-aps

On 9/17/07, Wayne Fay [EMAIL PROTECTED] wrote:

 Since we're talking about Eclipse... As I said before, I'm using SAP
 NWDS (2.0.14) which is based on Eclipse v2.1. I'm using
 eclipse:eclipse to generate metadata and added the proper perspectives
 etc.

 When I create a new project (J2EE, EJB Module Project or Web Module
 Project) then it shows up in the J2EE Explorer and things are good.

 When I use mvn e:e and then import the project, it comes in as a
 standard Java project. I've tried editing metadata files manually
 but its still not coming up the way I was hoping. The EJB project
 shows up in J2EE Explorer but the beans don't show up since I'm not
 using the default ejbModule directory etc.

 Any ideas? I might try upgrading to the latest NWDS build which is
 based on Eclipse 3, apparently.

 Wayne

 On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote:
  There can be problems caused with a single build destination caused by
 the
  Eclipse incremental compiler that would sometimes require doing a clean
 in
  both maven and eclipse.
 

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




-- 
What lies behind us and what lies in front of us is of little concern to
what lies within us. -Ralph Waldo Emerson


Re: Eclipse and Maven best practice

2007-09-17 Thread Jim Sellers
I'd take a look at what files are generated when you create a new project
using SAP.  Are there other folders / files that are created?  (starting
with a dot).

Are there project natures / builders that are not being included (in the
.project file)?

It sounds like there is *something* missing that SAP is reading / looking
at.

Jim


On 9/17/07, Wayne Fay [EMAIL PROTECTED] wrote:

 Since we're talking about Eclipse... As I said before, I'm using SAP
 NWDS (2.0.14) which is based on Eclipse v2.1. I'm using
 eclipse:eclipse to generate metadata and added the proper perspectives
 etc.

 When I create a new project (J2EE, EJB Module Project or Web Module
 Project) then it shows up in the J2EE Explorer and things are good.

 When I use mvn e:e and then import the project, it comes in as a
 standard Java project. I've tried editing metadata files manually
 but its still not coming up the way I was hoping. The EJB project
 shows up in J2EE Explorer but the beans don't show up since I'm not
 using the default ejbModule directory etc.

 Any ideas? I might try upgrading to the latest NWDS build which is
 based on Eclipse 3, apparently.

 Wayne

 On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote:
  There can be problems caused with a single build destination caused by
 the
  Eclipse incremental compiler that would sometimes require doing a clean
 in
  both maven and eclipse.
 

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




Re: Eclipse and Maven best practice

2007-09-16 Thread Thierry Lach
There can be problems caused with a single build destination caused by the
Eclipse incremental compiler that would sometimes require doing a clean in
both maven and eclipse.

On 9/14/07, Jim Sellers [EMAIL PROTECTED] wrote:

 I've used separate locations for a few reasons:
 1) in web apps to keep the default location (WEB-INF/classes)
 2) in eclipse it'll build to one location, in maven it builds to 2
 (classes,
 test-classes) and I wanted to keep that behaviour
 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean
 when I just back into eclipse
 4) I like to have the tools keep as close to their default behaviour as
 possible so that the ideas from either tool don't leak into the other.
 5) because I enjoy pain?

 You're right: it's mostly to avoid having to refresh eclipse and have it
 totally rebuild everything. ;-)

 Jim


 On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:
 
  That's interesting - why separate locations?  To avoid having to refresh
  in
  Eclipse when a maven build is run?
 
  On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
  
   I've had the most success with using maven and eclipse by:
   1) having both systems build to a separate locations
   2) using command line to run maven and when I need to sync up metadata
   using
   eclipse:eclipse then hitting refresh in eclipse.
   3) for any eclipse specific data (.classpath, .mymetadata, etc),
 having
   those are part of the .cvsignore (not checked into source control)
  
   Not against anyone who has worked on the m2e or q4e plug-ins, but when
 I
   tried any plug-ins that were available close to a year ago (?) I had
   troubles.  I still have not found a reason to move away from the
 command
   line.
  
   Jim
  
  
   On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
   
I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project
 at
work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
added.
   
Among the things they took away in this customized Eclipse is the
ability to add plugins etc the usual way through the menu system.
   
I'm wondering if anyone else is stuck using NWDS and if there's
 any
chance to use m2e or q4e etc with this tool?
   
Wayne
   
On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
 Is there any reason why you don't use a Maven/Eclipse plugin such
 as
 m2eclipse and now q4e?  They integrate fully into Eclipse's build
  and
   do
 autodependency management.  Also have you setup a CLASSPATH
  Container
 variable within Eclipse in order to use your local M2 repository?

 See here:

 http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

 And for plugins:

 http://m2eclipse.codehaus.org/
 http://code.google.com/p/q4e/

 -aps

 On 9/13/07, zm [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  Can anyone help me with the best way to setup a Maven/Eclipse
environment?
  I
  know there is a goal to produce an eclipse project with the pom,
  but
I'm
  trying to understand how to create one at hand, customise and
   include
it's
  dependencies.
 
  I have created 2 projects, appTest and appCommon. The main
   project
is
  appTest that depends on appCommon.
 
  The source directories are the default Maven (src/main/java) and
   that
  directory is configured as source in eclipse, so it can
 compile
   the
  code.
 
  Then I've configured a specific directory build (same level as
  the
src
  above), that eclipse will use to put the compiled classes (this
   folder
  will
  be ignored for SVN/CVS integration).
 
  Everything looks great, and works nicelly. Or so it seems ...
 
  No let's say I put a dependency on version Log4J 1.0. I make
 some
   code
  accessing it, then eclipse will just mark it as invalid, since
 the
Log4J
  is
  not in it's classpath. Maven, on the other end, downloads it
 from
central
  repository and compiles successfully.
 
  Now what would be the best way to put it to compile in eclipse?
 
  The way I see it, I can include it in the project's classpath,
 and
point
  it
  to the local repository jar that maven just downloaded.
 
  Would this be the best option?
  --
  View this message in context:
 
   
  
 
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
 
   -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 What lies behind us and what lies in front of us is of little
  concern
to
 what lies within us. -Ralph Waldo Emerson

   
   
 

Re: Eclipse and Maven best practice

2007-09-14 Thread Alexander Vaisberg

You must this dependency to the pom add.

zm schrieb:

Hi,

Can anyone help me with the best way to setup a Maven/Eclipse environment? I
know there is a goal to produce an eclipse project with the pom, but I'm
trying to understand how to create one at hand, customise and include it's
dependencies.

I have created 2 projects, appTest and appCommon. The main project is
appTest that depends on appCommon.

The source directories are the default Maven (src/main/java) and that
directory is configured as source in eclipse, so it can compile the code.

Then I've configured a specific directory build (same level as the src
above), that eclipse will use to put the compiled classes (this folder will
be ignored for SVN/CVS integration).

Everything looks great, and works nicelly. Or so it seems ...

No let's say I put a dependency on version Log4J 1.0. I make some code
accessing it, then eclipse will just mark it as invalid, since the Log4J is
not in it's classpath. Maven, on the other end, downloads it from central
repository and compiles successfully.

Now what would be the best way to put it to compile in eclipse?

The way I see it, I can include it in the project's classpath, and point it
to the local repository jar that maven just downloaded.

Would this be the best option?
  



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



Re: Eclipse and Maven best practice

2007-09-14 Thread thebugslayer
$ mvn eclipse:m2clipse
seems to works really well for me in Eclipse3.3. It creates a
M2Libraries that automatically loads the jars into eclipse classpath.

The only trouble I have is if I want my project to have WTP nature
enable... I've used
$ mvn eclipse:m2clipse -Dwtpversion=1.5
but then I have to do some manual clean up before able to run(like
enable M2LIB in J2EE modules in project settings.). I guess it's not
up to date.

-Z

On 9/14/07, Alexander Vaisberg [EMAIL PROTECTED] wrote:
 You must this dependency to the pom add.

 zm schrieb:
  Hi,
 
  Can anyone help me with the best way to setup a Maven/Eclipse environment? I
  know there is a goal to produce an eclipse project with the pom, but I'm
  trying to understand how to create one at hand, customise and include it's
  dependencies.
 
  I have created 2 projects, appTest and appCommon. The main project is
  appTest that depends on appCommon.
 
  The source directories are the default Maven (src/main/java) and that
  directory is configured as source in eclipse, so it can compile the code.
 
  Then I've configured a specific directory build (same level as the src
  above), that eclipse will use to put the compiled classes (this folder will
  be ignored for SVN/CVS integration).
 
  Everything looks great, and works nicelly. Or so it seems ...
 
  No let's say I put a dependency on version Log4J 1.0. I make some code
  accessing it, then eclipse will just mark it as invalid, since the Log4J is
  not in it's classpath. Maven, on the other end, downloads it from central
  repository and compiles successfully.
 
  Now what would be the best way to put it to compile in eclipse?
 
  The way I see it, I can include it in the project's classpath, and point it
  to the local repository jar that maven just downloaded.
 
  Would this be the best option?
 


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




-- 
/bugslayer

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



Re: Eclipse and Maven best practice

2007-09-14 Thread Dave Feltenberger
That's interesting - why separate locations?  To avoid having to refresh in
Eclipse when a maven build is run?

On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:

 I've had the most success with using maven and eclipse by:
 1) having both systems build to a separate locations
 2) using command line to run maven and when I need to sync up metadata
 using
 eclipse:eclipse then hitting refresh in eclipse.
 3) for any eclipse specific data (.classpath, .mymetadata, etc), having
 those are part of the .cvsignore (not checked into source control)

 Not against anyone who has worked on the m2e or q4e plug-ins, but when I
 tried any plug-ins that were available close to a year ago (?) I had
 troubles.  I still have not found a reason to move away from the command
 line.

 Jim


 On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
 
  I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
  work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
  added.
 
  Among the things they took away in this customized Eclipse is the
  ability to add plugins etc the usual way through the menu system.
 
  I'm wondering if anyone else is stuck using NWDS and if there's any
  chance to use m2e or q4e etc with this tool?
 
  Wayne
 
  On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
   Is there any reason why you don't use a Maven/Eclipse plugin such as
   m2eclipse and now q4e?  They integrate fully into Eclipse's build and
 do
   autodependency management.  Also have you setup a CLASSPATH Container
   variable within Eclipse in order to use your local M2 repository?
  
   See here:
  
   http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
  
   And for plugins:
  
   http://m2eclipse.codehaus.org/
   http://code.google.com/p/q4e/
  
   -aps
  
   On 9/13/07, zm [EMAIL PROTECTED] wrote:
   
   
Hi,
   
Can anyone help me with the best way to setup a Maven/Eclipse
  environment?
I
know there is a goal to produce an eclipse project with the pom, but
  I'm
trying to understand how to create one at hand, customise and
 include
  it's
dependencies.
   
I have created 2 projects, appTest and appCommon. The main
 project
  is
appTest that depends on appCommon.
   
The source directories are the default Maven (src/main/java) and
 that
directory is configured as source in eclipse, so it can compile
 the
code.
   
Then I've configured a specific directory build (same level as the
  src
above), that eclipse will use to put the compiled classes (this
 folder
will
be ignored for SVN/CVS integration).
   
Everything looks great, and works nicelly. Or so it seems ...
   
No let's say I put a dependency on version Log4J 1.0. I make some
 code
accessing it, then eclipse will just mark it as invalid, since the
  Log4J
is
not in it's classpath. Maven, on the other end, downloads it from
  central
repository and compiles successfully.
   
Now what would be the best way to put it to compile in eclipse?
   
The way I see it, I can include it in the project's classpath, and
  point
it
to the local repository jar that maven just downloaded.
   
Would this be the best option?
--
View this message in context:
   
 
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
Sent from the Maven - Users mailing list archive at Nabble.com.
   
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   What lies behind us and what lies in front of us is of little concern
  to
   what lies within us. -Ralph Waldo Emerson
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Eclipse and Maven best practice

2007-09-14 Thread Rodrigo Madera
Since you brought that up, let me take advantage of this oportunity to ask
users:

I have always used m2. How would that compare to q4e?

Thanks,
Rodrigo

On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:

 That's interesting - why separate locations?  To avoid having to refresh
 in
 Eclipse when a maven build is run?

 On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
 
  I've had the most success with using maven and eclipse by:
  1) having both systems build to a separate locations
  2) using command line to run maven and when I need to sync up metadata
  using
  eclipse:eclipse then hitting refresh in eclipse.
  3) for any eclipse specific data (.classpath, .mymetadata, etc), having
  those are part of the .cvsignore (not checked into source control)
 
  Not against anyone who has worked on the m2e or q4e plug-ins, but when I
  tried any plug-ins that were available close to a year ago (?) I had
  troubles.  I still have not found a reason to move away from the command
  line.
 
  Jim
 
 
  On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
  
   I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
   work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
   added.
  
   Among the things they took away in this customized Eclipse is the
   ability to add plugins etc the usual way through the menu system.
  
   I'm wondering if anyone else is stuck using NWDS and if there's any
   chance to use m2e or q4e etc with this tool?
  
   Wayne
  
   On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
Is there any reason why you don't use a Maven/Eclipse plugin such as
m2eclipse and now q4e?  They integrate fully into Eclipse's build
 and
  do
autodependency management.  Also have you setup a CLASSPATH
 Container
variable within Eclipse in order to use your local M2 repository?
   
See here:
   
http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
   
And for plugins:
   
http://m2eclipse.codehaus.org/
http://code.google.com/p/q4e/
   
-aps
   
On 9/13/07, zm [EMAIL PROTECTED] wrote:


 Hi,

 Can anyone help me with the best way to setup a Maven/Eclipse
   environment?
 I
 know there is a goal to produce an eclipse project with the pom,
 but
   I'm
 trying to understand how to create one at hand, customise and
  include
   it's
 dependencies.

 I have created 2 projects, appTest and appCommon. The main
  project
   is
 appTest that depends on appCommon.

 The source directories are the default Maven (src/main/java) and
  that
 directory is configured as source in eclipse, so it can compile
  the
 code.

 Then I've configured a specific directory build (same level as
 the
   src
 above), that eclipse will use to put the compiled classes (this
  folder
 will
 be ignored for SVN/CVS integration).

 Everything looks great, and works nicelly. Or so it seems ...

 No let's say I put a dependency on version Log4J 1.0. I make some
  code
 accessing it, then eclipse will just mark it as invalid, since the
   Log4J
 is
 not in it's classpath. Maven, on the other end, downloads it from
   central
 repository and compiles successfully.

 Now what would be the best way to put it to compile in eclipse?

 The way I see it, I can include it in the project's classpath, and
   point
 it
 to the local repository jar that maven just downloaded.

 Would this be the best option?
 --
 View this message in context:

  
 
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
 Sent from the Maven - Users mailing list archive at Nabble.com.



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


   
   
--
What lies behind us and what lies in front of us is of little
 concern
   to
what lies within us. -Ralph Waldo Emerson
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 




-- 
If Jack Bauer had been a Spartan, the movie would have been called 1.


Re: Eclipse and Maven best practice

2007-09-14 Thread Dave Feltenberger
I haven't had the time/inclination to try out q4e yet.  I didn't like m2
when I tried it a few weeks ago, though.  I'd be interested to see what
people think of q4e so far...


On 9/14/07, Rodrigo Madera [EMAIL PROTECTED] wrote:

 Since you brought that up, let me take advantage of this oportunity to ask
 users:

 I have always used m2. How would that compare to q4e?

 Thanks,
 Rodrigo

 On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:
 
  That's interesting - why separate locations?  To avoid having to refresh
  in
  Eclipse when a maven build is run?
 
  On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
  
   I've had the most success with using maven and eclipse by:
   1) having both systems build to a separate locations
   2) using command line to run maven and when I need to sync up metadata
   using
   eclipse:eclipse then hitting refresh in eclipse.
   3) for any eclipse specific data (.classpath, .mymetadata, etc),
 having
   those are part of the .cvsignore (not checked into source control)
  
   Not against anyone who has worked on the m2e or q4e plug-ins, but when
 I
   tried any plug-ins that were available close to a year ago (?) I had
   troubles.  I still have not found a reason to move away from the
 command
   line.
  
   Jim
  
  
   On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
   
I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project
 at
work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
added.
   
Among the things they took away in this customized Eclipse is the
ability to add plugins etc the usual way through the menu system.
   
I'm wondering if anyone else is stuck using NWDS and if there's
 any
chance to use m2e or q4e etc with this tool?
   
Wayne
   
On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
 Is there any reason why you don't use a Maven/Eclipse plugin such
 as
 m2eclipse and now q4e?  They integrate fully into Eclipse's build
  and
   do
 autodependency management.  Also have you setup a CLASSPATH
  Container
 variable within Eclipse in order to use your local M2 repository?

 See here:

 http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

 And for plugins:

 http://m2eclipse.codehaus.org/
 http://code.google.com/p/q4e/

 -aps

 On 9/13/07, zm [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  Can anyone help me with the best way to setup a Maven/Eclipse
environment?
  I
  know there is a goal to produce an eclipse project with the pom,
  but
I'm
  trying to understand how to create one at hand, customise and
   include
it's
  dependencies.
 
  I have created 2 projects, appTest and appCommon. The main
   project
is
  appTest that depends on appCommon.
 
  The source directories are the default Maven (src/main/java) and
   that
  directory is configured as source in eclipse, so it can
 compile
   the
  code.
 
  Then I've configured a specific directory build (same level as
  the
src
  above), that eclipse will use to put the compiled classes (this
   folder
  will
  be ignored for SVN/CVS integration).
 
  Everything looks great, and works nicelly. Or so it seems ...
 
  No let's say I put a dependency on version Log4J 1.0. I make
 some
   code
  accessing it, then eclipse will just mark it as invalid, since
 the
Log4J
  is
  not in it's classpath. Maven, on the other end, downloads it
 from
central
  repository and compiles successfully.
 
  Now what would be the best way to put it to compile in eclipse?
 
  The way I see it, I can include it in the project's classpath,
 and
point
  it
  to the local repository jar that maven just downloaded.
 
  Would this be the best option?
  --
  View this message in context:
 
   
  
 
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
 
   -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 What lies behind us and what lies in front of us is of little
  concern
to
 what lies within us. -Ralph Waldo Emerson

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



 --
 If Jack Bauer had been a Spartan, the movie would have been called 1.



Re: Eclipse and Maven best practice

2007-09-14 Thread Jim Sellers
I've used separate locations for a few reasons:
1) in web apps to keep the default location (WEB-INF/classes)
2) in eclipse it'll build to one location, in maven it builds to 2 (classes,
test-classes) and I wanted to keep that behaviour
3) if I run mvn clean or mvn site (etc), I don't have to do a full clean
when I just back into eclipse
4) I like to have the tools keep as close to their default behaviour as
possible so that the ideas from either tool don't leak into the other.
5) because I enjoy pain?

You're right: it's mostly to avoid having to refresh eclipse and have it
totally rebuild everything. ;-)

Jim


On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:

 That's interesting - why separate locations?  To avoid having to refresh
 in
 Eclipse when a maven build is run?

 On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
 
  I've had the most success with using maven and eclipse by:
  1) having both systems build to a separate locations
  2) using command line to run maven and when I need to sync up metadata
  using
  eclipse:eclipse then hitting refresh in eclipse.
  3) for any eclipse specific data (.classpath, .mymetadata, etc), having
  those are part of the .cvsignore (not checked into source control)
 
  Not against anyone who has worked on the m2e or q4e plug-ins, but when I
  tried any plug-ins that were available close to a year ago (?) I had
  troubles.  I still have not found a reason to move away from the command
  line.
 
  Jim
 
 
  On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
  
   I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
   work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
   added.
  
   Among the things they took away in this customized Eclipse is the
   ability to add plugins etc the usual way through the menu system.
  
   I'm wondering if anyone else is stuck using NWDS and if there's any
   chance to use m2e or q4e etc with this tool?
  
   Wayne
  
   On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
Is there any reason why you don't use a Maven/Eclipse plugin such as
m2eclipse and now q4e?  They integrate fully into Eclipse's build
 and
  do
autodependency management.  Also have you setup a CLASSPATH
 Container
variable within Eclipse in order to use your local M2 repository?
   
See here:
   
http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
   
And for plugins:
   
http://m2eclipse.codehaus.org/
http://code.google.com/p/q4e/
   
-aps
   
On 9/13/07, zm [EMAIL PROTECTED] wrote:


 Hi,

 Can anyone help me with the best way to setup a Maven/Eclipse
   environment?
 I
 know there is a goal to produce an eclipse project with the pom,
 but
   I'm
 trying to understand how to create one at hand, customise and
  include
   it's
 dependencies.

 I have created 2 projects, appTest and appCommon. The main
  project
   is
 appTest that depends on appCommon.

 The source directories are the default Maven (src/main/java) and
  that
 directory is configured as source in eclipse, so it can compile
  the
 code.

 Then I've configured a specific directory build (same level as
 the
   src
 above), that eclipse will use to put the compiled classes (this
  folder
 will
 be ignored for SVN/CVS integration).

 Everything looks great, and works nicelly. Or so it seems ...

 No let's say I put a dependency on version Log4J 1.0. I make some
  code
 accessing it, then eclipse will just mark it as invalid, since the
   Log4J
 is
 not in it's classpath. Maven, on the other end, downloads it from
   central
 repository and compiles successfully.

 Now what would be the best way to put it to compile in eclipse?

 The way I see it, I can include it in the project's classpath, and
   point
 it
 to the local repository jar that maven just downloaded.

 Would this be the best option?
 --
 View this message in context:

  
 
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
 Sent from the Maven - Users mailing list archive at Nabble.com.



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


   
   
--
What lies behind us and what lies in front of us is of little
 concern
   to
what lies within us. -Ralph Waldo Emerson
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 



Re: Eclipse and Maven best practice

2007-09-14 Thread Dave Feltenberger
I'll have to give this a try.  I agree having Eclipse do a rebuild is
painful sometimes, especially if there are a lot of projects.  I never
really thought about having two separate output directories, for some
reason.

One more experiment to add to the to-do list...

On 9/14/07, Jim Sellers [EMAIL PROTECTED] wrote:

 I've used separate locations for a few reasons:
 1) in web apps to keep the default location (WEB-INF/classes)
 2) in eclipse it'll build to one location, in maven it builds to 2
 (classes,
 test-classes) and I wanted to keep that behaviour
 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean
 when I just back into eclipse
 4) I like to have the tools keep as close to their default behaviour as
 possible so that the ideas from either tool don't leak into the other.
 5) because I enjoy pain?

 You're right: it's mostly to avoid having to refresh eclipse and have it
 totally rebuild everything. ;-)

 Jim


 On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:
 
  That's interesting - why separate locations?  To avoid having to refresh
  in
  Eclipse when a maven build is run?
 
  On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
  
   I've had the most success with using maven and eclipse by:
   1) having both systems build to a separate locations
   2) using command line to run maven and when I need to sync up metadata
   using
   eclipse:eclipse then hitting refresh in eclipse.
   3) for any eclipse specific data (.classpath, .mymetadata, etc),
 having
   those are part of the .cvsignore (not checked into source control)
  
   Not against anyone who has worked on the m2e or q4e plug-ins, but when
 I
   tried any plug-ins that were available close to a year ago (?) I had
   troubles.  I still have not found a reason to move away from the
 command
   line.
  
   Jim
  
  
   On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
   
I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project
 at
work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
added.
   
Among the things they took away in this customized Eclipse is the
ability to add plugins etc the usual way through the menu system.
   
I'm wondering if anyone else is stuck using NWDS and if there's
 any
chance to use m2e or q4e etc with this tool?
   
Wayne
   
On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
 Is there any reason why you don't use a Maven/Eclipse plugin such
 as
 m2eclipse and now q4e?  They integrate fully into Eclipse's build
  and
   do
 autodependency management.  Also have you setup a CLASSPATH
  Container
 variable within Eclipse in order to use your local M2 repository?

 See here:

 http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

 And for plugins:

 http://m2eclipse.codehaus.org/
 http://code.google.com/p/q4e/

 -aps

 On 9/13/07, zm [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  Can anyone help me with the best way to setup a Maven/Eclipse
environment?
  I
  know there is a goal to produce an eclipse project with the pom,
  but
I'm
  trying to understand how to create one at hand, customise and
   include
it's
  dependencies.
 
  I have created 2 projects, appTest and appCommon. The main
   project
is
  appTest that depends on appCommon.
 
  The source directories are the default Maven (src/main/java) and
   that
  directory is configured as source in eclipse, so it can
 compile
   the
  code.
 
  Then I've configured a specific directory build (same level as
  the
src
  above), that eclipse will use to put the compiled classes (this
   folder
  will
  be ignored for SVN/CVS integration).
 
  Everything looks great, and works nicelly. Or so it seems ...
 
  No let's say I put a dependency on version Log4J 1.0. I make
 some
   code
  accessing it, then eclipse will just mark it as invalid, since
 the
Log4J
  is
  not in it's classpath. Maven, on the other end, downloads it
 from
central
  repository and compiles successfully.
 
  Now what would be the best way to put it to compile in eclipse?
 
  The way I see it, I can include it in the project's classpath,
 and
point
  it
  to the local repository jar that maven just downloaded.
 
  Would this be the best option?
  --
  View this message in context:
 
   
  
 
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
 
   -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 What lies behind us and what lies in front of us is of little
  concern
to
 

Re: Eclipse and Maven best practice

2007-09-14 Thread Rodrigo Madera
Maven and Eclipse are tricky to get together well.

I use m2, and from time to time I've lost hours of otherwise productive time
trying to figure out why things were not working. I could name a lot of
issues, like dependency problems and removed compiled classes that weren't
being rebuilt.

Sometimes a simple right click + Disable Maven + Enable Maven would suffice,
sometimes it won't.

Not to mention the _REALLY_ annoying issue that m2 only build the correct
eclipse project if the project compiles successfully. That means that if
your 300+ class project has a single little tiny problem, you don't get an
eclipse project with the correct source directory.

This is by far something that would make me switch to q4e if it doesn't have
the problem.

Speak up there people! Let's see if we can get Eclipse + Maven more
productive with some input.
Who knows, maybe the a m2 hears my cry and helps us out =o)

Yours,
Rodrigo Madera


On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:

 I haven't had the time/inclination to try out q4e yet.  I didn't like m2
 when I tried it a few weeks ago, though.  I'd be interested to see what
 people think of q4e so far...


 On 9/14/07, Rodrigo Madera [EMAIL PROTECTED] wrote:
 
  Since you brought that up, let me take advantage of this oportunity to
 ask
  users:
 
  I have always used m2. How would that compare to q4e?
 
  Thanks,
  Rodrigo
 
  On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:
  
   That's interesting - why separate locations?  To avoid having to
 refresh
   in
   Eclipse when a maven build is run?
  
   On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
   
I've had the most success with using maven and eclipse by:
1) having both systems build to a separate locations
2) using command line to run maven and when I need to sync up
 metadata
using
eclipse:eclipse then hitting refresh in eclipse.
3) for any eclipse specific data (.classpath, .mymetadata, etc),
  having
those are part of the .cvsignore (not checked into source control)
   
Not against anyone who has worked on the m2e or q4e plug-ins, but
 when
  I
tried any plug-ins that were available close to a year ago (?) I had
troubles.  I still have not found a reason to move away from the
  command
line.
   
Jim
   
   
On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:

 I'm recently involved in an SAP NWDS (NetWeaver Dev Studio)
 project
  at
 work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
 added.

 Among the things they took away in this customized Eclipse is the
 ability to add plugins etc the usual way through the menu system.

 I'm wondering if anyone else is stuck using NWDS and if there's
  any
 chance to use m2e or q4e etc with this tool?

 Wayne

 On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
  Is there any reason why you don't use a Maven/Eclipse plugin
 such
  as
  m2eclipse and now q4e?  They integrate fully into Eclipse's
 build
   and
do
  autodependency management.  Also have you setup a CLASSPATH
   Container
  variable within Eclipse in order to use your local M2
 repository?
 
  See here:
 
 
 http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
 
  And for plugins:
 
  http://m2eclipse.codehaus.org/
  http://code.google.com/p/q4e/
 
  -aps
 
  On 9/13/07, zm [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   Can anyone help me with the best way to setup a Maven/Eclipse
 environment?
   I
   know there is a goal to produce an eclipse project with the
 pom,
   but
 I'm
   trying to understand how to create one at hand, customise and
include
 it's
   dependencies.
  
   I have created 2 projects, appTest and appCommon. The main
project
 is
   appTest that depends on appCommon.
  
   The source directories are the default Maven (src/main/java)
 and
that
   directory is configured as source in eclipse, so it can
  compile
the
   code.
  
   Then I've configured a specific directory build (same level
 as
   the
 src
   above), that eclipse will use to put the compiled classes
 (this
folder
   will
   be ignored for SVN/CVS integration).
  
   Everything looks great, and works nicelly. Or so it seems ...
  
   No let's say I put a dependency on version Log4J 1.0. I make
  some
code
   accessing it, then eclipse will just mark it as invalid, since
  the
 Log4J
   is
   not in it's classpath. Maven, on the other end, downloads it
  from
 central
   repository and compiles successfully.
  
   Now what would be the best way to put it to compile in
 eclipse?
  
   The way I see it, I can include it in the project's classpath,
  and
 point
   it
   to the local repository jar that maven just 

RE: Eclipse and Maven best practice

2007-09-14 Thread Jeff Jensen


 -Original Message-
 From: Jim Sellers [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 14, 2007 3:23 PM
 To: Maven Users List
 Subject: Re: Eclipse and Maven best practice
 
 I've used separate locations for a few reasons:
 1) in web apps to keep the default location (WEB-INF/classes)

It is easy to adjust Maven to use this location, if you don't mind that.


 2) in eclipse it'll build to one location, in maven it builds to 2
(classes,
 test-classes) and I wanted to keep that behavior

You can configure Eclipse to compile source dirs to different locations
(output dirs), and therefore match the Maven target dirs.   In fact, the
Maven 2 Eclipse plugins generate Eclipse configs to match that.


 3) if I run mvn clean or mvn site (etc), I don't have to do a full clean
 when I just back into eclipse

If you had Maven and Eclipse build to the same output dirs, building one
actually builds for both.


 4) I like to have the tools keep as close to their default behaviour as
 possible so that the ideas from either tool don't leak into the other.

Which means you probably are not interested in my thoughts on your other
points ;-)


 5) because I enjoy pain?

Heh - to each his own :-)


 You're right: it's mostly to avoid having to refresh eclipse and have it
 totally rebuild everything. ;-)

You may enjoy a little config change as suggested above to prevent
rebuilding!

There is also an automatically refresh workspace Eclipse pref to do that
for you too.


 
 Jim
 
 
 On 9/14/07, Dave Feltenberger [EMAIL PROTECTED] wrote:
 
  That's interesting - why separate locations?  To avoid having to refresh
  in
  Eclipse when a maven build is run?
 
  On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
  
   I've had the most success with using maven and eclipse by:
   1) having both systems build to a separate locations
   2) using command line to run maven and when I need to sync up metadata
   using
   eclipse:eclipse then hitting refresh in eclipse.
   3) for any eclipse specific data (.classpath, .mymetadata, etc),
having
   those are part of the .cvsignore (not checked into source control)
  
   Not against anyone who has worked on the m2e or q4e plug-ins, but when
I
   tried any plug-ins that were available close to a year ago (?) I had
   troubles.  I still have not found a reason to move away from the
command
   line.
  
   Jim
  
  
   On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
   
I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project
at
work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
added.
   
Among the things they took away in this customized Eclipse is the
ability to add plugins etc the usual way through the menu system.
   
I'm wondering if anyone else is stuck using NWDS and if there's
any
chance to use m2e or q4e etc with this tool?
   
Wayne
   
On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
 Is there any reason why you don't use a Maven/Eclipse plugin such
as
 m2eclipse and now q4e?  They integrate fully into Eclipse's build
  and
   do
 autodependency management.  Also have you setup a CLASSPATH
  Container
 variable within Eclipse in order to use your local M2 repository?

 See here:

 http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

 And for plugins:

 http://m2eclipse.codehaus.org/
 http://code.google.com/p/q4e/

 -aps

 On 9/13/07, zm [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  Can anyone help me with the best way to setup a Maven/Eclipse
environment?
  I
  know there is a goal to produce an eclipse project with the pom,
  but
I'm
  trying to understand how to create one at hand, customise and
   include
it's
  dependencies.
 
  I have created 2 projects, appTest and appCommon. The main
   project
is
  appTest that depends on appCommon.
 
  The source directories are the default Maven (src/main/java) and
   that
  directory is configured as source in eclipse, so it can
compile
   the
  code.
 
  Then I've configured a specific directory build (same level as
  the
src
  above), that eclipse will use to put the compiled classes (this
   folder
  will
  be ignored for SVN/CVS integration).
 
  Everything looks great, and works nicelly. Or so it seems ...
 
  No let's say I put a dependency on version Log4J 1.0. I make
some
   code
  accessing it, then eclipse will just mark it as invalid, since
the
Log4J
  is
  not in it's classpath. Maven, on the other end, downloads it
from
central
  repository and compiles successfully.
 
  Now what would be the best way to put it to compile in eclipse?
 
  The way I see it, I can include it in the project's classpath,
and
point
  it
  to the local repository jar that maven just downloaded.
 
  Would this be the best option

Re: Eclipse and Maven best practice

2007-09-14 Thread Rodrigo Madera
Wow... sorry for so many typos. I'm in a serious rush.

Here's my previous email with applied corrections:

Maven and Eclipse are tricky to get together well.

 I use m2, and from time to time I've lost hours of otherwise productive
 time trying to figure out why things were not working. I could name a lot of
 issues, like dependency problems and classes that weren't being rebuilt.

 Sometimes a simple right click + Disable Maven + Enable Maven would
 suffice, sometimes it wouldn't.

 Not to mention the _REALLY_ annoying issue that m2 only builds the correct
 eclipse IDE project if the Maven project compiles successfully. That means
 that if your 300+ class project has a single little tiny problem, you don't
 get an eclipse project with the correct source directories configured.

 This is by far something that would make me switch to q4e if it doesn't
 have this problem.

 Speak up people! Let's see if we can get Eclipse + Maven more productive
 with some input.
 Who knows, maybe a developer from the m2 team hears my cry and helps us
 out =o)

 Yours,
 Rodrigo Madera


Sorry again,
Rodrigo


RE: Eclipse and Maven best practice

2007-09-13 Thread Hayes, Peter
http://maven.apache.org/plugins/maven-eclipse-plugin/overview.html
http://m2eclipse.codehaus.org/
http://code.google.com/p/q4e/ 

-Original Message-
From: zm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 13, 2007 10:54 AM
To: users@maven.apache.org
Subject: Eclipse and Maven best practice


Hi,

Can anyone help me with the best way to setup a Maven/Eclipse
environment? I
know there is a goal to produce an eclipse project with the pom, but I'm
trying to understand how to create one at hand, customise and include
it's
dependencies.

I have created 2 projects, appTest and appCommon. The main project
is
appTest that depends on appCommon.

The source directories are the default Maven (src/main/java) and that
directory is configured as source in eclipse, so it can compile the
code.

Then I've configured a specific directory build (same level as the
src
above), that eclipse will use to put the compiled classes (this folder
will
be ignored for SVN/CVS integration).

Everything looks great, and works nicelly. Or so it seems ...

No let's say I put a dependency on version Log4J 1.0. I make some code
accessing it, then eclipse will just mark it as invalid, since the Log4J
is
not in it's classpath. Maven, on the other end, downloads it from
central
repository and compiles successfully.

Now what would be the best way to put it to compile in eclipse?

The way I see it, I can include it in the project's classpath, and point
it
to the local repository jar that maven just downloaded.

Would this be the best option?
-- 
View this message in context:
http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s17
7.html#a12655883
Sent from the Maven - Users mailing list archive at Nabble.com.


-
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: Eclipse and Maven best practice

2007-09-13 Thread Alexander Sack
Is there any reason why you don't use a Maven/Eclipse plugin such as
m2eclipse and now q4e?  They integrate fully into Eclipse's build and do
autodependency management.  Also have you setup a CLASSPATH Container
variable within Eclipse in order to use your local M2 repository?

See here:

http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

And for plugins:

http://m2eclipse.codehaus.org/
http://code.google.com/p/q4e/

-aps

On 9/13/07, zm [EMAIL PROTECTED] wrote:


 Hi,

 Can anyone help me with the best way to setup a Maven/Eclipse environment?
 I
 know there is a goal to produce an eclipse project with the pom, but I'm
 trying to understand how to create one at hand, customise and include it's
 dependencies.

 I have created 2 projects, appTest and appCommon. The main project is
 appTest that depends on appCommon.

 The source directories are the default Maven (src/main/java) and that
 directory is configured as source in eclipse, so it can compile the
 code.

 Then I've configured a specific directory build (same level as the src
 above), that eclipse will use to put the compiled classes (this folder
 will
 be ignored for SVN/CVS integration).

 Everything looks great, and works nicelly. Or so it seems ...

 No let's say I put a dependency on version Log4J 1.0. I make some code
 accessing it, then eclipse will just mark it as invalid, since the Log4J
 is
 not in it's classpath. Maven, on the other end, downloads it from central
 repository and compiles successfully.

 Now what would be the best way to put it to compile in eclipse?

 The way I see it, I can include it in the project's classpath, and point
 it
 to the local repository jar that maven just downloaded.

 Would this be the best option?
 --
 View this message in context:
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




-- 
What lies behind us and what lies in front of us is of little concern to
what lies within us. -Ralph Waldo Emerson


Re: Eclipse and Maven best practice

2007-09-13 Thread Alexander Vaysberg

Hi,
It give a book a Better Builds with Maven vor free on the page:
http://www.devzuz.com/web/guest/products/resources#BBWM. I think it help 
you.


Alexander Vaysberg (pc-hilfe)
zm schrieb:

Hi,

Can anyone help me with the best way to setup a Maven/Eclipse environment? I
know there is a goal to produce an eclipse project with the pom, but I'm
trying to understand how to create one at hand, customise and include it's
dependencies.

I have created 2 projects, appTest and appCommon. The main project is
appTest that depends on appCommon.

The source directories are the default Maven (src/main/java) and that
directory is configured as source in eclipse, so it can compile the code.

Then I've configured a specific directory build (same level as the src
above), that eclipse will use to put the compiled classes (this folder will
be ignored for SVN/CVS integration).

Everything looks great, and works nicelly. Or so it seems ...

No let's say I put a dependency on version Log4J 1.0. I make some code
accessing it, then eclipse will just mark it as invalid, since the Log4J is
not in it's classpath. Maven, on the other end, downloads it from central
repository and compiles successfully.

Now what would be the best way to put it to compile in eclipse?

The way I see it, I can include it in the project's classpath, and point it
to the local repository jar that maven just downloaded.

Would this be the best option?
  



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



Re: Eclipse and Maven best practice

2007-09-13 Thread Wayne Fay
I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
added.

Among the things they took away in this customized Eclipse is the
ability to add plugins etc the usual way through the menu system.

I'm wondering if anyone else is stuck using NWDS and if there's any
chance to use m2e or q4e etc with this tool?

Wayne

On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
 Is there any reason why you don't use a Maven/Eclipse plugin such as
 m2eclipse and now q4e?  They integrate fully into Eclipse's build and do
 autodependency management.  Also have you setup a CLASSPATH Container
 variable within Eclipse in order to use your local M2 repository?

 See here:

 http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

 And for plugins:

 http://m2eclipse.codehaus.org/
 http://code.google.com/p/q4e/

 -aps

 On 9/13/07, zm [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  Can anyone help me with the best way to setup a Maven/Eclipse environment?
  I
  know there is a goal to produce an eclipse project with the pom, but I'm
  trying to understand how to create one at hand, customise and include it's
  dependencies.
 
  I have created 2 projects, appTest and appCommon. The main project is
  appTest that depends on appCommon.
 
  The source directories are the default Maven (src/main/java) and that
  directory is configured as source in eclipse, so it can compile the
  code.
 
  Then I've configured a specific directory build (same level as the src
  above), that eclipse will use to put the compiled classes (this folder
  will
  be ignored for SVN/CVS integration).
 
  Everything looks great, and works nicelly. Or so it seems ...
 
  No let's say I put a dependency on version Log4J 1.0. I make some code
  accessing it, then eclipse will just mark it as invalid, since the Log4J
  is
  not in it's classpath. Maven, on the other end, downloads it from central
  repository and compiles successfully.
 
  Now what would be the best way to put it to compile in eclipse?
 
  The way I see it, I can include it in the project's classpath, and point
  it
  to the local repository jar that maven just downloaded.
 
  Would this be the best option?
  --
  View this message in context:
  http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
  Sent from the Maven - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 What lies behind us and what lies in front of us is of little concern to
 what lies within us. -Ralph Waldo Emerson


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



Re: Eclipse and Maven best practice

2007-09-13 Thread Jim Sellers
I've had the most success with using maven and eclipse by:
1) having both systems build to a separate locations
2) using command line to run maven and when I need to sync up metadata using
eclipse:eclipse then hitting refresh in eclipse.
3) for any eclipse specific data (.classpath, .mymetadata, etc), having
those are part of the .cvsignore (not checked into source control)

Not against anyone who has worked on the m2e or q4e plug-ins, but when I
tried any plug-ins that were available close to a year ago (?) I had
troubles.  I still have not found a reason to move away from the command
line.

Jim


On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:

 I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
 work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
 added.

 Among the things they took away in this customized Eclipse is the
 ability to add plugins etc the usual way through the menu system.

 I'm wondering if anyone else is stuck using NWDS and if there's any
 chance to use m2e or q4e etc with this tool?

 Wayne

 On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
  Is there any reason why you don't use a Maven/Eclipse plugin such as
  m2eclipse and now q4e?  They integrate fully into Eclipse's build and do
  autodependency management.  Also have you setup a CLASSPATH Container
  variable within Eclipse in order to use your local M2 repository?
 
  See here:
 
  http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
 
  And for plugins:
 
  http://m2eclipse.codehaus.org/
  http://code.google.com/p/q4e/
 
  -aps
 
  On 9/13/07, zm [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   Can anyone help me with the best way to setup a Maven/Eclipse
 environment?
   I
   know there is a goal to produce an eclipse project with the pom, but
 I'm
   trying to understand how to create one at hand, customise and include
 it's
   dependencies.
  
   I have created 2 projects, appTest and appCommon. The main project
 is
   appTest that depends on appCommon.
  
   The source directories are the default Maven (src/main/java) and that
   directory is configured as source in eclipse, so it can compile the
   code.
  
   Then I've configured a specific directory build (same level as the
 src
   above), that eclipse will use to put the compiled classes (this folder
   will
   be ignored for SVN/CVS integration).
  
   Everything looks great, and works nicelly. Or so it seems ...
  
   No let's say I put a dependency on version Log4J 1.0. I make some code
   accessing it, then eclipse will just mark it as invalid, since the
 Log4J
   is
   not in it's classpath. Maven, on the other end, downloads it from
 central
   repository and compiles successfully.
  
   Now what would be the best way to put it to compile in eclipse?
  
   The way I see it, I can include it in the project's classpath, and
 point
   it
   to the local repository jar that maven just downloaded.
  
   Would this be the best option?
   --
   View this message in context:
  
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
   Sent from the Maven - Users mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  What lies behind us and what lies in front of us is of little concern
 to
  what lies within us. -Ralph Waldo Emerson
 

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




Re: Eclipse and Maven best practice

2007-09-13 Thread Wayne Fay
This is the way I generally work, too. I just thought maybe I'd look
into one of these new tools since I'm back in Eclipse regularly and
have never really given any of these tools a chance.

Wayne

On 9/13/07, Jim Sellers [EMAIL PROTECTED] wrote:
 I've had the most success with using maven and eclipse by:
 1) having both systems build to a separate locations
 2) using command line to run maven and when I need to sync up metadata using
 eclipse:eclipse then hitting refresh in eclipse.
 3) for any eclipse specific data (.classpath, .mymetadata, etc), having
 those are part of the .cvsignore (not checked into source control)

 Not against anyone who has worked on the m2e or q4e plug-ins, but when I
 tried any plug-ins that were available close to a year ago (?) I had
 troubles.  I still have not found a reason to move away from the command
 line.

 Jim


 On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:
 
  I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
  work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
  added.
 
  Among the things they took away in this customized Eclipse is the
  ability to add plugins etc the usual way through the menu system.
 
  I'm wondering if anyone else is stuck using NWDS and if there's any
  chance to use m2e or q4e etc with this tool?
 
  Wayne
 
  On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
   Is there any reason why you don't use a Maven/Eclipse plugin such as
   m2eclipse and now q4e?  They integrate fully into Eclipse's build and do
   autodependency management.  Also have you setup a CLASSPATH Container
   variable within Eclipse in order to use your local M2 repository?
  
   See here:
  
   http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
  
   And for plugins:
  
   http://m2eclipse.codehaus.org/
   http://code.google.com/p/q4e/
  
   -aps
  
   On 9/13/07, zm [EMAIL PROTECTED] wrote:
   
   
Hi,
   
Can anyone help me with the best way to setup a Maven/Eclipse
  environment?
I
know there is a goal to produce an eclipse project with the pom, but
  I'm
trying to understand how to create one at hand, customise and include
  it's
dependencies.
   
I have created 2 projects, appTest and appCommon. The main project
  is
appTest that depends on appCommon.
   
The source directories are the default Maven (src/main/java) and that
directory is configured as source in eclipse, so it can compile the
code.
   
Then I've configured a specific directory build (same level as the
  src
above), that eclipse will use to put the compiled classes (this folder
will
be ignored for SVN/CVS integration).
   
Everything looks great, and works nicelly. Or so it seems ...
   
No let's say I put a dependency on version Log4J 1.0. I make some code
accessing it, then eclipse will just mark it as invalid, since the
  Log4J
is
not in it's classpath. Maven, on the other end, downloads it from
  central
repository and compiles successfully.
   
Now what would be the best way to put it to compile in eclipse?
   
The way I see it, I can include it in the project's classpath, and
  point
it
to the local repository jar that maven just downloaded.
   
Would this be the best option?
--
View this message in context:
   
  http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
Sent from the Maven - Users mailing list archive at Nabble.com.
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   What lies behind us and what lies in front of us is of little concern
  to
   what lies within us. -Ralph Waldo Emerson
  
 
  -
  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: Eclipse and Maven best practice

2007-09-13 Thread Lee Meador
Wayne,

I don't think you are going to get an m2e for Eclipse 2 and q4e, as I
remember, is for 3.3 (but maybe it works with 3.2 too).

But you can install pretty much as many versions of Eclipse as you want each
working on a different part of your code. Just put them in different
folders. I even use multiples of the same version with different groups of
plugins. Then start up the eclipse version you want but be careful about
pointing different versions at the same workspace. Sometimes a different
version or some plugin will store some configuration that causes some other
instance to die completely or go into slow-eclipse mode where everything
takes 20 seconds. It works pretty good to keep your source in a version
control (eg. SVN) and then set up multiple local workspaces tied to the
version control. Run the Eclipse you want against its own workspace and then
save the changes to the one repo and update to the other repo. Its like
working on two computers at once with the different versions. You can even
run multiple eclipse instances at the same time if you have the RAM.

-- Lee

On 9/13/07, Wayne Fay [EMAIL PROTECTED] wrote:

 I'm recently involved in an SAP NWDS (NetWeaver Dev Studio) project at
 work. NWDS is really just Eclipse 2.1 with some SAP-specific stuff
 added.

 Among the things they took away in this customized Eclipse is the
 ability to add plugins etc the usual way through the menu system.

 I'm wondering if anyone else is stuck using NWDS and if there's any
 chance to use m2e or q4e etc with this tool?

 Wayne

 On 9/13/07, Alexander Sack [EMAIL PROTECTED] wrote:
  Is there any reason why you don't use a Maven/Eclipse plugin such as
  m2eclipse and now q4e?  They integrate fully into Eclipse's build and do
  autodependency management.  Also have you setup a CLASSPATH Container
  variable within Eclipse in order to use your local M2 repository?
 
  See here:
 
  http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
 
  And for plugins:
 
  http://m2eclipse.codehaus.org/
  http://code.google.com/p/q4e/
 
  -aps
 
  On 9/13/07, zm [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   Can anyone help me with the best way to setup a Maven/Eclipse
 environment?
   I
   know there is a goal to produce an eclipse project with the pom, but
 I'm
   trying to understand how to create one at hand, customise and include
 it's
   dependencies.
  
   I have created 2 projects, appTest and appCommon. The main project
 is
   appTest that depends on appCommon.
  
   The source directories are the default Maven (src/main/java) and that
   directory is configured as source in eclipse, so it can compile the
   code.
  
   Then I've configured a specific directory build (same level as the
 src
   above), that eclipse will use to put the compiled classes (this folder
   will
   be ignored for SVN/CVS integration).
  
   Everything looks great, and works nicelly. Or so it seems ...
  
   No let's say I put a dependency on version Log4J 1.0. I make some code
   accessing it, then eclipse will just mark it as invalid, since the
 Log4J
   is
   not in it's classpath. Maven, on the other end, downloads it from
 central
   repository and compiles successfully.
  
   Now what would be the best way to put it to compile in eclipse?
  
   The way I see it, I can include it in the project's classpath, and
 point
   it
   to the local repository jar that maven just downloaded.
  
   Would this be the best option?
   --
   View this message in context:
  
 http://www.nabble.com/Eclipse-and-Maven-%22best-practice%22-tf4436040s177.html#a12655883
   Sent from the Maven - Users mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  What lies behind us and what lies in front of us is of little concern
 to
  what lies within us. -Ralph Waldo Emerson
 

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




-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com