On Fri, Apr 1, 2011 at 10:00 AM, ant elder <antel...@apache.org> wrote: > On Wed, Feb 9, 2011 at 9:16 AM, ant elder <antel...@apache.org> wrote: >> On Mon, Feb 7, 2011 at 8:57 PM, Florian Moga <moga....@gmail.com> wrote: >>> How does the shell operate with webapps? >> >> Presently it doesn't, for the webapp samples you have to run them in >> some server, so either deploy them to your appserver or some of them >> have the Jetty or Tomcat plugin in their pom.xml so you can run them >> with "mvn jetty:run". >> >> ...ant >> > > Replying to that now quite old email... > > As you asked about this i had a go at adding support to the Tuscany > plugin to support that and there is now some initial code that seems > to work. So if you add the pom.xml of a webapp project : > > <plugin> > <groupId>org.apache.tuscany.maven.plugins</groupId> > <artifactId>maven-tuscany-plugin</artifactId> > <version>${tuscany.version}</version> > </plugin> > > then when doing "mvn tuscany:run" it will see that the packaging type > is war and launch an embeded Tomcat to run the webapp project. > > In a similar vein, i've also added support for having the plugin run a > classes main method instead of launching Tuscany, so if you have: > > <plugin> > <groupId>org.apache.tuscany.maven.plugins</groupId> > <artifactId>maven-tuscany-plugin</artifactId> > <version>${tuscany.version}</version> > <configuration> > <mainClass>sample.HelloworldSCAClient</mainClass> > </configuration> > </plugin> > > then when doing "mvn tuscany:run" the main method of that class gets called. > > So using those if we add the tuscany plugin definition to the samples > then you'll be able to run any sample by doing just "mvn tuscany:run" > instead of having different ways for different samples depending on > what type of sample it is. > > ...ant >
I've updated all the samples in unreleased to demonstrate this, if we're happy with the approach i'll add it to the samples in trunk. https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/unreleased/samples/getting-started/ ...ant