Re: Eclipse/Maven2 integration info

2007-09-27 Thread Lee Meador
Alexander,

We sometimes do something like your Ant script but with batch/script files.
Its not cross-platform between Windows and Linux but each one is so simple
it doesn't matter much.

-- Lee

On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
>
> Hi Everybody:
>
> You know Eclipse/Maven2 integration at this point can be very confusing.
> You have three plugins, two of which are ECLIPSE plugins that integrate
> Maven2 while the other is a Maven2 plugin that happens to auto-generate
> files for Eclipse.  I wrote this below and I figured I would share to see
> if
> it helps anyone else.
>
> The main advantages of Codehaus and Q4E (which I plan to try very soon but
> I
> will assume it does similar things that Codehaus does) is that they
> integrate the POM dependency graph as part of your Eclipse project's Build
> Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> variable referenced in your .classpath file to use your local maven2
> repository (the M2_REPO variable in the directions - btw this is typical
> for
> other plugins like the JBoss tools).  Unfortunately the latter is not as
> dynamic when it comes to adding and deleting dependencies in your project.
>
> Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> and
> with 3.3 though for some reason its buggy under 3.3).
>
> What I do to setup a project is the following:
>
> - Use mvn archetype to setup the basic structure
> - Create a new Java project with Maven2 nature enabled
> - Import archetype directory structure into this project
> - Edit the Build Path within Eclipse
> - Use ant build file to execute mvn from within Eclipse
>
> Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse plugin):
>
> 1) In some temporary directory
> mvn archetype:create -DgroupId=com.example.project -DartifactId=MyProject
> 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> 3) Within MyProject use archetype plugin to create other modules which
> adds
> them to parent module, e.g.
>
> mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> mvn archetype create -DgroupId=com.example.project -DartifactId=war
>
> This will create two sub modules, one for war, one for ejb3.  You can
> change
> the packaging to war and jar (or ejb) respectively.
>
> 4) Now go into Eclipse and do a new project MyProject and import the
> MyProject you created above via Filesystem
> 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> dynamically change as you edit your POM hierarchy
> 6) Edit Build Path in Project's properties and remove MyProject.  Instead
> add the ejb3/src/main/java and war/src/main/java source folders.
> 7) Check "Allow output folders for source folders"
> 8) Now I use a generic build.xml ANT file to execute Maven2 such as this:
>
> 
> 
> 
>
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
>   
> 
>
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
>
> Mine has some more stuff in it but you get the idea.
>
> 9)  Now copy build.xml to Ant View and execute targets
> 10) Remove the old MyProject you imported as now its part of your
> workspace
> (I guess you could have not imported it originally which is an extra step)
>
> I have NO idea if this is what others do but this works great for my
> builds.  I can build from the command line using ant (as well as allow ant
> to do some preprocessing that Maven2 might or might not be able to
> accomplish as easy) as well as build from Eclipse.  I have built several
> products this way without any issue (nightly builds use the command line,
> developers such as myself use Eclipse).
>
> Try ithope this helps a littleI will play with Q4E with Europa
> (which I want for just for the server instances stuff).
>
> Thanks!
>
> -aps
>
> --
> "What lies behind us and what lies in front of us is of little concern to
> what lies within us." -Ralph Waldo Emerson
>



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


Re: Eclipse/Maven2 integration info

2007-09-26 Thread christopher . x . marsh-bourdon
And as a fifth way, you could of course use Maveniser, which can be found 
at https://sourceforge.net/projects/maveniser.  This works with the Maven 
2 command line via Eclipse's External Tools and I will caveat this is a 
very basic Eclipse plug-in. Basic but useful. 

Version 2 is in development and will provide for all Maven 2 Goals and 
Phases as well as being able to add new Goals on the fly.

Feedback/flames/requests always gratefully received at 
[EMAIL PROTECTED]

Christopher Marsh-Bourdon




Steinar Bang <[EMAIL PROTECTED]> 
Sent by: news <[EMAIL PROTECTED]>
09/27/2007 01:58 AM
Please respond to
"Maven Users List" 


To
users@maven.apache.org
cc

Subject
Re: Eclipse/Maven2 integration info






>>>>> "Alexander Sack" <[EMAIL PROTECTED]>:

> You know Eclipse/Maven2 integration at this point can be very
> confusing.  You have three plugins, two of which are ECLIPSE plugins
> that integrate Maven2 while the other is a Maven2 plugin that
> happens to auto-generate files for Eclipse.  I wrote this below and
> I figured I would share to see if it helps anyone else.

A fourth way of interacting with eclipse, when writing eclipse
applications, is to use the maven-bundle-plugin from the apache felix
project, to build OSGi bundles that are then added to the PDE target
platform. 


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





This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates. This transmission may contain information that is
privileged, confidential, legally privileged, and/or exempt from
disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including
any reliance thereon) is STRICTLY PROHIBITED. Although this
transmission and any attachments are believed to be free of any
virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the
recipient to ensure that it is virus free and no responsibility is
accepted by JPMorgan Chase & Co., its subsidiaries and affiliates,
as applicable, for any loss or damage arising in any way from its
use. If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you. 
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.


Re: Eclipse/Maven2 integration info

2007-09-26 Thread Steinar Bang
> "Alexander Sack" <[EMAIL PROTECTED]>:

> You know Eclipse/Maven2 integration at this point can be very
> confusing.  You have three plugins, two of which are ECLIPSE plugins
> that integrate Maven2 while the other is a Maven2 plugin that
> happens to auto-generate files for Eclipse.  I wrote this below and
> I figured I would share to see if it helps anyone else.

A fourth way of interacting with eclipse, when writing eclipse
applications, is to use the maven-bundle-plugin from the apache felix
project, to build OSGi bundles that are then added to the PDE target
platform. 


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



Re: Eclipse/Maven2 integration info

2007-09-18 Thread Alexander Sack
Pete:

Yea, you can do that way but I find it more cumbersome.  Also, there are
certain things I needed ANT for before the Maven build (like I needed to use
Ant's native2ascii due to a platform issue as well as some preprocessing
before our builds).

The other thing is that ANT unlike Eclipse is cross platform compatible and
we have developers on both UNIX and Windows systems who are familiar with
ant, not maven (including me at one point who has to switch back to and
fro), the ANT build file works like a champ (I can do the same
preprocessingand build from the command line easily).  I can also change
maven options and profiles a little bit more easier through my process (I
have a build.properties file that passes whether to skip test phase and what
profiles to activate).

IMO, the Ant view is nicer than the External application view and gives you
more options (you are doing the samething in the end).

Sidenote: Carlos mentioned that Q4E will have something like what I
described where you can execute various plugin goals similar to the ant
view.

-aps

PS I never have to use Maven eclipse:eclipse at this point due to
Q4E/m2eclipse
.

On 9/18/07, Pete <[EMAIL PROTECTED]> wrote:
>
> Alexander,
>
> Not quite sure why you need an Ant build wrapper it is far easier to just
> use
> Eclipse's external tools facility to run mvn for any selected folder
>
> 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.
>
> At least this way you know Maven is behaving as it does from the
> command line, periodically you need to run eclipse:eclipse, but this
> can be done as above.
>
> 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.
>
>
>
> On 17/09/2007, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
> > what eclipse plugin are you using? you should ask in its mailing list
> > though dependeing on which one you use
> >
> > On 9/15/07, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >  sorry to hijack this hteread.. but i have a questionr egarding mvn &
> > > eclipse integration
> > >
> > > somehow, even after i enable a maven project iva eclipse, the
> classpath in
> > > eclipse is screwed up big time
> > > i hav dfined a m2_repo variable, but still i am getting errors from
> all
> > > import i do, like eclipse does not know
> > > where to look for external packages i import (such as spring, log4j
> etc..)
> > >
> > > i ws wondering how i can enable eclipse to have same classpath as
> maven.
> > >
> > > any help would be appreciated
> > >
> > > thanks and regards
> > >   marco
> > >
> > >
> > > On 9/15/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
> > > >
> > > > most of your steps can be done in Q4E by going to the "New project"
> > > > wizard, "Ne Maven 2 project", choose the archetype and fill in the
> > > > blanks
> > > >
> > > > On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > > > > Hi Everybody:
> > > > >
> > > > > You know Eclipse/Maven2 integration at this point can be very
> confusing.
> > > > > You have three plugins, two of which are ECLIPSE plugins that
> integrate
> > > > > Maven2 while the other is a Maven2 plugin that happens to
> auto-generate
> > > > > files for Eclipse.  I wrote this below and I figured I would share
> to
> > > > see if
> > > > > it helps anyone else.
> > > > >
> > > > > The main advantages of Codehaus and Q4E (which I plan to try very
> soon
> > > > but I
> > > > > will assume it does similar things that Codehaus does) is that
> they
> > > > > integrate the POM dependency graph as part of your Eclipse
> project's
> > > > Build
> > > > > Path, i.e. it autoupdates dependencies as you add them to the
> POM.  The
> > > > > maven-eclipse-plugin relies on creating a separate CLASSPATH
> CONTAINER
> > > > > variable referenced in your .classpath file to use your local
> maven2
> > > > > repository (the M2_REPO variable in the directions - btw this is
> typical
> > > > for
> > > > > other plugins like the JBoss tools).  Unfortunately the latter is
> not as
> > > > > dynamic when it comes to adding and deleting dependencies in your
> > > > project.
> > > > >
> > > > > Codehaus installs on 3.1.x and up (I've used it with 3.1.1specifically
> > > > and
> > > > > with 3.3 though for some reason its buggy under 3.3).
> > > > >
> > > > > What I do to setup a project is the following:
> > > > >
> > > > > - Use mvn archetype to setup the basic structure
> > > > > - Create a n

Re: Eclipse/Maven2 integration info

2007-09-18 Thread Pete
Alexander,

Not quite sure why you need an Ant build wrapper it is far easier to just use
Eclipse's external tools facility to run mvn for any selected folder

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.

At least this way you know Maven is behaving as it does from the
command line, periodically you need to run eclipse:eclipse, but this
can be done as above.

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.



On 17/09/2007, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
> what eclipse plugin are you using? you should ask in its mailing list
> though dependeing on which one you use
>
> On 9/15/07, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> > Hello,
> >  sorry to hijack this hteread.. but i have a questionr egarding mvn &
> > eclipse integration
> >
> > somehow, even after i enable a maven project iva eclipse, the classpath in
> > eclipse is screwed up big time
> > i hav dfined a m2_repo variable, but still i am getting errors from all
> > import i do, like eclipse does not know
> > where to look for external packages i import (such as spring, log4j etc..)
> >
> > i ws wondering how i can enable eclipse to have same classpath as maven.
> >
> > any help would be appreciated
> >
> > thanks and regards
> >   marco
> >
> >
> > On 9/15/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
> > >
> > > most of your steps can be done in Q4E by going to the "New project"
> > > wizard, "Ne Maven 2 project", choose the archetype and fill in the
> > > blanks
> > >
> > > On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > > > Hi Everybody:
> > > >
> > > > You know Eclipse/Maven2 integration at this point can be very confusing.
> > > > You have three plugins, two of which are ECLIPSE plugins that integrate
> > > > Maven2 while the other is a Maven2 plugin that happens to auto-generate
> > > > files for Eclipse.  I wrote this below and I figured I would share to
> > > see if
> > > > it helps anyone else.
> > > >
> > > > The main advantages of Codehaus and Q4E (which I plan to try very soon
> > > but I
> > > > will assume it does similar things that Codehaus does) is that they
> > > > integrate the POM dependency graph as part of your Eclipse project's
> > > Build
> > > > Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> > > > maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> > > > variable referenced in your .classpath file to use your local maven2
> > > > repository (the M2_REPO variable in the directions - btw this is typical
> > > for
> > > > other plugins like the JBoss tools).  Unfortunately the latter is not as
> > > > dynamic when it comes to adding and deleting dependencies in your
> > > project.
> > > >
> > > > Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> > > and
> > > > with 3.3 though for some reason its buggy under 3.3).
> > > >
> > > > What I do to setup a project is the following:
> > > >
> > > > - Use mvn archetype to setup the basic structure
> > > > - Create a new Java project with Maven2 nature enabled
> > > > - Import archetype directory structure into this project
> > > > - Edit the Build Path within Eclipse
> > > > - Use ant build file to execute mvn from within Eclipse
> > > >
> > > > Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
> > > plugin):
> > > >
> > > > 1) In some temporary directory
> > > > mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
> > > > 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> > > > 3) Within MyProject use archetype plugin to create other modules which
> > > adds
> > > > them to parent module, e.g.
> > > >
> > > > mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> > > > mvn archetype create -DgroupId=com.example.project -DartifactId=war
> > > >
> > > > This will create two sub modules, one for war, one for ejb3.  You can
> > > change
> > > > the packaging to war and jar (or ejb) respectively.
> > > >
> > > > 4) Now go into Eclipse and do a new project MyProject and import the
> > > > MyProject you created above via Filesystem
> > > > 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> > > > dynamically change as you edit your POM hierarchy
> > > > 6) Edit Build Path in Project's properties and remove
> > > MyProject.  Instead
> > > > add the ejb3/src/main/java and war/src/main/java source folders.
> > > > 7) Check "Allow

Re: Eclipse/Maven2 integration info

2007-09-17 Thread Carlos Sanchez
what eclipse plugin are you using? you should ask in its mailing list
though dependeing on which one you use

On 9/15/07, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> Hello,
>  sorry to hijack this hteread.. but i have a questionr egarding mvn &
> eclipse integration
>
> somehow, even after i enable a maven project iva eclipse, the classpath in
> eclipse is screwed up big time
> i hav dfined a m2_repo variable, but still i am getting errors from all
> import i do, like eclipse does not know
> where to look for external packages i import (such as spring, log4j etc..)
>
> i ws wondering how i can enable eclipse to have same classpath as maven.
>
> any help would be appreciated
>
> thanks and regards
>   marco
>
>
> On 9/15/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
> >
> > most of your steps can be done in Q4E by going to the "New project"
> > wizard, "Ne Maven 2 project", choose the archetype and fill in the
> > blanks
> >
> > On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > > Hi Everybody:
> > >
> > > You know Eclipse/Maven2 integration at this point can be very confusing.
> > > You have three plugins, two of which are ECLIPSE plugins that integrate
> > > Maven2 while the other is a Maven2 plugin that happens to auto-generate
> > > files for Eclipse.  I wrote this below and I figured I would share to
> > see if
> > > it helps anyone else.
> > >
> > > The main advantages of Codehaus and Q4E (which I plan to try very soon
> > but I
> > > will assume it does similar things that Codehaus does) is that they
> > > integrate the POM dependency graph as part of your Eclipse project's
> > Build
> > > Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> > > maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> > > variable referenced in your .classpath file to use your local maven2
> > > repository (the M2_REPO variable in the directions - btw this is typical
> > for
> > > other plugins like the JBoss tools).  Unfortunately the latter is not as
> > > dynamic when it comes to adding and deleting dependencies in your
> > project.
> > >
> > > Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> > and
> > > with 3.3 though for some reason its buggy under 3.3).
> > >
> > > What I do to setup a project is the following:
> > >
> > > - Use mvn archetype to setup the basic structure
> > > - Create a new Java project with Maven2 nature enabled
> > > - Import archetype directory structure into this project
> > > - Edit the Build Path within Eclipse
> > > - Use ant build file to execute mvn from within Eclipse
> > >
> > > Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
> > plugin):
> > >
> > > 1) In some temporary directory
> > > mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
> > > 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> > > 3) Within MyProject use archetype plugin to create other modules which
> > adds
> > > them to parent module, e.g.
> > >
> > > mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> > > mvn archetype create -DgroupId=com.example.project -DartifactId=war
> > >
> > > This will create two sub modules, one for war, one for ejb3.  You can
> > change
> > > the packaging to war and jar (or ejb) respectively.
> > >
> > > 4) Now go into Eclipse and do a new project MyProject and import the
> > > MyProject you created above via Filesystem
> > > 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> > > dynamically change as you edit your POM hierarchy
> > > 6) Edit Build Path in Project's properties and remove
> > MyProject.  Instead
> > > add the ejb3/src/main/java and war/src/main/java source folders.
> > > 7) Check "Allow output folders for source folders"
> > > 8) Now I use a generic build.xml ANT file to execute Maven2 such as
> > this:
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > >   
> > > 
> > >
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > Mine has some more stuff in it but you get the idea.
> > >
> > > 9)  Now copy build.xml to Ant View and execute targets
> > > 10) Remove the old MyProject you imported as now its part of your
> > workspace
> > > (I guess you could have not imported it originally which is an extra
> > step)
> > >
> > > I have NO idea if this is what others do but this works great for my
> > > builds.  I can build from the command line using ant (as well as allow
> > ant
> > > to do som

Re: Eclipse/Maven2 integration info

2007-09-17 Thread Carlos Sanchez
Yes, there's already a Maven Lifecycle view, although it's not
finished yet, but you can get the idea

On 9/15/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> Cool Carlos.
>
> I just downloaded and installed Q4E on my Europa install and it worked
> great.  I checked out our current build, added the Maven2 Dependency
> tracking to it and it works great (no changes on my side whatsoever, my
> project's POM was read without a hitch).
>
> Question, have you thought of (or perhaps there is already) a Maven2 View
> like the Ant View where you can define and execute various Maven tasks (like
> clean, compile, package, and install are ones that should just come by
> default).  I know I would like to add this.
>
> Thanks!
>
> -aps
>
> On 9/14/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
> >
> > most of your steps can be done in Q4E by going to the "New project"
> > wizard, "Ne Maven 2 project", choose the archetype and fill in the
> > blanks
> >
> > On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > > Hi Everybody:
> > >
> > > You know Eclipse/Maven2 integration at this point can be very confusing.
> > > You have three plugins, two of which are ECLIPSE plugins that integrate
> > > Maven2 while the other is a Maven2 plugin that happens to auto-generate
> > > files for Eclipse.  I wrote this below and I figured I would share to
> > see if
> > > it helps anyone else.
> > >
> > > The main advantages of Codehaus and Q4E (which I plan to try very soon
> > but I
> > > will assume it does similar things that Codehaus does) is that they
> > > integrate the POM dependency graph as part of your Eclipse project's
> > Build
> > > Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> > > maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> > > variable referenced in your .classpath file to use your local maven2
> > > repository (the M2_REPO variable in the directions - btw this is typical
> > for
> > > other plugins like the JBoss tools).  Unfortunately the latter is not as
> > > dynamic when it comes to adding and deleting dependencies in your
> > project.
> > >
> > > Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> > and
> > > with 3.3 though for some reason its buggy under 3.3).
> > >
> > > What I do to setup a project is the following:
> > >
> > > - Use mvn archetype to setup the basic structure
> > > - Create a new Java project with Maven2 nature enabled
> > > - Import archetype directory structure into this project
> > > - Edit the Build Path within Eclipse
> > > - Use ant build file to execute mvn from within Eclipse
> > >
> > > Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
> > plugin):
> > >
> > > 1) In some temporary directory
> > > mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
> > > 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> > > 3) Within MyProject use archetype plugin to create other modules which
> > adds
> > > them to parent module, e.g.
> > >
> > > mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> > > mvn archetype create -DgroupId=com.example.project -DartifactId=war
> > >
> > > This will create two sub modules, one for war, one for ejb3.  You can
> > change
> > > the packaging to war and jar (or ejb) respectively.
> > >
> > > 4) Now go into Eclipse and do a new project MyProject and import the
> > > MyProject you created above via Filesystem
> > > 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> > > dynamically change as you edit your POM hierarchy
> > > 6) Edit Build Path in Project's properties and remove
> > MyProject.  Instead
> > > add the ejb3/src/main/java and war/src/main/java source folders.
> > > 7) Check "Allow output folders for source folders"
> > > 8) Now I use a generic build.xml ANT file to execute Maven2 such as
> > this:
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > >   
> > > 
> > >
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > Mine has some more stuff in it but you get the idea.
> > >
> > > 9)  Now copy build.xml to Ant View and execute targets
> > > 10) Remove the old MyProject you imported as now its part of your
> > workspace
> > > (I guess you could have not imported it originally which is an extra
> > step)
> > >
> > > I have NO idea if this is what others do but this works great for my
> > > builds.  I can build from the command line using ant (as well as allow
> > ant
> > >

Re: Eclipse/Maven2 integration info

2007-09-15 Thread Alexander Sack
Cool Carlos.

I just downloaded and installed Q4E on my Europa install and it worked
great.  I checked out our current build, added the Maven2 Dependency
tracking to it and it works great (no changes on my side whatsoever, my
project's POM was read without a hitch).

Question, have you thought of (or perhaps there is already) a Maven2 View
like the Ant View where you can define and execute various Maven tasks (like
clean, compile, package, and install are ones that should just come by
default).  I know I would like to add this.

Thanks!

-aps

On 9/14/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
>
> most of your steps can be done in Q4E by going to the "New project"
> wizard, "Ne Maven 2 project", choose the archetype and fill in the
> blanks
>
> On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > Hi Everybody:
> >
> > You know Eclipse/Maven2 integration at this point can be very confusing.
> > You have three plugins, two of which are ECLIPSE plugins that integrate
> > Maven2 while the other is a Maven2 plugin that happens to auto-generate
> > files for Eclipse.  I wrote this below and I figured I would share to
> see if
> > it helps anyone else.
> >
> > The main advantages of Codehaus and Q4E (which I plan to try very soon
> but I
> > will assume it does similar things that Codehaus does) is that they
> > integrate the POM dependency graph as part of your Eclipse project's
> Build
> > Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> > maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> > variable referenced in your .classpath file to use your local maven2
> > repository (the M2_REPO variable in the directions - btw this is typical
> for
> > other plugins like the JBoss tools).  Unfortunately the latter is not as
> > dynamic when it comes to adding and deleting dependencies in your
> project.
> >
> > Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> and
> > with 3.3 though for some reason its buggy under 3.3).
> >
> > What I do to setup a project is the following:
> >
> > - Use mvn archetype to setup the basic structure
> > - Create a new Java project with Maven2 nature enabled
> > - Import archetype directory structure into this project
> > - Edit the Build Path within Eclipse
> > - Use ant build file to execute mvn from within Eclipse
> >
> > Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
> plugin):
> >
> > 1) In some temporary directory
> > mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
> > 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> > 3) Within MyProject use archetype plugin to create other modules which
> adds
> > them to parent module, e.g.
> >
> > mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> > mvn archetype create -DgroupId=com.example.project -DartifactId=war
> >
> > This will create two sub modules, one for war, one for ejb3.  You can
> change
> > the packaging to war and jar (or ejb) respectively.
> >
> > 4) Now go into Eclipse and do a new project MyProject and import the
> > MyProject you created above via Filesystem
> > 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> > dynamically change as you edit your POM hierarchy
> > 6) Edit Build Path in Project's properties and remove
> MyProject.  Instead
> > add the ejb3/src/main/java and war/src/main/java source folders.
> > 7) Check "Allow output folders for source folders"
> > 8) Now I use a generic build.xml ANT file to execute Maven2 such as
> this:
> >
> > 
> > 
> > 
> >
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >   
> > 
> >
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > Mine has some more stuff in it but you get the idea.
> >
> > 9)  Now copy build.xml to Ant View and execute targets
> > 10) Remove the old MyProject you imported as now its part of your
> workspace
> > (I guess you could have not imported it originally which is an extra
> step)
> >
> > I have NO idea if this is what others do but this works great for my
> > builds.  I can build from the command line using ant (as well as allow
> ant
> > to do some preprocessing that Maven2 might or might not be able to
> > accomplish as easy) as well as build from Eclipse.  I have built several
> > products this way without any issue (nightly builds use the command
> line,
> > developers such as myself use Eclipse).
> >
> > Try ithope this helps a littleI will play with Q4E with Europa
> > (which I want for just for the server instances stuff).
> >
> > Thanks!
> >
> > -aps
> >
> > --
> > "Wha

Re: Eclipse/Maven2 integration info

2007-09-15 Thread Marco Mistroni
Hello,
 sorry to hijack this hteread.. but i have a questionr egarding mvn &
eclipse integration

somehow, even after i enable a maven project iva eclipse, the classpath in
eclipse is screwed up big time
i hav dfined a m2_repo variable, but still i am getting errors from all
import i do, like eclipse does not know
where to look for external packages i import (such as spring, log4j etc..)

i ws wondering how i can enable eclipse to have same classpath as maven.

any help would be appreciated

thanks and regards
  marco


On 9/15/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
>
> most of your steps can be done in Q4E by going to the "New project"
> wizard, "Ne Maven 2 project", choose the archetype and fill in the
> blanks
>
> On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > Hi Everybody:
> >
> > You know Eclipse/Maven2 integration at this point can be very confusing.
> > You have three plugins, two of which are ECLIPSE plugins that integrate
> > Maven2 while the other is a Maven2 plugin that happens to auto-generate
> > files for Eclipse.  I wrote this below and I figured I would share to
> see if
> > it helps anyone else.
> >
> > The main advantages of Codehaus and Q4E (which I plan to try very soon
> but I
> > will assume it does similar things that Codehaus does) is that they
> > integrate the POM dependency graph as part of your Eclipse project's
> Build
> > Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> > maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> > variable referenced in your .classpath file to use your local maven2
> > repository (the M2_REPO variable in the directions - btw this is typical
> for
> > other plugins like the JBoss tools).  Unfortunately the latter is not as
> > dynamic when it comes to adding and deleting dependencies in your
> project.
> >
> > Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> and
> > with 3.3 though for some reason its buggy under 3.3).
> >
> > What I do to setup a project is the following:
> >
> > - Use mvn archetype to setup the basic structure
> > - Create a new Java project with Maven2 nature enabled
> > - Import archetype directory structure into this project
> > - Edit the Build Path within Eclipse
> > - Use ant build file to execute mvn from within Eclipse
> >
> > Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
> plugin):
> >
> > 1) In some temporary directory
> > mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
> > 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> > 3) Within MyProject use archetype plugin to create other modules which
> adds
> > them to parent module, e.g.
> >
> > mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> > mvn archetype create -DgroupId=com.example.project -DartifactId=war
> >
> > This will create two sub modules, one for war, one for ejb3.  You can
> change
> > the packaging to war and jar (or ejb) respectively.
> >
> > 4) Now go into Eclipse and do a new project MyProject and import the
> > MyProject you created above via Filesystem
> > 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> > dynamically change as you edit your POM hierarchy
> > 6) Edit Build Path in Project's properties and remove
> MyProject.  Instead
> > add the ejb3/src/main/java and war/src/main/java source folders.
> > 7) Check "Allow output folders for source folders"
> > 8) Now I use a generic build.xml ANT file to execute Maven2 such as
> this:
> >
> > 
> > 
> > 
> >
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >   
> > 
> >
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > Mine has some more stuff in it but you get the idea.
> >
> > 9)  Now copy build.xml to Ant View and execute targets
> > 10) Remove the old MyProject you imported as now its part of your
> workspace
> > (I guess you could have not imported it originally which is an extra
> step)
> >
> > I have NO idea if this is what others do but this works great for my
> > builds.  I can build from the command line using ant (as well as allow
> ant
> > to do some preprocessing that Maven2 might or might not be able to
> > accomplish as easy) as well as build from Eclipse.  I have built several
> > products this way without any issue (nightly builds use the command
> line,
> > developers such as myself use Eclipse).
> >
> > Try ithope this helps a littleI will play with Q4E with Europa
> > (which I want for just for the server instances stuff).
> >
> > Thanks!
> >
> > -aps
> >
> > --
> > "What lies behind us and

Re: Eclipse/Maven2 integration info

2007-09-15 Thread Marco Mistroni
Hello,


On 9/15/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
>
> most of your steps can be done in Q4E by going to the "New project"
> wizard, "Ne Maven 2 project", choose the archetype and fill in the
> blanks
>
> On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> > Hi Everybody:
> >
> > You know Eclipse/Maven2 integration at this point can be very confusing.
> > You have three plugins, two of which are ECLIPSE plugins that integrate
> > Maven2 while the other is a Maven2 plugin that happens to auto-generate
> > files for Eclipse.  I wrote this below and I figured I would share to
> see if
> > it helps anyone else.
> >
> > The main advantages of Codehaus and Q4E (which I plan to try very soon
> but I
> > will assume it does similar things that Codehaus does) is that they
> > integrate the POM dependency graph as part of your Eclipse project's
> Build
> > Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> > maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> > variable referenced in your .classpath file to use your local maven2
> > repository (the M2_REPO variable in the directions - btw this is typical
> for
> > other plugins like the JBoss tools).  Unfortunately the latter is not as
> > dynamic when it comes to adding and deleting dependencies in your
> project.
> >
> > Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
> and
> > with 3.3 though for some reason its buggy under 3.3).
> >
> > What I do to setup a project is the following:
> >
> > - Use mvn archetype to setup the basic structure
> > - Create a new Java project with Maven2 nature enabled
> > - Import archetype directory structure into this project
> > - Edit the Build Path within Eclipse
> > - Use ant build file to execute mvn from within Eclipse
> >
> > Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
> plugin):
> >
> > 1) In some temporary directory
> > mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
> > 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> > 3) Within MyProject use archetype plugin to create other modules which
> adds
> > them to parent module, e.g.
> >
> > mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> > mvn archetype create -DgroupId=com.example.project -DartifactId=war
> >
> > This will create two sub modules, one for war, one for ejb3.  You can
> change
> > the packaging to war and jar (or ejb) respectively.
> >
> > 4) Now go into Eclipse and do a new project MyProject and import the
> > MyProject you created above via Filesystem
> > 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> > dynamically change as you edit your POM hierarchy
> > 6) Edit Build Path in Project's properties and remove
> MyProject.  Instead
> > add the ejb3/src/main/java and war/src/main/java source folders.
> > 7) Check "Allow output folders for source folders"
> > 8) Now I use a generic build.xml ANT file to execute Maven2 such as
> this:
> >
> > 
> > 
> > 
> >
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >   
> > 
> >
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > Mine has some more stuff in it but you get the idea.
> >
> > 9)  Now copy build.xml to Ant View and execute targets
> > 10) Remove the old MyProject you imported as now its part of your
> workspace
> > (I guess you could have not imported it originally which is an extra
> step)
> >
> > I have NO idea if this is what others do but this works great for my
> > builds.  I can build from the command line using ant (as well as allow
> ant
> > to do some preprocessing that Maven2 might or might not be able to
> > accomplish as easy) as well as build from Eclipse.  I have built several
> > products this way without any issue (nightly builds use the command
> line,
> > developers such as myself use Eclipse).
> >
> > Try ithope this helps a littleI will play with Q4E with Europa
> > (which I want for just for the server instances stuff).
> >
> > Thanks!
> >
> > -aps
> >
> > --
> > "What lies behind us and what lies in front of us is of little concern
> to
> > what lies within us." -Ralph Waldo Emerson
> >
>
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>  -- The Princess Bride
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Eclipse/Maven2 integration info

2007-09-14 Thread Carlos Sanchez
most of your steps can be done in Q4E by going to the "New project"
wizard, "Ne Maven 2 project", choose the archetype and fill in the
blanks

On 9/14/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
> Hi Everybody:
>
> You know Eclipse/Maven2 integration at this point can be very confusing.
> You have three plugins, two of which are ECLIPSE plugins that integrate
> Maven2 while the other is a Maven2 plugin that happens to auto-generate
> files for Eclipse.  I wrote this below and I figured I would share to see if
> it helps anyone else.
>
> The main advantages of Codehaus and Q4E (which I plan to try very soon but I
> will assume it does similar things that Codehaus does) is that they
> integrate the POM dependency graph as part of your Eclipse project's Build
> Path, i.e. it autoupdates dependencies as you add them to the POM.  The
> maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
> variable referenced in your .classpath file to use your local maven2
> repository (the M2_REPO variable in the directions - btw this is typical for
> other plugins like the JBoss tools).  Unfortunately the latter is not as
> dynamic when it comes to adding and deleting dependencies in your project.
>
> Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically and
> with 3.3 though for some reason its buggy under 3.3).
>
> What I do to setup a project is the following:
>
> - Use mvn archetype to setup the basic structure
> - Create a new Java project with Maven2 nature enabled
> - Import archetype directory structure into this project
> - Edit the Build Path within Eclipse
> - Use ant build file to execute mvn from within Eclipse
>
> Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse plugin):
>
> 1) In some temporary directory
> mvn archetype:create -DgroupId=com.example.project -DartifactId=MyProject
> 2) Edit pom.xml to packaging is pom, rm -rf the src directory
> 3) Within MyProject use archetype plugin to create other modules which adds
> them to parent module, e.g.
>
> mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
> mvn archetype create -DgroupId=com.example.project -DartifactId=war
>
> This will create two sub modules, one for war, one for ejb3.  You can change
> the packaging to war and jar (or ejb) respectively.
>
> 4) Now go into Eclipse and do a new project MyProject and import the
> MyProject you created above via Filesystem
> 5) Enable Maven2 nature, now Maven2 dependencies will show up and
> dynamically change as you edit your POM hierarchy
> 6) Edit Build Path in Project's properties and remove MyProject.  Instead
> add the ejb3/src/main/java and war/src/main/java source folders.
> 7) Check "Allow output folders for source folders"
> 8) Now I use a generic build.xml ANT file to execute Maven2 such as this:
>
> 
> 
> 
>
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
>   
> 
>
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
>
> Mine has some more stuff in it but you get the idea.
>
> 9)  Now copy build.xml to Ant View and execute targets
> 10) Remove the old MyProject you imported as now its part of your workspace
> (I guess you could have not imported it originally which is an extra step)
>
> I have NO idea if this is what others do but this works great for my
> builds.  I can build from the command line using ant (as well as allow ant
> to do some preprocessing that Maven2 might or might not be able to
> accomplish as easy) as well as build from Eclipse.  I have built several
> products this way without any issue (nightly builds use the command line,
> developers such as myself use Eclipse).
>
> Try ithope this helps a littleI will play with Q4E with Europa
> (which I want for just for the server instances stuff).
>
> Thanks!
>
> -aps
>
> --
> "What lies behind us and what lies in front of us is of little concern to
> what lies within us." -Ralph Waldo Emerson
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
 -- The Princess Bride

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



Eclipse/Maven2 integration info

2007-09-14 Thread Alexander Sack
Hi Everybody:

You know Eclipse/Maven2 integration at this point can be very confusing.
You have three plugins, two of which are ECLIPSE plugins that integrate
Maven2 while the other is a Maven2 plugin that happens to auto-generate
files for Eclipse.  I wrote this below and I figured I would share to see if
it helps anyone else.

The main advantages of Codehaus and Q4E (which I plan to try very soon but I
will assume it does similar things that Codehaus does) is that they
integrate the POM dependency graph as part of your Eclipse project's Build
Path, i.e. it autoupdates dependencies as you add them to the POM.  The
maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
variable referenced in your .classpath file to use your local maven2
repository (the M2_REPO variable in the directions - btw this is typical for
other plugins like the JBoss tools).  Unfortunately the latter is not as
dynamic when it comes to adding and deleting dependencies in your project.

Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically and
with 3.3 though for some reason its buggy under 3.3).

What I do to setup a project is the following:

- Use mvn archetype to setup the basic structure
- Create a new Java project with Maven2 nature enabled
- Import archetype directory structure into this project
- Edit the Build Path within Eclipse
- Use ant build file to execute mvn from within Eclipse

Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse plugin):

1) In some temporary directory
mvn archetype:create -DgroupId=com.example.project -DartifactId=MyProject
2) Edit pom.xml to packaging is pom, rm -rf the src directory
3) Within MyProject use archetype plugin to create other modules which adds
them to parent module, e.g.

mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
mvn archetype create -DgroupId=com.example.project -DartifactId=war

This will create two sub modules, one for war, one for ejb3.  You can change
the packaging to war and jar (or ejb) respectively.

4) Now go into Eclipse and do a new project MyProject and import the
MyProject you created above via Filesystem
5) Enable Maven2 nature, now Maven2 dependencies will show up and
dynamically change as you edit your POM hierarchy
6) Edit Build Path in Project's properties and remove MyProject.  Instead
add the ejb3/src/main/java and war/src/main/java source folders.
7) Check "Allow output folders for source folders"
8) Now I use a generic build.xml ANT file to execute Maven2 such as this:





















  

   































Mine has some more stuff in it but you get the idea.

9)  Now copy build.xml to Ant View and execute targets
10) Remove the old MyProject you imported as now its part of your workspace
(I guess you could have not imported it originally which is an extra step)

I have NO idea if this is what others do but this works great for my
builds.  I can build from the command line using ant (as well as allow ant
to do some preprocessing that Maven2 might or might not be able to
accomplish as easy) as well as build from Eclipse.  I have built several
products this way without any issue (nightly builds use the command line,
developers such as myself use Eclipse).

Try ithope this helps a littleI will play with Q4E with Europa
(which I want for just for the server instances stuff).

Thanks!

-aps

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