Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-33

Protobuf gets compiled only when both activation conditions are triggered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.1.0-alpha
    • None
    • None

    Description

      In RATIS-26 we specify the following activation conditions for compiling protobuf files:

            <activation>
              <!-- Activate this if the generated source directory is missing. It will automatically
               kick the protoc compilation if you are doing a mvn install for the first time. Otherwise
               it will only compile the resources under src/main/java as usual.  If you want to
               force-compile the proto files (for example after changing them), you should run with
               mvn install -Dcompile-protobuf -->
              <file>
                <missing>${sources.dir}</missing>
              </file>
              <property>
                <name>compile-protobuf</name>
              </property>
            </activation>
      

      This does not work after maven version 3.2.2, due to MNG-4565 that changes the activation condition relationships from OR to AND. Thus we have to do both 1) delete ratis-proto-shaded/src/main/java, and 2) include -Dcompile-protobuf in the command to trigger the protobuf compilation.

      Attachments

        1. RATIS-33.000.patch
          2 kB
          Jing Zhao
        2. RATIS-33.001.patch
          2 kB
          Jing Zhao
        3. RATIS-33.002.patch
          2 kB
          Jing Zhao
        4. RATIS-33.003.patch
          2 kB
          Jing Zhao

        Activity

          People

            jingzhao Jing Zhao
            jingzhao Jing Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: