Permalink
Browse files

Issue #3 Priority Messaging with Akka

* Refactored POM files to have a single point of configurations for plugins and build
* Added base classes for Akka actors and priority messaging
  • Loading branch information...
1 parent 272163e commit 75819bb72dca21b993ac88210bfcc37153d90297 @nobeh nobeh committed Mar 13, 2012
View
@@ -21,84 +21,18 @@
</description>
<build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <outputDirectory>target/classes</outputDirectory>
- <testSourceDirectory>src/test/java</testSourceDirectory>
- <testOutputDirectory>target/bin</testOutputDirectory>
- <testResources>
- <testResource>
- <directory>src/main/resources</directory>
- </testResource>
- </testResources>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
</plugin>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.15.2</version>
- <executions>
- <execution>
- <id>compile</id>
- <phase>compile</phase>
- <goals>
- <goal>add-source</goal>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${basedir}/src/test/java</source>
- </sources>
- </configuration>
- </execution>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${basedir}/src/main/scala</source>
- </sources>
- </configuration>
- </execution>
- </executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.9</version>
- <configuration>
- </configuration>
- </plugin>
-
</plugins>
</build>
@@ -0,0 +1,6 @@
+package nl.cwi.crisp.api.akka
+
+import akka.actor._
+
+abstract class CrispActor extends Actor {
+}
@@ -0,0 +1,10 @@
+package nl.cwi.crisp.api.akka
+
+class PriorityGenerator extends akka.dispatch.PriorityGenerator {
+
+ override def gen(message: Any): Int = {
+ var msg: PriorityMessage = message.asInstanceOf[PriorityMessage]
+ msg.priority.getOrElse(0)
+ }
+
+}
@@ -0,0 +1,3 @@
+package nl.cwi.crisp.api.akka
+
+class PriorityMessage(val priority: Option[Int] = None)
@@ -21,84 +21,18 @@
</description>
<build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <outputDirectory>target/classes</outputDirectory>
- <testSourceDirectory>src/test/java</testSourceDirectory>
- <testOutputDirectory>target/bin</testOutputDirectory>
- <testResources>
- <testResource>
- <directory>src/main/resources</directory>
- </testResource>
- </testResources>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
</plugin>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.15.2</version>
- <executions>
- <execution>
- <id>compile</id>
- <phase>compile</phase>
- <goals>
- <goal>add-source</goal>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.5</version>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${basedir}/src/test/java</source>
- </sources>
- </configuration>
- </execution>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${basedir}/src/main/scala</source>
- </sources>
- </configuration>
- </execution>
- </executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.9</version>
- <configuration>
- </configuration>
- </plugin>
-
</plugins>
</build>
View
49 pom.xml
@@ -22,6 +22,55 @@
<module>examples</module>
</modules>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.scala-tools</groupId>
+ <artifactId>maven-scala-plugin</artifactId>
+ <version>2.15.2</version>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>add-source</goal>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/src/main/scala</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
<dependencyManagement>
<dependencies>
<dependency>

0 comments on commit 75819bb

Please sign in to comment.