If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
Beyond compare script for 2 level comparison of jar
We would probably need screenshots and a copy of the log to help determine what is happening in this case. 20 minutes seems too long to scan archive files. Are you using the latest release of BC3 (3.3.13)? All 3.x updates are free for 3.x users. You can email us at [email protected] with a few screenshots with Binary unchecked and binary checked to show your data loaded and the loading issue. What did you mean that the .class files are compared but the .xml and properties are not?
Please include a link back to this forum thread in the email for our reference, and a copy of your BCSupport.zip from the Help menu -> Support; Export.
With graphical interface also its showing as loading. The file comparison is running for 20 mins and still has not terminated.
Our use case is as below
parent.jar
|->child.jar
|-------->abc.class
|----------->xyz.class
|------------>test.properties
|->pom.xml
We want to compare everything inside parent jar (including child jar classes ) with another version of parent jar.
If I use session with "archive as folder always" it compare the .class files inside child jars but it is not comparing .properties and pom.xml files. So in session I have selected "Binary Comparison" as well. But if I select "Binary Comparison" it just says loading and nothing happens
Am I missing anything here? Is there any workround for this?
If nothing has happened it is probably still extracting and loading. How long have you let it load?
For all troubleshooting, I usually recommend loading in the graphical interface first. If you load the session Test, then load your .jar files into the session base folder paths.
Also, to the jar files have .zips or other archives in them? You wouldn't need the Treat Archives as Folders option enabled to set .jar files as base folders; they would still load as folders and show their contents, it is for the files within the base folders.
and the log output is
6/17/2015 11:08:16 AM >> log verbose "C:\bclogs\bclog.txt"
6/17/2015 11:08:16 AM >> criteria binary
6/17/2015 11:08:16 AM >> load "Test"
6/17/2015 11:08:16 AM Load comparison: <->
6/17/2015 11:08:16 AM >> load abc.jar xyz.jar
nothing happens after this load
Also, if you load your session in the graphical interface, and then go to the Session menu -> Session Settings, and enable the Binary content scan here, do you see any errors in the log as the comparison runs?
Can you include the text in the log of the error lines?
Treating archives as Folders would expand the archives and binary scan the contents inside. If you disable this option, then it will binary scan the archive file as a single file. It depends on which behavior you need. Scanning the archive as a single file would be faster.
The session is loading now.
But "criteria binary" line is causing problem.
If I add criteria binary in script, the script does not terminate with no errors in logs.
But if I remove it the script runs fine but the diff report doesnt show differences in pom.xml or .properties file.
I have set treat "archives as folders" in session. Is that causing any problem?
Could you attach or send in your current script.txt? I notice an error in my above example:
It should load the saved session first, THEN set criteria and load folders or filters, etc:
log verbose "C:\bclogs\bclog.txt"
load "ArchivesAsFoldersSessionName"
criteria binary
load %1 %2
expand all
I am using this solution:-
"Alternatively, you can set just this one setting in the Session Settings dialog, Handling, Always treat archives as folders. Then save the blank session. In script you can then reference this setting and then load the folders:"
But the child jar is showing all the files and not just the modified files.
Can you please help here?
Scripting does not have a direct option to support this, but you can save a session with this setting set, and then use that session to control the option.
To set this up, go to the graphical interface and launch a new blank Folder Compare. Here you can either configure everything to load the folders, criteria, settings.
Alternatively, you can set just this one setting in the Session Settings dialog, Handling, Always treat archives as folders. Then save the blank session. In script you can then reference this setting and then load the folders:
Beyond compare script for 2 level comparison of jar
Hi There,
We want to compare the jar referenced inside the jar ie 2 level comparison of artifacts.
Please help us with script. We have below script which compares on the given jar but not the jar inside it.
We are not able to drill down and check the changes in child jar.
Leave a comment: