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

  • Home
  • SEARCH
  • 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 115023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:57:13+00:00 2026-05-11T02:57:13+00:00

In a J2EE web application, how do people manage resources so that they are

  • 0

In a J2EE web application, how do people manage resources so that they are visible to both the web context and to unit/integration tests?

I find that often you end up having your source/resource folders configured a certain way during development (i.e., what Maven expects) and so your unit tests will run in your IDE. But once the web app is built and packaged into a WAR file (i.e., when your Continuous Integration server has done a build) your unit tests won’t run anymore because the resources are located elsewhere.

Do you end up keeping resources in two different places and manually keeping them in sync?

  • 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-11T02:57:13+00:00Added an answer on May 11, 2026 at 2:57 am

    Normally this is the reason for multi-module builds. The external services are in a separate build unit than the web application. So you build, package and run your integrations tests when you build that module.

    Another module can contain your domain model and its unit tests, which are also run at build time.

    It is quite common for a module that results in a WAR to not have any java code in it at all, but only web related artifacts. Although not necessary, this is often done because code that is in a war module cannot be included into another module.

    The last special case is the module containing web-tests. This module may often need test-scoped artifacts from the other modules (because it is testing the application from the outside, but may need data from the inside). This can be solves by also packaging test-resources in jar files, creating a separate set of ‘test’ jar files for each modules.

    Multi module builds are the norm for maven projects, and are also easy to set up for other build systems like ant.

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

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Here is the proper answer too: http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=50456&ANCHOR&ProjectName=CompositeWPF May 11, 2026 at 11:02 am
  • added an answer If you open the certificate up in notepad and it… May 11, 2026 at 11:02 am
  • added an answer You could hook the Changed event, and set the value… May 11, 2026 at 11:02 am

Related Questions

In a J2EE web application, how do people manage resources so that they are
Is it possible to configure two separate web apps (WAR) in a J2EE application
Is there a ColdFusion analog for the deployment descriptor/web.xml file found in a J2EE
I have a question regarding handling errors in a J2EE application. Our current application
I have a J2EE project in Eclipse 3.2 and at the end of every
in eclipse, i have a weblogic server running, and a j2ee application deployed to
Given a large API (an in particular, the Java or J2EE standard libraries), is
How can I instantiate a JMS queue listener in java (JRE /JDK / J2EE
In a C# (feel free to answer for other languages) loop, what's the difference
In a desktop application needing some serious re-factoring, I have several chunks of code

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.