Re: [M2]Eclipse WTP, dependency, deployement, libraries
> You will have to regenerate your eclipse settings each time that you change > your pom (adding/removing a dependency for example). > After that you can ** import ** your project in eclipse and you'll use the > standard build of eclipse (Ctrl + B) to build your application. I think you just need to import the project once, and refresh it later after you regenerate your eclipse settings. Jeffrey Ai Arnaud HERITIER wrote: > > ok, sorry, I didn't see that you were new to M2. > > You have actually several choices to work with maven 2 and eclipse. > > The first one is to use a plugin in eclipse to launch maven 2 to build > your > application. > There are 2 plugins actually for eclipse : > - http://code.google.com/p/q4e/ which we hope will be integrated in > eclipse > in some monthes. When i tested it this plugin worked only with maven > 2.1.x. > It should be transparent in most cases if you are using 2.0.x, but it's > not > sure > - http://m2eclipse.codehaus.org/ > Those plugins will give you some additional features in eclipse: For > example > they'll help you to write your pom, add dependencies... > The problem with those plugins, is that they aren't supporting WTP if you > are developing a web application :-( > > The other choice, is to use the plugin in maven to setup your project for > eclipse > http://maven.apache.org/plugins/maven-eclipse-plugin/ > This plugin is used from maven in command line. It setup your eclipse > settings (build path, WTP support, ...). > You will have to regenerate your eclipse settings each time that you > change > your pom (adding/removing a dependency for example). > After that you can import your project in eclipse and you'll use the > standard build of eclipse (Ctrl + B) to build your application. You'll > also > be able to deploy your webapp on an application server using WTP > > Hope, this helps > > Arnaud > > > On Nov 20, 2007 2:51 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > >> 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 >> > > > > -- > .. > 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 > ... > > -- View this message in context: http://www.nabble.com/-M2-Eclipse-WTP%2C-dependency%2C-deployement%2C-libraries-tf4842004s177.html#a13882523 Sent from the Maven - Users mailing list archive at Nabble.com. - To un
Re: [M2]Eclipse WTP, dependency, deployement, libraries
On Nov 20, 2007 4:54 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > I'm completely lost. I think I'm going to restart step by step. First a > Maven2 Webapp using WTP and Tapestry... and then I'll study the Axis2 > plugins to integrate in my project. You can find free books to help you on www.devzuz.com and www.sonatype.com > > > But, just to understand a little bit more. What you propose to me is to > put > my webservice sources outside the main project as independant AAR project > and add depencies in the pom.xml of my main project? Yes, it's a possibility. I'm not sure this is the best one. Perhaps you can ask on this list what is the preferred solution to do that. It's not an eclipse/maven problem but an axis/maven best practice that you need... > > > 2007/11/20, Michael Bernagou <[EMAIL PROTECTED]>: > > > > Thanks a lot... I'm going to try and let you know. > > > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > > > On Nov 20, 2007 3:52 PM, Michael Bernagou <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > 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. > > > > > > > > But Axis2 convention is to have web services implementation > "outside" > > > to > > > > be > > > > deployed in WEB-INF/services instead of WEB-INF/classes as the > > > other... > > > > "When conventions meet the other conventions" > > > > > > > > > You can have an AAR project and use it as dependency in your war : > > > > http://ws.apache.org/axis2/tools/1_3/maven-plugins/maven-aar-plugin.html > > > > > > > > > > > > > > > > > > > > > Anyway, thanks a lot it is more clear than before. So I updated my > > > pom.xml: > > > > > > > > > > > >${artifactId}-${version} > > > >${basedir}/webapp/WEB-INF/classes > > > > > > > > > > > > > > > > > > > > > > > > ${basedir}/webapp/WEB-INF/services/ApplicationWebService > > > >false > > > > > ${basedir}/src/ApplicationWebService > > > > > > > > > > > > > > > > > > > > > > > ${basedir}/webapp/WEB-INF/services/UserWebService > > > >false > > > >${basedir}/src/UserWebService > > > > > > > > > > > > > ${basedir}/webapp/WEB-INF/classes > > > > > > >false > > > >${basedir}/src/main > > > > > > > > > > > > > ${basedir}/webapp/WEB-INF/classes > > > > > > >false > > > >${basedir}/src/resources > > > > > > > > > > > > ... > > > > > > > > > > > > And then I rerun the batch, but I still have a target directory > > > created > > > > and > > > > maven change the directory for all the 4 resources I defined. > Anyway, > > > I > > > > can > > > > leave with that target folder since Eclipse WTP will copied it > itself > > > in > > > > the > > > > WEB-INF/classes but I don't understand why my > information > > > are > > > > not take into account in the mvn process. > > > > > > > > > Why don't you add directly your services descriptors in : > > > src/main/webapp/WEB-INF/services/ > > > The default directory for your webapp data are in : > > > src/main/webapp > > > It's used when you use a war packaging (war in > > > your > > > pom) > > > You don't have to define where to copy classes, ressources and others > > > Maven will do it for you > > > target/${yourAppName}<-src/main/webapp > > > target/${yourAppName}/WEB-INF/classes<-src/main/java (after > compilation) > > > > > > target/${yourAppName}/WEB-INF/classes<-src/main/resources > > > target/${yourAppName}/WEB-INF/lib<-libs defined in your pom > > > > > > It's not directory that you have to use but outputDirectory > > > http://maven.apache.org/ref/current/maven-model/maven.html#class_build > > > > > > Arnaud > > > > > > > > > > > > > > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > > > > > > > On Nov 20, 2007 3:19 PM, Michael Bernagou <[EMAIL PROTECTED] > > > > > > wrote: > > > > > > > > > > > > > > > > > 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 t
Re: [M2]Eclipse WTP, dependency, deployement, libraries
I'm completely lost. I think I'm going to restart step by step. First a Maven2 Webapp using WTP and Tapestry... and then I'll study the Axis2 plugins to integrate in my project. But, just to understand a little bit more. What you propose to me is to put my webservice sources outside the main project as independant AAR project and add depencies in the pom.xml of my main project? 2007/11/20, Michael Bernagou <[EMAIL PROTECTED]>: > > Thanks a lot... I'm going to try and let you know. > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > On Nov 20, 2007 3:52 PM, Michael Bernagou <[EMAIL PROTECTED]> > > wrote: > > > > > > 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. > > > > > > But Axis2 convention is to have web services implementation "outside" > > to > > > be > > > deployed in WEB-INF/services instead of WEB-INF/classes as the > > other... > > > "When conventions meet the other conventions" > > > > > > You can have an AAR project and use it as dependency in your war : > > http://ws.apache.org/axis2/tools/1_3/maven-plugins/maven-aar-plugin.html > > > > > > > > > > > > > > > Anyway, thanks a lot it is more clear than before. So I updated my > > pom.xml: > > > > > > > > >${artifactId}-${version} > > >${basedir}/webapp/WEB-INF/classes > > > > > > > > > > > > > > > > > ${basedir}/webapp/WEB-INF/services/ApplicationWebService > > >false > > >${basedir}/src/ApplicationWebService > > > > > > > > > > > > > > > > ${basedir}/webapp/WEB-INF/services/UserWebService > > >false > > >${basedir}/src/UserWebService > > > > > > > > >${basedir}/webapp/WEB-INF/classes > > > > >false > > >${basedir}/src/main > > > > > > > > >${basedir}/webapp/WEB-INF/classes > > > > >false > > >${basedir}/src/resources > > > > > > > > > ... > > > > > > > > > And then I rerun the batch, but I still have a target directory > > created > > > and > > > maven change the directory for all the 4 resources I defined. Anyway, > > I > > > can > > > leave with that target folder since Eclipse WTP will copied it itself > > in > > > the > > > WEB-INF/classes but I don't understand why my information > > are > > > not take into account in the mvn process. > > > > > > Why don't you add directly your services descriptors in : > > src/main/webapp/WEB-INF/services/ > > The default directory for your webapp data are in : > > src/main/webapp > > It's used when you use a war packaging (war in > > your > > pom) > > You don't have to define where to copy classes, ressources and others > > Maven will do it for you > > target/${yourAppName}<-src/main/webapp > > target/${yourAppName}/WEB-INF/classes<-src/main/java (after compilation) > > > > target/${yourAppName}/WEB-INF/classes<-src/main/resources > > target/${yourAppName}/WEB-INF/lib<-libs defined in your pom > > > > It's not directory that you have to use but outputDirectory > > http://maven.apache.org/ref/current/maven-model/maven.html#class_build > > > > Arnaud > > > > > > > > > > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > > > > > On Nov 20, 2007 3:19 PM, Michael Bernagou <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > > > 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- > >
Re: [M2]Eclipse WTP, dependency, deployement, libraries
Thanks a lot... I'm going to try and let you know. 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > On Nov 20, 2007 3:52 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > > > > 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. > > > > But Axis2 convention is to have web services implementation "outside" to > > be > > deployed in WEB-INF/services instead of WEB-INF/classes as the other... > > "When conventions meet the other conventions" > > > You can have an AAR project and use it as dependency in your war : > http://ws.apache.org/axis2/tools/1_3/maven-plugins/maven-aar-plugin.html > > > > > > > > > Anyway, thanks a lot it is more clear than before. So I updated my > pom.xml: > > > > > >${artifactId}-${version} > >${basedir}/webapp/WEB-INF/classes > > > > > > > > > > > ${basedir}/webapp/WEB-INF/services/ApplicationWebService > >false > > >${basedir}/src/ApplicationWebService > > > > > > > > > ${basedir}/webapp/WEB-INF/services/UserWebService > >false > >${basedir}/src/UserWebService > > > > > > >${basedir}/webapp/WEB-INF/classes > >false > >${basedir}/src/main > > > > > > >${basedir}/webapp/WEB-INF/classes > >false > >${basedir}/src/resources > > > > > > ... > > > > > > And then I rerun the batch, but I still have a target directory created > > and > > maven change the directory for all the 4 resources I defined. Anyway, I > > can > > leave with that target folder since Eclipse WTP will copied it itself in > > the > > WEB-INF/classes but I don't understand why my information > are > > not take into account in the mvn process. > > > Why don't you add directly your services descriptors in : > src/main/webapp/WEB-INF/services/ > The default directory for your webapp data are in : > src/main/webapp > It's used when you use a war packaging (war in your > pom) > You don't have to define where to copy classes, ressources and others > Maven will do it for you > target/${yourAppName}<-src/main/webapp > target/${yourAppName}/WEB-INF/classes<-src/main/java (after compilation) > target/${yourAppName}/WEB-INF/classes<-src/main/resources > target/${yourAppName}/WEB-INF/lib<-libs defined in your pom > > It's not directory that you have to use but outputDirectory > http://maven.apache.org/ref/current/maven-model/maven.html#class_build > > Arnaud > > > > > > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > > > On Nov 20, 2007 3:19 PM, Michael Bernagou <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > 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] > > > > > > > > > > > > -
Re: [M2]Eclipse WTP, dependency, deployement, libraries
On Nov 20, 2007 3:52 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > > 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. > > But Axis2 convention is to have web services implementation "outside" to > be > deployed in WEB-INF/services instead of WEB-INF/classes as the other... > "When conventions meet the other conventions" You can have an AAR project and use it as dependency in your war : http://ws.apache.org/axis2/tools/1_3/maven-plugins/maven-aar-plugin.html > > > Anyway, thanks a lot it is more clear than before. So I updated my pom.xml: > > >${artifactId}-${version} >${basedir}/webapp/WEB-INF/classes > > > > > ${basedir}/webapp/WEB-INF/services/ApplicationWebService >false >${basedir}/src/ApplicationWebService > > > > ${basedir}/webapp/WEB-INF/services/UserWebService >false >${basedir}/src/UserWebService > > >${basedir}/webapp/WEB-INF/classes >false >${basedir}/src/main > > >${basedir}/webapp/WEB-INF/classes >false >${basedir}/src/resources > > > ... > > > And then I rerun the batch, but I still have a target directory created > and > maven change the directory for all the 4 resources I defined. Anyway, I > can > leave with that target folder since Eclipse WTP will copied it itself in > the > WEB-INF/classes but I don't understand why my information are > not take into account in the mvn process. Why don't you add directly your services descriptors in : src/main/webapp/WEB-INF/services/ The default directory for your webapp data are in : src/main/webapp It's used when you use a war packaging (war in your pom) You don't have to define where to copy classes, ressources and others Maven will do it for you target/${yourAppName}<-src/main/webapp target/${yourAppName}/WEB-INF/classes<-src/main/java (after compilation) target/${yourAppName}/WEB-INF/classes<-src/main/resources target/${yourAppName}/WEB-INF/lib<-libs defined in your pom It's not directory that you have to use but outputDirectory http://maven.apache.org/ref/current/maven-model/maven.html#class_build Arnaud > > > 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > On Nov 20, 2007 3:19 PM, Michael Bernagou <[EMAIL PROTECTED]> > wrote: > > > > > > > > 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,
Re: [M2]Eclipse WTP, dependency, deployement, libraries
> 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. But Axis2 convention is to have web services implementation "outside" to be deployed in WEB-INF/services instead of WEB-INF/classes as the other... "When conventions meet the other conventions" Anyway, thanks a lot it is more clear than before. So I updated my pom.xml : ${artifactId}-${version} ${basedir}/webapp/WEB-INF/classes ${basedir}/webapp/WEB-INF/services/ApplicationWebService false ${basedir}/src/ApplicationWebService ${basedir}/webapp/WEB-INF/services/UserWebService false ${basedir}/src/UserWebService ${basedir}/webapp/WEB-INF/classes false ${basedir}/src/main ${basedir}/webapp/WEB-INF/classes false ${basedir}/src/resources ... And then I rerun the batch, but I still have a target directory created and maven change the directory for all the 4 resources I defined. Anyway, I can leave with that target folder since Eclipse WTP will copied it itself in the WEB-INF/classes but I don't understand why my information are not take into account in the mvn process. 2007/11/20, Arnaud HERITIER <[EMAIL PROTECTED]>: > > On Nov 20, 2007 3:19 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > > > > > 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
Re: [M2]Eclipse WTP, dependency, deployement, libraries
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 2- I have to define a build element in the pom.xml to define my src... (got 4 folder because of web services) 3- Each time my classpath should evolve I have to restart the .bat in my project folder. Then : 4- When I deploy for test in WTP, Eclipse take care of Maven and received also the lib declared in the pom.xml 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. Am I right? 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
Re: [M2]Eclipse WTP, dependency, deployement, libraries
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
Re: [M2]Eclipse WTP, dependency, deployement, libraries
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 ...
Re: [M2]Eclipse WTP, dependency, deployement, libraries
ok, sorry, I didn't see that you were new to M2. You have actually several choices to work with maven 2 and eclipse. The first one is to use a plugin in eclipse to launch maven 2 to build your application. There are 2 plugins actually for eclipse : - http://code.google.com/p/q4e/ which we hope will be integrated in eclipse in some monthes. When i tested it this plugin worked only with maven 2.1.x. It should be transparent in most cases if you are using 2.0.x, but it's not sure - http://m2eclipse.codehaus.org/ Those plugins will give you some additional features in eclipse: For example they'll help you to write your pom, add dependencies... The problem with those plugins, is that they aren't supporting WTP if you are developing a web application :-( The other choice, is to use the plugin in maven to setup your project for eclipse http://maven.apache.org/plugins/maven-eclipse-plugin/ This plugin is used from maven in command line. It setup your eclipse settings (build path, WTP support, ...). You will have to regenerate your eclipse settings each time that you change your pom (adding/removing a dependency for example). After that you can import your project in eclipse and you'll use the standard build of eclipse (Ctrl + B) to build your application. You'll also be able to deploy your webapp on an application server using WTP Hope, this helps Arnaud On Nov 20, 2007 2:51 PM, Michael Bernagou <[EMAIL PROTECTED]> wrote: > 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 > -- .. 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 ...
Re: [M2]Eclipse WTP, dependency, deployement, libraries
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
Re: [M2]Eclipse WTP, dependency, deployement, libraries
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
Re: [M2]Eclipse WTP, dependency, deployement, libraries
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 ...
Re: [M2]Eclipse WTP, dependency, deployement, libraries
So, the problem seems to be in the WTP part which do not take care about M2 (the plugin neither). It's the first time I used M2 and this repository system was a good idea, but if to use it I need another development tool, it's very bad. Thanks for answering, but I don't want to change again the way I develop especially if I don't have a very good reason to use M2 such as sharing libraries between projects. Yes, my librairies are used only in this project and I don't see the need of M2 in this context. Hope the next WTP will have also a DevLoader... 2007/11/20, Beelen, M. - SPLXL <[EMAIL PROTECTED]>: > > Michael, > > For running (and debugging) my eclipse projects in tomcat I am using the > Sysdeo tomcat plugin. (http://www.eclipsetotale.com/tomcatPlugin.html) > > It offers the ability to start and stop tomcat from Eclipse and more > importantly contains a additional DevLoader, which you can add to your > tomcat-configuration, which ensure that the libraries referenced in your > project configuration are loaded in the webContext within tomcat. > If your project refers to the libs in your M2-repo, then those libs will > be loaded. > > It is really using WTP, but it works like a charm for me. > (Note: You do have to select which libs you want to include in the > classpath of the webContext, so you can ignore those dependancies on the > classpath for the scope provided or or test) > > With kind regards, > Marco Beelen > > > > > > -Original Message- > From: Michael Bernagou [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 20, 2007 9:49 AM > To: users@maven.apache.org > Subject: [M2]Eclipse WTP, dependency, deployement, libraries > > 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 > ** > For information, services and offers, please visit our web site: > http://www.klm.com. This e-mail and any attachment may contain > confidential and privileged material intended for the addressee > only. If you are not the addressee, you are notified that no part > of the e-mail or any attachment may be disclosed, copied or > distributed, and that any other action related to this e-mail or > attachment is strictly prohibited, and may be unlawful. If you have > received this e-mail by error, please notify the sender immediately > by return e-mail, and delete this message. > > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries > and/or its employees shall not be liable for the incorrect or > incomplete transmission of this e-mail or any attachments, nor > responsible for any delay in receipt. > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal > Dutch Airlines) is registered in Amstelveen, The Netherlands, with > registered number 33014286 > ** > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Michael Bernagou Java Developper
RE: [M2]Eclipse WTP, dependency, deployement, libraries
Michael, For running (and debugging) my eclipse projects in tomcat I am using the Sysdeo tomcat plugin. (http://www.eclipsetotale.com/tomcatPlugin.html) It offers the ability to start and stop tomcat from Eclipse and more importantly contains a additional DevLoader, which you can add to your tomcat-configuration, which ensure that the libraries referenced in your project configuration are loaded in the webContext within tomcat. If your project refers to the libs in your M2-repo, then those libs will be loaded. It is really using WTP, but it works like a charm for me. (Note: You do have to select which libs you want to include in the classpath of the webContext, so you can ignore those dependancies on the classpath for the scope provided or or test) With kind regards, Marco Beelen -Original Message- From: Michael Bernagou [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 9:49 AM To: users@maven.apache.org Subject: [M2]Eclipse WTP, dependency, deployement, libraries 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 ** For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch Airlines) is registered in Amstelveen, The Netherlands, with registered number 33014286 ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[M2]Eclipse WTP, dependency, deployement, libraries
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