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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:39:45+00:00 2026-06-01T20:39:45+00:00

I created a eclipse web project by importing a war file. Originally, there was

  • 0

I created a eclipse web project by importing a war file. Originally, there was no source code in the war file. I want to build a new war file from this project by changing dynamically the content of one properties file according to diffrent profiles, so that the built war file could be deployed in different environment (development et production).

But since there is no source code in the original war file, thus no source code in the project, after converting this project to maven project, and setting the packaging to war in the pom.xml, maven shows the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war >(default-war) on project birt: Error assembling WAR: webxml attribute is required (or pre->existing WEB-INF/web.xml if executing in update mode)

I assume this error is caused by the fact that there is no such folder (/src/main/webapp) in my project. The structure of my project is the following:

drwxrwxr-x 3 kewei kewei 4096 12 avril 15:55 build

-rw-rw-r– 1 kewei kewei 375 12 avril 16:10 pom.xml

drwxrwxr-x 3 kewei kewei 4096 12 avril 15:54 src

drwxrwxr-x 5 kewei kewei 4096 12 avril 16:12 target

drwxrwxr-x 10 kewei kewei 4096 12 avril 15:55 WebContent

There is nothing in the src folder and everything is in the WebContent folder.

I could do this job by changing the properties file and exporting the project to a war file (without maven). But is there a smarter way?

Maybe maven is not designed to do this kind of build? In this case, how can I build different wars by changing dynamically the content of properties file according to diffrent profiles?

Thanks!

  • 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-01T20:39:47+00:00Added an answer on June 1, 2026 at 8:39 pm

    If you really like to cope with the WebContent instead of the maven way where everything is under src/main/webapp etc. you can change the configuration for the maven-war-plugin to change it to your needs. But i can recoment to do the configuration only for the first step. After it’s running change the layout of the project to the maven defaults (conventsions), cause it makes life easier.

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

Sidebar

Related Questions

So my first Web and JavaScript project with EClipse: I created a File->New General
I have created a New --> Dynamic Web Project from Eclipse IDE , Modified
So I set up a new project into Eclipse and created a build.xml that
I tried to make project by selecting Archtype Web Application from Eclipse create new
I created new web project testweb. By default default output folder is testweb\build\classes .
I'm trying to build a new web app using Eclipse, I want to use
I'm creating a dynamic web project in Eclipse (almost from scratch) and I created
I have recently created a web project in Java using eclipse. I have a
I created a new project in Eclipse called Lottery. The first thing that happened
I have created a web application using Jersey and Dynamic Web Project of Eclipse.

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.