You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@buildr.apache.org by Tal Rotbart <re...@gmail.com> on 2008/02/25 01:43:03 UTC

JDK 1.6 developer preview on Mac OS X

Hi all,

Does any of you have experience with updating Buildr / Antwrap / RJB
to work with JDK 1.6 Developer Preview on Mac OS X?

It seems that even after uninstalling all version of rjb and Antwrap
and reinstalling with JAVA_HOME pointing to the JDK 1.6's home folder
at:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

When using buildr (with JAVA_HOME set correctly as well) the Ant tasks
launched by Antwrap still seem to use the 1.5 javac, classpath and
tools.jar.

Any clues would be appreciated greatly.

Cheers,
Tal

Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
It seems that RJB has some hard-coded values for Mac OS X. It ignores
JAVA_HOME and instead relies on the current jdk symlink
(/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/).
Apparently a known issue.

While it compiles the native extensions against the JDK 1.6, it seems
to fail when run with this error message:
---
dlopen(/System/Library/Frameworks/JavaVM.framework/Libraries/libjvm_compat.dylib,
9): no suitable image found.  Did find:
	/System/Library/Frameworks/JavaVM.framework/Libraries/libjvm_compat.dylib:
mach-o, but wrong architecture
---

Again, any clue would be greatly appreciated. I'm going to submit a
bug to the rjb project, but I'm wondering if anyone is aware of a
workaround.

Cheers,
Tal

On Mon, Feb 25, 2008 at 11:43 AM, Tal Rotbart <re...@gmail.com> wrote:
> Hi all,
>
>  Does any of you have experience with updating Buildr / Antwrap / RJB
>  to work with JDK 1.6 Developer Preview on Mac OS X?
>
>  It seems that even after uninstalling all version of rjb and Antwrap
>  and reinstalling with JAVA_HOME pointing to the JDK 1.6's home folder
>  at:
>  /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>
>  When using buildr (with JAVA_HOME set correctly as well) the Ant tasks
>  launched by Antwrap still seem to use the 1.5 javac, classpath and
>  tools.jar.
>
>  Any clues would be appreciated greatly.
>
>  Cheers,
>  Tal
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 26, 2008, at 1:00 PM, Alexandre Bairos wrote:

> I took a look in the docs and didn't see anything about Junit 4.

It does seem to support Junit 3 test cases, although doesn't seem like  
we support that either:
http://testng.org/doc/documentation-main.html#junit

Assaf

>
>
>
> On Tue, Feb 26, 2008 at 5:51 PM, Assaf Arkin <ar...@intalio.com>  
> wrote:
>
>> On 2/26/08, Victor Hugo Borja <vi...@gmail.com> wrote:
>>>
>>> On Tue, Feb 26, 2008 at 2:02 AM, Assaf Arkin <ar...@intalio.com>  
>>> wrote:
>>>
>>>>
>>>> I added a check for the org.junit.Test annotation, can you try it  
>>>> out?
>>>>
>>>
>>>
>>> Thanks Assaf, I've modified the test-filter so that we can use it  
>>> with
>>> TestNG annotations.
>>
>>
>>
>> That's a nice API, I can see how we could easily use it elsewhere.
>>
>> If I remember correctly, TestNG can run test cases that extend
>> junit.testframework.TestCase, I don't know if it supports JUnit
>> annotations.
>> Can anyone verify that?
>>
>> Assaf
>>
>> --
>>> vic
>>>
>>> Quaerendo invenietis.
>>>
>>
>>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Alexandre Bairos <al...@gmail.com>.
I took a look in the docs and didn't see anything about Junit 4.


On Tue, Feb 26, 2008 at 5:51 PM, Assaf Arkin <ar...@intalio.com> wrote:

> On 2/26/08, Victor Hugo Borja <vi...@gmail.com> wrote:
> >
> > On Tue, Feb 26, 2008 at 2:02 AM, Assaf Arkin <ar...@intalio.com> wrote:
> >
> > >
> > > I added a check for the org.junit.Test annotation, can you try it out?
> > >
> >
> >
> > Thanks Assaf, I've modified the test-filter so that we can use it with
> > TestNG annotations.
>
>
>
> That's a nice API, I can see how we could easily use it elsewhere.
>
> If I remember correctly, TestNG can run test cases that extend
> junit.testframework.TestCase, I don't know if it supports JUnit
> annotations.
>  Can anyone verify that?
>
> Assaf
>
> --
> > vic
> >
> > Quaerendo invenietis.
> >
>
>
>
> --
> CTO, Intalio
> http://www.intalio.com
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
Works perfectly!

Cheers,
Tal

On Tue, Feb 26, 2008 at 7:02 PM, Assaf Arkin <ar...@intalio.com> wrote:
> On Feb 25, 2008, at 7:50 PM, Tal Rotbart wrote:
>
>  > I don't think Ant complains with Junit4 tests. At least it doesn't for
>  > me (I've manually removed that filter for my build, and it never
>  > complained with Buildr 1.2.x). Maybe only if you have no @Test
>  > annotated methods in the class you are trying to run.
>  >
>  > TestCase is deprecated if I'm not mistaken, so we can't rely on that,
>  > instead I can write a filter that will check if there's at least one
>  > @Test annotated method in the class, but that might slow down the
>  > build.
>
>  I added a check for the org.junit.Test annotation, can you try it out?
>
>
>
>  Assaf
>
>  >
>  >
>  > Cheers,
>  > Tal
>  >
>  > On Tue, Feb 26, 2008 at 2:45 PM, Assaf Arkin <ar...@intalio.com>
>  > wrote:
>  >> On Feb 25, 2008, at 7:19 PM, Tal Rotbart wrote:
>  >>
>  >>> Alright, did that the candidates seem alright. It is the output of
>  >>> the
>  >>> JUnitTestFilter that is empty.
>  >>>
>  >>> From the filter's java code it seems to assume that the test would
>  >>> be
>  >>> an instance of junit.framework.TestCase, which AFAIK isn't the case
>  >>> with Junit4 (See
>  >>> http://junit.sourceforge.net/doc/cookbook/cookbook.htm), and isn't
>  >>> the
>  >>> case with my test classes.
>  >>>
>  >>> Did I miss some setting in the buildfile that wasn't required before
>  >>> 1.3?
>  >>
>  >> 1.2 would decide what a good candidate is based on the class name,
>  >> looking for Test* or *Test.  That wasn't the most loved feature, it's
>  >> a good convention but if you have a class that's not a test case with
>  >> a matching name, Ant complains.
>  >>
>  >> So 1.3 is trying to figure out which classes are test cases, before
>  >> handing those off to Ant.  I'm not sure how we could do annotations,
>  >> but that's one possibility.  Worse case, we can always revert back.
>  >>
>  >>
>  >>
>  >> Assaf
>  >>
>  >>>
>  >>>
>  >>> Cheers,
>  >>> Tal
>  >>>
>  >>> On Tue, Feb 26, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>  >>> wrote:
>  >>>> On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:
>  >>>>
>  >>>>> task.tests reports an empty array ("[]").
>  >>>>> I verified that the compile task compiled test classes to the <sub
>  >>>>> project>/target/test/classes/<package hierarchy>/ folder. Note
>  >>>>> that
>  >>>>> the same buildfile works perfectly with buildr 1.2.x on another
>  >>>>> machien running Ubuntu.
>  >>>>>
>  >>>>> The sub-project's define:
>  >>>>> define "data" do
>  >>>>>  compile.with COMMONS_LANG, project("model"), XSTREAM
>  >>>>>  test.compile.with TEST_DEPENDENCIES, project("test-common")
>  >>>>>  test.with  TEST_DEPENDENCIES, project("model"), project("test-
>  >>>>> common")
>  >>>>>  test.enhance do |task|
>  >>>>>      p "Available tests: "
>  >>>>>      p task.tests
>  >>>>>  end
>  >>>>>  package(:jar)
>  >>>>> end
>  >>>>>
>  >>>>> Any more hints on where to look for the source of the issue?
>  >>>>
>  >>>> The test cases are filtered in lib/java/test_frameworks.rb, line
>  >>>> 126.
>  >>>> This method basically runs through all the classes appearing in
>  >>>> target/
>  >>>> test/classes and filters the one it thinks are valid test cases.
>  >>>> Maybe a few puts statement there to see why it's not picking on
>  >>>> your
>  >>>> test cases.
>  >>>>
>  >>>> Assaf
>  >>>>
>  >>>>
>  >>>>
>  >>>>>
>  >>>>>
>  >>>>> Cheers,
>  >>>>> Tal
>  >>>>>
>  >>>>> On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>
>  >>>>> wrote:
>  >>>>>> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>  >>>>>>
>  >>>>>>> I do not see the difference between jruby /usr/bin/buildr and
>  >>>>>>> jruby -s
>  >>>>>>> buildr. They both run the exact same script, and with both
>  >>>>>>> commands
>  >>>>>>> buildr trunk pretend to perform the tests but do not actually do
>  >>>>>>> them.
>  >>>>>>
>  >>>>>> They will both run the same script.  I'm not seeing any problem
>  >>>>>> running tests in trunk, tested against JUnit.
>  >>>>>>
>  >>>>>> Try to find out what tests are being picked up:
>  >>>>>>
>  >>>>>> test.enhance do |task|
>  >>>>>> p "Available tests: "
>  >>>>>> p task.tests
>  >>>>>> end
>  >>>>>>
>  >>>>>> Assaf
>  >>>>>>
>  >>>>>>
>  >>>>>>
>  >>>>>>>
>  >>>>>>>
>  >>>>>>> Any clue would be greatly appreciated,
>  >>>>>>>
>  >>>>>>> Cheers,
>  >>>>>>> Tal
>  >>>>>>>
>  >>>>>>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>  >>>>>>>> wrote:
>  >>>>>>>> Tal,
>  >>>>>>>>
>  >>>>>>>>
>  >>>>>>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <redbeard@gmail.com
>  >>>>>>>> >
>  >>>>>>>> wrote:
>  >>>>>>>>
>  >>>>>>>>> Weird. I just noticed Buildr pretends to run my tests but
>  >>>>>>>>> doesn't,this is
>  >>>>>>>>> under jruby.
>  >>>>>>>>
>  >>>>>>>>> Steps I took:
>  >>>>>>>>>
>  >>>>>>>>> 1. Downloaded jruby
>  >>>>>>>>> 2. Added it to my PATH
>  >>>>>>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>  >>>>>>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>  >>>>>>>>> install'.
>  >>>>>>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean
>  >>>>>>>>> package' (My
>  >>>>>>>>> /usr/bin/buildr's content is listed below.)
>  >>>>>>>>
>  >>>>>>>>
>  >>>>>>>> In step 5, you should be able to run buildr with 'jruby -S
>  >>>>>>>> buildr'
>  >>>>>>>> or simply
>  >>>>>>>> with 'builldr' if the JRuby version is first on your path.
>  >>>>>>>>
>  >>>>>>>> I guess /usr/bin/buildr is your script for MRI and would not
>  >>>>>>>> work
>  >>>>>>>> with JRuby
>  >>>>>>>> as it requires rjb.
>  >>>>>>>>
>  >>>>>>>> Cheers,
>  >>>>>>>> --
>  >>>>>>>> vic
>  >>>>>>>>
>  >>>>>>>> Quaerendo invenietis.
>  >>>>>>>>
>  >>>>>>
>  >>>>>>
>  >>>>
>  >>>>
>  >>
>  >>
>
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On 2/26/08, Victor Hugo Borja <vi...@gmail.com> wrote:
>
> On Tue, Feb 26, 2008 at 2:02 AM, Assaf Arkin <ar...@intalio.com> wrote:
>
> >
> > I added a check for the org.junit.Test annotation, can you try it out?
> >
>
>
> Thanks Assaf, I've modified the test-filter so that we can use it with
> TestNG annotations.



That's a nice API, I can see how we could easily use it elsewhere.

If I remember correctly, TestNG can run test cases that extend
junit.testframework.TestCase, I don't know if it supports JUnit annotations.
 Can anyone verify that?

Assaf

--
> vic
>
> Quaerendo invenietis.
>



-- 
CTO, Intalio
http://www.intalio.com

Re: JDK 1.6 developer preview on Mac OS X

Posted by Victor Hugo Borja <vi...@gmail.com>.
On Tue, Feb 26, 2008 at 2:02 AM, Assaf Arkin <ar...@intalio.com> wrote:

>
> I added a check for the org.junit.Test annotation, can you try it out?
>

Thanks Assaf, I've modified the test-filter so that we can use it with
TestNG annotations.
-- 
vic

Quaerendo invenietis.

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 25, 2008, at 7:50 PM, Tal Rotbart wrote:

> I don't think Ant complains with Junit4 tests. At least it doesn't for
> me (I've manually removed that filter for my build, and it never
> complained with Buildr 1.2.x). Maybe only if you have no @Test
> annotated methods in the class you are trying to run.
>
> TestCase is deprecated if I'm not mistaken, so we can't rely on that,
> instead I can write a filter that will check if there's at least one
> @Test annotated method in the class, but that might slow down the
> build.

I added a check for the org.junit.Test annotation, can you try it out?

Assaf

>
>
> Cheers,
> Tal
>
> On Tue, Feb 26, 2008 at 2:45 PM, Assaf Arkin <ar...@intalio.com>  
> wrote:
>> On Feb 25, 2008, at 7:19 PM, Tal Rotbart wrote:
>>
>>> Alright, did that the candidates seem alright. It is the output of  
>>> the
>>> JUnitTestFilter that is empty.
>>>
>>> From the filter's java code it seems to assume that the test would  
>>> be
>>> an instance of junit.framework.TestCase, which AFAIK isn't the case
>>> with Junit4 (See
>>> http://junit.sourceforge.net/doc/cookbook/cookbook.htm), and isn't  
>>> the
>>> case with my test classes.
>>>
>>> Did I miss some setting in the buildfile that wasn't required before
>>> 1.3?
>>
>> 1.2 would decide what a good candidate is based on the class name,
>> looking for Test* or *Test.  That wasn't the most loved feature, it's
>> a good convention but if you have a class that's not a test case with
>> a matching name, Ant complains.
>>
>> So 1.3 is trying to figure out which classes are test cases, before
>> handing those off to Ant.  I'm not sure how we could do annotations,
>> but that's one possibility.  Worse case, we can always revert back.
>>
>>
>>
>> Assaf
>>
>>>
>>>
>>> Cheers,
>>> Tal
>>>
>>> On Tue, Feb 26, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>>> wrote:
>>>> On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:
>>>>
>>>>> task.tests reports an empty array ("[]").
>>>>> I verified that the compile task compiled test classes to the <sub
>>>>> project>/target/test/classes/<package hierarchy>/ folder. Note  
>>>>> that
>>>>> the same buildfile works perfectly with buildr 1.2.x on another
>>>>> machien running Ubuntu.
>>>>>
>>>>> The sub-project's define:
>>>>> define "data" do
>>>>>  compile.with COMMONS_LANG, project("model"), XSTREAM
>>>>>  test.compile.with TEST_DEPENDENCIES, project("test-common")
>>>>>  test.with  TEST_DEPENDENCIES, project("model"), project("test-
>>>>> common")
>>>>>  test.enhance do |task|
>>>>>      p "Available tests: "
>>>>>      p task.tests
>>>>>  end
>>>>>  package(:jar)
>>>>> end
>>>>>
>>>>> Any more hints on where to look for the source of the issue?
>>>>
>>>> The test cases are filtered in lib/java/test_frameworks.rb, line  
>>>> 126.
>>>> This method basically runs through all the classes appearing in
>>>> target/
>>>> test/classes and filters the one it thinks are valid test cases.
>>>> Maybe a few puts statement there to see why it's not picking on  
>>>> your
>>>> test cases.
>>>>
>>>> Assaf
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Tal
>>>>>
>>>>> On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>
>>>>> wrote:
>>>>>> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>>>>>>
>>>>>>> I do not see the difference between jruby /usr/bin/buildr and
>>>>>>> jruby -s
>>>>>>> buildr. They both run the exact same script, and with both
>>>>>>> commands
>>>>>>> buildr trunk pretend to perform the tests but do not actually do
>>>>>>> them.
>>>>>>
>>>>>> They will both run the same script.  I'm not seeing any problem
>>>>>> running tests in trunk, tested against JUnit.
>>>>>>
>>>>>> Try to find out what tests are being picked up:
>>>>>>
>>>>>> test.enhance do |task|
>>>>>> p "Available tests: "
>>>>>> p task.tests
>>>>>> end
>>>>>>
>>>>>> Assaf
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Any clue would be greatly appreciated,
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Tal
>>>>>>>
>>>>>>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>>>>>>>> wrote:
>>>>>>>> Tal,
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <redbeard@gmail.com 
>>>>>>>> >
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Weird. I just noticed Buildr pretends to run my tests but
>>>>>>>>> doesn't,this is
>>>>>>>>> under jruby.
>>>>>>>>
>>>>>>>>> Steps I took:
>>>>>>>>>
>>>>>>>>> 1. Downloaded jruby
>>>>>>>>> 2. Added it to my PATH
>>>>>>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>>>>>>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>>>>>>>>> install'.
>>>>>>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean
>>>>>>>>> package' (My
>>>>>>>>> /usr/bin/buildr's content is listed below.)
>>>>>>>>
>>>>>>>>
>>>>>>>> In step 5, you should be able to run buildr with 'jruby -S
>>>>>>>> buildr'
>>>>>>>> or simply
>>>>>>>> with 'builldr' if the JRuby version is first on your path.
>>>>>>>>
>>>>>>>> I guess /usr/bin/buildr is your script for MRI and would not  
>>>>>>>> work
>>>>>>>> with JRuby
>>>>>>>> as it requires rjb.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> --
>>>>>>>> vic
>>>>>>>>
>>>>>>>> Quaerendo invenietis.
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>


Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 25, 2008, at 7:50 PM, Tal Rotbart wrote:

> I don't think Ant complains with Junit4 tests. At least it doesn't for
> me (I've manually removed that filter for my build, and it never
> complained with Buildr 1.2.x). Maybe only if you have no @Test
> annotated methods in the class you are trying to run.

If Buildr passes a class name to Ant/JUnit and that class is not a  
test case, the task fails with:
     [junit] Test NotATest FAILED

So we have to be selective of the classes we pass to JUnit through Ant.

Assaf

>
>
> TestCase is deprecated if I'm not mistaken, so we can't rely on that,
> instead I can write a filter that will check if there's at least one
> @Test annotated method in the class, but that might slow down the
> build.
>
> Cheers,
> Tal
>
> On Tue, Feb 26, 2008 at 2:45 PM, Assaf Arkin <ar...@intalio.com>  
> wrote:
>> On Feb 25, 2008, at 7:19 PM, Tal Rotbart wrote:
>>
>>> Alright, did that the candidates seem alright. It is the output of  
>>> the
>>> JUnitTestFilter that is empty.
>>>
>>> From the filter's java code it seems to assume that the test would  
>>> be
>>> an instance of junit.framework.TestCase, which AFAIK isn't the case
>>> with Junit4 (See
>>> http://junit.sourceforge.net/doc/cookbook/cookbook.htm), and isn't  
>>> the
>>> case with my test classes.
>>>
>>> Did I miss some setting in the buildfile that wasn't required before
>>> 1.3?
>>
>> 1.2 would decide what a good candidate is based on the class name,
>> looking for Test* or *Test.  That wasn't the most loved feature, it's
>> a good convention but if you have a class that's not a test case with
>> a matching name, Ant complains.
>>
>> So 1.3 is trying to figure out which classes are test cases, before
>> handing those off to Ant.  I'm not sure how we could do annotations,
>> but that's one possibility.  Worse case, we can always revert back.
>>
>>
>>
>> Assaf
>>
>>>
>>>
>>> Cheers,
>>> Tal
>>>
>>> On Tue, Feb 26, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>>> wrote:
>>>> On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:
>>>>
>>>>> task.tests reports an empty array ("[]").
>>>>> I verified that the compile task compiled test classes to the <sub
>>>>> project>/target/test/classes/<package hierarchy>/ folder. Note  
>>>>> that
>>>>> the same buildfile works perfectly with buildr 1.2.x on another
>>>>> machien running Ubuntu.
>>>>>
>>>>> The sub-project's define:
>>>>> define "data" do
>>>>>  compile.with COMMONS_LANG, project("model"), XSTREAM
>>>>>  test.compile.with TEST_DEPENDENCIES, project("test-common")
>>>>>  test.with  TEST_DEPENDENCIES, project("model"), project("test-
>>>>> common")
>>>>>  test.enhance do |task|
>>>>>      p "Available tests: "
>>>>>      p task.tests
>>>>>  end
>>>>>  package(:jar)
>>>>> end
>>>>>
>>>>> Any more hints on where to look for the source of the issue?
>>>>
>>>> The test cases are filtered in lib/java/test_frameworks.rb, line  
>>>> 126.
>>>> This method basically runs through all the classes appearing in
>>>> target/
>>>> test/classes and filters the one it thinks are valid test cases.
>>>> Maybe a few puts statement there to see why it's not picking on  
>>>> your
>>>> test cases.
>>>>
>>>> Assaf
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Tal
>>>>>
>>>>> On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>
>>>>> wrote:
>>>>>> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>>>>>>
>>>>>>> I do not see the difference between jruby /usr/bin/buildr and
>>>>>>> jruby -s
>>>>>>> buildr. They both run the exact same script, and with both
>>>>>>> commands
>>>>>>> buildr trunk pretend to perform the tests but do not actually do
>>>>>>> them.
>>>>>>
>>>>>> They will both run the same script.  I'm not seeing any problem
>>>>>> running tests in trunk, tested against JUnit.
>>>>>>
>>>>>> Try to find out what tests are being picked up:
>>>>>>
>>>>>> test.enhance do |task|
>>>>>> p "Available tests: "
>>>>>> p task.tests
>>>>>> end
>>>>>>
>>>>>> Assaf
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Any clue would be greatly appreciated,
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Tal
>>>>>>>
>>>>>>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>>>>>>>> wrote:
>>>>>>>> Tal,
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <redbeard@gmail.com 
>>>>>>>> >
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Weird. I just noticed Buildr pretends to run my tests but
>>>>>>>>> doesn't,this is
>>>>>>>>> under jruby.
>>>>>>>>
>>>>>>>>> Steps I took:
>>>>>>>>>
>>>>>>>>> 1. Downloaded jruby
>>>>>>>>> 2. Added it to my PATH
>>>>>>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>>>>>>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>>>>>>>>> install'.
>>>>>>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean
>>>>>>>>> package' (My
>>>>>>>>> /usr/bin/buildr's content is listed below.)
>>>>>>>>
>>>>>>>>
>>>>>>>> In step 5, you should be able to run buildr with 'jruby -S
>>>>>>>> buildr'
>>>>>>>> or simply
>>>>>>>> with 'builldr' if the JRuby version is first on your path.
>>>>>>>>
>>>>>>>> I guess /usr/bin/buildr is your script for MRI and would not  
>>>>>>>> work
>>>>>>>> with JRuby
>>>>>>>> as it requires rjb.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> --
>>>>>>>> vic
>>>>>>>>
>>>>>>>> Quaerendo invenietis.
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>


Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
I don't think Ant complains with Junit4 tests. At least it doesn't for
me (I've manually removed that filter for my build, and it never
complained with Buildr 1.2.x). Maybe only if you have no @Test
annotated methods in the class you are trying to run.

TestCase is deprecated if I'm not mistaken, so we can't rely on that,
instead I can write a filter that will check if there's at least one
@Test annotated method in the class, but that might slow down the
build.

Cheers,
Tal

On Tue, Feb 26, 2008 at 2:45 PM, Assaf Arkin <ar...@intalio.com> wrote:
> On Feb 25, 2008, at 7:19 PM, Tal Rotbart wrote:
>
>  > Alright, did that the candidates seem alright. It is the output of the
>  > JUnitTestFilter that is empty.
>  >
>  > From the filter's java code it seems to assume that the test would be
>  > an instance of junit.framework.TestCase, which AFAIK isn't the case
>  > with Junit4 (See
>  > http://junit.sourceforge.net/doc/cookbook/cookbook.htm), and isn't the
>  > case with my test classes.
>  >
>  > Did I miss some setting in the buildfile that wasn't required before
>  > 1.3?
>
>  1.2 would decide what a good candidate is based on the class name,
>  looking for Test* or *Test.  That wasn't the most loved feature, it's
>  a good convention but if you have a class that's not a test case with
>  a matching name, Ant complains.
>
>  So 1.3 is trying to figure out which classes are test cases, before
>  handing those off to Ant.  I'm not sure how we could do annotations,
>  but that's one possibility.  Worse case, we can always revert back.
>
>
>
>  Assaf
>
>  >
>  >
>  > Cheers,
>  > Tal
>  >
>  > On Tue, Feb 26, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>  > wrote:
>  >> On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:
>  >>
>  >>> task.tests reports an empty array ("[]").
>  >>> I verified that the compile task compiled test classes to the <sub
>  >>> project>/target/test/classes/<package hierarchy>/ folder. Note that
>  >>> the same buildfile works perfectly with buildr 1.2.x on another
>  >>> machien running Ubuntu.
>  >>>
>  >>> The sub-project's define:
>  >>> define "data" do
>  >>>   compile.with COMMONS_LANG, project("model"), XSTREAM
>  >>>   test.compile.with TEST_DEPENDENCIES, project("test-common")
>  >>>   test.with  TEST_DEPENDENCIES, project("model"), project("test-
>  >>> common")
>  >>>   test.enhance do |task|
>  >>>       p "Available tests: "
>  >>>       p task.tests
>  >>>   end
>  >>>   package(:jar)
>  >>> end
>  >>>
>  >>> Any more hints on where to look for the source of the issue?
>  >>
>  >> The test cases are filtered in lib/java/test_frameworks.rb, line 126.
>  >> This method basically runs through all the classes appearing in
>  >> target/
>  >> test/classes and filters the one it thinks are valid test cases.
>  >> Maybe a few puts statement there to see why it's not picking on your
>  >> test cases.
>  >>
>  >> Assaf
>  >>
>  >>
>  >>
>  >>>
>  >>>
>  >>> Cheers,
>  >>> Tal
>  >>>
>  >>> On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>
>  >>> wrote:
>  >>>> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>  >>>>
>  >>>>> I do not see the difference between jruby /usr/bin/buildr and
>  >>>>> jruby -s
>  >>>>> buildr. They both run the exact same script, and with both
>  >>>>> commands
>  >>>>> buildr trunk pretend to perform the tests but do not actually do
>  >>>>> them.
>  >>>>
>  >>>> They will both run the same script.  I'm not seeing any problem
>  >>>> running tests in trunk, tested against JUnit.
>  >>>>
>  >>>> Try to find out what tests are being picked up:
>  >>>>
>  >>>> test.enhance do |task|
>  >>>>  p "Available tests: "
>  >>>>  p task.tests
>  >>>> end
>  >>>>
>  >>>> Assaf
>  >>>>
>  >>>>
>  >>>>
>  >>>>>
>  >>>>>
>  >>>>> Any clue would be greatly appreciated,
>  >>>>>
>  >>>>> Cheers,
>  >>>>> Tal
>  >>>>>
>  >>>>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>  >>>>>> wrote:
>  >>>>>> Tal,
>  >>>>>>
>  >>>>>>
>  >>>>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com>
>  >>>>>> wrote:
>  >>>>>>
>  >>>>>>> Weird. I just noticed Buildr pretends to run my tests but
>  >>>>>>> doesn't,this is
>  >>>>>>> under jruby.
>  >>>>>>
>  >>>>>>> Steps I took:
>  >>>>>>>
>  >>>>>>> 1. Downloaded jruby
>  >>>>>>> 2. Added it to my PATH
>  >>>>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>  >>>>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>  >>>>>>> install'.
>  >>>>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean
>  >>>>>>> package' (My
>  >>>>>>> /usr/bin/buildr's content is listed below.)
>  >>>>>>
>  >>>>>>
>  >>>>>> In step 5, you should be able to run buildr with 'jruby -S
>  >>>>>> buildr'
>  >>>>>> or simply
>  >>>>>> with 'builldr' if the JRuby version is first on your path.
>  >>>>>>
>  >>>>>> I guess /usr/bin/buildr is your script for MRI and would not work
>  >>>>>> with JRuby
>  >>>>>> as it requires rjb.
>  >>>>>>
>  >>>>>> Cheers,
>  >>>>>> --
>  >>>>>> vic
>  >>>>>>
>  >>>>>> Quaerendo invenietis.
>  >>>>>>
>  >>>>
>  >>>>
>  >>
>  >>
>
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 25, 2008, at 7:19 PM, Tal Rotbart wrote:

> Alright, did that the candidates seem alright. It is the output of the
> JUnitTestFilter that is empty.
>
> From the filter's java code it seems to assume that the test would be
> an instance of junit.framework.TestCase, which AFAIK isn't the case
> with Junit4 (See
> http://junit.sourceforge.net/doc/cookbook/cookbook.htm), and isn't the
> case with my test classes.
>
> Did I miss some setting in the buildfile that wasn't required before  
> 1.3?

1.2 would decide what a good candidate is based on the class name,  
looking for Test* or *Test.  That wasn't the most loved feature, it's  
a good convention but if you have a class that's not a test case with  
a matching name, Ant complains.

So 1.3 is trying to figure out which classes are test cases, before  
handing those off to Ant.  I'm not sure how we could do annotations,  
but that's one possibility.  Worse case, we can always revert back.

Assaf

>
>
> Cheers,
> Tal
>
> On Tue, Feb 26, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>  
> wrote:
>> On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:
>>
>>> task.tests reports an empty array ("[]").
>>> I verified that the compile task compiled test classes to the <sub
>>> project>/target/test/classes/<package hierarchy>/ folder. Note that
>>> the same buildfile works perfectly with buildr 1.2.x on another
>>> machien running Ubuntu.
>>>
>>> The sub-project's define:
>>> define "data" do
>>>   compile.with COMMONS_LANG, project("model"), XSTREAM
>>>   test.compile.with TEST_DEPENDENCIES, project("test-common")
>>>   test.with  TEST_DEPENDENCIES, project("model"), project("test-
>>> common")
>>>   test.enhance do |task|
>>>       p "Available tests: "
>>>       p task.tests
>>>   end
>>>   package(:jar)
>>> end
>>>
>>> Any more hints on where to look for the source of the issue?
>>
>> The test cases are filtered in lib/java/test_frameworks.rb, line 126.
>> This method basically runs through all the classes appearing in  
>> target/
>> test/classes and filters the one it thinks are valid test cases.
>> Maybe a few puts statement there to see why it's not picking on your
>> test cases.
>>
>> Assaf
>>
>>
>>
>>>
>>>
>>> Cheers,
>>> Tal
>>>
>>> On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>
>>> wrote:
>>>> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>>>>
>>>>> I do not see the difference between jruby /usr/bin/buildr and
>>>>> jruby -s
>>>>> buildr. They both run the exact same script, and with both  
>>>>> commands
>>>>> buildr trunk pretend to perform the tests but do not actually do
>>>>> them.
>>>>
>>>> They will both run the same script.  I'm not seeing any problem
>>>> running tests in trunk, tested against JUnit.
>>>>
>>>> Try to find out what tests are being picked up:
>>>>
>>>> test.enhance do |task|
>>>>  p "Available tests: "
>>>>  p task.tests
>>>> end
>>>>
>>>> Assaf
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> Any clue would be greatly appreciated,
>>>>>
>>>>> Cheers,
>>>>> Tal
>>>>>
>>>>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>>>>>> wrote:
>>>>>> Tal,
>>>>>>
>>>>>>
>>>>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Weird. I just noticed Buildr pretends to run my tests but
>>>>>>> doesn't,this is
>>>>>>> under jruby.
>>>>>>
>>>>>>> Steps I took:
>>>>>>>
>>>>>>> 1. Downloaded jruby
>>>>>>> 2. Added it to my PATH
>>>>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>>>>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>>>>>>> install'.
>>>>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean  
>>>>>>> package' (My
>>>>>>> /usr/bin/buildr's content is listed below.)
>>>>>>
>>>>>>
>>>>>> In step 5, you should be able to run buildr with 'jruby -S  
>>>>>> buildr'
>>>>>> or simply
>>>>>> with 'builldr' if the JRuby version is first on your path.
>>>>>>
>>>>>> I guess /usr/bin/buildr is your script for MRI and would not work
>>>>>> with JRuby
>>>>>> as it requires rjb.
>>>>>>
>>>>>> Cheers,
>>>>>> --
>>>>>> vic
>>>>>>
>>>>>> Quaerendo invenietis.
>>>>>>
>>>>
>>>>
>>
>>


Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
Alright, did that the candidates seem alright. It is the output of the
JUnitTestFilter that is empty.

>From the filter's java code it seems to assume that the test would be
an instance of junit.framework.TestCase, which AFAIK isn't the case
with Junit4 (See
http://junit.sourceforge.net/doc/cookbook/cookbook.htm), and isn't the
case with my test classes.

Did I miss some setting in the buildfile that wasn't required before 1.3?

Cheers,
Tal

On Tue, Feb 26, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com> wrote:
> On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:
>
>  > task.tests reports an empty array ("[]").
>  > I verified that the compile task compiled test classes to the <sub
>  > project>/target/test/classes/<package hierarchy>/ folder. Note that
>  > the same buildfile works perfectly with buildr 1.2.x on another
>  > machien running Ubuntu.
>  >
>  > The sub-project's define:
>  > define "data" do
>  >    compile.with COMMONS_LANG, project("model"), XSTREAM
>  >    test.compile.with TEST_DEPENDENCIES, project("test-common")
>  >    test.with  TEST_DEPENDENCIES, project("model"), project("test-
>  > common")
>  >    test.enhance do |task|
>  >        p "Available tests: "
>  >        p task.tests
>  >    end
>  >    package(:jar)
>  > end
>  >
>  > Any more hints on where to look for the source of the issue?
>
>  The test cases are filtered in lib/java/test_frameworks.rb, line 126.
>  This method basically runs through all the classes appearing in target/
>  test/classes and filters the one it thinks are valid test cases.
>  Maybe a few puts statement there to see why it's not picking on your
>  test cases.
>
>  Assaf
>
>
>
>  >
>  >
>  > Cheers,
>  > Tal
>  >
>  > On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>
>  > wrote:
>  >> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>  >>
>  >>> I do not see the difference between jruby /usr/bin/buildr and
>  >>> jruby -s
>  >>> buildr. They both run the exact same script, and with both commands
>  >>> buildr trunk pretend to perform the tests but do not actually do
>  >>> them.
>  >>
>  >> They will both run the same script.  I'm not seeing any problem
>  >> running tests in trunk, tested against JUnit.
>  >>
>  >> Try to find out what tests are being picked up:
>  >>
>  >> test.enhance do |task|
>  >>   p "Available tests: "
>  >>   p task.tests
>  >> end
>  >>
>  >> Assaf
>  >>
>  >>
>  >>
>  >>>
>  >>>
>  >>> Any clue would be greatly appreciated,
>  >>>
>  >>> Cheers,
>  >>> Tal
>  >>>
>  >>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>  >>>> wrote:
>  >>>> Tal,
>  >>>>
>  >>>>
>  >>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com>
>  >>>> wrote:
>  >>>>
>  >>>>> Weird. I just noticed Buildr pretends to run my tests but
>  >>>>> doesn't,this is
>  >>>>> under jruby.
>  >>>>
>  >>>>> Steps I took:
>  >>>>>
>  >>>>> 1. Downloaded jruby
>  >>>>> 2. Added it to my PATH
>  >>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>  >>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>  >>>>> install'.
>  >>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
>  >>>>> /usr/bin/buildr's content is listed below.)
>  >>>>
>  >>>>
>  >>>> In step 5, you should be able to run buildr with 'jruby -S buildr'
>  >>>> or simply
>  >>>> with 'builldr' if the JRuby version is first on your path.
>  >>>>
>  >>>> I guess /usr/bin/buildr is your script for MRI and would not work
>  >>>> with JRuby
>  >>>> as it requires rjb.
>  >>>>
>  >>>> Cheers,
>  >>>> --
>  >>>> vic
>  >>>>
>  >>>> Quaerendo invenietis.
>  >>>>
>  >>
>  >>
>
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 25, 2008, at 2:56 PM, Tal Rotbart wrote:

> task.tests reports an empty array ("[]").
> I verified that the compile task compiled test classes to the <sub
> project>/target/test/classes/<package hierarchy>/ folder. Note that
> the same buildfile works perfectly with buildr 1.2.x on another
> machien running Ubuntu.
>
> The sub-project's define:
> define "data" do
>    compile.with COMMONS_LANG, project("model"), XSTREAM
>    test.compile.with TEST_DEPENDENCIES, project("test-common")
>    test.with  TEST_DEPENDENCIES, project("model"), project("test- 
> common")
>    test.enhance do |task|
>        p "Available tests: "
>        p task.tests
>    end
>    package(:jar)
> end
>
> Any more hints on where to look for the source of the issue?

The test cases are filtered in lib/java/test_frameworks.rb, line 126.   
This method basically runs through all the classes appearing in target/ 
test/classes and filters the one it thinks are valid test cases.   
Maybe a few puts statement there to see why it's not picking on your  
test cases.

Assaf

>
>
> Cheers,
> Tal
>
> On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com>  
> wrote:
>> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>>
>>> I do not see the difference between jruby /usr/bin/buildr and  
>>> jruby -s
>>> buildr. They both run the exact same script, and with both commands
>>> buildr trunk pretend to perform the tests but do not actually do  
>>> them.
>>
>> They will both run the same script.  I'm not seeing any problem
>> running tests in trunk, tested against JUnit.
>>
>> Try to find out what tests are being picked up:
>>
>> test.enhance do |task|
>>   p "Available tests: "
>>   p task.tests
>> end
>>
>> Assaf
>>
>>
>>
>>>
>>>
>>> Any clue would be greatly appreciated,
>>>
>>> Cheers,
>>> Tal
>>>
>>> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>>>> wrote:
>>>> Tal,
>>>>
>>>>
>>>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> Weird. I just noticed Buildr pretends to run my tests but
>>>>> doesn't,this is
>>>>> under jruby.
>>>>
>>>>> Steps I took:
>>>>>
>>>>> 1. Downloaded jruby
>>>>> 2. Added it to my PATH
>>>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>>>>> 4. Installed buildr into jruby gems from trunk by using 'rake
>>>>> install'.
>>>>> 5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
>>>>> /usr/bin/buildr's content is listed below.)
>>>>
>>>>
>>>> In step 5, you should be able to run buildr with 'jruby -S buildr'
>>>> or simply
>>>> with 'builldr' if the JRuby version is first on your path.
>>>>
>>>> I guess /usr/bin/buildr is your script for MRI and would not work
>>>> with JRuby
>>>> as it requires rjb.
>>>>
>>>> Cheers,
>>>> --
>>>> vic
>>>>
>>>> Quaerendo invenietis.
>>>>
>>
>>


Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
task.tests reports an empty array ("[]").
I verified that the compile task compiled test classes to the <sub
project>/target/test/classes/<package hierarchy>/ folder. Note that
the same buildfile works perfectly with buildr 1.2.x on another
machien running Ubuntu.

The sub-project's define:
define "data" do
    compile.with COMMONS_LANG, project("model"), XSTREAM
    test.compile.with TEST_DEPENDENCIES, project("test-common")
    test.with  TEST_DEPENDENCIES, project("model"), project("test-common")
    test.enhance do |task|
        p "Available tests: "
        p task.tests
    end
    package(:jar)
end

Any more hints on where to look for the source of the issue?

Cheers,
Tal

On Tue, Feb 26, 2008 at 9:42 AM, Assaf Arkin <ar...@intalio.com> wrote:
> On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:
>
>  > I do not see the difference between jruby /usr/bin/buildr and jruby -s
>  > buildr. They both run the exact same script, and with both commands
>  > buildr trunk pretend to perform the tests but do not actually do them.
>
>  They will both run the same script.  I'm not seeing any problem
>  running tests in trunk, tested against JUnit.
>
>  Try to find out what tests are being picked up:
>
>  test.enhance do |task|
>    p "Available tests: "
>    p task.tests
>  end
>
>  Assaf
>
>
>
>  >
>  >
>  > Any clue would be greatly appreciated,
>  >
>  > Cheers,
>  > Tal
>  >
>  > On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com
>  > > wrote:
>  >> Tal,
>  >>
>  >>
>  >> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com>
>  >> wrote:
>  >>
>  >>> Weird. I just noticed Buildr pretends to run my tests but
>  >>> doesn't,this is
>  >>> under jruby.
>  >>
>  >>> Steps I took:
>  >>>
>  >>> 1. Downloaded jruby
>  >>> 2. Added it to my PATH
>  >>> 3. Verified 'which rake', 'which gem' point to the jruby.
>  >>> 4. Installed buildr into jruby gems from trunk by using 'rake
>  >>> install'.
>  >>> 5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
>  >>> /usr/bin/buildr's content is listed below.)
>  >>
>  >>
>  >> In step 5, you should be able to run buildr with 'jruby -S buildr'
>  >> or simply
>  >> with 'builldr' if the JRuby version is first on your path.
>  >>
>  >> I guess /usr/bin/buildr is your script for MRI and would not work
>  >> with JRuby
>  >> as it requires rjb.
>  >>
>  >> Cheers,
>  >> --
>  >> vic
>  >>
>  >> Quaerendo invenietis.
>  >>
>
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 25, 2008, at 2:35 PM, Tal Rotbart wrote:

> I do not see the difference between jruby /usr/bin/buildr and jruby -s
> buildr. They both run the exact same script, and with both commands
> buildr trunk pretend to perform the tests but do not actually do them.

They will both run the same script.  I'm not seeing any problem  
running tests in trunk, tested against JUnit.

Try to find out what tests are being picked up:

test.enhance do |task|
   p "Available tests: "
   p task.tests
end

Assaf

>
>
> Any clue would be greatly appreciated,
>
> Cheers,
> Tal
>
> On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vic.borja@gmail.com 
> > wrote:
>> Tal,
>>
>>
>> On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com>  
>> wrote:
>>
>>> Weird. I just noticed Buildr pretends to run my tests but  
>>> doesn't,this is
>>> under jruby.
>>
>>> Steps I took:
>>>
>>> 1. Downloaded jruby
>>> 2. Added it to my PATH
>>> 3. Verified 'which rake', 'which gem' point to the jruby.
>>> 4. Installed buildr into jruby gems from trunk by using 'rake  
>>> install'.
>>> 5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
>>> /usr/bin/buildr's content is listed below.)
>>
>>
>> In step 5, you should be able to run buildr with 'jruby -S buildr'  
>> or simply
>> with 'builldr' if the JRuby version is first on your path.
>>
>> I guess /usr/bin/buildr is your script for MRI and would not work  
>> with JRuby
>> as it requires rjb.
>>
>> Cheers,
>> --
>> vic
>>
>> Quaerendo invenietis.
>>


Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
I do not see the difference between jruby /usr/bin/buildr and jruby -s
buildr. They both run the exact same script, and with both commands
buildr trunk pretend to perform the tests but do not actually do them.

Any clue would be greatly appreciated,

Cheers,
Tal

On Tue, Feb 26, 2008 at 3:49 AM, Victor Hugo Borja <vi...@gmail.com> wrote:
> Tal,
>
>
>  On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com> wrote:
>
>  > Weird. I just noticed Buildr pretends to run my tests but doesn't,this is
>  > under jruby.
>
> > Steps I took:
>  >
>  > 1. Downloaded jruby
>  > 2. Added it to my PATH
>  > 3. Verified 'which rake', 'which gem' point to the jruby.
>  > 4. Installed buildr into jruby gems from trunk by using 'rake install'.
>  > 5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
>  > /usr/bin/buildr's content is listed below.)
>
>
>  In step 5, you should be able to run buildr with 'jruby -S buildr' or simply
>  with 'builldr' if the JRuby version is first on your path.
>
>  I guess /usr/bin/buildr is your script for MRI and would not work with JRuby
>  as it requires rjb.
>
>  Cheers,
>  --
>  vic
>
>  Quaerendo invenietis.
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Victor Hugo Borja <vi...@gmail.com>.
Tal,

On Sun, Feb 24, 2008 at 9:29 PM, Tal Rotbart <re...@gmail.com> wrote:

> Weird. I just noticed Buildr pretends to run my tests but doesn't,this is
> under jruby.
> Steps I took:
>
> 1. Downloaded jruby
> 2. Added it to my PATH
> 3. Verified 'which rake', 'which gem' point to the jruby.
> 4. Installed buildr into jruby gems from trunk by using 'rake install'.
> 5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
> /usr/bin/buildr's content is listed below.)


In step 5, you should be able to run buildr with 'jruby -S buildr' or simply
with 'builldr' if the JRuby version is first on your path.

I guess /usr/bin/buildr is your script for MRI and would not work with JRuby
as it requires rjb.

Cheers,
-- 
vic

Quaerendo invenietis.

Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
Also this is the buildr's output in --trace mode with some names changed ;p

On Mon, Feb 25, 2008 at 2:29 PM, Tal Rotbart <re...@gmail.com> wrote:
> Weird. I just noticed Buildr pretends to run my tests but doesn't,
>  this is under jruby.
>  Maybe I'm doing something wrong, and if this belongs in buildr-user
>  (even though 1.3 isn't yet released) let me know.
>
>  Steps I took:
>
>  1. Downloaded jruby
>  2. Added it to my PATH
>  3. Verified 'which rake', 'which gem' point to the jruby.
>  4. Installed buildr into jruby gems from trunk by using 'rake install'.
>  5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
>  /usr/bin/buildr's content is listed below.)
>
>  May it have something to do with including Junit 4.4 and/or Jmock 2.4?
>  In any case, some sort of error would be great.
>  I'd be happy to look into it if you told me where to start.
>
>  Cheers,
>  Tal
>
>
>  /usr/bin/buildr:
>  ---
>  #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
>  #
>  # This file was generated by RubyGems.
>  #
>  # The application 'buildr' is installed as part of a gem, and
>  # this file is here to facilitate running it.
>  #
>
>  require 'rubygems'
>
>  version = ">= 0"
>
>  if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
>   version = $1
>   ARGV.shift
>  end
>
>
>  gem 'buildr', version
>  load 'buildr'
>  ---
>
>
>
>  On Mon, Feb 25, 2008 at 1:32 PM, Tal Rotbart <re...@gmail.com> wrote:
>  > Just tried it, works incredibly well!
>  >  I see you also made the gem not dependent on rjb when installed from
>  >  jruby's rubygem. Nice touch.
>  >
>  >  You guys rock!
>  >
>  >  Cheers,
>  >  Tal
>  >
>  >
>  >
>  >  On Mon, Feb 25, 2008 at 12:59 PM, Assaf Arkin <ar...@intalio.com> wrote:
>  >  > On Feb 24, 2008, at 5:58 PM, Tal Rotbart wrote:
>  >  >
>  >  >  > Hi Assaf,
>  >  >  >
>  >  >  > Thanks. But that obviously doesn't solve RBJs problem.
>  >  >  > Any remaining issues running from jruby on trunk? That might be the
>  >  >  > only workaround.
>  >  >
>  >  >  None that we know of, JRuby support should be complete and pretty fast
>  >  >  on Java 6.
>  >  >
>  >  >  Assaf
>  >  >
>  >  >
>  >  >
>  >  >  >
>  >  >  >
>  >  >  > Cheers,
>  >  >  > Tal
>  >  >  >
>  >  >  >
>  >  >  > On Mon, Feb 25, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>  >  >  > wrote:
>  >  >  >>
>  >  >  >> On Feb 24, 2008, at 4:43 PM, Tal Rotbart wrote:
>  >  >  >>
>  >  >  >>> Hi all,
>  >  >  >>>
>  >  >  >>> Does any of you have experience with updating Buildr / Antwrap / RJB
>  >  >  >>> to work with JDK 1.6 Developer Preview on Mac OS X?
>  >  >  >>>
>  >  >  >>> It seems that even after uninstalling all version of rjb and Antwrap
>  >  >  >>> and reinstalling with JAVA_HOME pointing to the JDK 1.6's home
>  >  >  >>> folder
>  >  >  >>> at:
>  >  >  >>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>  >  >  >>>
>  >  >  >>> When using buildr (with JAVA_HOME set correctly as well) the Ant
>  >  >  >>> tasks
>  >  >  >>> launched by Antwrap still seem to use the 1.5 javac, classpath and
>  >  >  >>> tools.jar.
>  >  >  >>>
>  >  >  >>> Any clues would be appreciated greatly.
>  >  >  >>
>  >  >  >> Remove line 19 in lib/java.java.rb, that should do it.
>  >  >  >>
>  >  >  >> Assaf
>  >  >  >>
>  >  >  >>>
>  >  >  >>>
>  >  >  >>> Cheers,
>  >  >  >>> Tal
>  >  >  >>
>  >  >  >>
>  >  >
>  >  >
>  >
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
Weird. I just noticed Buildr pretends to run my tests but doesn't,
this is under jruby.
Maybe I'm doing something wrong, and if this belongs in buildr-user
(even though 1.3 isn't yet released) let me know.

Steps I took:

1. Downloaded jruby
2. Added it to my PATH
3. Verified 'which rake', 'which gem' point to the jruby.
4. Installed buildr into jruby gems from trunk by using 'rake install'.
5. Running buildr using 'jruby /usr/bin/buildr clean package' (My
/usr/bin/buildr's content is listed below.)

May it have something to do with including Junit 4.4 and/or Jmock 2.4?
In any case, some sort of error would be great.
I'd be happy to look into it if you told me where to start.

Cheers,
Tal


/usr/bin/buildr:
---
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
#
# This file was generated by RubyGems.
#
# The application 'buildr' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  version = $1
  ARGV.shift
end


gem 'buildr', version
load 'buildr'
---

On Mon, Feb 25, 2008 at 1:32 PM, Tal Rotbart <re...@gmail.com> wrote:
> Just tried it, works incredibly well!
>  I see you also made the gem not dependent on rjb when installed from
>  jruby's rubygem. Nice touch.
>
>  You guys rock!
>
>  Cheers,
>  Tal
>
>
>
>  On Mon, Feb 25, 2008 at 12:59 PM, Assaf Arkin <ar...@intalio.com> wrote:
>  > On Feb 24, 2008, at 5:58 PM, Tal Rotbart wrote:
>  >
>  >  > Hi Assaf,
>  >  >
>  >  > Thanks. But that obviously doesn't solve RBJs problem.
>  >  > Any remaining issues running from jruby on trunk? That might be the
>  >  > only workaround.
>  >
>  >  None that we know of, JRuby support should be complete and pretty fast
>  >  on Java 6.
>  >
>  >  Assaf
>  >
>  >
>  >
>  >  >
>  >  >
>  >  > Cheers,
>  >  > Tal
>  >  >
>  >  >
>  >  > On Mon, Feb 25, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>  >  > wrote:
>  >  >>
>  >  >> On Feb 24, 2008, at 4:43 PM, Tal Rotbart wrote:
>  >  >>
>  >  >>> Hi all,
>  >  >>>
>  >  >>> Does any of you have experience with updating Buildr / Antwrap / RJB
>  >  >>> to work with JDK 1.6 Developer Preview on Mac OS X?
>  >  >>>
>  >  >>> It seems that even after uninstalling all version of rjb and Antwrap
>  >  >>> and reinstalling with JAVA_HOME pointing to the JDK 1.6's home
>  >  >>> folder
>  >  >>> at:
>  >  >>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>  >  >>>
>  >  >>> When using buildr (with JAVA_HOME set correctly as well) the Ant
>  >  >>> tasks
>  >  >>> launched by Antwrap still seem to use the 1.5 javac, classpath and
>  >  >>> tools.jar.
>  >  >>>
>  >  >>> Any clues would be appreciated greatly.
>  >  >>
>  >  >> Remove line 19 in lib/java.java.rb, that should do it.
>  >  >>
>  >  >> Assaf
>  >  >>
>  >  >>>
>  >  >>>
>  >  >>> Cheers,
>  >  >>> Tal
>  >  >>
>  >  >>
>  >
>  >
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
Just tried it, works incredibly well!
I see you also made the gem not dependent on rjb when installed from
jruby's rubygem. Nice touch.

You guys rock!

Cheers,
Tal

On Mon, Feb 25, 2008 at 12:59 PM, Assaf Arkin <ar...@intalio.com> wrote:
> On Feb 24, 2008, at 5:58 PM, Tal Rotbart wrote:
>
>  > Hi Assaf,
>  >
>  > Thanks. But that obviously doesn't solve RBJs problem.
>  > Any remaining issues running from jruby on trunk? That might be the
>  > only workaround.
>
>  None that we know of, JRuby support should be complete and pretty fast
>  on Java 6.
>
>  Assaf
>
>
>
>  >
>  >
>  > Cheers,
>  > Tal
>  >
>  >
>  > On Mon, Feb 25, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>
>  > wrote:
>  >>
>  >> On Feb 24, 2008, at 4:43 PM, Tal Rotbart wrote:
>  >>
>  >>> Hi all,
>  >>>
>  >>> Does any of you have experience with updating Buildr / Antwrap / RJB
>  >>> to work with JDK 1.6 Developer Preview on Mac OS X?
>  >>>
>  >>> It seems that even after uninstalling all version of rjb and Antwrap
>  >>> and reinstalling with JAVA_HOME pointing to the JDK 1.6's home
>  >>> folder
>  >>> at:
>  >>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>  >>>
>  >>> When using buildr (with JAVA_HOME set correctly as well) the Ant
>  >>> tasks
>  >>> launched by Antwrap still seem to use the 1.5 javac, classpath and
>  >>> tools.jar.
>  >>>
>  >>> Any clues would be appreciated greatly.
>  >>
>  >> Remove line 19 in lib/java.java.rb, that should do it.
>  >>
>  >> Assaf
>  >>
>  >>>
>  >>>
>  >>> Cheers,
>  >>> Tal
>  >>
>  >>
>
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 24, 2008, at 5:58 PM, Tal Rotbart wrote:

> Hi Assaf,
>
> Thanks. But that obviously doesn't solve RBJs problem.
> Any remaining issues running from jruby on trunk? That might be the
> only workaround.

None that we know of, JRuby support should be complete and pretty fast  
on Java 6.

Assaf	

>
>
> Cheers,
> Tal
>
>
> On Mon, Feb 25, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com>  
> wrote:
>>
>> On Feb 24, 2008, at 4:43 PM, Tal Rotbart wrote:
>>
>>> Hi all,
>>>
>>> Does any of you have experience with updating Buildr / Antwrap / RJB
>>> to work with JDK 1.6 Developer Preview on Mac OS X?
>>>
>>> It seems that even after uninstalling all version of rjb and Antwrap
>>> and reinstalling with JAVA_HOME pointing to the JDK 1.6's home  
>>> folder
>>> at:
>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>>>
>>> When using buildr (with JAVA_HOME set correctly as well) the Ant  
>>> tasks
>>> launched by Antwrap still seem to use the 1.5 javac, classpath and
>>> tools.jar.
>>>
>>> Any clues would be appreciated greatly.
>>
>> Remove line 19 in lib/java.java.rb, that should do it.
>>
>> Assaf
>>
>>>
>>>
>>> Cheers,
>>> Tal
>>
>>


Re: JDK 1.6 developer preview on Mac OS X

Posted by Tal Rotbart <re...@gmail.com>.
Hi Assaf,

Thanks. But that obviously doesn't solve RBJs problem.
Any remaining issues running from jruby on trunk? That might be the
only workaround.

Cheers,
Tal


On Mon, Feb 25, 2008 at 12:13 PM, Assaf Arkin <ar...@intalio.com> wrote:
>
> On Feb 24, 2008, at 4:43 PM, Tal Rotbart wrote:
>
>  > Hi all,
>  >
>  > Does any of you have experience with updating Buildr / Antwrap / RJB
>  > to work with JDK 1.6 Developer Preview on Mac OS X?
>  >
>  > It seems that even after uninstalling all version of rjb and Antwrap
>  > and reinstalling with JAVA_HOME pointing to the JDK 1.6's home folder
>  > at:
>  > /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>  >
>  > When using buildr (with JAVA_HOME set correctly as well) the Ant tasks
>  > launched by Antwrap still seem to use the 1.5 javac, classpath and
>  > tools.jar.
>  >
>  > Any clues would be appreciated greatly.
>
>  Remove line 19 in lib/java.java.rb, that should do it.
>
>  Assaf
>
>  >
>  >
>  > Cheers,
>  > Tal
>
>

Re: JDK 1.6 developer preview on Mac OS X

Posted by Assaf Arkin <ar...@intalio.com>.
On Feb 24, 2008, at 4:43 PM, Tal Rotbart wrote:

> Hi all,
>
> Does any of you have experience with updating Buildr / Antwrap / RJB
> to work with JDK 1.6 Developer Preview on Mac OS X?
>
> It seems that even after uninstalling all version of rjb and Antwrap
> and reinstalling with JAVA_HOME pointing to the JDK 1.6's home folder
> at:
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>
> When using buildr (with JAVA_HOME set correctly as well) the Ant tasks
> launched by Antwrap still seem to use the 1.5 javac, classpath and
> tools.jar.
>
> Any clues would be appreciated greatly.

Remove line 19 in lib/java.java.rb, that should do it.

Assaf

>
>
> Cheers,
> Tal