db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: DERBY 4509
Date Fri, 08 Jan 2010 04:36:36 GMT
On Thu, Jan 7, 2010 at 8:05 PM, Jayaram Subramanian <rsjay1976@gmail.com> wrote:
> Hi,
> I am currently working on a task of converting autoincrement.sql to JUnit.
> When setting up the derby environment in eclipse the auto build option in
> eclipse was unchecked. This was done so that the build could be done by
> using ANT scripts from command line.  Whenever i am making changes to the
> java file in eclipse do i need to come to command prompt build the file
> using ANT and then run the JUnit test... What ant command could be used to
> compile the specific java file or do i need to do ANT ALL every time? Thanks
> With Regards
> Jayaram
When you go to Package Explorer in Eclipse, you can highlight the top
level 'build.xml' (which will show up close to the bottom), then right
click should show you 2 'ant build' options; one of them with "...",
and if you click on that one, eclipse will show you a number of
targets and you can pick the one you want...
Theoretically, that will do the same thing as building on the command line.

However, I habitually build on the command line (I'm not always "in"
eclipse) - I just have a window open at the top of the trunk. So I'm
not 100% certain the above steps work.

While I'm working on something I mostly run ant all (i.e. the 'all'
target); it will only compile things that have changed, so that's
usually quite quick, and it only compiles into classes
(<trunk>/classes), not jars.

ant all will not 'delete' classes that have been removed, and there
are some other things that won't get adjusted until you start clean.
So, occassionally - usually when I'm getting ready to run a bigger
suite, or after svn update, I do ant clobber followed by ant all. That
takes a little longer.

Finally we have agreed in the community that our tests are run on the
'insane' (i.e., non-debug-instrumented) jars (they get build under
<trunk>/jars/insane), so before creating a final patch we need to do a
final test run, and that's usually done with the insane jars.To get
the jars, you need to run the ant 'buildjars' target.

Note of caution: to switch insane or sane, you can try to run: ant
sane, or: ant insane, or ant -Dsane=true or -Dsane=false, but I
believe if you've got sane=true or sane=false in your
<home>/ant.properties that'll take precedence.

I hope this helps and doesn't confuse too much...


View raw message