camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: svn commit: r1460258 - in /camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala: RichExchange.scala dsl/SAbstractDefinition.scala dsl/builder/RouteBuilder.scala
Date Mon, 25 Mar 2013 07:49:08 GMT
On Mon, Mar 25, 2013 at 2:52 AM, Willem jiang <willem.jiang@gmail.com> wrote:
> Hi Claus,
>
> There is a camel-scala29 module in the component directory, I don't plan to change the
code there. So I guess it should be OK for changing codes for Scala 2.10.
> I don't think current camel-scala code can work with Scala 2.9.2 any more.
>
> Any thought?
>

Yes its a problem. Try building the code on trunk (eg all of it) and
see the error. And check the pom.xml of scala29 module.

The scala29 support is still supported in Camel 2.11 (but the latest
release we do that).
So in Camel 2.12 / 3.0 onwards we can support Scala 2.10 only onwards.

So the code should support both 2.9 and 2.10 of Scala.

And we only have 1 set of the code, to make maintaining of the code
much easier for us, and to ensure the Scala DSL is in sync.


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:59.448s
[INFO] Finished at: Mon Mar 25 08:48:22 CET 2013
[INFO] Final Memory: 167M/599M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
net.alchim31.maven:scala-maven-plugin:3.1.2:compile (default) on
project camel-scala_2.9: wrap:
org.apache.commons.exec.ExecuteException: Process exited with an
error: 1(Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :camel-scala_2.9


> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Sunday, March 24, 2013 at 7:05 PM, Claus Ibsen wrote:
>
>> Hi Willem
>>
>> These recent Scala changes breaks the code. The code on trunk doesn't
>> compile anymore.
>> We should revert these commits.
>>
>> As Camel 2.11 is supporting both Scala 2.10 and 2.9. So we should keep
>> the scala code as is. Supporting both.
>>
>> From Camel 2.12 / 3.0 onwards. We drop support for Scala 2.9, and then
>> we can include these Scala code changes. And only have one camel-scala
>> component.
>>
>>
>>
>> On Sun, Mar 24, 2013 at 4:30 AM, <ningjiang@apache.org (mailto:ningjiang@apache.org)>
wrote:
>> > Author: ningjiang
>> > Date: Sun Mar 24 03:30:10 2013
>> > New Revision: 1460258
>> >
>> > URL: http://svn.apache.org/r1460258
>> > Log:
>> > Fixed some compiling warnings of camel-scala
>> >
>> > Modified:
>> > camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
>> > camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
>> > camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
>> >
>> > Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
>> > URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala?rev=1460258&r1=1460257&r2=1460258&view=diff
>> > ==============================================================================
>> > --- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
(original)
>> > +++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
Sun Mar 24 03:30:10 2013
>> > @@ -32,9 +32,9 @@ class RichExchange(val exchange : Exchan
>> > def in(header:String) : Any = exchange.getIn.getHeader(header)
>> >
>> > def in = exchange.getIn.getBody
>> > - def in[T](implicit manifest: Manifest[T]) : T = exchange.getIn.getBody(manifest.erasure).asInstanceOf[T]
>> > + def in[T](implicit manifest: Manifest[T]) : T = exchange.getIn.getBody(manifest.runtimeClass).asInstanceOf[T]
>> >
>> > - def out : Any = exchange.getOut.getBody
>> > + def out = exchange.getOut.getBody
>> >
>> > def out(header:String) : Any = exchange.getOut.getHeader(header)
>> >
>> >
>> > Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
>> > URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala?rev=1460258&r1=1460257&r2=1460258&view=diff
>> > ==============================================================================
>> > --- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
(original)
>> > +++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
Sun Mar 24 03:30:10 2013
>> > @@ -74,7 +74,7 @@ abstract class SAbstractDefinition[P <:
>> >
>> > def filter(predicate: Exchange => Any) = SFilterDefinition(target.filter(predicateBuilder(predicate)))
>> >
>> > - def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E])
= SOnExceptionDefinition[E](target.onException(manifest.erasure.asInstanceOf[Class[Throwable]])).apply(block)
>> > + def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E])
= SOnExceptionDefinition[E](target.onException(manifest.runtimeClass.asInstanceOf[Class[Throwable]])).apply(block)
>> >
>> > def id(id : String) = wrap(target.id(id))
>> > def idempotentConsumer(expression: Exchange => Any) = SIdempotentConsumerDefinition(target.idempotentConsumer(expression,
null))
>> >
>> > Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
>> > URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala?rev=1460258&r1=1460257&r2=1460258&view=diff
>> > ==============================================================================
>> > --- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
(original)
>> > +++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
Sun Mar 24 03:30:10 2013
>> > @@ -85,7 +85,7 @@ class RouteBuilder extends Preamble with
>> > */
>> > def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E])
= {
>> > stack.size match {
>> > - case 0 => SOnExceptionDefinition[E](builder.onException(manifest.erasure.asInstanceOf[Class[Throwable]]))(this).apply(block)
>> > + case 0 => SOnExceptionDefinition[E](builder.onException(manifest.runtimeClass.asInstanceOf[Class[Throwable]]))(this).apply(block)
>> > case _ => stack.top.handle[E](block)
>> > }
>> > }
>>
>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cibsen@redhat.com (mailto:cibsen@redhat.com)
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>
>
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message