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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:30:55+00:00 2026-06-10T12:30:55+00:00

When I generate an Ant project with mvn ant:ant , the generated Ant project

  • 0

When I generate an Ant project with mvn ant:ant, the generated Ant project doesn’t filter resources to replace property tokens (e.g. ${property}). Is there an easy way to make it do so?

  • 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-06-10T12:30:56+00:00Added an answer on June 10, 2026 at 12:30 pm

    The ant plugin will generate the following files, based on your POM:

    |-- build.xml
    |-- maven-build.properties
    |-- maven-build.xml
    

    The resource filtering occurs within the “compile” target so you can override it’s behavior by copying the target into the build.xml and changing it’s behavior.

    Running the Maven ANT plugin again will not over-write this customization (Only the maven-* files are regenerated).

    Example

    build.xml

    Filterset is added to the copy task within the compile target:

    <project name="maven-ant-demo" default="package" basedir=".">
    
      <!-- ====================================================================== -->
      <!-- Import maven-build.xml into the current project                        -->
      <!-- ====================================================================== -->
    
      <import file="maven-build.xml"/>
    
      <!-- ====================================================================== -->
      <!-- Help target                                                            -->
      <!-- ====================================================================== -->
    
      <target name="help">
        <echo message="Please run: $ant -projecthelp"/>
      </target>
    
      <!-- ====================================================================== -->
      <!-- Override target                                                        -->
      <!-- Copied from "maven-build.xml"                                          -->
      <!-- ====================================================================== -->    
      <target name="compile" depends="get-deps" description="Compile the code">
        <mkdir dir="${maven.build.outputDir}"/>
        <javac destdir="${maven.build.outputDir}" 
               nowarn="false" 
               debug="true" 
               optimize="false" 
               deprecation="true" 
               target="1.1" 
               verbose="false" 
               fork="false" 
               source="1.3">
          <src>
            <pathelement location="${maven.build.srcDir.0}"/>
          </src>
          <classpath refid="build.classpath"/>
        </javac>
    
        <!--
        Note the filterset. This will perform resource filtering 
        -->
        <copy todir="${maven.build.outputDir}">
          <fileset dir="${maven.build.resourceDir.0}"/>
           <filterset begintoken="${" endtoken="}">
             <filter token="helloworld" value="${helloworld}"/>
           </filterset>
        </copy>
      </target>
    
    </project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I build my project to a Jar file with Ant, I generate javadoc
To make my Ant Generated swf as small as possible, i used the Runtime
I'm working on a project that uses NetBeans to generate the ANT build files.
I use an ANT build file to build my project and also generate the
I've generated ant build.xml for my android project, using android update project --name <project_name>
How can I take an IntelliJ generated ant build and incorporate my project's unit
I have following ant script to generate the jar file <project name=myProject basedir=. default=jar>
I am using apache ant to generate javadoc for my project. I have a
with ant it is possible to run JUnit tests and generate test reports in
As a result of an Ant process, I generate several files (the contents of

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.