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

Related Questions

I am trying get the data from my database but i am not getting
I am trying get my first simple project in rails to run. I have
I am trying get the Regex right for the following scenario but have some
I am trying get Struts 2 and Tiles to work and I am using
Trying to get this expression to work, can someone look at it and tell
I'm trying get some licensing code from AndroidPit.com working, but I get Unable to
Hello everyone I been trying get php uploader working but having a lot of
Trying to get all articles, with unique titles (distinct(title)), that have a body of
I'm trying get LocalConnection to work between two swf's placed within two different IFRAMES.
I'm trying get url contents with file_get_contents(), its works in my localhost server, but

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.