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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:52:46+00:00 2026-06-02T02:52:46+00:00

We are using Maven in Hudson to run our Java build process and the

  • 0

We are using Maven in Hudson to run our Java build process and the Surefire plugin to execute JUnit tests however I’ve run into a problem with the unit tests for one project which requires native dlls.

The error we’re seeing is :

Tests in error: TestFormRegistrationServiceConnection(com.#productidentifierremoved#.test.RegistrationServiceTest): no Authenticator in java.library.path

Where Authenticator is the name of the dll we require.
I found this SO post which suggest that the only way to set this is through argLine. We modified our config to this:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.10</version>
        <configuration>
            <forkMode>once</forkMode>
            <argLine>-Djava.library.path=${basedir}\src\main\native\Authenticator\Release</argLine>
        </configuration>
    </plugin>

However this still gives the same error and if we include a System.out.println(System.getProperty(“java.library.path”)); we can see that this is not being added to the path.

Any ideas how we can solve this?

  • 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-02T02:52:47+00:00Added an answer on June 2, 2026 at 2:52 am

    To add a system property to the JUnit tests, configure the Maven Surefire Plugin as follows:

    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <java.library.path>${project.basedir}/src/main/native/Authenticator/Release</java.library.path>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </build>
    

    Update:

    Ok, it seems this property has to be set before the JVM with JUnit tests starts. So I guess that you have problem with the backslashes. Backslashes in the Java property value are used to escape special characters like \t (tabulator) or \r\n (windows new-line). So try to use this instead of your solution:

    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <forkMode>once</forkMode>
            <argLine>-Djava.library.path=${project.basedir}/src/main/native/Authenticator/Release</argLine>
          </configuration>
        </plugin>
      </plugins>
    </build>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We build software using Hudson and Maven. We have C#, java and last, but
I'm using Hudson to build a Java project w/ Maven. The project includes two
Currently the my team is considering splitting our single CI build process into a
I am using maven to build my java app, Jenkins for CI and Sonar
I maintain the build for a large Java EE / Maven / Hudson /
I have been using maven projects in hudson quite successfully for some time. However
I'm using Hudson and Maven 2 for my automated build/CI. I can build fine
I'm using the maven release plugin on hudson. I'm trying to release the project.
I am using Maven (3.x) to build an Android application within Hudson. I use
I am using Maven (3.x) to build an Android application within Hudson. I use

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.