facebook

How to set a source dir in eclipse project as ant

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #250560 Reply

    Xiuping
    Member

    Hello,

    I have a very basic question about ant and eclipse project setting.

    In ant build.xml file, I have this:

    <target name=”compile” depends=”init”
    description=”Compile the classes”>

    <mkdir dir=”${lib.dir}”/>
    <javac srcdir=”${src.dir}”
    destdir=”${lib.dir}”
    includes=”**/*.java”
    classpathref=”classpath”>
    </javac>
    <rmic base=”${lib.dir}”
    classname=”edu.washington.ext.cp150.assignment2.susan.DBInventory.DvdInventoryDb”
    stubversion=”1.2″/>
    </target>

    ${src.dir} is a directory in the same level as build.xml. In my java file, I have package com.company.project.package;

    When I start off in eclipse, it always ask to put src in the package path which is not what I want.

    My question is how I can set a siurce dir in eclipse as in any:

    srcdir=”${src.dir}”?

    Thanks for help,

    Xiuping

    #250562 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    #250566 Reply

    Haris Peco
    Member

    Xiuping,

    basedir for ant is your workspace directory and your source is probably

    <property name= “src.dir” value=”{basedir}/src””/>

    or similar

    you can use absolute path , of course

    Best

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How to set a source dir in eclipse project as ant

You must be logged in to post in the forum log in