You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org> on 2011/01/25 23:57:43 UTC
[jira] Created: (CLEREZZA-410) Ability to automatically update
resources and recompile scala classes when they are saved to a file-system
location
Ability to automatically update resources and recompile scala classes when they are saved to a file-system location
-------------------------------------------------------------------------------------------------------------------
Key: CLEREZZA-410
URL: https://issues.apache.org/jira/browse/CLEREZZA-410
Project: Clerezza
Issue Type: New Feature
Reporter: Reto Bachmann-Gmür
Assignee: Reto Bachmann-Gmür
It shall be possible to have scala source files and resources in a directory structure analogous to the one of maven projects. A service shall monitor this directory and update a bundle whenever a file has been changed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (CLEREZZA-410) Ability to automatically update
resources and recompile scala classes when they are saved to a file-system
location
Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLEREZZA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reto Bachmann-Gmür closed CLEREZZA-410.
---------------------------------------
Resolution: Fixed
> Ability to automatically update resources and recompile scala classes when they are saved to a file-system location
> -------------------------------------------------------------------------------------------------------------------
>
> Key: CLEREZZA-410
> URL: https://issues.apache.org/jira/browse/CLEREZZA-410
> Project: Clerezza
> Issue Type: New Feature
> Reporter: Reto Bachmann-Gmür
> Assignee: Reto Bachmann-Gmür
>
> It shall be possible to have scala source files and resources in a directory structure analogous to the one of maven projects. A service shall monitor this directory and update a bundle whenever a file has been changed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLEREZZA-410) Ability to automatically update
resources and recompile scala classes when they are saved to a file-system
location
Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLEREZZA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986765#action_12986765 ]
Reto Bachmann-Gmür commented on CLEREZZA-410:
---------------------------------------------
Usage instruction, to create a project in /tmp/goo do the following
On the console enter the following commands
import org.apache.clerezza.sourcebundle._
val br = $[BundleRoot]
import java.io._
br.createSourceBundle(new File("/tmp/foo"))
in /tmp/foo you should create a directory structure like this:
src
src/main
src/main/resources
src/main/resources/OSGI-INF
src/main/resources/OSGI-INF/serviceComponents.xml
src/main/scala
src/main/scala/Service.scala
the content of src/main/resources/OSGI-INF/serviceComponents.xml
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<scr:component enabled="true" immediate="true" name="foo.Service">
<implementation class="foo.Service"/>
<property name="service.pid" value="foo.Service"/>
<service servicefactory="false">
<provide interface="java.lang.Object"/>
</service>
<property name="javax.ws.rs" type="Boolean" value="true"/>
<property name="foo.bar" type="Boolean" value="true"/>
</scr:component>
</components>
the content of src/main/scala/Service.scala
package foo
import javax.ws.rs._
import javax.ws.rs.core._
@Path("foobar")
class Service() {
@GET
def msg = "Hello World!"
}
if you point your browser to http://localhost:8080/foobar (at least some seconds after saving the last change) you should see the Hello World! - Greeting. Modify and add files, as soon as you save a file compilation starts, if compilation succeeds the bundle will be updated in the osgi environment.
> Ability to automatically update resources and recompile scala classes when they are saved to a file-system location
> -------------------------------------------------------------------------------------------------------------------
>
> Key: CLEREZZA-410
> URL: https://issues.apache.org/jira/browse/CLEREZZA-410
> Project: Clerezza
> Issue Type: New Feature
> Reporter: Reto Bachmann-Gmür
> Assignee: Reto Bachmann-Gmür
>
> It shall be possible to have scala source files and resources in a directory structure analogous to the one of maven projects. A service shall monitor this directory and update a bundle whenever a file has been changed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.