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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:52:04+00:00 2026-05-21T07:52:04+00:00

At build time, I am updating some variables that are stored in the web.xml

  • 0

At build time, I am updating some variables that are stored in the web.xml file using variables in a properties file, Is there a way to simplify what I am doing here:

    <target name="war-test" depends="compile">
            <mkdir dir="${dist}"/>
            <mkdir dir="${dist}/tmp"/>
            <copy file="WebContent/WEB-INF/web.xml.templ" tofile="${dist}/tmp/web.xml">
                    <filterchain>
                            <replacetokens>
                                    <token key="smtp.hostname" value="${test.smtp.hostname}"/>
                                    <token key="smtp.port" value="${test.smtp.port}"/>
                            </replacetokens>
                    </filterchain>
            </copy>
            <war destfile="${dist}/mywarfile-test.war" webxml="${dist}/tmp/web.xml">
                    <fileset dir="WebContent">
                            <exclude name="META-INF/**"/>
                            <exclude name="META-INF"/>
                            <exclude name="WEB-INF/**"/>
                            <exclude name="WEB-INF"/>
                    </fileset>
                    <lib dir="lib">
                            <exclude name="somelibrary.jar"/>
                    </lib>
                    <classes dir="${build}"/>
            </war>
            <delete dir="${dist}/tmp"/>
            <antcall target="clean"/>
    </target>

Do I need to make the tmp directory?

  • 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-21T07:52:05+00:00Added an answer on May 21, 2026 at 7:52 am

    You need to put the web.xml in a temporary location if you do not want to copy it directly to WebContent/WEB-INF and remove the exclude for that folder.
    There is no subelement for <war> that lets you create it on the fly, as there is for the manifest.

    As oers says there seems to be something strange, typo or similar.
    You create “${dist}/metainf/web.xml but include “${dist}/tmp/web.xml.

    If you want less lines you can replace the filter chain with:

    <filterset>
        <filter token="smtp.hostname" value="${test.smtp.hostname}" />
        <filter token="smtp.port" value="${test.smtp.port}" />
    </filterset>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have for some time build n-tier Applications using a database server as the
I have some experience of developing in Flex/Actionscript using Cairngorm framework. At that time
Simple question :) How can I reduce build time using a parallel build /
i'm trying to build an application that every given time, will connect to a
i try to build a app that is in landsscape mode all the time.
Is there a way to do an automatic deployment to my local rsa web
Is there any way to easily use a remote javascript file as a content
I found out that build time of C# solution with many projects gets much
For the optimum build time for Android Source code building (or any other Linux
From time to time I need to run a full build of the entire

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.