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 774421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:07:45+00:00 2026-05-14T19:07:45+00:00

Based on http://ant.apache.org/manual/Types/mapper.html Here’s my target: <target name=ms.copy-example> <copy todir=${ms.custom}> <fileset dir=${ms.example}> <include name=build.xml

  • 0

Based on http://ant.apache.org/manual/Types/mapper.html

Here’s my target:

 <target name="ms.copy-example">
  <copy todir="${ms.custom}">
   <fileset dir="${ms.example}">
    <include name="build.xml" />
   </fileset>
   <scriptmapper language="javascript">
     self.addMappedName("dir1/"+source);
     self.addMappedName("dir2/"+source);
     self.addMappedName("dir3/"+source);
   </scriptmapper>
  </copy>
 </target>

I’m trying to copy one file to three places. I don’t have to use a ‘scriptmapper’ to do this, but I didn’t see any other way to do it. What’s happening, though, is that it’s only copying the file into the first directory in the list (dir1) and not the other two (dir2, dir3).

Anyone suggestions?

  • 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. Editorial Team
    Editorial Team
    2026-05-14T19:07:46+00:00Added an answer on May 14, 2026 at 7:07 pm

    The scriptmapper is working, but by default, the copy task only copies to one (i.e. the first mapped) target.
    To get your example to work, add enablemultiplemappings="true" or similar to the copy:

    <copy todir="${ms.custom}" enablemultiplemappings="true">
    

    From the docs for copy task option enablemultiplemappings:

    If true the task will process to all
    the mappings for a given source path.
    If false the task will only process
    the first file or directory. This
    attribute is only relevant if there is
    a mapper subelement. (since Ant 1.6.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a force base graph layout algorithm, based on http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing )
I'm using a java based uploading construct http://www.javaatwork.com/java-upload-applet/details.html that I tried running over night.
Based on http://checkstyle.sourceforge.net/config_regexp.html I am trying to find hard coded occurance of same strings.
Based on http://developer.android.com/guide/topics/data/data-storage.html#db it seems like I'd need another Java Class file (which I
I am trying to implement a HTTP based chat here. All the chat messages
Based on http://www.mredkj.com/javascript/nfbasic2.html , following code will result in 5.6e+2 . num = 555.55;
Based on http://www.thinkingguy.net/2010/01/localizing-labelfor-in-aspnet-mvc-2.html I'm trying to use reflection to get to a string property
Based on http://ie.microsoft.com/testdrive/HTML5/ECMAScript5Array/Default.html , I thought IE9 supports indexOf in array but the following
This is based on: http://nhforge.org/blogs/nhibernate/archive/2011/03/03/effective-nhibernate-session-management-for-web-apps.aspx Code is here: https://gist.github.com/852307 My questions are, in the
I've build my own basic blog-tool with Rails 3.1 based upon http://ruby.railstutorial.org/ruby-on-rails-tutorial-book and with

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.