Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 69347 invoked from network); 22 Nov 2005 11:01:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Nov 2005 11:01:50 -0000 Received: (qmail 4233 invoked by uid 500); 22 Nov 2005 11:00:54 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 4178 invoked by uid 500); 22 Nov 2005 11:00:53 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 4166 invoked by uid 99); 22 Nov 2005 11:00:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2005 03:00:53 -0800 Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.227.126.187] (HELO moutng.kundenserver.de) (212.227.126.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2005 03:02:26 -0800 Received: from [80.135.253.248] (helo=[192.168.5.89]) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis), id 0MKwpI-1EeVt01bAz-0000op; Tue, 22 Nov 2005 12:00:31 +0100 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <03BBC756-185C-49D6-9195-6E2816B2720E@poellath.org> References: <239F6FDA-0BAD-4C16-B035-D484AC4A3D8E@poellath.org> <6D375E5D-1A47-4575-AC82-273A8BF5CEA5@poellath.org> <43690610.5050305@mortbay.com> <537CB951-9190-4FE2-A94E-D21842E9C1A7@poellath.org> <03BBC756-185C-49D6-9195-6E2816B2720E@poellath.org> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <59FC6B29-0475-4AFC-8ACE-D5772EA271CF@poellath.org> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Ralph_P=F6llath?= Subject: Re: [m2] Using the jetty6 plugin Date: Tue, 22 Nov 2005 12:00:28 +0100 To: "Maven Users List" X-Mailer: Apple Mail (2.746.2) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d7f8e0e45bd0b219b9cff1d50a2c9ffe X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I removed the log4jConfigLocation context-param from web.xml, so it =20 defaults to standard log4j config (same thing anyway). Setting the log4j config via command line works fine now: mvn -Dlog4j.configuration=3Dlog4j-console.properties -Pjetty =20 org.mortbay.jetty:maven-jetty6-plugin:1.0:run Now I tried adding an equivalent system property to the jetty6 plugin =20= config (see http://jetty.mortbay.org/jetty6/maven-plugin/howto.html ): profiles/profile/build/pluginManagement/plugins/plugin/ ... log4j.configuration log4j-console.properties But this results in the standard config file log4j.properties being =20 picked up. One explanation would be that log4j.configuration was set =20 before the plugin gets a shot at it (you can't override system =20 properties), but I'm quite sure it isn't me who set it. Any ideas? BTW, the docs mention "mvn jetty6:run", which won't work for me =20 either, but "mvn org.mortbay.jetty:maven-jetty6-plugin:1.0:run" does. Thanks, -Ralph. On 22.11.2005, at 11:03, Ralph P=F6llath wrote: > Hi, > > The one thing that keeps me from using the jetty6 plugin instead of =20= > tomcat for development is the log4j configuration for my spring =20 > application. > > As usual, the application expects log4j config in =20 > classpath:log4j.properties. For use with jetty, I need a different =20 > config file to be available at that location (log to console =20 > instead of files), so I dropped this into my POM: > > > > jetty > > > > > > = src/jetty/resources > > = log4j.properties > > > > > = src/main/resources > > = log4j.properties > > > > > > > > > > > The exclude stuff seems to work, but src/jetty/resources/=20 > log4j.properties doesn't seem to be placed on the classpath: > Embedded error: Invalid 'log4jConfigLocation' parameter: class path =20= > resource [log4j.properties] cannot be resolved to URL because it =20 > does not exist > > Jetty says > [INFO] Setting up classpath ... > :INFO: Checking Resource aliases > [INFO] Finished setting up classpath > > Is it possible to somehow display the classpath for inspection? > > I thought of filtering web.xml to manipulate the expected filename, =20= > but I guess that won't work since the webapp directory is src/main/=20 > webapp. > > Thanks, > -Ralph. > > On 03.11.2005, at 12:37, Jan Bartel wrote: >> Hi Ralph, >> >> I've linked the doco for the plugin onto the Jetty site. You can >> go directly to it here: >> http://jetty.mortbay.org/jetty6/maven-plugin/index.html >> >> You can change where the plugin expects to find your webapp by >> configuring the webAppSourceDirectory property. >> >> Regarding the oracle jars, I'm not sure about this, but perhaps =20 >> you could use the associated with the >> tag to get them onto the runtime classpath? >> >> cheers >> Jan >> >> >> Ralph P=F6llath wrote: >>> Hi, >>> I'm impressed! By following your instructions, I got jetty to run =20= >>> my webapp (using http://www.mortbay.org/maven2/snapshot as =20 >>> mentioned by Greg - the old url did not work anymore). >>> Unfortunately, I didn't get very far because jetty doesn't know =20 >>> about my oracle drivers. With tomcat, I keep those in $=20 >>> {catalina.base}/ common/lib. I guess I could add them as =20 >>> dependencies tom my project so they end up in WEB-INF/lib, but =20 >>> then I could not deploy the war to tomcat anymore. Sounds like I =20= >>> should have different maven profiles fot these scenarios? Or =20 >>> does jetty look for additional jars in some location? That would =20= >>> make it a lot easier.. >>> I also noticed that jetty expects my webapp at ${dasedir}/src/=20 >>> main/ webapp. Running mvn war:inplace works, but feels rather =20 >>> clumsy. I adds files to src that aren't sources, and I have to =20 >>> make sure I don't accidentally add them to svn. >>> Cheers, >>> -Ralph. >>> On 02.11.2005, at 19:31, Jan Bartel wrote: >>>> Ralph, >>>> >>>> Try putting the following in your pom.xml: >>>> >>>> >>>> >>>> mortbay-repo >>>> mortbay-repo >>>> http://www.mortbay.org/maven2 >>>> >>>> >>>> >>>> I should have the site doco for the plugin linked into the =20 >>>> Jetty website in the next day. In the meanwhile, all you should =20= >>>> need to do is to add these plugin config >>>> lines to your pom.xml: >>>> >>>> >>>> org.mortbay.jetty >>>> maven-jetty6-plugin >>>> >>>> 20 >>>> >>>> >>>> >>>> That will cause the plugin to keep running and scan for class/=20 >>>> lib changes every 20secs. You >>>> can change it to whatever you prefer. There are also a couple =20 >>>> of other config options, but >>>> that should get you going. >>>> >>>> You can run it: >>>> mvn org.mortbay.jetty:maven-jetty6-plugin:1.0:run >>>> >>>> You can shorten that to: >>>> mvn jetty6:run >>>> >>>> but I'm not sure exactly how to do that other than as the =20 >>>> plugin developer (I followed the >>>> instructions at http://maven.apache.org/maven2/guides/plugin/=20 >>>> guide- java-plugin-development.html). >>>> >>>> Jason, is there any update on how we get the Jetty repository =20 >>>> mirrored to the central >>>> Maven2 repository? >>>> >>>> >>>> cheers >>>> Jan >>>> >>>> Ralph P=F6llath wrote: >>>> >>>>> On 02.11.2005, at 16:55, Jan Bartel wrote: >>>>> >>>>>> Ralph, >>>>>> >>>>>> Just a suggestion: if you want to run your webapp without =20 >>>>>> having to create a war first, >>>>>> you could try the Jetty6 plugin. It is extremely lightweight, you >>>>>> don't have to have any external config files for it, plus it =20 >>>>>> will automatically >>>>>> hot-redeploy your webapp whenever you change any class files =20 >>>>>> or dependencies. You can >>>>>> get it from scpexe://jetty.mortbay.org/home/ftp/pub/maven2. >>>>> >>>>> Hi, >>>>> sounds great, but I can't figure out what to do with scpexe:// =20= >>>>> jetty.mortbay.org/home/ftp/pub/maven2. I tried creating a =20 >>>>> pluginRepository in ~/.m2/settings.xml but can't get it to work. >>>>> Cheers, >>>>> -Ralph. >>>>> >>>>>> Ralph P=F6llath wrote: >>>>>> >>>>>>> Hi, >>>>>>> I've successfully compiled and installed the tomcat plugin =20 >>>>>>> from svn, and tomcat:deploy works as expected. Now I'm =20 >>>>>>> wondering how to best use it. >>>>>>> For development, I'd like to avoid zipping up the war file =20 >>>>>>> for each deployment. =46rom gleaning at the source, I =20 >>>>>>> learned this means deploying in local mode. I guess I have =20= >>>>>>> to pass a parameter to the tomcat plugin, but I can't =20 >>>>>>> figure out the parameter's correct name (I know, this =20 >>>>>>> question is related to plugins in general, but I can't =20 >>>>>>> find the documentation). >>>>>>> I tried >>>>>>> $ mvn -Dorg.apache.maven.plugins.maven-tomcat- =20 >>>>>>> plugin.mode=3Dlocal tomcat:deploy >>>>>>> and >>>>>>> $ mvn -Dorg.codehaus.mojo.tomcat.mode=3Dlocal tomcat:deploy >>>>>>> but all I get is >>>>>>> [INFO] Deploying war remotely to /myProject on http://=20 >>>>>>> localhost: 8080/ manager >>>>>>> which means I'm running in the default remote mode. >>>>>>> I also noticed there's a mode called inplace, that uses a =20 >>>>>>> context.xml file to deploy to tomcat, and requires the war =20 >>>>>>> plugin to run in exploded mode. What's the advantage of =20 >>>>>>> using inplace (I assume you get to use a path different =20 >>>>>>> from project.build.finalName?), and how do I configure the =20= >>>>>>> war plugin? >>>>>>> How does everyone else use the tomcat plugin? >>>>>>> Thanks, >>>>>>> -Ralph. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org