On Nov 20, 2007 3:19 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > Ok I did what you explain and something happended :D > > It replace all my source by ... nothing and create a target/classes folder > in the root project. It deleted all the lib I had in WEB-INF/lib and put > only the 4 I had defined for test purpose in my pom.xml using the scope > system and added them as "jar to import in the project" and not "webapp > libraries". > > So, if I undestand well : > 1- I must have all my libraries declared in the pom.xml
yes > > 2- I have to define a build element in the pom.xml to define my src... > (got > 4 folder because of web services) Be careful, conventions in maven are to have only one src folder by langage (src/main/java) and one artifact (a jar, a war, ..) per project. > > 3- Each time my classpath should evolve I have to restart the .bat in my > project folder. Yes you update your eclipse settings using maven (never using eclipse itself) > > Then : > 4- When I deploy for test in WTP, Eclipse take care of Maven and received > also the lib declared in the pom.xml yes > > 5- When I would like to deploy on prod I will use maven to create a war > will > include all the lib in the right places. yes : mvn package > > > Am I right? yes Arnaud > > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > You have to launch it in your project directory. > > > > Arnaud > > > > On Nov 20, 2007 3:01 PM, Michael Bernagou <[EMAIL PROTECTED]> > wrote: > > > > > So I did it : > > > R:\java\tools\maven-2.0.7\bin>mvn eclipse:eclipse -Dwtpversion=1.5 - > > > Declipse.workspace="R:\Michael\PersonalWS" > > > > > > [INFO] Scanning for projects... > > > [INFO] Searching repository for plugin with prefix: 'eclipse'. > > > [INFO] > > > > > > ------------------------------------------------------------------------- > > > --- > > > [INFO] Building Maven Default Project > > > [INFO] task-segment: [eclipse:eclipse] > > > [INFO] > > > > > > ------------------------------------------------------------------------- > > > --- > > > [INFO] Preparing eclipse:eclipse > > > [INFO] No goals needed for project - skipping > > > [INFO] > > > > ------------------------------------------------------------------------ > > > [ERROR] BUILD ERROR > > > [INFO] > > > > ------------------------------------------------------------------------ > > > [INFO] Cannot execute mojo: eclipse. It requires a project with an > > > existing > > > pom. > > > xml, but the build is not using one. > > > [INFO] > > > > ------------------------------------------------------------------------ > > > [INFO] For more information, run Maven with the -e switch > > > [INFO] > > > > ------------------------------------------------------------------------ > > > [INFO] Total time: < 1 second > > > [INFO] Finished at: Tue Nov 20 14:57:30 CET 2007 > > > [INFO] Final Memory: 2M/4M > > > [INFO] > > > > ------------------------------------------------------------------------ > > > > > > I notice it try to update maven-eclipse-plugin I already have and set > > (not > > > visible in this log since it's another try). > > > It fails because it didn't find a project with a pom.xml... but there > is > > > one, mine. > > > Maybe something is missing such as the project name to target: - > > > Declipse.project or something like that? > > > > > > 2007/11/20, Michael Bernagou <[EMAIL PROTECTED]>: > > > > > > > > Hum, I don't know how to do that. > > > > Ok I can create a bat file to launch the command but is it to do > only > > > > once? > > > > > > > > 2007/11/20, Arnaud HERITIER < [EMAIL PROTECTED]>: > > > > > > > > > > Did you activate the WTP support in the eclipse plugin for maven 2 > ? > > > > > mvn eclipse:eclipse -Dwtpversion=1.5 > > > > > > > > > > It's working fine generally.... > > > > > > > > > > TEll us if you have any problem, we'll try to solve them > > > > > > > > > > Arnaud > > > > > > > > > > On Nov 20, 2007 9:49 AM, Michael Bernagou < > [EMAIL PROTECTED]> > > > > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I'm new to M2 and I use Eclipse 3.2 WTP, Maven 2.0.7 and the > > latest > > > > > maven > > > > > > plugin for eclipse. I use the server integration in Eclipse to > > test > > > my > > > > > > > > > > > webapp and I set the dependency in my pom.xml. For example, I > > > develop > > > > > a > > > > > > Tapestry webapp so I added the tapestry-core-5.0.6 dependency in > > the > > > > > > pom.xml > > > > > > . > > > > > > > > > > > > The build is done normally but when I start the server, the > > > libraries > > > > > > defined in the pom.xml are not copyed in the Tomcat instance > > managed > > > > > by > > > > > > Eclipse WTP. > > > > > > I tried all the different scope and none of them deploy the > libs. > > I > > > > > tried > > > > > > also to specify in Eclipse the Maven dependency should be Export > > > > > > (Project/Build Path/Order Export/check the boxes). > > > > > > > > > > > > For the scope "system" I tried to specifyed the absolute path > > where > > > I > > > > > > would > > > > > > like to have my libraries (WEB-INF/lib) but it is finally not > the > > > goal > > > > > of > > > > > > this scope since it is just to refer a system library needed. > > > > > > > > > > > > A solution is to copy the lib I need in my webaap/WEB-INF/lib > but > > > then > > > > > M2 > > > > > > would be useless in this case. > > > > > > So, what did I miss? > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > > > > > -- > > > > > > Michael Bernagou > > > > > > Java Developper > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > .......................................................... > > > > > Arnaud HERITIER > > > > > .......................................................... > > > > > OCTO Technology - aheritier AT octo DOT com > > > > > www.octo.com | blog.octo.com > > > > > .......................................................... > > > > > ASF - aheritier AT apache DOT org > > > > > www.apache.org | maven.apache.org > > > > > ........................................................... > > > > > > > > > > > > > > > > > > > > > -- > > > > Michael Bernagou > > > > Java Developper > > > > > > > > > > > > > > > -- > > > Michael Bernagou > > > Java Developper > > > > > > > > > > > -- > > .......................................................... > > Arnaud HERITIER > > .......................................................... > > OCTO Technology - aheritier AT octo DOT com > > www.octo.com | blog.octo.com > > .......................................................... > > ASF - aheritier AT apache DOT org > > www.apache.org | maven.apache.org > > ........................................................... > > > > > > -- > Michael Bernagou > Java Developper > -- .......................................................... Arnaud HERITIER .......................................................... OCTO Technology - aheritier AT octo DOT com www.octo.com | blog.octo.com .......................................................... ASF - aheritier AT apache DOT org www.apache.org | maven.apache.org ...........................................................
