[nbdev] Re: How to test module depending on nb-javac-*.jar

  • From: Radim Kubacki < >
  • To: Jan Lahoda < >
  • Cc:
  • Subject: [nbdev] Re: How to test module depending on nb-javac-*.jar
  • Date: Sun, 4 Nov 2012 14:40:50 +0100

2012/11/3 Radim Kubacki 
< >:
> And now there is another question: it works perfectly when running my
> tests locally but fails in my Jenkins. Any idea? I guess that Ant
> spawned from Jenkins (or running in-process? I need to find out) will
> somehow put original javac on classpath again.
>
To answer my own mail: unit-testsrun correctly using the property
recommended by Tom and Honza. It is Emma coverage support what is
broken here. So I split my build and created a build pipeline where
first build runs unittests and second one runs coverage and other
checks. Junit test failures can be easily ignored in the second build
and coverage report is still generated.

It would be nice to apply similar logic to emma coverage support to
replace javac if needed as is done for regular test runs but I
consider this to be low priority.

-Radim

> -Radim
>
> 2012/10/9 Radim Kubacki 
> < >:
>> Awesome, that's the trick. Thanks!
>>
>> -Radim
>>
>> 2012/10/9 Jan Lahoda 
>> < >:
>>> Hi Radim,
>>>
>>> Please try to add:
>>> requires.nb.javac=true
>>> into the nbproject/project.properties of that project. Let me know if
>>> that does not fix the problem.
>>>
>>> Jan
>>>
>>> On Tue, Oct 9, 2012 at 11:20 AM, Radim Kubacki 
>>> < >
>>>  wrote:
>>>> Hi,
>>>>
>>>> I have a code that analyzes content of Java source file (generated
>>>> R.java) in one of nbandroid plugin
>>>> (http://kenai.com/projects/nbandroid/sources/mercurial/content/grammars/src/org/netbeans/modules/android/grammars/ProjectRefResolver.java?rev=609).
>>>> It worked fine and I was interested in VariableName.getSimpleName()
>>>> value. Now I added VariableName.getConstant() and my unit test fails
>>>> with NoSuchMethodError somewhere in com/sun/tools/javac/... but it
>>>> runs OK inside NetBeans runtime.
>>>>
>>>> I suspect this is because my code is compiled against NetBeans'
>>>> version of javac but the test runs with classes from tools.jar shipped
>>>> with JDK. Is this correct? How do I fix that (I want running code
>>>> *and* running test)?
>>>>
>>>> -Radim


[nbdev] Re: How to test module depending on nb-javac-*.jar

Radim Kubacki 11/03/2012

[nbdev] Re: How to test module depending on nb-javac-*.jar

Radim Kubacki 11/04/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close