Announcement

Collapse
No announcement yet.

Pom File rule - how to?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pom File rule - how to?

    Hi,
    I have two maven projects that with a lot modules, each one with a pom.xml file.
    I compare all folders to make it easier to see the differences and do the necessary merges. But many of the poms there are no differences, except the version. How could I set some rule to not consider the version? I don't want during the comparasion, that beyond compare mark the version as different.
    Example:
    Project a, pom.xml:
    <parent>
    <groupId>company.cust.on</groupId>
    <artifactId>cus.on.parentt</artifactId>
    <version>30.0.0-SNAPSHOT</version>
    <relativePath>../cust-on-parent</relativePath>
    </parent>
    Project b, pom.xml:
    <parent>
    <groupId>company.cust.on</groupId>
    <artifactId>cus.on.parentt</artifactId>
    <version>9.0.0.0-SNAPSHOT</version>
    <relativePath>../cust-on-parent</relativePath>
    </parent>

    Can anyone help?
    Thanks in advance

  • #2
    Hello,

    Yes, you can define a grammar element to ignore this <version> node with a RegEx or a Delimited Type, and create a new File Format: new Text format for pom.xml with the extension pom.xml, or update the general XML format for all *.xml files.

    We have a KB article about updating the grammar and importance here: http://www.scootersoftware.com/suppo..._unimportantv3

    Then, the Folder Compare running a Rules-based scan would use the default Text Compare session settings, which you can update to make this grammar Unimportant by default on the Home screen, in the Saved Sessions list, expand the New folder, select Text Compare, and uncheck the grammar name here.
    Aaron P Scooter Software

    Comment

    Working...
    X