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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:56:41+00:00 2026-06-15T02:56:41+00:00

This might be a little too difficult to do with perl, but I’m hoping

  • 0

This might be a little too difficult to do with perl, but I’m hoping someone can at least help me find the correct direction to accomplish this.

Currently we have a Nexus server that is holding all of our .jar files. One of the applications needs to use 3rd party common jars that are being defined in a .properties file.

The properties file looks like this

commons-logging=commons-logging-1.1.1.jar
commons-io=commons-io-2.3.jar
httpcore=httpcore-4.2.1.jar

I am being asked to create a Perl script that will skim through this properties file, then compare that version(i.e. commons-logging-1.1.1.jar) with a version that is located elsewhere. If the version in the properties file is not the same, it will then copy the new .jar file to the common jar location.

An example
In C:\commons there is a commons-logging-1.1.0

In the properties file, it is specified that commons-logging=commons-logging-1.1.1.jar is needed. The perl script would then read the .properties file, determine that commons-logging-1.1.1 is not the same as the commons-logging-1.1.0 found in the commons folder and would replace it.

We can also use maven for something like this, but I’m not sure how we can make it so the developer can just define what jar is needed in a properties file and replace it in a specific folder.

Any help would be greatly appreciated.

  • 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-15T02:56:42+00:00Added an answer on June 15, 2026 at 2:56 am

    It’s hard to know what problems you are having with this. Perhaps this program will help?

    use strict;
    use warnings;
    
    open my $fh, '<', '.properties' or die $!;
    
    while (<$fh>) {
      if (/^([\w-]+)=\1-([\d.]+)\.jar$/) {
        my ($lib, $ver) = ($1, $2);
        print qq(Library "$lib" needs version $ver\n);
      }
      else {
        warn "Error in .properties line $.: $_";
      }
    }
    

    output

    Library "commons-logging" needs version 1.1.1
    Library "commons-io" needs version 2.3
    Library "httpcore" needs version 4.2.1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question might be little silly but I can't seem to find
This might be a simple question but I've searched and searched and can't find
This might be pushing things a little too far, but mostly out of curiosity..
This might be too little information... but why is this working opposite as I
I am afraid that this question might be a little too broad, but I
maybe this question is a little too general but maybe someone has experience the
This might be a little bit odd question, but Im trying to figure out
This might be a little bit picky, but in the iPad SplitViewController setup, there
This might be a very basic question but it confuses me. Can two different
This might be a too bigger ask, but before I outsource it, I would

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.