Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand

The first issue is that the current ONAP master tagged version of the checkstyle does not work with Eclipse Oxygen/Photon (and maybe other versions) because of the "curly bracket" issue. There is a fix on the way but it's not here yet. The current tagged version of oparent we are using in Policy is 1.2.1.

Hack oparent to fix "curly bracket" issue

To get around this issue, check out oparent, checked out the 1.2.1 tag, fixed the "curly bracket" bug and built it on my local machine.

  1. Check out oparent
  2. git tag -l
  3. git co tags/1.2.3 -b 1.2.3
  4. If you want CheckStyle to ignore generated files, do the following:
    1. Add the following tag to the above file:
      <module name="SuppressionFilter">
        <property name="file" value="<absolute path to the directory of the file>/suppressions.xml"/>
      </module>
    2. Create a file called "suppressions.xml" in the folder given above, and put the following content in it:
      <?xml version="1.0"?>
      <!DOCTYPE suppressions PUBLIC
        "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
        "https://checkstyle.org/dtds/suppressions_1_2.dtd">
      <suppressions>
        <suppress files="[\\/]generated-sources[\\/]" checks="[a-zA-Z0-9]*"/>
      </suppressions>
  5. The versions in the POMs in oparent are snapshot, so we need to change those to 1.2.1
     mvn versions:set -DnewVersion=1.2.1
  6. Now build locally:
    mvn clean install

...