You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Jayaram Subramanian <rs...@gmail.com> on 2010/01/08 05:05:49 UTC

DERBY 4509

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

Re: DERBY 4509

Posted by Kathey Marsden <km...@sbcglobal.net>.
Jayaram Subramanian 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?
I usually do ant all; ant buildjars  each time from the command prompt 
and  find it does not take long for an incremental build.   There are 
probably more specific targets I could use and I never took the time to 
get the eclipse build working. 

 Before posting a patch for commit I always ant clobber and then build  
and run test to make sure there is nothing broken.  For preview patches 
like the one you posted for this issue, just an incremental build is fine.



Re: DERBY 4509

Posted by Myrna van Lunteren <m....@gmail.com>.
On Thu, Jan 7, 2010 at 8:05 PM, Jayaram Subramanian <rs...@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...

Myrna