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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:33:05+00:00 2026-05-24T11:33:05+00:00

My Hudson job calls a single XML database collection and a single log file.

  • 0

My Hudson job calls a single XML database collection and a single log file. E.g.

  • /db/project
  • ${user.home}/logs/logging.log

I’d like to inject Hudson’s env.EXECUTOR_NUMBER in both paths to avoid concurrent execution clashes. E.g.

  • /db/project {$EXECUTOR_NUMBER}
  • {$user.home}/logs {$EXECUTOR_NUMBER}/logging.log

I’ve found out the following:

  • Hudson site states that I need to pass Hudson’s EXECUTOR_NUMBER to Maven as part of the build goal.
  • Log4J can only use system variables not environment variables (as these are a platform specific concept)

Now that I’ve got Hudson’s EXECUTOR_NUMBER variable specified in the build goal, how can I use this as a system property for use by Log4J and Java’s System.getProperties() class?

  • 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-24T11:33:07+00:00Added an answer on May 24, 2026 at 11:33 am

    You can pass System Properties to any Java process using the -D syntax.

    mvn clean install -DEXECUTOR_NUMBER={$EXECUTOR_NUMBER}
    

    For a test class in a forked run, you will additionally have to configure the surefire plugin to pass the system property to the forked vm:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <systemPropertyVariables>
            <EXECUTOR_NUMBER>${EXECUTOR_NUMBER}</EXECUTOR_NUMBER>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added a new job in my hudson server which builds the project
Using a Clearcase Dynamic view, Hudson's job log shows cleartool 's lsview , startview
I am using Hudson CI server with a project (or job) that is hosted
I've created a hudson job for our maven multi-project with 5 modules to deploy
I have such a situation : one hudson job for one project that is
I would like our Hudson deploy job to output a changelog of all Subversion
I have a Hudson job that launches a .bat script file that itself launches
When using the Git plugin for Hudson my job always fails when fetching the
Hudson CI server displays stability weather which is cool. And it allows one project
Environment: hudson/sonar/maven2 in ubuntu locally with default parameters And I got the log from

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.