I'm using Eclipse Sysdeo plugin with tomcat + gradle for my projects, though I have to add custom gradle task to my build to setup devloader classpath. I was thinking to convert this to plugin, but I never have enough time for this, so I copy-paste from project to project at the moment and tuning something here and there. Maybe this can help you:
eclipse.project.file { whenMerged { project -> def nature = 'com.sysdeo.eclipse.tomcat.tomcatnature' if (!project.natures.find { it.equals( nature ) }) { project.natures.add( nature ); } } } eclipse.classpath.file { whenMerged { classpath -> def xml = '''<?xml version="1.0" encoding="UTF-8"?> <tomcatProjectProperties> <rootDir>src/main/webapp</rootDir> <exportSource>false</exportSource> <reloadable>true</reloadable> <redirectLogger>true</redirectLogger> <updateXml>true</updateXml> <warLocation></warLocation> <extraInfo>%3CResource+name%3D%22jdbc%2Fmy-project-db%22%0A++++++++type%3D%22javax.sql.DataSource%22%0A++++++++auth%3D%22Container%22%0A++++++++maxActive%3D%22100%22+maxIdle%3D%2230%22+maxWait%3D%2210000%22%0A++++++++driverClassName%3D%22org.postgresql.Driver%22%0A++++++++url%3D%22jdbc%3Apostgresql%3A%2F%2Flocalhost%2Fmy-project-db%22%0A++++++++username%3D%22dmitrygusev%22+%2F%3E%0A%0A%3CLoader+delegate%3D%22true%22%2F%3E</extraInfo> <webPath>/</webPath> <webClassPathEntries/> </tomcatProjectProperties>''' def root = new XmlParser().parseText(xml) def entries = root.webClassPathEntries.get(0) entries.children().clear() def classPathEntries = ["/my-project-name-subproject1/bin", "/my-project-name-subproject2/bin"] sourceSets.main.compileClasspath.minus(configurations. providedCompile).each { if (!it.absolutePath.contains("my-project-name-")) { classPathEntries << it.absolutePath } } classPathEntries.each{ entry -> entries.appendNode( "webClassPathEntry", entry) } def tomcatPluginFile = file(".tomcatplugin") tomcatPluginFile.delete() tomcatPluginFile << groovy.xml.XmlUtil.serialize(root) } } On Fri, Sep 6, 2013 at 5:28 PM, Barry Books <trs...@gmail.com> wrote: > Thanks, I guess I was not clear what I meant by works. RunJettyRun knows > about Maven so I can just right click on my project select "Run Jetty" and > it 'just works'. No messing with classpaths, creating a run configuration > etc. If you can do that with Eclipse/Gradle I'd like to know how because > when I try it Tapestry does not start and if I go to the website I get > this: > > Directory: /sandbox/META-INF/ <http://localhost:8080/sandbox/META-INF/ > >102 > bytes Sep 5, 2013 7:13:00 AMWEB-INF/ > <http://localhost:8080/sandbox/WEB-INF/>136 > bytes Sep 5, 2013 7:13:19 AM > > It did occur to me that the test case runner is now its own module so I > tried this: > > *import* org.apache.tapestry5.test.Jetty7Runner; > > > *public* *class* Jetty { > > *public* *static* *void* main(String[] args) *throws* Exception{ > > Jetty7Runner runner = *new* Jetty7Runner("src/main/webapp","/",8080,8443); > > } > > } > > > and that works if I add src/main/resources to the classpath and check > exported entries only. This may even be better because I don't need a > plugin but still does not fit my definition of 'just works'. I would rate > it promising. > > > On Fri, Sep 6, 2013 at 7:26 AM, Thiago H de Paula Figueiredo < > thiag...@gmail.com> wrote: > > > Hi! > > > > Answering the question in the message subject: in the exact same ways you > > ran applications using older Tapestry versions. Or any other servlet > > API-based application. > > > > > > On Fri, 06 Sep 2013 09:13:54 -0300, Barry Books <trs...@gmail.com> > wrote: > > > > With 5.4 I've decided to switch from Maven to Gradle to do builds. In > the > >> past I've used RunJettyRun/Maven which just works but RunJettyRun/Gradle > >> does not. Are there any suggestions for a simple (no configuration) way > >> to run Tapestry apps built with Gradle in Eclipse? > >> > > > > RunJettyRun is an Eclipse plugin which works independently of Maven and > > Gradle. I run my Tapestry 5.4 application using RunJettyRun in the exact > > same way as my 5.1 ones. I really don't know what's your problem here, as > > you just said RunJettyRun/Gradle doesn't work without specifying what > > "doesn't work" means. As long as the Eclipse project has the classpath > set > > up correctly and the webapp context configured, RunJettyRun will work. > > > > -- > > Thiago H. de Paula Figueiredo > > > > ------------------------------**------------------------------**--------- > > To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org< > users-unsubscr...@tapestry.apache.org> > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > -- Dmitry Gusev AnjLab Team http://anjlab.com