Sorry, this wasn't clear by me. It's just my guts saying that there have to
be something somewhere in the code checking for the probes. If we extend
that part also searching in inner, anonymous classes what you say shouldn't
be any problem. Maybe Toni can add a sentence here from America :-)
On Aug 9, 2011 3:30 PM, "Samuel Cox" <[email protected]> wrote:
> Andreas,
>
> Was that a question for me? I did some quick searching on ops4j
> website and in the source and didn't find anything related to
> config-search-method.
>
> On Tue, Aug 9, 2011 at 2:11 AM, Andreas Pieber <[email protected]> wrote:
>> Shouldn't this be nothing more than to extend the config-search-method
wit
>> the "#getDeclaredClass" method?
>> Kind regards,
>> Andreas
>>
>> On Mon, Aug 8, 2011 at 20:50, Samuel Cox <[email protected]> wrote:
>>>
>>> Toni, thanks for that.  I'll search through the source.
>>>
>>> However, I just noticed something that might be pretty important.
>>>
>>> If you want a static method in Scala, you have to do something like:
>>>
>>> class A {
>>>  def instanceMethod() = 1
>>> }
>>>
>>> object A {
>>>  def staticMethod() = 2
>>> }
>>>
>>> Scala tries  hard to have this end up generating bytecode like:
>>>
>>> class A {
>>>  int instanceMethod() { return 1; }
>>>  static int staticMethod() { return 2; }
>>> }
>>>
>>> However, this doesn't always work.  In my case, my @Configuration
>>> annotated method is ending up in a class named, ServiceTest$, whereas
>>> the actual unit test is named, ServiceTest.  I'm assuming that is
>>> going to cause problems...
>>>
>>>
>>> On Mon, Aug 8, 2011 at 1:16 PM, Toni Menzel <[email protected]>
wrote:
>>> > Using scala is one of the thing on a list named "cool things to do
>>> > next".  I
>>> > think you issue related to the ProbeBuilder not including the scala
>>> > class
>>> > when building the probe (bundle that contains your test) on the fly.
>>> > Should
>>> > be simple to fix when you are looking at the right spot. Check out the
>>> > Exam
>>> > sources and look for the spot where the Pax Tinybundles library (class
>>> > called Tinybundles) is used. As said before on this list, i will go
back
>>> > to
>>> > work not earlier than end of august unfortunately.
>>> > Enjoy!
>>> >
>>> > On Mon, Aug 8, 2011 at 7:54 PM, Samuel Cox <[email protected]>
>>> > wrote:
>>> >>
>>> >> I have a theory.  I think it has to do with my attempt at having a
>>> >> static @Configuration-annotated method.
>>> >>
>>> >> I'll report back...
>>> >>
>>> >> On Mon, Aug 8, 2011 at 12:51 PM, Samuel Cox <[email protected]>
>>> >> wrote:
>>> >> > I used bnd -wrap on the scala-library.jar and do a mavenBundle(...)
>>> >> > in
>>> >> > the @Configuration method.  Things don't seem to progress that far
>>> >> > though.  I can't run any code in the unit test..
>>> >> >
>>> >> > On Mon, Aug 8, 2011 at 12:46 PM, Harald Wellmann
>>> >> > <[email protected]> wrote:
>>> >> >> Ok, I know nothing about Scala, but I just looked at the
>>> >> >> scala-library
>>> >> >> artifact which happened to hang around in my local Maven
repository,
>>> >> >> and it
>>> >> >> didn't have the OSGi manifest headers.
>>> >> >>
>>> >> >> How do you provision the Scala artifact in your test? If it's not
a
>>> >> >> proper
>>> >> >> OSGi bundle exporting the scala package, then the test probe can't
>>> >> >> pick
>>> >> >> it
>>> >> >> up.
>>> >> >>
>>> >> >> The test probe includes a DynamicImport-Package: * header, so it
>>> >> >> should
>>> >> >> automatically import the scala package, provided some other bundle
>>> >> >> exports
>>> >> >> it.
>>> >> >>
>>> >> >> Best regards,
>>> >> >> Harald
>>> >> >>
>>> >> >> Am 08.08.2011 19:29, schrieb Samuel Cox:
>>> >> >>>
>>> >> >>> Harald, we use the scala-library.jar file in our production OSGi
>>> >> >>> environment.  Works fine there.
>>> >> >>>
>>> >> >>
>>> >> >> _______________________________________________
>>> >> >> general mailing list
>>> >> >> [email protected]
>>> >> >> http://lists.ops4j.org/mailman/listinfo/general
>>> >> >>
>>> >> >
>>> >>
>>> >> _______________________________________________
>>> >> general mailing list
>>> >> [email protected]
>>> >> http://lists.ops4j.org/mailman/listinfo/general
>>> >
>>> >
>>> >
>>> > --
>>> > Toni Menzel Source
>>> >
>>> >
>>> > _______________________________________________
>>> > general mailing list
>>> > [email protected]
>>> > http://lists.ops4j.org/mailman/listinfo/general
>>> >
>>> >
>>>
>>> _______________________________________________
>>> general mailing list
>>> [email protected]
>>> http://lists.ops4j.org/mailman/listinfo/general
>>
>>
>> _______________________________________________
>> general mailing list
>> [email protected]
>> http://lists.ops4j.org/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to