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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:05:02+00:00 2026-05-12T11:05:02+00:00

The Junits I have in my project need to load property files from the

  • 0

The Junits I have in my project need to load property files from the classpath. How can I specify the directory of those property files so that Maven will set that in the classpath before running the tests?

  • 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-12T11:05:02+00:00Added an answer on May 12, 2026 at 11:05 am

    You can use the build-helper-maven-plugin to specify additional test-resource directories as follows. Using the configuration below, the contents of the test-resources directory will be copied to the target/test-classes directory during the generate-test-sources phase:

    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>build-helper-maven-plugin</artifactId>
      <version>1.12</version>
      <executions>
        <execution>
          <id>add-test-resource</id>
          <phase>generate-test-sources</phase>
          <goals>
            <goal>add-test-resource</goal>
          </goals>
          <configuration>
            <resources>
              <resource>
                <directory>path/to/additional/test/resources</directory>
                <excludes>
                  <exclude>**/folder-to-exclude/**</exclude>
                </excludes>
              </resource>
            </resources>
          </configuration>
        </execution> 
      </executions>
    </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a maven project that converts text files of a specific format to
In a maven project I have some junit tests where I need to refer
I have a project that uses the normal Maven structure, e.g. module \ src
I have setup an android test project that runs junit tests. It's using two
I have this JUnit test that I need help developing a Interface and Class
I'm dipping my toes into Android development. I have a project that will interface
I have an extremely odd problem in my JUnit tests that I just can't
I have the same problem as Junit4 and TestNG in one project with Maven
I have a mavenized project with dependencies upon 4 others mavenized projects that my
I have a project which uses the following maven dependencies: <dependency> <groupId>com.dropbox</groupId> <artifactId>client2</artifactId> <version>1.3</version>

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.