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.
It’s hard to know what problems you are having with this. Perhaps this program will help?
output