Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 182913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:01:25+00:00 2026-05-11T15:01:25+00:00

I am trying to get ant4eclipse to work and I have used ant a

  • 0

I am trying to get ant4eclipse to work and I have used ant a bit, but not much above a simple scripting language. We have multiple source folders in our Eclipse projects so the example in the ant4eclipse documentation needs adapting:

Currently I have the following:

<target name='build'>    <!-- resolve the eclipse output location -->   <getOutputpath property='classes.dir' workspace='${workspace}' projectName='${project.name}' />    <!-- init output location -->   <delete dir='${classes.dir}' />   <mkdir dir='${classes.dir}' />    <!-- resolve the eclipse source location -->   <getSourcepath pathId='source.path' project='.' allowMultipleFolders='true'/>    <!-- read the eclipse classpath -->   <getEclipseClasspath pathId='build.classpath'                            workspace='${workspace}' projectName='${project.name}' />    <!-- compile -->   <javac destdir='${classes.dir}' classpathref='build.classpath' verbose='false' encoding='iso-8859-1'>     <src refid='source.path' />     </javac>    <!-- copy resources from src to bin -->   <copy todir='${classes.dir}' preservelastmodified='true'>     <fileset refid='source.path'>         <include name='**/*'/>         <!--         patternset refid='not.java.files'/>         -->     </fileset>   </copy> </target> 

The task runs successfully, but I cannot get the to work – it is supposed to copy all non-java files over too to emulate the behaviour of eclipse.

So, I have a pathId named source.path which contains multiple directories, which I somehow needs to massage into something the copy-task like. I have tried nesting which is not valid, and some other wild guesses.

How can I do this – thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:01:26+00:00Added an answer on May 11, 2026 at 3:01 pm

    You could use the foreach task from the ant-contrib library:

    <target name='build'>     ...      <!-- copy resources from src to bin -->     <foreach target='copy.resources' param='resource.dir'>         <path refid='source.path'/>     </foreach> </target>  <target name='copy.resources'>     <copy todir='${classes.dir}' preservelastmodified='true'>         <fileset dir='${resource.dir}' exclude='**/*.java'>     </copy> </target> 

    If your source.path contains file paths as well then you could the if task (also from ant-contrib) to prevent attempting to copy files for a file path, e.g.

    <target name='copy.resources'>     <if>         <available file='${classes.dir}' type='dir'/>         <then>             <copy todir='${classes.dir}' preservelastmodified='true'>                 <fileset dir='${resource.dir}' exclude='**/*.java'>             </copy>         </then>     </if> </target> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

I am trying to get SpecUnit to run in a continuous integration build using
I am trying to get some accurate runtime comparisons of PHP vs Python (and
I am trying to get a DataGrid under CE 5.0 / .NET CF 2.0
I am trying to get the Edit with Vim context menu to open files

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.