Browse files

Merge pull request #25 from jonnyzzz/jars

Fix project generation templates and readme
  • Loading branch information...
2 parents 64dc543 + 4f375da commit c24f0b71d9d4ae748bf0fe4408def2fa4b1ad6ca @ajselvig ajselvig committed Mar 13, 2013
View
2 .idea/artifacts/kara_exec.xml
@@ -3,7 +3,7 @@
<output-path>$PROJECT_DIR$/out/artifacts/kara_exec</output-path>
<root id="root">
<element id="directory" name="src">
- <element id="archive" name="kara-exex-src.zip">
+ <element id="archive" name="kara-exec-src.zip">
<element id="dir-copy" path="$PROJECT_DIR$/src/KaraExec/src" />
</element>
</element>
View
24 README.md
@@ -28,8 +28,22 @@ Kara is Open Source and licensed under the Apache Licenses, version 2.0. It can
## Running Sample Project
-To start sample project you need to either download kara binary package or compile kara-dist artifact.
-Next,
-open samples directory,
-set KARA_HOME environment variable to point to the directory and run `../kara s` command
-You'll see Kara embedded web server running on `http://localhost:3000`
+To start sample project you need:
+* either download kara binary package and unpack or compile `kara-dist` artifact in IDEA project
+* close IDEA projects
+* configure Path Variable `KARA_HOME` in IDEA to point to kara root directory or to the output of `kara-dist` artifacts, i.e. `<project home>/out/artifacts/kara_dist`
+* open samples directory
+* run `../kara s` command
+* open demo pages at embedded web server running on `http://localhost:3000`
+
+## Generating new project
+
+To start sample project you need:
+* either download kara binary package and unpack or compile `kara-dist` artifact in IDEA project
+* close IDEA projects
+* configure Path Variable `KARA_HOME` in IDEA to point to kara root directory or to the output of `kara-dist` artifacts, i.e. `<project home>/out/artifacts/kara_dist`
+* open the directory you like to start with
+* run `<path to kara home>/kara g project <project name> --package=<package name> --ide=idea` command
+* open generated project in IDEA
+* use `Server` run configuration to start/debug your application
+
View
12 src/KaraExec/src/generators/templates/IDEATemplates.kt
@@ -45,11 +45,11 @@ fun Generator.libraryKaraLib(): String {
return """<component name="libraryTable">
<library name="KaraLib">
<CLASSES>
- <root url="jar://$KARA_HOME$/modules/core/KaraLib.jar!/" />
+ <root url="jar://$KARA_HOME$/modules/core/kara-core.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
- <root url="jar://$KARA_HOME$/modules/core/KaraLib-sources.zip!/" />
+ <root url="jar://$KARA_HOME$/modules/core/src/kara-core-src.zip!/" />
</SOURCES>
</library>
</component>
@@ -78,11 +78,11 @@ fun Generator.libraryKaraExec() : String {
<library name="KaraExec">
<CLASSES>
<root url="file://$KARA_HOME$/lib" />
- <root url="jar://$KARA_HOME$/modules/KaraExec.jar!/" />
+ <root url="jar://$KARA_HOME$/modules/exec/kara-exec.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
- <root url="jar://$KARA_HOME$/modules/KaraExec-sources.zip!/" />
+ <root url="jar://$KARA_HOME$/modules/exec/src/kara-exec-src.zip!/" />
</SOURCES>
<jarDirectory url="file://$KARA_HOME$/lib" recursive="false" />
</library>
@@ -141,14 +141,14 @@ fun Generator.launcherConfiguration() : String {
return """<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Server" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
- <option name="MAIN_CLASS_NAME" value="kara.KaraPackage" />
+ <option name="MAIN_CLASS_NAME" value="kara.setup.SetupPackage" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="s" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
+ <option name="ENV_VARIconteABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="Launcher" />
<envs />
View
1 src/KaraLib/src/kara/views/HtmlView.kt
@@ -9,6 +9,7 @@ abstract class HtmlView(var layout : HtmlLayout? = null) : BodyTag("view", false
override fun writeResponse(context : ActionContext) : Unit {
+ context.response.setContentType("text/html")
val writer = context.response.getWriter()!!
tagStack = TagStack(this)
if (layout == null) {

0 comments on commit c24f0b7

Please sign in to comment.