jar question, using ant

Discussion in 'Java' started by Mike G., Sep 22, 2003.

  1. Mike G.

    Mike G. Guest

    I'm new to ant.

    When I create my jar file, I would like to include my source dir, as well as
    my build dir.

    Here is how my directory structure is set up

    Project
    |
    +- Build
    | |
    | +- project.class
    |
    +- Source
    |
    +- project.java
    |
    +- Doc
    |


    this is how I am performing my jar command in the build.xml file:

    <target name="dist" depends="compile" description="generate the
    distribution file (jar file)" >
    <jar jarfile="rds_rev${version}.jar" basedir="${build}"/>
    </target>

    As you can see this is just creating a jar file of my "build" directory. I
    guess I would like to be able to specify two directories to jar. The "build"
    directory and the "source" directory.

    Can someone help me with this?

    Thanks in advance,

    -Mike
    Mike G., Sep 22, 2003
    #1
    1. Advertising

  2. Mike G.

    Mike G. Guest

    sorry, already answered!
    "Mike G." <> wrote in message
    news:pRBbb.4103$...
    > I'm new to ant.
    >
    > When I create my jar file, I would like to include my source dir, as well

    as
    > my build dir.
    >
    > Here is how my directory structure is set up
    >
    > Project
    > |
    > +- Build
    > | |
    > | +- project.class
    > |
    > +- Source
    > |
    > +- project.java
    > |
    > +- Doc
    > |
    >
    >
    > this is how I am performing my jar command in the build.xml file:
    >
    > <target name="dist" depends="compile" description="generate the
    > distribution file (jar file)" >
    > <jar jarfile="rds_rev${version}.jar" basedir="${build}"/>
    > </target>
    >
    > As you can see this is just creating a jar file of my "build" directory.

    I
    > guess I would like to be able to specify two directories to jar. The

    "build"
    > directory and the "source" directory.
    >
    > Can someone help me with this?
    >
    > Thanks in advance,
    >
    > -Mike
    >
    >
    Mike G., Sep 22, 2003
    #2
    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. Mike G.

    jar using ant question

    Mike G., Sep 18, 2003, in forum: Java
    Replies:
    2
    Views:
    6,197
    Lee Peterson
    Sep 19, 2003
  2. Arnold Peters
    Replies:
    0
    Views:
    555
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,701
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,730
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    642
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page