To have a constant and easy reproducible dev environment we're using Eclipse in a Docker container.
- Save
Dockerfile
anddocker-entrypoint.sh
somewhere in the same folder - Run
docker build -t desktop/eclipse:tapestry .
in that folder - Wait...
See the file eclipse
for the mounted files and needed directories:
- Location of source files
- Maven
- Gradle
- Eclipse
Everything should be self-explanatory
Save eclipse
in your path and execute it, maybe chmod +x
first.
Some settings might be off, lets fix that:
- Window -> Preferences -> Groovy -> Compiler -> Switch to 2.4.15.xx
- Window -> Preferences -> General -> Workspace -> Text File Encoding -> UTF-8
TestNG can't be installed via Dockerfile, so need to do it now:
- Help -> Install New Software -> Work with: http://beust.com/eclipse -> TestNG
File -> Import... -> Gradle -> Existing Gradle Project -> Choose Tapestry and "Finish"
You need to run some gradle tasks for the errors to go away:
- Project "beanmodel" -> Run As -> Run Configurations -> Gradle Project -> Choose working directory and set task "generateGrammarSource" I've run it twice before Eclipse picking it up, weird...
- Project "beanmodel" -> Properties - Java Build Path -> Source -> Add Folder -> "build/generated-src/antlr/main"
- Project tapestry-core -> Run As -> Run Configurations -> Gradle Project -> Choose working directory and set task "compileCoffeeScript compileTestCoffeeScript"
Now only 3 errors should be left:
- Fix "/tapestry-core/src/test/groovy/org/apache/tapestry5/LaunchJetty8.groovy" package declaration
- Close project "tapestry-javadoc"
Voila! You can build Tapestry now!