How to correctly import the jUnit classpath into an Ant buildfile on OS X

Hi,-
I'm trying to automate compilation with Ant & jUnit which I run from command-line on my Mac OS X. My source files are in the /src folder, test classes are in the /test folder, the .class files go into the /build folder, and junit38.jar is in the /lib folder. The build.xml file looks like this:
<?xml version="1.0"?>
<project name="Money" default="build-source" basedir=".">
    <description>The Money project build file.</description>
    <property name="src" location="."/>
    <property name="build" location="build"/>
    <property name="junit" location="lib/junit38.jar"/>
    <path id="_classpath">
        <pathelement location="${junit}"/>
        <pathelement location="${build}"/>
    </path>
    <target name="prepare">
        <mkdir dir="${build}"/>
    </target>
    <target name="build-source" depends="prepare" description="compile the source ">
        <javac srcdir="${src}" destdir="${build}"/>
    </target>
    <target name="test" depends="build-source">
        <javac srcdir="${test}" destdir="${build}"/>
    </target>
</project>When I try to import jUnit with these declarations:
import org.junit.* ;
import static org.junit.Assert.* ;
public class MoneyTester {
}it says "package org.junit does not exist" and I can't extend the TestCase class with my own test classes. Can anyone tell how to properly set the jUnit classpath?
Much appreciated! Cheers, Vahagn

I see what you mean. It now looks like this, but the error won't go away:
    <target name="build-source" depends="prepare" description="compile the source ">
        <javac srcdir="${src}" destdir="${build}">
            <classpath refid="_classpath"/>
        </javac>
    </target>
    <target name="test" depends="build-source">
        <javac srcdir="${test}" destdir="${build}">
            <classpath refid="_classpath"/>
        </javac>
    </target>Edited by: Vahagn on Aug 14, 2010 11:59 AM

Similar Messages

  • I inadvertinly removed my contacts from my Address app on my iPad. it is still on our other iPad and our two iPhones. How can I import the contacts back into our iPad

    I inadvertinly removed my infocontact information  from my wikes "Contacts" App. The contact app still works in my iPad and both of our iPhones..
    How can I restore the contact info in her Contact app??
    Thanks

    Have you tried syncing them across iCloud? There is a nice tutorial here: http://www.gottabemobile.com/2011/10/18/how-to-sync-email-contacts-and-calendar- with-icloud/

  • How can I import the catalog elements_10 into elements_13?

    Programm PS_Elements_13 ist correctly installed.
    There are several thousends of Fotos in the old catalog registered.
    I work with Windows7 and PC

    Photoshop Elements Help / Use Backup, Restore to move catalog | Organizer | Elements 6 or later -
    http://helpx.adobe.com/photoshop-elements/kb/backup-restore-move-catalog-photoshop.html

  • How do I import a jpeg image into my mail signature so that it wont separate when it gets to the receiving email

    How do I import a jpg image into my mail signature box so that it wont separate into an attachment when it gets to the receiving mail box.  We have a company logo and when I send it to someone it does not show up under our address but rather as an attachment.  How do I keep this from happening?

    Hello
    be sure to send your email into HTML format end be sure your corespondant read mail as HTML format
    as you can not be sure of your coresspondant email setting , you can not be sure as your mail is read
    Pierre

  • How can I import data using .dmp into the table which has more columns then in import

    I am building the history for warehouse purpose on Oracle 8i database and want to use the old import (.dmp) files (from oracle 7.3.4) to import data but the underlying table is having few more columns which are not in my old DMP file .. how can I import the data into these altered tables while using the same *.imp files .
    Any solutions ?

    That is the most obvious solution .. but think of the case when my operational database which is the source of my data is undergoing changes every quarter i.e after every 3 months there are some changes on underlying table structures which means structures of my import files will always be different after evry quarter .. you can imagine the number of temporary import structures I need to create .. can't there be a solution wherein I can write an SQL over the import file to read the data in required format ..

  • How to import the internal table into subroutine as parameter

    how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine

    Hi Yong,
    try this:
    parameters: p_tabnm like dd03l-tabname.
    field-symbols: <fs_tabname> type standard table.
    data: itab_ref type ref to data.
    create data itab_ref type standard table of (p_tabnm)
                         with default key.
    assign itab_ref->* to <fs_tabname>.
    select * from (p_tabnm) into table <fs_tabname>.
    perform subroutine tables <fs_tabname>
                       using p_tabnm.
    *&      Form  subroutine
          text
         -->P_<FS_TABNAME>  text
         -->P_P_TABNM  text
    form subroutine  tables   p_tabname type standard table
                     using    p_tabnm.
    Here p_tabname already has the structure of the table you gave as input
    parameter
    endform.                    " subroutine

  • How to I import Apple 'Pages' text into InDesign while keeping the formatting?

    How to I import Apple 'Pages' text into InDesign while keeping the formatting?

    I have imported the rtf file, but it shows up as only one line with a grey line after it, even though there are multiple lines

  • TS3355 I loaded video from an external hard drive to my desktop. How do I import the video into iMovie 09? I tried "Import Camera Archive". Didn't work.

    I loaded video from an external hard drive to my desktop. How do I import the video into iMovie 09? I tried "Import Camera Archive". Didn't work.

    It depends on the type of video. iMovie will only import video that it can edit.
    In general, you would use FILE/IMPORT MOVIE...

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • How could I import the photos I took in iPhone into Aperture 3?  I see nothing when I connect my iPhone to my Mac..

    How could I import the photos I took in iPhone into Aperture 3?  I see nothing when I connect my iPhone to my Mac..
    iPhoto isn't working neither..

    I see nothing when I connect my iPhone to my Mac.
    Does your Mac not recognize the device? Or is the iPhone recognized, but the import panel does not show any images to import? Is your Photo Stream turned on?
    There is a known bug with PhotoStream and AP 3.2.1.
    Do you have the current Aperture version 3.2.2? If not, upgrade to 3.2.2.
    See this: http://aperture.maccreate.com/2011/12/12/aperture-3-2-2-addresses-hidden-photost ream-issue/

  • How do you import a .png file into the Final Cut Pro X and at the same time keep the file's original transparency settings?

    How do you import a .png file into the Final Cut Pro X and at the same time keep the file's original transparency settings?

    Go to the Info inspector for the still image and in settings select the alpha type.

  • How do I import a .fcpproject file into final cut pro?

    How do I import a .fcpproject file into final cut pro?

    You don't. The application opens it when it recognizes it in the correct folder structure.

  • How can i import the AUC value when the project go-live

    Dear all experts,
    please help me on the following issue.
    our SAP project will go live in Jan 2010.
    there are some open investment projects to be imported in the PRD.
    the projects are settled to AUC when it is not completed.
    so the actual cost of open projects are the value of AUC.
    but i can not use AS91 to import the value for the AUC because the asset class is for investment measure.
    so  i want to know how can i import the value to AUC thanks a lot.

    Dear  Judy ZHU,
    You can do manual posting to FI using T code like FB50,
    Dr - Cost element(related to project cost ) & WBS
    Cr- CWIP account.
    After that run CJ88 for that project, your project expenses will be settled into AUC/Cost center.
    This is one proposed solution for this to my knowledge..
    SAP experts,  Please correct this if i'm wrong, since I' have not  practically used this method.
    Regards,
    Sam L.

  • How to SIMPLY use the %DIMENSION_TO_SET% variables into logic scripts

    hello,
    I'm using a prompt of type "COPYMOVE" or "COPYMOVEINPUT". In this type of prompt, there are 2 columns of dimension members list, one for defining the "source zone" and one for defining the "target zone" of logics.
    The left colum of the prompt (for source zone) feeds the variables %DIMENSION_SET% : %ACCOUNT_SET%, %ENTITY_SET%, %CATEGORY_SET%, etc...and these variables can be used in the logic scripts in *XDIM_MEMBERSET instructions for example.
    The right colum of the prompt feeds the variables %DIMENSION_TO_SET% : %ACCOUNT_TO_SET%, %ENTITY_TO_SET%, %CATEGORY_TO_SET%, etc...and I don't know how to SIMPLY use these variables in the logic scripts.
    I've found a tricky way to do that but I meet 2 problems :
    - it is complicated
    - the multi-info instruction (BEGININFO/ENDINFO) seems to be bugged as blank lines are added all the time in the code and sometimes I have to wait for minutes when I try to modifiy the package code through BPC for excel eData/modify package menu.
    So the question is how to SIMPLY get the %DIMENSION_TO_SET% variables into logic scripts and use them ? Thanks, R.
    Here is the tricky package code I use at this time (I build one function for each %DIMENSION_TO_SET% variable and I pass these functions to the logic) :
    PROMPT(COPYMOVE,,,,"ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,USER,WS-WW\PlauchuR)
    TASK(Execute formulas,APPSET,US)
    TASK(Execute formulas,APP,SV)
    TASK(Execute formulas,SELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\FROM_1561_.TMP)
    TASK(Execute formulas,TOSELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\TO_1561_.TMP)
    BEGININFO(%FSS%)
    *FUNCTION TARGETACCDETAIL=%ACCDETAIL_TO_SET%
    *FUNCTION TARGETACCOUNT=%ACCOUNT_TO_SET%
    *FUNCTION TARGETCATEGORY=%CATEGORY_TO_SET%
    *FUNCTION TARGETDATASRC=%DATASRC_TO_SET%
    *FUNCTION TARGETENTITY=%ENTITY_TO_SET%
    *FUNCTION TARGETTIME=%TIME_TO_SET%
    *FUNCTION TARGETYEARS=%YEARS_TO_SET%
    ENDINFO
    TASK(Execute formulas,FORMULASCRIPT,%FSS%)
    TASK(Execute formulas,LOGICFILE,D:\BPC\Data\WebFolders\US\SV
    ..\AdminApp\SV\_TEST.Lgf)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Edited by: ALEXANDRE BEDIER on Jun 16, 2010 3:15 PM

    hello,
    finally I've discovered that there is no need of BEGININFO instruction.
    One can pass several functions to a logic with one FORMULASCRIPT task. The functions definitions have to be separated by instructions. See below :
    PROMPT(COPYMOVEINPUT,%FTARGETS%,,"select source and target zone for category and datasource.","ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,FORMULASCRIPT,*FUNCTION TACCDETAIL=%ACCDETAIL_TO_SET% *FUNCTION TACCOUNT=%ACCOUNT_TO_SET% *FUNCTION TCATEGORY=%CATEGORY_TO_SET% *FUNCTION TDATASRC=%DATASRC_TO_SET% *FUNCTION TENTITY=%ENTITY_TO_SET% *FUNCTION TTIME=%TIME_TO_SET% *FUNCTION TYEARS=%YEARS_TO_SET%)
    TASK(Execute formulas,USER,%USER%)
    TASK(Execute formulas,APPSET,%APPSET%)
    TASK(Execute formulas,APP,%APP%)
    TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
    TASK(Execute formulas,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\_TEST.LGF)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Then one will be able to use the functions TACCDETAIL, TCATEGORY, TACCOUNT,... in the logic script.
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:31 AM
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:33 AM

  • How can I import multiple PDF pages into ID?

    I am putting together a catalog which consists of over 400 pages. We had the products on our website exported into a PDF format and I need to add a header and footer to each page via a master page in ID. I don't need to edit the actual PDF but I need to create a layer on top of what was exported. How can I import the 400 pages to be independent of each other without manually placing them?

    Depending upon what you want in the header or footer, you do it in
    Acrobat...Document>Header and Footer>Add.
    There's a multipage PDF place script that ships with ID...open the
    scripts panel and it should be there.
    Bob

Maybe you are looking for

  • Long Load Times on Graphic Intensive Games

    I'm experiencing some absurdly long load times (1-3 hours) with many games (SPORE, Portal, X:3, etc...) that I believe may be related to how graphically intensive they are. Older games with lower graphics quality (WoW, Civ 4, etc...) load up fine. Wh

  • Calendar Widget Not Showing Upcoming Events

    I've upgraded to the latest N900 firmware (pr1.2) and ever since I have had a problem with the calendar widget. All the events are contained in the calendar when I open it however they are not displayed on the desktop widget. I've got events loaded f

  • How to connect iphone to Pioneer receiver

    Tryng to connect my iphone to watch videos on our Pioneer Receiver.  Can get sound but no picture using the HDMI cable.  Receiver is a VSX-23TXH and says it is iphone compatible.

  • Authentication failure when attempting to pair mouse

    For the last couple years I've had my Iogear Bluetooth mouse paired nicely with my Powerbook via a USB Bluetooth dongle (the built-in bluetooth doesn't work). Last week I paired my mouse with a friend's MacBook for several hours. When I tried to resu

  • Trouble importing images from Safari

    I can no longer copy images from Safari to iPhoto. I get a message that Safari can't communicate with iPhoto. Can anyone give me some steps I can understand (keep them simple) to fix this? Thanks.