Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-1135

Ozone jars are missing in the Ozone Snapshot tar

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.4.0
    • 0.4.0
    • None
    • None

    Description

      After executing an ozone dist build the library jars are missing from the created tar file.

      The problem is on the maven side. The tar file creation is called before the jar copies.

      cd hadoop-ozone/dist
      mvn clean package | grep "\-\-\-"
      [INFO] ----------------< org.apache.hadoop:hadoop-ozone-dist >-----------------
      [INFO] --------------------------------[ pom ]---------------------------------
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hadoop-ozone-dist ---
      [INFO] --- maven-antrun-plugin:1.7:run (create-testdirs) @ hadoop-ozone-dist ---
      [INFO] --- maven-remote-resources-plugin:1.5:process (default) @ hadoop-ozone-dist ---
      [INFO] --- exec-maven-plugin:1.3.1:exec (dist) @ hadoop-ozone-dist ---
      [INFO] --- exec-maven-plugin:1.3.1:exec (tar-ozone) @ hadoop-ozone-dist ---
      [INFO] --- maven-site-plugin:3.6:attach-descriptor (attach-descriptor) @ hadoop-ozone-dist ---
      [INFO] --- maven-dependency-plugin:3.0.2:build-classpath (add-classpath-descriptor) @ hadoop-ozone-dist ---
      [INFO] --- maven-dependency-plugin:3.0.2:copy (copy-classpath-files) @ hadoop-ozone-dist ---
      [INFO] --- maven-dependency-plugin:3.0.2:copy-dependencies (copy-jars) @ hadoop-ozone-dist ---
      [INFO] --- maven-jar-plugin:2.5:test-jar (default) @ hadoop-ozone-dist ---

      The right order of the plugin executions are:

      • Call 'dist' (dist-layout-stitching, it cleans the destination directory)
      • Copy the jar files (copy-classpath-files, copy-jars)
      • Create the tar package (tar-ozone)

      It could be done with adjusting the maven phases in the pom.xml

      I would suggest to move 'dist' to the 'compile' phase, move 'copy-classpath-files' and 'copy-jars' to the 'prepare-package' phase, and keep 'tar-ozone' at the 'package' phase.

      With this setup we can be sure that the steps are executed in the right order.

      Attachments

        1. HDDS-1135.00.patch
          0.9 kB
          Dinesh Chitlangia

        Activity

          People

            dineshchitlangia Dinesh Chitlangia
            shashikant Shashikant Banerjee
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: