Re: Problem with ant's javac task

Discussion in 'Java' started by z3, Jul 23, 2003.

  1. z3

    z3 Guest

    Try with your build.xml in the root folder and <project basedir="."


    "Sophie" <> a écrit dans le message news:
    ...
    > Hello,
    >
    > i have the following ant target to compile sources:
    >
    > -----------------------------------------------------------------
    > ...
    > <property name="src-dir" value="src" />
    > <property name="build-dir" value="classes" />
    >
    > <target name="compile">
    > <mkdir dir="${build-dir}"/>
    > <javac srcdir="${src-dir}" destdir="${build-dir}"/>
    > </target>
    > ...
    > -----------------------------------------------------------------
    >
    > Assuming i have the one .java file in ${src-dir} and the following
    > structure of folders.
    >
    > root
    > -- classes
    > -- src
    > ---- oneJavaClass.java
    >
    > the result is as follows.
    >
    > root
    > -- classes
    > ---- src
    > ------ oneJavaClass.class
    > --src
    > ----oneJavaClass.java
    >
    > How do i have to change the ant target, that the oneJavaClass.java is
    > compiled directly under the classes folder without producing another
    > src folder in the classes folder, because the oneJavaClass.java does not
    > belong that package structure. This is the result i am looking for:
    >
    > root
    > -- classes
    > ---- oneJavaClass.class
    > --src
    > ----oneJavaClass.java
    >
    >
    > Thanks for your advice
    >
    > Sophie
     
    z3, Jul 23, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sowbug
    Replies:
    4
    Views:
    1,157
    Tony Morris
    Jan 26, 2004
  2. Victor
    Replies:
    0
    Views:
    8,888
    Victor
    Sep 1, 2004
  3. Collin VanDyck
    Replies:
    2
    Views:
    668
    Collin VanDyck
    Nov 18, 2004
  4. krabhi
    Replies:
    1
    Views:
    9,415
    Marco Meschieri
    Aug 9, 2006
  5. Lax
    Replies:
    1
    Views:
    951
    Jean-Francois Briere
    Jan 18, 2007
Loading...

Share This Page